diff --git a/catalyst_voices/Earthfile b/catalyst_voices/Earthfile index 82dbe168a0..ac0085d1f6 100644 --- a/catalyst_voices/Earthfile +++ b/catalyst_voices/Earthfile @@ -19,35 +19,6 @@ builder: COPY +repo-catalyst-voices/repo . DO flutter-ci+BOOTSTRAP -# Generates flutter code. -# Based on Catalyst Gateway OpenAPI specifications generates models, clients -# and serialization logic. -# It accepts [save_locally] ARG that when true place the artifacts in the -# proper folder of `catalyst_voices_services` local code. -code-generator: - ARG save_locally=false - - LET gen_code_path = lib/generated/catalyst_gateway - LET local_gen_code_path = packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/ - - FROM +builder - WORKDIR packages/internal/catalyst_voices_services - COPY catalyst-gateway+build/doc/cat-gateway-api.json openapi/cat-gateway-api.json - DO flutter-ci+OPENAPI_CODE_GEN \ - --SAVE_LOCALLY=$save_locally \ - --GEN_CODE_PATH=$gen_code_path \ - --LOCAL_GEN_CODE_PATH=$local_gen_code_path - -# Tests that the code generation is consistent -# with the generated code currently in the repo. -# This MUST be a test target because it requires artifacts from build targets. -test-flutter-code-generator: - FROM +code-generator - # Copy generated files in the local file tree to a temporary folder - COPY packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway /tmp/repo_generated - # Check diff between local code and earthly artifacts - RUN diff /tmp/repo_generated lib/generated/catalyst_gateway - # Runs static analysis on the code. check-static-analysis: FROM +builder diff --git a/catalyst_voices/apps/voices/integration_test/Earthfile b/catalyst_voices/apps/voices/integration_test/Earthfile index d4df74940d..cf7357aef1 100644 --- a/catalyst_voices/apps/voices/integration_test/Earthfile +++ b/catalyst_voices/apps/voices/integration_test/Earthfile @@ -23,7 +23,7 @@ integration-test-web: # END RUN ($driver --port=$driver_port > $driver.log &) && \ sleep 5 && \ - flutter drive --driver=test_driver/integration_tests.dart \ + flutter drive --driver=test_driver/integration_tests.dart --verbose \ --target=integration_test/app_test.dart \ -d web-server --browser-name=$browser --driver-port=$driver_port \ # https://github.com/flutter/flutter/issues/154727 diff --git a/catalyst_voices/justfile b/catalyst_voices/justfile index a0086e2844..98870b8739 100755 --- a/catalyst_voices/justfile +++ b/catalyst_voices/justfile @@ -15,13 +15,5 @@ check-code: test-code: earthly +test-unit -# Generates gateway services in packages/internal/catalyst_voices_services -generate-gateway-services: - cd .. && earthly ./catalyst_voices+code-generator --platform=linux/amd64 --save_locally=true - -# Test generated gateway services -test-gateway-services: - cd .. && earthly ./catalyst_voices+test-flutter-code-generator --platform=linux/amd64 - # Pre Push Checks pre-push: check-code diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/README.md b/catalyst_voices/packages/internal/catalyst_voices_services/README.md index 7b8e3d41d8..7a752204a2 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_services/README.md +++ b/catalyst_voices/packages/internal/catalyst_voices_services/README.md @@ -1,37 +1 @@ # Catalyst Voices Services - -## Automated Code Generation - -This package is used for the code generation from the OpenAPI specifications. -It leverages `swagger_dart_code_generator` library and the artifacts generated -for the documentation of the `catalyst-gateway` backend. -The process consists in 3 simple steps: - -1. The OpenAPI specification is picked from the artifact generated in the -`Earthfile` of `catalyst-gateway`. -2. The code is generated and saved as an artifact in the `Earthfile` of -`catalyst_voices` -3. Generated code is placed in the proper location within the `catalyst_voices` -project (`packages/catalyst_voices_services/lib/generated/catalyst_gateway`) -and it's ready for local usage. - -This process can be achieved by executing from the `catalyst_voices` root -folder: - -```sh -earthly +code-generator --platform=linux/amd64 --save_locally=true -``` - -The `--platform=linux/amd64` flag is necessary only when running the command from -a different platform such as **Windows** or **macOS**. -It ensures that the code generation process is compatible with the target platform. -If you are running the command on a **Linux** platform, you can omit this flag. - -In this way it's possible to locally generate the code using the same version of -OpenAPI specs defined in the backend code and developers have full control of -what should be committed. - -To ensure the consistency of the generated code (especially when backend changes -occur) an earthly target is automatically executed on PR against main. -This `+test-flutter-code-generator` generates the code on the CI and compares -it with the code currently in repo, failing if there is an inconsistency. diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart deleted file mode 100644 index a88cc123f5..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; -import 'package:collection/collection.dart'; - -enum DeepQueryInspectionFlag { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('enabled') - enabled('enabled'), - @JsonValue('disabled') - disabled('disabled'); - - final String? value; - - const DeepQueryInspectionFlag(this.value); -} - -enum LogLevel { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('debug') - debug('debug'), - @JsonValue('info') - info('info'), - @JsonValue('warn') - warn('warn'), - @JsonValue('error') - error('error'); - - final String? value; - - const LogLevel(this.value); -} - -enum Network { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('mainnet') - mainnet('mainnet'), - @JsonValue('preprod') - preprod('preprod'), - @JsonValue('preview') - preview('preview'); - - final String? value; - - const Network(this.value); -} - -enum ReasonRejected { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('FragmentAlreadyInLog') - fragmentalreadyinlog('FragmentAlreadyInLog'), - @JsonValue('FragmentInvalid') - fragmentinvalid('FragmentInvalid'), - @JsonValue('PreviousFragmentInvalid') - previousfragmentinvalid('PreviousFragmentInvalid'), - @JsonValue('PoolOverflow') - pooloverflow('PoolOverflow'); - - final String? value; - - const ReasonRejected(this.value); -} - -enum VoterGroupId { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('rep') - rep('rep'), - @JsonValue('direct') - direct('direct'); - - final String? value; - - 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/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart deleted file mode 100644 index a2f5526c24..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart +++ /dev/null @@ -1,3073 +0,0 @@ -// ignore_for_file: type=lint - -import 'package:json_annotation/json_annotation.dart'; -import 'package:collection/collection.dart'; -import 'dart:convert'; - -import 'cat_gateway_api.enums.swagger.dart' as enums; - -part 'cat_gateway_api.models.swagger.g.dart'; - -@JsonSerializable(explicitToJson: true) -class AccountVote { - const AccountVote({ - required this.votePlanId, - required this.votes, - }); - - factory AccountVote.fromJson(Map json) => - _$AccountVoteFromJson(json); - - static const toJsonFactory = _$AccountVoteToJson; - Map toJson() => _$AccountVoteToJson(this); - - @JsonKey(name: 'vote_plan_id') - final String votePlanId; - @JsonKey(name: 'votes', defaultValue: []) - final List votes; - static const fromJsonFactory = _$AccountVoteFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is AccountVote && - (identical(other.votePlanId, votePlanId) || - const DeepCollectionEquality() - .equals(other.votePlanId, votePlanId)) && - (identical(other.votes, votes) || - const DeepCollectionEquality().equals(other.votes, votes))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(votePlanId) ^ - const DeepCollectionEquality().hash(votes) ^ - runtimeType.hashCode; -} - -extension $AccountVoteExtension on AccountVote { - AccountVote copyWith({String? votePlanId, List? votes}) { - return AccountVote( - votePlanId: votePlanId ?? this.votePlanId, votes: votes ?? this.votes); - } - - AccountVote copyWithWrapped( - {Wrapped? votePlanId, Wrapped>? votes}) { - return AccountVote( - votePlanId: (votePlanId != null ? votePlanId.value : this.votePlanId), - votes: (votes != null ? votes.value : this.votes)); - } -} - -@JsonSerializable(explicitToJson: true) -class BlockDate { - const BlockDate({ - required this.epoch, - required this.slotId, - }); - - factory BlockDate.fromJson(Map json) => - _$BlockDateFromJson(json); - - static const toJsonFactory = _$BlockDateToJson; - Map toJson() => _$BlockDateToJson(this); - - @JsonKey(name: 'epoch') - final int epoch; - @JsonKey(name: 'slot_id') - final int slotId; - static const fromJsonFactory = _$BlockDateFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is BlockDate && - (identical(other.epoch, epoch) || - const DeepCollectionEquality().equals(other.epoch, epoch)) && - (identical(other.slotId, slotId) || - const DeepCollectionEquality().equals(other.slotId, slotId))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(epoch) ^ - const DeepCollectionEquality().hash(slotId) ^ - runtimeType.hashCode; -} - -extension $BlockDateExtension on BlockDate { - BlockDate copyWith({int? epoch, int? slotId}) { - return BlockDate(epoch: epoch ?? this.epoch, slotId: slotId ?? this.slotId); - } - - BlockDate copyWithWrapped({Wrapped? epoch, Wrapped? slotId}) { - return BlockDate( - epoch: (epoch != null ? epoch.value : this.epoch), - slotId: (slotId != null ? slotId.value : this.slotId)); - } -} - -@JsonSerializable(explicitToJson: true) -class Cip36Info { - const Cip36Info({ - required this.stakePubKey, - required this.nonce, - required this.slotNo, - required this.txn, - required this.voteKey, - required this.paymentAddress, - required this.isPayable, - required this.cip36, - }); - - factory Cip36Info.fromJson(Map json) => - _$Cip36InfoFromJson(json); - - static const toJsonFactory = _$Cip36InfoToJson; - Map toJson() => _$Cip36InfoToJson(this); - - @JsonKey(name: 'stake_pub_key') - final String stakePubKey; - @JsonKey(name: 'nonce') - final int nonce; - @JsonKey(name: 'slot_no') - final int slotNo; - @JsonKey(name: 'txn') - final int txn; - @JsonKey(name: 'vote_key') - final String voteKey; - @JsonKey(name: 'payment_address') - final String paymentAddress; - @JsonKey(name: 'is_payable') - final bool isPayable; - @JsonKey(name: 'cip36') - final bool cip36; - static const fromJsonFactory = _$Cip36InfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Cip36Info && - (identical(other.stakePubKey, stakePubKey) || - const DeepCollectionEquality() - .equals(other.stakePubKey, stakePubKey)) && - (identical(other.nonce, nonce) || - const DeepCollectionEquality().equals(other.nonce, nonce)) && - (identical(other.slotNo, slotNo) || - const DeepCollectionEquality().equals(other.slotNo, slotNo)) && - (identical(other.txn, txn) || - const DeepCollectionEquality().equals(other.txn, txn)) && - (identical(other.voteKey, voteKey) || - const DeepCollectionEquality() - .equals(other.voteKey, voteKey)) && - (identical(other.paymentAddress, paymentAddress) || - const DeepCollectionEquality() - .equals(other.paymentAddress, paymentAddress)) && - (identical(other.isPayable, isPayable) || - const DeepCollectionEquality() - .equals(other.isPayable, isPayable)) && - (identical(other.cip36, cip36) || - const DeepCollectionEquality().equals(other.cip36, cip36))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(stakePubKey) ^ - const DeepCollectionEquality().hash(nonce) ^ - const DeepCollectionEquality().hash(slotNo) ^ - const DeepCollectionEquality().hash(txn) ^ - const DeepCollectionEquality().hash(voteKey) ^ - const DeepCollectionEquality().hash(paymentAddress) ^ - const DeepCollectionEquality().hash(isPayable) ^ - const DeepCollectionEquality().hash(cip36) ^ - runtimeType.hashCode; -} - -extension $Cip36InfoExtension on Cip36Info { - Cip36Info copyWith( - {String? stakePubKey, - int? nonce, - int? slotNo, - int? txn, - String? voteKey, - String? paymentAddress, - bool? isPayable, - bool? cip36}) { - return Cip36Info( - stakePubKey: stakePubKey ?? this.stakePubKey, - nonce: nonce ?? this.nonce, - slotNo: slotNo ?? this.slotNo, - txn: txn ?? this.txn, - voteKey: voteKey ?? this.voteKey, - paymentAddress: paymentAddress ?? this.paymentAddress, - isPayable: isPayable ?? this.isPayable, - cip36: cip36 ?? this.cip36); - } - - Cip36Info copyWithWrapped( - {Wrapped? stakePubKey, - Wrapped? nonce, - Wrapped? slotNo, - Wrapped? txn, - Wrapped? voteKey, - Wrapped? paymentAddress, - Wrapped? isPayable, - Wrapped? cip36}) { - return Cip36Info( - stakePubKey: - (stakePubKey != null ? stakePubKey.value : this.stakePubKey), - nonce: (nonce != null ? nonce.value : this.nonce), - slotNo: (slotNo != null ? slotNo.value : this.slotNo), - txn: (txn != null ? txn.value : this.txn), - voteKey: (voteKey != null ? voteKey.value : this.voteKey), - paymentAddress: (paymentAddress != null - ? paymentAddress.value - : this.paymentAddress), - isPayable: (isPayable != null ? isPayable.value : this.isPayable), - cip36: (cip36 != null ? cip36.value : this.cip36)); - } -} - -@JsonSerializable(explicitToJson: true) -class Cip36Reporting { - const Cip36Reporting({ - required this.cip36, - required this.invalids, - }); - - factory Cip36Reporting.fromJson(Map json) => - _$Cip36ReportingFromJson(json); - - static const toJsonFactory = _$Cip36ReportingToJson; - Map toJson() => _$Cip36ReportingToJson(this); - - @JsonKey(name: 'cip36', defaultValue: []) - final List cip36; - @JsonKey(name: 'invalids', defaultValue: []) - final List invalids; - static const fromJsonFactory = _$Cip36ReportingFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Cip36Reporting && - (identical(other.cip36, cip36) || - const DeepCollectionEquality().equals(other.cip36, cip36)) && - (identical(other.invalids, invalids) || - const DeepCollectionEquality() - .equals(other.invalids, invalids))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(cip36) ^ - const DeepCollectionEquality().hash(invalids) ^ - runtimeType.hashCode; -} - -extension $Cip36ReportingExtension on Cip36Reporting { - Cip36Reporting copyWith( - {List? cip36, List? invalids}) { - return Cip36Reporting( - cip36: cip36 ?? this.cip36, invalids: invalids ?? this.invalids); - } - - Cip36Reporting copyWithWrapped( - {Wrapped>? cip36, - Wrapped>? invalids}) { - return Cip36Reporting( - cip36: (cip36 != null ? cip36.value : this.cip36), - invalids: (invalids != null ? invalids.value : this.invalids)); - } -} - -@JsonSerializable(explicitToJson: true) -class Cip36ReportingList { - const Cip36ReportingList({ - required this.cip36, - }); - - factory Cip36ReportingList.fromJson(Map json) => - _$Cip36ReportingListFromJson(json); - - static const toJsonFactory = _$Cip36ReportingListToJson; - Map toJson() => _$Cip36ReportingListToJson(this); - - @JsonKey(name: 'cip36', defaultValue: []) - final List cip36; - static const fromJsonFactory = _$Cip36ReportingListFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Cip36ReportingList && - (identical(other.cip36, cip36) || - const DeepCollectionEquality().equals(other.cip36, cip36))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(cip36) ^ runtimeType.hashCode; -} - -extension $Cip36ReportingListExtension on Cip36ReportingList { - Cip36ReportingList copyWith({List? cip36}) { - return Cip36ReportingList(cip36: cip36 ?? this.cip36); - } - - Cip36ReportingList copyWithWrapped({Wrapped>? cip36}) { - return Cip36ReportingList( - cip36: (cip36 != null ? cip36.value : this.cip36)); - } -} - -@JsonSerializable(explicitToJson: true) -class ConfigBadRequest { - const ConfigBadRequest({ - required this.error, - this.schemaValidationErrors, - }); - - factory ConfigBadRequest.fromJson(Map json) => - _$ConfigBadRequestFromJson(json); - - static const toJsonFactory = _$ConfigBadRequestToJson; - Map toJson() => _$ConfigBadRequestToJson(this); - - @JsonKey(name: 'error') - final String error; - @JsonKey(name: 'schema_validation_errors', defaultValue: []) - final List? schemaValidationErrors; - static const fromJsonFactory = _$ConfigBadRequestFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is ConfigBadRequest && - (identical(other.error, error) || - const DeepCollectionEquality().equals(other.error, error)) && - (identical(other.schemaValidationErrors, schemaValidationErrors) || - const DeepCollectionEquality().equals( - other.schemaValidationErrors, schemaValidationErrors))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(error) ^ - const DeepCollectionEquality().hash(schemaValidationErrors) ^ - runtimeType.hashCode; -} - -extension $ConfigBadRequestExtension on ConfigBadRequest { - ConfigBadRequest copyWith( - {String? error, List? schemaValidationErrors}) { - return ConfigBadRequest( - error: error ?? this.error, - schemaValidationErrors: - schemaValidationErrors ?? this.schemaValidationErrors); - } - - ConfigBadRequest copyWithWrapped( - {Wrapped? error, - Wrapped?>? schemaValidationErrors}) { - return ConfigBadRequest( - error: (error != null ? error.value : this.error), - schemaValidationErrors: (schemaValidationErrors != null - ? schemaValidationErrors.value - : this.schemaValidationErrors)); - } -} - -@JsonSerializable(explicitToJson: true) -class ContentErrorDetail { - const ContentErrorDetail({ - this.loc, - this.msg, - this.type, - }); - - factory ContentErrorDetail.fromJson(Map json) => - _$ContentErrorDetailFromJson(json); - - static const toJsonFactory = _$ContentErrorDetailToJson; - Map toJson() => _$ContentErrorDetailToJson(this); - - @JsonKey(name: 'loc', defaultValue: []) - final List? loc; - @JsonKey(name: 'msg') - final String? msg; - @JsonKey(name: 'type') - final String? type; - static const fromJsonFactory = _$ContentErrorDetailFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is ContentErrorDetail && - (identical(other.loc, loc) || - const DeepCollectionEquality().equals(other.loc, loc)) && - (identical(other.msg, msg) || - const DeepCollectionEquality().equals(other.msg, msg)) && - (identical(other.type, type) || - const DeepCollectionEquality().equals(other.type, type))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(loc) ^ - const DeepCollectionEquality().hash(msg) ^ - const DeepCollectionEquality().hash(type) ^ - runtimeType.hashCode; -} - -extension $ContentErrorDetailExtension on ContentErrorDetail { - ContentErrorDetail copyWith({List? loc, String? msg, String? type}) { - return ContentErrorDetail( - loc: loc ?? this.loc, msg: msg ?? this.msg, type: type ?? this.type); - } - - ContentErrorDetail copyWithWrapped( - {Wrapped?>? loc, - Wrapped? msg, - Wrapped? type}) { - return ContentErrorDetail( - loc: (loc != null ? loc.value : this.loc), - msg: (msg != null ? msg.value : this.msg), - type: (type != null ? type.value : this.type)); - } -} - -@JsonSerializable(explicitToJson: true) -class DelegatePublicKey { - const DelegatePublicKey({ - required this.address, - }); - - factory DelegatePublicKey.fromJson(Map json) => - _$DelegatePublicKeyFromJson(json); - - static const toJsonFactory = _$DelegatePublicKeyToJson; - Map toJson() => _$DelegatePublicKeyToJson(this); - - @JsonKey(name: 'address') - final String address; - static const fromJsonFactory = _$DelegatePublicKeyFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is DelegatePublicKey && - (identical(other.address, address) || - const DeepCollectionEquality().equals(other.address, address))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(address) ^ runtimeType.hashCode; -} - -extension $DelegatePublicKeyExtension on DelegatePublicKey { - DelegatePublicKey copyWith({String? address}) { - return DelegatePublicKey(address: address ?? this.address); - } - - DelegatePublicKey copyWithWrapped({Wrapped? address}) { - return DelegatePublicKey( - address: (address != null ? address.value : this.address)); - } -} - -@JsonSerializable(explicitToJson: true) -class Delegation { - const Delegation({ - required this.votingKey, - required this.power, - }); - - factory Delegation.fromJson(Map json) => - _$DelegationFromJson(json); - - static const toJsonFactory = _$DelegationToJson; - Map toJson() => _$DelegationToJson(this); - - @JsonKey(name: 'voting_key') - final String votingKey; - @JsonKey(name: 'power') - final int power; - static const fromJsonFactory = _$DelegationFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Delegation && - (identical(other.votingKey, votingKey) || - const DeepCollectionEquality() - .equals(other.votingKey, votingKey)) && - (identical(other.power, power) || - const DeepCollectionEquality().equals(other.power, power))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(votingKey) ^ - const DeepCollectionEquality().hash(power) ^ - runtimeType.hashCode; -} - -extension $DelegationExtension on Delegation { - Delegation copyWith({String? votingKey, int? power}) { - return Delegation( - votingKey: votingKey ?? this.votingKey, power: power ?? this.power); - } - - Delegation copyWithWrapped( - {Wrapped? votingKey, Wrapped? power}) { - return Delegation( - votingKey: (votingKey != null ? votingKey.value : this.votingKey), - power: (power != null ? power.value : this.power)); - } -} - -@JsonSerializable(explicitToJson: true) -class Delegations { - const Delegations({ - required this.delegations, - }); - - factory Delegations.fromJson(Map json) => - _$DelegationsFromJson(json); - - static const toJsonFactory = _$DelegationsToJson; - Map toJson() => _$DelegationsToJson(this); - - @JsonKey(name: 'delegations', defaultValue: []) - final List delegations; - static const fromJsonFactory = _$DelegationsFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Delegations && - (identical(other.delegations, delegations) || - const DeepCollectionEquality() - .equals(other.delegations, delegations))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(delegations) ^ runtimeType.hashCode; -} - -extension $DelegationsExtension on Delegations { - Delegations copyWith({List? delegations}) { - return Delegations(delegations: delegations ?? this.delegations); - } - - Delegations copyWithWrapped({Wrapped>? delegations}) { - return Delegations( - delegations: - (delegations != null ? delegations.value : this.delegations)); - } -} - -@JsonSerializable(explicitToJson: true) -class DirectVoter { - const DirectVoter({ - required this.votingKey, - }); - - factory DirectVoter.fromJson(Map json) => - _$DirectVoterFromJson(json); - - static const toJsonFactory = _$DirectVoterToJson; - Map toJson() => _$DirectVoterToJson(this); - - @JsonKey(name: 'voting_key') - final String votingKey; - static const fromJsonFactory = _$DirectVoterFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is DirectVoter && - (identical(other.votingKey, votingKey) || - const DeepCollectionEquality() - .equals(other.votingKey, votingKey))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(votingKey) ^ runtimeType.hashCode; -} - -extension $DirectVoterExtension on DirectVoter { - DirectVoter copyWith({String? votingKey}) { - return DirectVoter(votingKey: votingKey ?? this.votingKey); - } - - DirectVoter copyWithWrapped({Wrapped? votingKey}) { - return DirectVoter( - votingKey: (votingKey != null ? votingKey.value : this.votingKey)); - } -} - -@JsonSerializable(explicitToJson: true) -class Forbidden { - const Forbidden({ - required this.id, - required this.msg, - this.required, - }); - - factory Forbidden.fromJson(Map json) => - _$ForbiddenFromJson(json); - - static const toJsonFactory = _$ForbiddenToJson; - Map toJson() => _$ForbiddenToJson(this); - - @JsonKey(name: 'id') - final String id; - @JsonKey(name: 'msg') - final String msg; - @JsonKey(name: 'required', defaultValue: []) - final List? required; - static const fromJsonFactory = _$ForbiddenFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Forbidden && - (identical(other.id, id) || - const DeepCollectionEquality().equals(other.id, id)) && - (identical(other.msg, msg) || - const DeepCollectionEquality().equals(other.msg, msg)) && - (identical(other.required, required) || - const DeepCollectionEquality() - .equals(other.required, required))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(id) ^ - const DeepCollectionEquality().hash(msg) ^ - const DeepCollectionEquality().hash(required) ^ - runtimeType.hashCode; -} - -extension $ForbiddenExtension on Forbidden { - Forbidden copyWith({String? id, String? msg, List? required}) { - return Forbidden( - id: id ?? this.id, - msg: msg ?? this.msg, - required: required ?? this.required); - } - - Forbidden copyWithWrapped( - {Wrapped? id, - Wrapped? msg, - Wrapped?>? required}) { - return Forbidden( - id: (id != null ? id.value : this.id), - msg: (msg != null ? msg.value : this.msg), - required: (required != null ? required.value : this.required)); - } -} - -@JsonSerializable(explicitToJson: true) -class FragmentStatus { - const FragmentStatus(); - - factory FragmentStatus.fromJson(Map json) => - _$FragmentStatusFromJson(json); - - static const toJsonFactory = _$FragmentStatusToJson; - Map toJson() => _$FragmentStatusToJson(this); - - static const fromJsonFactory = _$FragmentStatusFromJson; - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => runtimeType.hashCode; -} - -@JsonSerializable(explicitToJson: true) -class FragmentsBatch { - const FragmentsBatch({ - required this.failFast, - required this.fragments, - }); - - factory FragmentsBatch.fromJson(Map json) => - _$FragmentsBatchFromJson(json); - - static const toJsonFactory = _$FragmentsBatchToJson; - Map toJson() => _$FragmentsBatchToJson(this); - - @JsonKey(name: 'fail_fast') - final bool failFast; - @JsonKey(name: 'fragments', defaultValue: []) - final List fragments; - static const fromJsonFactory = _$FragmentsBatchFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is FragmentsBatch && - (identical(other.failFast, failFast) || - const DeepCollectionEquality() - .equals(other.failFast, failFast)) && - (identical(other.fragments, fragments) || - const DeepCollectionEquality() - .equals(other.fragments, fragments))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(failFast) ^ - const DeepCollectionEquality().hash(fragments) ^ - runtimeType.hashCode; -} - -extension $FragmentsBatchExtension on FragmentsBatch { - FragmentsBatch copyWith({bool? failFast, List? fragments}) { - return FragmentsBatch( - failFast: failFast ?? this.failFast, - fragments: fragments ?? this.fragments); - } - - FragmentsBatch copyWithWrapped( - {Wrapped? failFast, Wrapped>? fragments}) { - return FragmentsBatch( - failFast: (failFast != null ? failFast.value : this.failFast), - fragments: (fragments != null ? fragments.value : this.fragments)); - } -} - -@JsonSerializable(explicitToJson: true) -class FragmentsProcessingSummary { - const FragmentsProcessingSummary({ - required this.accepted, - required this.rejected, - }); - - factory FragmentsProcessingSummary.fromJson(Map json) => - _$FragmentsProcessingSummaryFromJson(json); - - static const toJsonFactory = _$FragmentsProcessingSummaryToJson; - Map toJson() => _$FragmentsProcessingSummaryToJson(this); - - @JsonKey(name: 'accepted', defaultValue: []) - final List accepted; - @JsonKey(name: 'rejected', defaultValue: []) - final List rejected; - static const fromJsonFactory = _$FragmentsProcessingSummaryFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is FragmentsProcessingSummary && - (identical(other.accepted, accepted) || - const DeepCollectionEquality() - .equals(other.accepted, accepted)) && - (identical(other.rejected, rejected) || - const DeepCollectionEquality() - .equals(other.rejected, rejected))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(accepted) ^ - const DeepCollectionEquality().hash(rejected) ^ - runtimeType.hashCode; -} - -extension $FragmentsProcessingSummaryExtension on FragmentsProcessingSummary { - FragmentsProcessingSummary copyWith( - {List? accepted, List? rejected}) { - return FragmentsProcessingSummary( - accepted: accepted ?? this.accepted, - rejected: rejected ?? this.rejected); - } - - FragmentsProcessingSummary copyWithWrapped( - {Wrapped>? accepted, - Wrapped>? rejected}) { - return FragmentsProcessingSummary( - accepted: (accepted != null ? accepted.value : this.accepted), - rejected: (rejected != null ? rejected.value : this.rejected)); - } -} - -@JsonSerializable(explicitToJson: true) -class FrontendConfig { - const FrontendConfig({ - this.sentry, - }); - - factory FrontendConfig.fromJson(Map json) => - _$FrontendConfigFromJson(json); - - static const toJsonFactory = _$FrontendConfigToJson; - Map toJson() => _$FrontendConfigToJson(this); - - @JsonKey(name: 'sentry') - final Sentry? sentry; - static const fromJsonFactory = _$FrontendConfigFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is FrontendConfig && - (identical(other.sentry, sentry) || - const DeepCollectionEquality().equals(other.sentry, sentry))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(sentry) ^ runtimeType.hashCode; -} - -extension $FrontendConfigExtension on FrontendConfig { - FrontendConfig copyWith({Sentry? sentry}) { - return FrontendConfig(sentry: sentry ?? this.sentry); - } - - FrontendConfig copyWithWrapped({Wrapped? sentry}) { - return FrontendConfig( - sentry: (sentry != null ? sentry.value : this.sentry)); - } -} - -@JsonSerializable(explicitToJson: true) -class FullStakeInfo { - const FullStakeInfo({ - required this.volatile, - required this.persistent, - }); - - factory FullStakeInfo.fromJson(Map json) => - _$FullStakeInfoFromJson(json); - - static const toJsonFactory = _$FullStakeInfoToJson; - Map toJson() => _$FullStakeInfoToJson(this); - - @JsonKey(name: 'volatile') - final StakeInfo volatile; - @JsonKey(name: 'persistent') - final StakeInfo persistent; - static const fromJsonFactory = _$FullStakeInfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is FullStakeInfo && - (identical(other.volatile, volatile) || - const DeepCollectionEquality() - .equals(other.volatile, volatile)) && - (identical(other.persistent, persistent) || - const DeepCollectionEquality() - .equals(other.persistent, persistent))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(volatile) ^ - const DeepCollectionEquality().hash(persistent) ^ - runtimeType.hashCode; -} - -extension $FullStakeInfoExtension on FullStakeInfo { - FullStakeInfo copyWith({StakeInfo? volatile, StakeInfo? persistent}) { - return FullStakeInfo( - volatile: volatile ?? this.volatile, - persistent: persistent ?? this.persistent); - } - - FullStakeInfo copyWithWrapped( - {Wrapped? volatile, Wrapped? persistent}) { - return FullStakeInfo( - volatile: (volatile != null ? volatile.value : this.volatile), - persistent: (persistent != null ? persistent.value : this.persistent)); - } -} - -@JsonSerializable(explicitToJson: true) -class Hash { - const Hash({ - required this.hash, - }); - - factory Hash.fromJson(Map json) => _$HashFromJson(json); - - static const toJsonFactory = _$HashToJson; - Map toJson() => _$HashToJson(this); - - @JsonKey(name: 'hash') - final String hash; - static const fromJsonFactory = _$HashFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Hash && - (identical(other.hash, hash) || - const DeepCollectionEquality().equals(other.hash, hash))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(hash) ^ runtimeType.hashCode; -} - -extension $HashExtension on Hash { - Hash copyWith({String? hash}) { - return Hash(hash: hash ?? this.hash); - } - - Hash copyWithWrapped({Wrapped? hash}) { - return Hash(hash: (hash != null ? hash.value : this.hash)); - } -} - -@JsonSerializable(explicitToJson: true) -class InternalServerError { - const InternalServerError({ - required this.id, - required this.msg, - this.issue, - }); - - factory InternalServerError.fromJson(Map json) => - _$InternalServerErrorFromJson(json); - - static const toJsonFactory = _$InternalServerErrorToJson; - Map toJson() => _$InternalServerErrorToJson(this); - - @JsonKey(name: 'id') - final String id; - @JsonKey(name: 'msg') - final String msg; - @JsonKey(name: 'issue') - final String? issue; - static const fromJsonFactory = _$InternalServerErrorFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is InternalServerError && - (identical(other.id, id) || - const DeepCollectionEquality().equals(other.id, id)) && - (identical(other.msg, msg) || - const DeepCollectionEquality().equals(other.msg, msg)) && - (identical(other.issue, issue) || - const DeepCollectionEquality().equals(other.issue, issue))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(id) ^ - const DeepCollectionEquality().hash(msg) ^ - const DeepCollectionEquality().hash(issue) ^ - runtimeType.hashCode; -} - -extension $InternalServerErrorExtension on InternalServerError { - InternalServerError copyWith({String? id, String? msg, String? issue}) { - return InternalServerError( - id: id ?? this.id, msg: msg ?? this.msg, issue: issue ?? this.issue); - } - - InternalServerError copyWithWrapped( - {Wrapped? id, Wrapped? msg, Wrapped? issue}) { - return InternalServerError( - id: (id != null ? id.value : this.id), - msg: (msg != null ? msg.value : this.msg), - issue: (issue != null ? issue.value : this.issue)); - } -} - -@JsonSerializable(explicitToJson: true) -class InvalidRegistrationsReport { - const InvalidRegistrationsReport({ - required this.errorReport, - required this.stakeAddress, - required this.voteKey, - required this.paymentAddress, - required this.isPayable, - required this.cip36, - }); - - factory InvalidRegistrationsReport.fromJson(Map json) => - _$InvalidRegistrationsReportFromJson(json); - - static const toJsonFactory = _$InvalidRegistrationsReportToJson; - Map toJson() => _$InvalidRegistrationsReportToJson(this); - - @JsonKey(name: 'error_report', defaultValue: []) - final List errorReport; - @JsonKey(name: 'stake_address') - final String stakeAddress; - @JsonKey(name: 'vote_key') - final String voteKey; - @JsonKey(name: 'payment_address') - final String paymentAddress; - @JsonKey(name: 'is_payable') - final bool isPayable; - @JsonKey(name: 'cip36') - final bool cip36; - static const fromJsonFactory = _$InvalidRegistrationsReportFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is InvalidRegistrationsReport && - (identical(other.errorReport, errorReport) || - const DeepCollectionEquality() - .equals(other.errorReport, errorReport)) && - (identical(other.stakeAddress, stakeAddress) || - const DeepCollectionEquality() - .equals(other.stakeAddress, stakeAddress)) && - (identical(other.voteKey, voteKey) || - const DeepCollectionEquality() - .equals(other.voteKey, voteKey)) && - (identical(other.paymentAddress, paymentAddress) || - const DeepCollectionEquality() - .equals(other.paymentAddress, paymentAddress)) && - (identical(other.isPayable, isPayable) || - const DeepCollectionEquality() - .equals(other.isPayable, isPayable)) && - (identical(other.cip36, cip36) || - const DeepCollectionEquality().equals(other.cip36, cip36))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(errorReport) ^ - const DeepCollectionEquality().hash(stakeAddress) ^ - const DeepCollectionEquality().hash(voteKey) ^ - const DeepCollectionEquality().hash(paymentAddress) ^ - const DeepCollectionEquality().hash(isPayable) ^ - const DeepCollectionEquality().hash(cip36) ^ - runtimeType.hashCode; -} - -extension $InvalidRegistrationsReportExtension on InvalidRegistrationsReport { - InvalidRegistrationsReport copyWith( - {List? errorReport, - String? stakeAddress, - String? voteKey, - String? paymentAddress, - bool? isPayable, - bool? cip36}) { - return InvalidRegistrationsReport( - errorReport: errorReport ?? this.errorReport, - stakeAddress: stakeAddress ?? this.stakeAddress, - voteKey: voteKey ?? this.voteKey, - paymentAddress: paymentAddress ?? this.paymentAddress, - isPayable: isPayable ?? this.isPayable, - cip36: cip36 ?? this.cip36); - } - - InvalidRegistrationsReport copyWithWrapped( - {Wrapped>? errorReport, - Wrapped? stakeAddress, - Wrapped? voteKey, - Wrapped? paymentAddress, - Wrapped? isPayable, - Wrapped? cip36}) { - return InvalidRegistrationsReport( - errorReport: - (errorReport != null ? errorReport.value : this.errorReport), - stakeAddress: - (stakeAddress != null ? stakeAddress.value : this.stakeAddress), - voteKey: (voteKey != null ? voteKey.value : this.voteKey), - paymentAddress: (paymentAddress != null - ? paymentAddress.value - : this.paymentAddress), - isPayable: (isPayable != null ? isPayable.value : this.isPayable), - cip36: (cip36 != null ? cip36.value : this.cip36)); - } -} - -@JsonSerializable(explicitToJson: true) -class RbacRegistration { - const RbacRegistration({ - required this.txHash, - }); - - factory RbacRegistration.fromJson(Map json) => - _$RbacRegistrationFromJson(json); - - static const toJsonFactory = _$RbacRegistrationToJson; - Map toJson() => _$RbacRegistrationToJson(this); - - @JsonKey(name: 'tx_hash') - final String txHash; - static const fromJsonFactory = _$RbacRegistrationFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is RbacRegistration && - (identical(other.txHash, txHash) || - const DeepCollectionEquality().equals(other.txHash, txHash))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(txHash) ^ runtimeType.hashCode; -} - -extension $RbacRegistrationExtension on RbacRegistration { - RbacRegistration copyWith({String? txHash}) { - return RbacRegistration(txHash: txHash ?? this.txHash); - } - - RbacRegistration copyWithWrapped({Wrapped? txHash}) { - return RbacRegistration( - txHash: (txHash != null ? txHash.value : this.txHash)); - } -} - -@JsonSerializable(explicitToJson: true) -class RbacRegistrationsResponse { - const RbacRegistrationsResponse({ - required this.registrations, - }); - - factory RbacRegistrationsResponse.fromJson(Map json) => - _$RbacRegistrationsResponseFromJson(json); - - static const toJsonFactory = _$RbacRegistrationsResponseToJson; - Map toJson() => _$RbacRegistrationsResponseToJson(this); - - @JsonKey(name: 'registrations', defaultValue: []) - final List registrations; - static const fromJsonFactory = _$RbacRegistrationsResponseFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is RbacRegistrationsResponse && - (identical(other.registrations, registrations) || - const DeepCollectionEquality() - .equals(other.registrations, registrations))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(registrations) ^ runtimeType.hashCode; -} - -extension $RbacRegistrationsResponseExtension on RbacRegistrationsResponse { - RbacRegistrationsResponse copyWith({List? registrations}) { - return RbacRegistrationsResponse( - registrations: registrations ?? this.registrations); - } - - RbacRegistrationsResponse copyWithWrapped( - {Wrapped>? registrations}) { - return RbacRegistrationsResponse( - registrations: - (registrations != null ? registrations.value : this.registrations)); - } -} - -@JsonSerializable(explicitToJson: true) -class RbacRole0ChainRootResponse { - const RbacRole0ChainRootResponse({ - required this.chainRoot, - }); - - factory RbacRole0ChainRootResponse.fromJson(Map json) => - _$RbacRole0ChainRootResponseFromJson(json); - - static const toJsonFactory = _$RbacRole0ChainRootResponseToJson; - Map toJson() => _$RbacRole0ChainRootResponseToJson(this); - - @JsonKey(name: 'chain_root') - final String chainRoot; - static const fromJsonFactory = _$RbacRole0ChainRootResponseFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is RbacRole0ChainRootResponse && - (identical(other.chainRoot, chainRoot) || - const DeepCollectionEquality() - .equals(other.chainRoot, chainRoot))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(chainRoot) ^ runtimeType.hashCode; -} - -extension $RbacRole0ChainRootResponseExtension on RbacRole0ChainRootResponse { - RbacRole0ChainRootResponse copyWith({String? chainRoot}) { - return RbacRole0ChainRootResponse(chainRoot: chainRoot ?? this.chainRoot); - } - - RbacRole0ChainRootResponse copyWithWrapped({Wrapped? chainRoot}) { - return RbacRole0ChainRootResponse( - chainRoot: (chainRoot != null ? chainRoot.value : this.chainRoot)); - } -} - -@JsonSerializable(explicitToJson: true) -class RegistrationInfo { - const RegistrationInfo({ - required this.rewardsAddress, - required this.txHash, - required this.nonce, - required this.votingInfo, - }); - - factory RegistrationInfo.fromJson(Map json) => - _$RegistrationInfoFromJson(json); - - static const toJsonFactory = _$RegistrationInfoToJson; - Map toJson() => _$RegistrationInfoToJson(this); - - @JsonKey(name: 'rewards_address') - final String rewardsAddress; - @JsonKey(name: 'tx_hash') - final String txHash; - @JsonKey(name: 'nonce') - final int nonce; - @JsonKey(name: 'voting_info') - final VotingInfo votingInfo; - static const fromJsonFactory = _$RegistrationInfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is RegistrationInfo && - (identical(other.rewardsAddress, rewardsAddress) || - const DeepCollectionEquality() - .equals(other.rewardsAddress, rewardsAddress)) && - (identical(other.txHash, txHash) || - const DeepCollectionEquality().equals(other.txHash, txHash)) && - (identical(other.nonce, nonce) || - const DeepCollectionEquality().equals(other.nonce, nonce)) && - (identical(other.votingInfo, votingInfo) || - const DeepCollectionEquality() - .equals(other.votingInfo, votingInfo))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(rewardsAddress) ^ - const DeepCollectionEquality().hash(txHash) ^ - const DeepCollectionEquality().hash(nonce) ^ - const DeepCollectionEquality().hash(votingInfo) ^ - runtimeType.hashCode; -} - -extension $RegistrationInfoExtension on RegistrationInfo { - RegistrationInfo copyWith( - {String? rewardsAddress, - String? txHash, - int? nonce, - VotingInfo? votingInfo}) { - return RegistrationInfo( - rewardsAddress: rewardsAddress ?? this.rewardsAddress, - txHash: txHash ?? this.txHash, - nonce: nonce ?? this.nonce, - votingInfo: votingInfo ?? this.votingInfo); - } - - RegistrationInfo copyWithWrapped( - {Wrapped? rewardsAddress, - Wrapped? txHash, - Wrapped? nonce, - Wrapped? votingInfo}) { - return RegistrationInfo( - rewardsAddress: (rewardsAddress != null - ? rewardsAddress.value - : this.rewardsAddress), - txHash: (txHash != null ? txHash.value : this.txHash), - nonce: (nonce != null ? nonce.value : this.nonce), - votingInfo: (votingInfo != null ? votingInfo.value : this.votingInfo)); - } -} - -@JsonSerializable(explicitToJson: true) -class RejectedFragment { - const RejectedFragment({ - required this.id, - required this.poolNumber, - required this.reason, - }); - - factory RejectedFragment.fromJson(Map json) => - _$RejectedFragmentFromJson(json); - - static const toJsonFactory = _$RejectedFragmentToJson; - Map toJson() => _$RejectedFragmentToJson(this); - - @JsonKey(name: 'id') - final String id; - @JsonKey(name: 'pool_number') - final int poolNumber; - @JsonKey( - name: 'reason', - toJson: reasonRejectedToJson, - fromJson: reasonRejectedFromJson, - ) - final enums.ReasonRejected reason; - static const fromJsonFactory = _$RejectedFragmentFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is RejectedFragment && - (identical(other.id, id) || - const DeepCollectionEquality().equals(other.id, id)) && - (identical(other.poolNumber, poolNumber) || - const DeepCollectionEquality() - .equals(other.poolNumber, poolNumber)) && - (identical(other.reason, reason) || - const DeepCollectionEquality().equals(other.reason, reason))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(id) ^ - const DeepCollectionEquality().hash(poolNumber) ^ - const DeepCollectionEquality().hash(reason) ^ - runtimeType.hashCode; -} - -extension $RejectedFragmentExtension on RejectedFragment { - RejectedFragment copyWith( - {String? id, int? poolNumber, enums.ReasonRejected? reason}) { - return RejectedFragment( - id: id ?? this.id, - poolNumber: poolNumber ?? this.poolNumber, - reason: reason ?? this.reason); - } - - RejectedFragment copyWithWrapped( - {Wrapped? id, - Wrapped? poolNumber, - Wrapped? reason}) { - return RejectedFragment( - id: (id != null ? id.value : this.id), - poolNumber: (poolNumber != null ? poolNumber.value : this.poolNumber), - reason: (reason != null ? reason.value : this.reason)); - } -} - -@JsonSerializable(explicitToJson: true) -class Response$ { - const Response$({ - required this.chainRoot, - }); - - factory Response$.fromJson(Map json) => - _$Response$FromJson(json); - - static const toJsonFactory = _$Response$ToJson; - Map toJson() => _$Response$ToJson(this); - - @JsonKey(name: 'chain_root') - final String chainRoot; - static const fromJsonFactory = _$Response$FromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Response$ && - (identical(other.chainRoot, chainRoot) || - const DeepCollectionEquality() - .equals(other.chainRoot, chainRoot))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(chainRoot) ^ runtimeType.hashCode; -} - -extension $Response$Extension on Response$ { - Response$ copyWith({String? chainRoot}) { - return Response$(chainRoot: chainRoot ?? this.chainRoot); - } - - Response$ copyWithWrapped({Wrapped? chainRoot}) { - return Response$( - chainRoot: (chainRoot != null ? chainRoot.value : this.chainRoot)); - } -} - -@JsonSerializable(explicitToJson: true) -class Sentry { - const Sentry({ - required this.dsn, - this.release, - this.environment, - }); - - factory Sentry.fromJson(Map json) => _$SentryFromJson(json); - - static const toJsonFactory = _$SentryToJson; - Map toJson() => _$SentryToJson(this); - - @JsonKey(name: 'dsn') - final String dsn; - @JsonKey(name: 'release') - final String? release; - @JsonKey(name: 'environment') - final String? environment; - static const fromJsonFactory = _$SentryFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Sentry && - (identical(other.dsn, dsn) || - const DeepCollectionEquality().equals(other.dsn, dsn)) && - (identical(other.release, release) || - const DeepCollectionEquality() - .equals(other.release, release)) && - (identical(other.environment, environment) || - const DeepCollectionEquality() - .equals(other.environment, environment))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(dsn) ^ - const DeepCollectionEquality().hash(release) ^ - const DeepCollectionEquality().hash(environment) ^ - runtimeType.hashCode; -} - -extension $SentryExtension on Sentry { - Sentry copyWith({String? dsn, String? release, String? environment}) { - return Sentry( - dsn: dsn ?? this.dsn, - release: release ?? this.release, - environment: environment ?? this.environment); - } - - Sentry copyWithWrapped( - {Wrapped? dsn, - Wrapped? release, - Wrapped? environment}) { - return Sentry( - dsn: (dsn != null ? dsn.value : this.dsn), - release: (release != null ? release.value : this.release), - environment: - (environment != null ? environment.value : this.environment)); - } -} - -@JsonSerializable(explicitToJson: true) -class ServiceUnavailable { - const ServiceUnavailable({ - required this.id, - required this.msg, - }); - - factory ServiceUnavailable.fromJson(Map json) => - _$ServiceUnavailableFromJson(json); - - static const toJsonFactory = _$ServiceUnavailableToJson; - Map toJson() => _$ServiceUnavailableToJson(this); - - @JsonKey(name: 'id') - final String id; - @JsonKey(name: 'msg') - final String msg; - static const fromJsonFactory = _$ServiceUnavailableFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is ServiceUnavailable && - (identical(other.id, id) || - const DeepCollectionEquality().equals(other.id, id)) && - (identical(other.msg, msg) || - const DeepCollectionEquality().equals(other.msg, msg))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(id) ^ - const DeepCollectionEquality().hash(msg) ^ - runtimeType.hashCode; -} - -extension $ServiceUnavailableExtension on ServiceUnavailable { - ServiceUnavailable copyWith({String? id, String? msg}) { - return ServiceUnavailable(id: id ?? this.id, msg: msg ?? this.msg); - } - - ServiceUnavailable copyWithWrapped( - {Wrapped? id, Wrapped? msg}) { - return ServiceUnavailable( - id: (id != null ? id.value : this.id), - msg: (msg != null ? msg.value : this.msg)); - } -} - -@JsonSerializable(explicitToJson: true) -class Slot { - const Slot({ - required this.slotNumber, - required this.blockHash, - required this.blockTime, - }); - - factory Slot.fromJson(Map json) => _$SlotFromJson(json); - - static const toJsonFactory = _$SlotToJson; - Map toJson() => _$SlotToJson(this); - - @JsonKey(name: 'slot_number') - final int slotNumber; - @JsonKey(name: 'block_hash') - final String blockHash; - @JsonKey(name: 'block_time') - final DateTime blockTime; - static const fromJsonFactory = _$SlotFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Slot && - (identical(other.slotNumber, slotNumber) || - const DeepCollectionEquality() - .equals(other.slotNumber, slotNumber)) && - (identical(other.blockHash, blockHash) || - const DeepCollectionEquality() - .equals(other.blockHash, blockHash)) && - (identical(other.blockTime, blockTime) || - const DeepCollectionEquality() - .equals(other.blockTime, blockTime))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(slotNumber) ^ - const DeepCollectionEquality().hash(blockHash) ^ - const DeepCollectionEquality().hash(blockTime) ^ - runtimeType.hashCode; -} - -extension $SlotExtension on Slot { - Slot copyWith({int? slotNumber, String? blockHash, DateTime? blockTime}) { - return Slot( - slotNumber: slotNumber ?? this.slotNumber, - blockHash: blockHash ?? this.blockHash, - blockTime: blockTime ?? this.blockTime); - } - - Slot copyWithWrapped( - {Wrapped? slotNumber, - Wrapped? blockHash, - Wrapped? blockTime}) { - return Slot( - slotNumber: (slotNumber != null ? slotNumber.value : this.slotNumber), - blockHash: (blockHash != null ? blockHash.value : this.blockHash), - blockTime: (blockTime != null ? blockTime.value : this.blockTime)); - } -} - -@JsonSerializable(explicitToJson: true) -class SlotInfo { - const SlotInfo({ - this.previous, - this.current, - this.next, - }); - - factory SlotInfo.fromJson(Map json) => - _$SlotInfoFromJson(json); - - static const toJsonFactory = _$SlotInfoToJson; - Map toJson() => _$SlotInfoToJson(this); - - @JsonKey(name: 'previous') - final Slot? previous; - @JsonKey(name: 'current') - final Slot? current; - @JsonKey(name: 'next') - final Slot? next; - static const fromJsonFactory = _$SlotInfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is SlotInfo && - (identical(other.previous, previous) || - const DeepCollectionEquality() - .equals(other.previous, previous)) && - (identical(other.current, current) || - const DeepCollectionEquality() - .equals(other.current, current)) && - (identical(other.next, next) || - const DeepCollectionEquality().equals(other.next, next))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(previous) ^ - const DeepCollectionEquality().hash(current) ^ - const DeepCollectionEquality().hash(next) ^ - runtimeType.hashCode; -} - -extension $SlotInfoExtension on SlotInfo { - SlotInfo copyWith({Slot? previous, Slot? current, Slot? next}) { - return SlotInfo( - previous: previous ?? this.previous, - current: current ?? this.current, - next: next ?? this.next); - } - - SlotInfo copyWithWrapped( - {Wrapped? previous, - Wrapped? current, - Wrapped? next}) { - return SlotInfo( - previous: (previous != null ? previous.value : this.previous), - current: (current != null ? current.value : this.current), - next: (next != null ? next.value : this.next)); - } -} - -@JsonSerializable(explicitToJson: true) -class StakeInfo { - const StakeInfo({ - required this.adaAmount, - required this.slotNumber, - required this.nativeTokens, - }); - - factory StakeInfo.fromJson(Map json) => - _$StakeInfoFromJson(json); - - static const toJsonFactory = _$StakeInfoToJson; - Map toJson() => _$StakeInfoToJson(this); - - @JsonKey(name: 'ada_amount') - final int adaAmount; - @JsonKey(name: 'slot_number') - final int slotNumber; - @JsonKey(name: 'native_tokens', defaultValue: []) - final List nativeTokens; - static const fromJsonFactory = _$StakeInfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is StakeInfo && - (identical(other.adaAmount, adaAmount) || - const DeepCollectionEquality() - .equals(other.adaAmount, adaAmount)) && - (identical(other.slotNumber, slotNumber) || - const DeepCollectionEquality() - .equals(other.slotNumber, slotNumber)) && - (identical(other.nativeTokens, nativeTokens) || - const DeepCollectionEquality() - .equals(other.nativeTokens, nativeTokens))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(adaAmount) ^ - const DeepCollectionEquality().hash(slotNumber) ^ - const DeepCollectionEquality().hash(nativeTokens) ^ - runtimeType.hashCode; -} - -extension $StakeInfoExtension on StakeInfo { - StakeInfo copyWith( - {int? adaAmount, - int? slotNumber, - List? nativeTokens}) { - return StakeInfo( - adaAmount: adaAmount ?? this.adaAmount, - slotNumber: slotNumber ?? this.slotNumber, - nativeTokens: nativeTokens ?? this.nativeTokens); - } - - StakeInfo copyWithWrapped( - {Wrapped? adaAmount, - Wrapped? slotNumber, - Wrapped>? nativeTokens}) { - return StakeInfo( - adaAmount: (adaAmount != null ? adaAmount.value : this.adaAmount), - slotNumber: (slotNumber != null ? slotNumber.value : this.slotNumber), - nativeTokens: - (nativeTokens != null ? nativeTokens.value : this.nativeTokens)); - } -} - -@JsonSerializable(explicitToJson: true) -class StakedNativeTokenInfo { - const StakedNativeTokenInfo({ - required this.policyHash, - required this.assetName, - required this.amount, - }); - - factory StakedNativeTokenInfo.fromJson(Map json) => - _$StakedNativeTokenInfoFromJson(json); - - static const toJsonFactory = _$StakedNativeTokenInfoToJson; - Map toJson() => _$StakedNativeTokenInfoToJson(this); - - @JsonKey(name: 'policy_hash') - final String policyHash; - @JsonKey(name: 'asset_name') - final String assetName; - @JsonKey(name: 'amount') - final int amount; - static const fromJsonFactory = _$StakedNativeTokenInfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is StakedNativeTokenInfo && - (identical(other.policyHash, policyHash) || - const DeepCollectionEquality() - .equals(other.policyHash, policyHash)) && - (identical(other.assetName, assetName) || - const DeepCollectionEquality() - .equals(other.assetName, assetName)) && - (identical(other.amount, amount) || - const DeepCollectionEquality().equals(other.amount, amount))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(policyHash) ^ - const DeepCollectionEquality().hash(assetName) ^ - const DeepCollectionEquality().hash(amount) ^ - runtimeType.hashCode; -} - -extension $StakedNativeTokenInfoExtension on StakedNativeTokenInfo { - StakedNativeTokenInfo copyWith( - {String? policyHash, String? assetName, int? amount}) { - return StakedNativeTokenInfo( - policyHash: policyHash ?? this.policyHash, - assetName: assetName ?? this.assetName, - amount: amount ?? this.amount); - } - - StakedNativeTokenInfo copyWithWrapped( - {Wrapped? policyHash, - Wrapped? assetName, - Wrapped? amount}) { - return StakedNativeTokenInfo( - policyHash: (policyHash != null ? policyHash.value : this.policyHash), - assetName: (assetName != null ? assetName.value : this.assetName), - amount: (amount != null ? amount.value : this.amount)); - } -} - -@JsonSerializable(explicitToJson: true) -class StatusInABlock { - const StatusInABlock({ - required this.date, - required this.block, - }); - - factory StatusInABlock.fromJson(Map json) => - _$StatusInABlockFromJson(json); - - static const toJsonFactory = _$StatusInABlockToJson; - Map toJson() => _$StatusInABlockToJson(this); - - @JsonKey(name: 'date') - final BlockDate date; - @JsonKey(name: 'block') - final Hash block; - static const fromJsonFactory = _$StatusInABlockFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is StatusInABlock && - (identical(other.date, date) || - const DeepCollectionEquality().equals(other.date, date)) && - (identical(other.block, block) || - const DeepCollectionEquality().equals(other.block, block))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(date) ^ - const DeepCollectionEquality().hash(block) ^ - runtimeType.hashCode; -} - -extension $StatusInABlockExtension on StatusInABlock { - StatusInABlock copyWith({BlockDate? date, Hash? block}) { - return StatusInABlock(date: date ?? this.date, block: block ?? this.block); - } - - StatusInABlock copyWithWrapped( - {Wrapped? date, Wrapped? block}) { - return StatusInABlock( - date: (date != null ? date.value : this.date), - block: (block != null ? block.value : this.block)); - } -} - -@JsonSerializable(explicitToJson: true) -class StatusPending { - const StatusPending(); - - factory StatusPending.fromJson(Map json) => - _$StatusPendingFromJson(json); - - static const toJsonFactory = _$StatusPendingToJson; - Map toJson() => _$StatusPendingToJson(this); - - static const fromJsonFactory = _$StatusPendingFromJson; - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => runtimeType.hashCode; -} - -@JsonSerializable(explicitToJson: true) -class StatusRejected { - const StatusRejected({ - required this.reason, - }); - - factory StatusRejected.fromJson(Map json) => - _$StatusRejectedFromJson(json); - - static const toJsonFactory = _$StatusRejectedToJson; - Map toJson() => _$StatusRejectedToJson(this); - - @JsonKey(name: 'reason') - final String reason; - static const fromJsonFactory = _$StatusRejectedFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is StatusRejected && - (identical(other.reason, reason) || - const DeepCollectionEquality().equals(other.reason, reason))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(reason) ^ runtimeType.hashCode; -} - -extension $StatusRejectedExtension on StatusRejected { - StatusRejected copyWith({String? reason}) { - return StatusRejected(reason: reason ?? this.reason); - } - - StatusRejected copyWithWrapped({Wrapped? reason}) { - return StatusRejected( - reason: (reason != null ? reason.value : this.reason)); - } -} - -@JsonSerializable(explicitToJson: true) -class SyncState { - const SyncState({ - required this.slotNumber, - required this.blockHash, - required this.lastUpdated, - }); - - factory SyncState.fromJson(Map json) => - _$SyncStateFromJson(json); - - static const toJsonFactory = _$SyncStateToJson; - Map toJson() => _$SyncStateToJson(this); - - @JsonKey(name: 'slot_number') - final int slotNumber; - @JsonKey(name: 'block_hash') - final String blockHash; - @JsonKey(name: 'last_updated') - final DateTime lastUpdated; - static const fromJsonFactory = _$SyncStateFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is SyncState && - (identical(other.slotNumber, slotNumber) || - const DeepCollectionEquality() - .equals(other.slotNumber, slotNumber)) && - (identical(other.blockHash, blockHash) || - const DeepCollectionEquality() - .equals(other.blockHash, blockHash)) && - (identical(other.lastUpdated, lastUpdated) || - const DeepCollectionEquality() - .equals(other.lastUpdated, lastUpdated))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(slotNumber) ^ - const DeepCollectionEquality().hash(blockHash) ^ - const DeepCollectionEquality().hash(lastUpdated) ^ - runtimeType.hashCode; -} - -extension $SyncStateExtension on SyncState { - SyncState copyWith( - {int? slotNumber, String? blockHash, DateTime? lastUpdated}) { - return SyncState( - slotNumber: slotNumber ?? this.slotNumber, - blockHash: blockHash ?? this.blockHash, - lastUpdated: lastUpdated ?? this.lastUpdated); - } - - SyncState copyWithWrapped( - {Wrapped? slotNumber, - Wrapped? blockHash, - Wrapped? lastUpdated}) { - return SyncState( - slotNumber: (slotNumber != null ? slotNumber.value : this.slotNumber), - blockHash: (blockHash != null ? blockHash.value : this.blockHash), - lastUpdated: - (lastUpdated != null ? lastUpdated.value : this.lastUpdated)); - } -} - -@JsonSerializable(explicitToJson: true) -class TooManyRequests { - const TooManyRequests({ - required this.id, - required this.msg, - }); - - factory TooManyRequests.fromJson(Map json) => - _$TooManyRequestsFromJson(json); - - static const toJsonFactory = _$TooManyRequestsToJson; - Map toJson() => _$TooManyRequestsToJson(this); - - @JsonKey(name: 'id') - final String id; - @JsonKey(name: 'msg') - final String msg; - static const fromJsonFactory = _$TooManyRequestsFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is TooManyRequests && - (identical(other.id, id) || - const DeepCollectionEquality().equals(other.id, id)) && - (identical(other.msg, msg) || - const DeepCollectionEquality().equals(other.msg, msg))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(id) ^ - const DeepCollectionEquality().hash(msg) ^ - runtimeType.hashCode; -} - -extension $TooManyRequestsExtension on TooManyRequests { - TooManyRequests copyWith({String? id, String? msg}) { - return TooManyRequests(id: id ?? this.id, msg: msg ?? this.msg); - } - - TooManyRequests copyWithWrapped({Wrapped? id, Wrapped? msg}) { - return TooManyRequests( - id: (id != null ? id.value : this.id), - msg: (msg != null ? msg.value : this.msg)); - } -} - -@JsonSerializable(explicitToJson: true) -class Unauthorized { - const Unauthorized({ - required this.id, - required this.msg, - }); - - factory Unauthorized.fromJson(Map json) => - _$UnauthorizedFromJson(json); - - static const toJsonFactory = _$UnauthorizedToJson; - Map toJson() => _$UnauthorizedToJson(this); - - @JsonKey(name: 'id') - final String id; - @JsonKey(name: 'msg') - final String msg; - static const fromJsonFactory = _$UnauthorizedFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is Unauthorized && - (identical(other.id, id) || - const DeepCollectionEquality().equals(other.id, id)) && - (identical(other.msg, msg) || - const DeepCollectionEquality().equals(other.msg, msg))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(id) ^ - const DeepCollectionEquality().hash(msg) ^ - runtimeType.hashCode; -} - -extension $UnauthorizedExtension on Unauthorized { - Unauthorized copyWith({String? id, String? msg}) { - return Unauthorized(id: id ?? this.id, msg: msg ?? this.msg); - } - - Unauthorized copyWithWrapped({Wrapped? id, Wrapped? msg}) { - return Unauthorized( - id: (id != null ? id.value : this.id), - msg: (msg != null ? msg.value : this.msg)); - } -} - -@JsonSerializable(explicitToJson: true) -class UnprocessableContent { - const UnprocessableContent({ - required this.detail, - }); - - factory UnprocessableContent.fromJson(Map json) => - _$UnprocessableContentFromJson(json); - - static const toJsonFactory = _$UnprocessableContentToJson; - Map toJson() => _$UnprocessableContentToJson(this); - - @JsonKey(name: 'detail', defaultValue: []) - final List detail; - static const fromJsonFactory = _$UnprocessableContentFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is UnprocessableContent && - (identical(other.detail, detail) || - const DeepCollectionEquality().equals(other.detail, detail))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(detail) ^ runtimeType.hashCode; -} - -extension $UnprocessableContentExtension on UnprocessableContent { - UnprocessableContent copyWith({List? detail}) { - return UnprocessableContent(detail: detail ?? this.detail); - } - - UnprocessableContent copyWithWrapped( - {Wrapped>? detail}) { - return UnprocessableContent( - detail: (detail != null ? detail.value : this.detail)); - } -} - -@JsonSerializable(explicitToJson: true) -class VotePlan { - const VotePlan({ - required this.votingToken, - }); - - factory VotePlan.fromJson(Map json) => - _$VotePlanFromJson(json); - - static const toJsonFactory = _$VotePlanToJson; - Map toJson() => _$VotePlanToJson(this); - - @JsonKey(name: 'voting_token') - final String votingToken; - static const fromJsonFactory = _$VotePlanFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is VotePlan && - (identical(other.votingToken, votingToken) || - const DeepCollectionEquality() - .equals(other.votingToken, votingToken))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(votingToken) ^ runtimeType.hashCode; -} - -extension $VotePlanExtension on VotePlan { - VotePlan copyWith({String? votingToken}) { - return VotePlan(votingToken: votingToken ?? this.votingToken); - } - - VotePlan copyWithWrapped({Wrapped? votingToken}) { - return VotePlan( - votingToken: - (votingToken != null ? votingToken.value : this.votingToken)); - } -} - -@JsonSerializable(explicitToJson: true) -class VoterInfo { - const VoterInfo({ - required this.votingPower, - required this.votingGroup, - required this.delegationsPower, - required this.delegationsCount, - required this.votingPowerSaturation, - this.delegatorAddresses, - }); - - factory VoterInfo.fromJson(Map json) => - _$VoterInfoFromJson(json); - - static const toJsonFactory = _$VoterInfoToJson; - Map toJson() => _$VoterInfoToJson(this); - - @JsonKey(name: 'voting_power') - final int votingPower; - @JsonKey( - name: 'voting_group', - toJson: voterGroupIdToJson, - fromJson: voterGroupIdFromJson, - ) - final enums.VoterGroupId votingGroup; - @JsonKey(name: 'delegations_power') - final int delegationsPower; - @JsonKey(name: 'delegations_count') - final int delegationsCount; - @JsonKey(name: 'voting_power_saturation') - final double votingPowerSaturation; - @JsonKey(name: 'delegator_addresses', defaultValue: []) - final List? delegatorAddresses; - static const fromJsonFactory = _$VoterInfoFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is VoterInfo && - (identical(other.votingPower, votingPower) || - const DeepCollectionEquality() - .equals(other.votingPower, votingPower)) && - (identical(other.votingGroup, votingGroup) || - const DeepCollectionEquality() - .equals(other.votingGroup, votingGroup)) && - (identical(other.delegationsPower, delegationsPower) || - const DeepCollectionEquality() - .equals(other.delegationsPower, delegationsPower)) && - (identical(other.delegationsCount, delegationsCount) || - const DeepCollectionEquality() - .equals(other.delegationsCount, delegationsCount)) && - (identical(other.votingPowerSaturation, votingPowerSaturation) || - const DeepCollectionEquality().equals( - other.votingPowerSaturation, votingPowerSaturation)) && - (identical(other.delegatorAddresses, delegatorAddresses) || - const DeepCollectionEquality() - .equals(other.delegatorAddresses, delegatorAddresses))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(votingPower) ^ - const DeepCollectionEquality().hash(votingGroup) ^ - const DeepCollectionEquality().hash(delegationsPower) ^ - const DeepCollectionEquality().hash(delegationsCount) ^ - const DeepCollectionEquality().hash(votingPowerSaturation) ^ - const DeepCollectionEquality().hash(delegatorAddresses) ^ - runtimeType.hashCode; -} - -extension $VoterInfoExtension on VoterInfo { - VoterInfo copyWith( - {int? votingPower, - enums.VoterGroupId? votingGroup, - int? delegationsPower, - int? delegationsCount, - double? votingPowerSaturation, - List? delegatorAddresses}) { - return VoterInfo( - votingPower: votingPower ?? this.votingPower, - votingGroup: votingGroup ?? this.votingGroup, - delegationsPower: delegationsPower ?? this.delegationsPower, - delegationsCount: delegationsCount ?? this.delegationsCount, - votingPowerSaturation: - votingPowerSaturation ?? this.votingPowerSaturation, - delegatorAddresses: delegatorAddresses ?? this.delegatorAddresses); - } - - VoterInfo copyWithWrapped( - {Wrapped? votingPower, - Wrapped? votingGroup, - Wrapped? delegationsPower, - Wrapped? delegationsCount, - Wrapped? votingPowerSaturation, - Wrapped?>? delegatorAddresses}) { - return VoterInfo( - votingPower: - (votingPower != null ? votingPower.value : this.votingPower), - votingGroup: - (votingGroup != null ? votingGroup.value : this.votingGroup), - delegationsPower: (delegationsPower != null - ? delegationsPower.value - : this.delegationsPower), - delegationsCount: (delegationsCount != null - ? delegationsCount.value - : this.delegationsCount), - votingPowerSaturation: (votingPowerSaturation != null - ? votingPowerSaturation.value - : this.votingPowerSaturation), - delegatorAddresses: (delegatorAddresses != null - ? delegatorAddresses.value - : this.delegatorAddresses)); - } -} - -@JsonSerializable(explicitToJson: true) -class VoterRegistration { - const VoterRegistration({ - required this.voterInfo, - required this.asAt, - required this.lastUpdated, - required this.$final, - }); - - factory VoterRegistration.fromJson(Map json) => - _$VoterRegistrationFromJson(json); - - static const toJsonFactory = _$VoterRegistrationToJson; - Map toJson() => _$VoterRegistrationToJson(this); - - @JsonKey(name: 'voter_info') - final VoterInfo voterInfo; - @JsonKey(name: 'as_at') - final DateTime asAt; - @JsonKey(name: 'last_updated') - final DateTime lastUpdated; - @JsonKey(name: 'final') - final bool $final; - static const fromJsonFactory = _$VoterRegistrationFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is VoterRegistration && - (identical(other.voterInfo, voterInfo) || - const DeepCollectionEquality() - .equals(other.voterInfo, voterInfo)) && - (identical(other.asAt, asAt) || - const DeepCollectionEquality().equals(other.asAt, asAt)) && - (identical(other.lastUpdated, lastUpdated) || - const DeepCollectionEquality() - .equals(other.lastUpdated, lastUpdated)) && - (identical(other.$final, $final) || - const DeepCollectionEquality().equals(other.$final, $final))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(voterInfo) ^ - const DeepCollectionEquality().hash(asAt) ^ - const DeepCollectionEquality().hash(lastUpdated) ^ - const DeepCollectionEquality().hash($final) ^ - runtimeType.hashCode; -} - -extension $VoterRegistrationExtension on VoterRegistration { - VoterRegistration copyWith( - {VoterInfo? voterInfo, - DateTime? asAt, - DateTime? lastUpdated, - bool? $final}) { - return VoterRegistration( - voterInfo: voterInfo ?? this.voterInfo, - asAt: asAt ?? this.asAt, - lastUpdated: lastUpdated ?? this.lastUpdated, - $final: $final ?? this.$final); - } - - VoterRegistration copyWithWrapped( - {Wrapped? voterInfo, - Wrapped? asAt, - Wrapped? lastUpdated, - Wrapped? $final}) { - return VoterRegistration( - voterInfo: (voterInfo != null ? voterInfo.value : this.voterInfo), - asAt: (asAt != null ? asAt.value : this.asAt), - lastUpdated: - (lastUpdated != null ? lastUpdated.value : this.lastUpdated), - $final: ($final != null ? $final.value : this.$final)); - } -} - -@JsonSerializable(explicitToJson: true) -class VotingInfo { - const VotingInfo(); - - factory VotingInfo.fromJson(Map json) => - _$VotingInfoFromJson(json); - - static const toJsonFactory = _$VotingInfoToJson; - Map toJson() => _$VotingInfoToJson(this); - - static const fromJsonFactory = _$VotingInfoFromJson; - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => runtimeType.hashCode; -} - -@JsonSerializable(explicitToJson: true) -class VotingInfoDelegations { - const VotingInfoDelegations({ - required this.type, - required this.delegations, - }); - - factory VotingInfoDelegations.fromJson(Map json) => - _$VotingInfoDelegationsFromJson(json); - - static const toJsonFactory = _$VotingInfoDelegationsToJson; - Map toJson() => _$VotingInfoDelegationsToJson(this); - - @JsonKey( - name: 'type', - toJson: votingInfoDelegationsTypeToJson, - fromJson: votingInfoDelegationsTypeFromJson, - ) - final enums.VotingInfoDelegationsType type; - @JsonKey(name: 'delegations', defaultValue: []) - final List delegations; - static const fromJsonFactory = _$VotingInfoDelegationsFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is VotingInfoDelegations && - (identical(other.type, type) || - const DeepCollectionEquality().equals(other.type, type)) && - (identical(other.delegations, delegations) || - const DeepCollectionEquality() - .equals(other.delegations, delegations))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(type) ^ - const DeepCollectionEquality().hash(delegations) ^ - runtimeType.hashCode; -} - -extension $VotingInfoDelegationsExtension on VotingInfoDelegations { - VotingInfoDelegations copyWith( - {enums.VotingInfoDelegationsType? type, List? delegations}) { - return VotingInfoDelegations( - type: type ?? this.type, delegations: delegations ?? this.delegations); - } - - VotingInfoDelegations copyWithWrapped( - {Wrapped? type, - Wrapped>? delegations}) { - return VotingInfoDelegations( - type: (type != null ? type.value : this.type), - delegations: - (delegations != null ? delegations.value : this.delegations)); - } -} - -@JsonSerializable(explicitToJson: true) -class VotingInfoDirectVoter { - const VotingInfoDirectVoter({ - required this.type, - required this.votingKey, - }); - - factory VotingInfoDirectVoter.fromJson(Map json) => - _$VotingInfoDirectVoterFromJson(json); - - static const toJsonFactory = _$VotingInfoDirectVoterToJson; - Map toJson() => _$VotingInfoDirectVoterToJson(this); - - @JsonKey( - name: 'type', - toJson: votingInfoDirectVoterTypeToJson, - fromJson: votingInfoDirectVoterTypeFromJson, - ) - final enums.VotingInfoDirectVoterType type; - @JsonKey(name: 'voting_key') - final String votingKey; - static const fromJsonFactory = _$VotingInfoDirectVoterFromJson; - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other is VotingInfoDirectVoter && - (identical(other.type, type) || - const DeepCollectionEquality().equals(other.type, type)) && - (identical(other.votingKey, votingKey) || - const DeepCollectionEquality() - .equals(other.votingKey, votingKey))); - } - - @override - String toString() => jsonEncode(this); - - @override - int get hashCode => - const DeepCollectionEquality().hash(type) ^ - const DeepCollectionEquality().hash(votingKey) ^ - runtimeType.hashCode; -} - -extension $VotingInfoDirectVoterExtension on VotingInfoDirectVoter { - VotingInfoDirectVoter copyWith( - {enums.VotingInfoDirectVoterType? type, String? votingKey}) { - return VotingInfoDirectVoter( - type: type ?? this.type, votingKey: votingKey ?? this.votingKey); - } - - VotingInfoDirectVoter copyWithWrapped( - {Wrapped? type, - Wrapped? votingKey}) { - return VotingInfoDirectVoter( - type: (type != null ? type.value : this.type), - votingKey: (votingKey != null ? votingKey.value : this.votingKey)); - } -} - -String? deepQueryInspectionFlagNullableToJson( - enums.DeepQueryInspectionFlag? deepQueryInspectionFlag) { - return deepQueryInspectionFlag?.value; -} - -String? deepQueryInspectionFlagToJson( - enums.DeepQueryInspectionFlag deepQueryInspectionFlag) { - return deepQueryInspectionFlag.value; -} - -enums.DeepQueryInspectionFlag deepQueryInspectionFlagFromJson( - Object? deepQueryInspectionFlag, [ - enums.DeepQueryInspectionFlag? defaultValue, -]) { - return enums.DeepQueryInspectionFlag.values - .firstWhereOrNull((e) => e.value == deepQueryInspectionFlag) ?? - defaultValue ?? - enums.DeepQueryInspectionFlag.swaggerGeneratedUnknown; -} - -enums.DeepQueryInspectionFlag? deepQueryInspectionFlagNullableFromJson( - Object? deepQueryInspectionFlag, [ - enums.DeepQueryInspectionFlag? defaultValue, -]) { - if (deepQueryInspectionFlag == null) { - return null; - } - return enums.DeepQueryInspectionFlag.values - .firstWhereOrNull((e) => e.value == deepQueryInspectionFlag) ?? - defaultValue; -} - -String deepQueryInspectionFlagExplodedListToJson( - List? deepQueryInspectionFlag) { - return deepQueryInspectionFlag?.map((e) => e.value!).join(',') ?? ''; -} - -List deepQueryInspectionFlagListToJson( - List? deepQueryInspectionFlag) { - if (deepQueryInspectionFlag == null) { - return []; - } - - return deepQueryInspectionFlag.map((e) => e.value!).toList(); -} - -List deepQueryInspectionFlagListFromJson( - List? deepQueryInspectionFlag, [ - List? defaultValue, -]) { - if (deepQueryInspectionFlag == null) { - return defaultValue ?? []; - } - - return deepQueryInspectionFlag - .map((e) => deepQueryInspectionFlagFromJson(e.toString())) - .toList(); -} - -List? - deepQueryInspectionFlagNullableListFromJson( - List? deepQueryInspectionFlag, [ - List? defaultValue, -]) { - if (deepQueryInspectionFlag == null) { - return defaultValue; - } - - return deepQueryInspectionFlag - .map((e) => deepQueryInspectionFlagFromJson(e.toString())) - .toList(); -} - -String? logLevelNullableToJson(enums.LogLevel? logLevel) { - return logLevel?.value; -} - -String? logLevelToJson(enums.LogLevel logLevel) { - return logLevel.value; -} - -enums.LogLevel logLevelFromJson( - Object? logLevel, [ - enums.LogLevel? defaultValue, -]) { - return enums.LogLevel.values.firstWhereOrNull((e) => e.value == logLevel) ?? - defaultValue ?? - enums.LogLevel.swaggerGeneratedUnknown; -} - -enums.LogLevel? logLevelNullableFromJson( - Object? logLevel, [ - enums.LogLevel? defaultValue, -]) { - if (logLevel == null) { - return null; - } - return enums.LogLevel.values.firstWhereOrNull((e) => e.value == logLevel) ?? - defaultValue; -} - -String logLevelExplodedListToJson(List? logLevel) { - return logLevel?.map((e) => e.value!).join(',') ?? ''; -} - -List logLevelListToJson(List? logLevel) { - if (logLevel == null) { - return []; - } - - return logLevel.map((e) => e.value!).toList(); -} - -List logLevelListFromJson( - List? logLevel, [ - List? defaultValue, -]) { - if (logLevel == null) { - return defaultValue ?? []; - } - - return logLevel.map((e) => logLevelFromJson(e.toString())).toList(); -} - -List? logLevelNullableListFromJson( - List? logLevel, [ - List? defaultValue, -]) { - if (logLevel == null) { - return defaultValue; - } - - return logLevel.map((e) => logLevelFromJson(e.toString())).toList(); -} - -String? networkNullableToJson(enums.Network? network) { - return network?.value; -} - -String? networkToJson(enums.Network network) { - return network.value; -} - -enums.Network networkFromJson( - Object? network, [ - enums.Network? defaultValue, -]) { - return enums.Network.values.firstWhereOrNull((e) => e.value == network) ?? - defaultValue ?? - enums.Network.swaggerGeneratedUnknown; -} - -enums.Network? networkNullableFromJson( - Object? network, [ - enums.Network? defaultValue, -]) { - if (network == null) { - return null; - } - return enums.Network.values.firstWhereOrNull((e) => e.value == network) ?? - defaultValue; -} - -String networkExplodedListToJson(List? network) { - return network?.map((e) => e.value!).join(',') ?? ''; -} - -List networkListToJson(List? network) { - if (network == null) { - return []; - } - - return network.map((e) => e.value!).toList(); -} - -List networkListFromJson( - List? network, [ - List? defaultValue, -]) { - if (network == null) { - return defaultValue ?? []; - } - - return network.map((e) => networkFromJson(e.toString())).toList(); -} - -List? networkNullableListFromJson( - List? network, [ - List? defaultValue, -]) { - if (network == null) { - return defaultValue; - } - - return network.map((e) => networkFromJson(e.toString())).toList(); -} - -String? reasonRejectedNullableToJson(enums.ReasonRejected? reasonRejected) { - return reasonRejected?.value; -} - -String? reasonRejectedToJson(enums.ReasonRejected reasonRejected) { - return reasonRejected.value; -} - -enums.ReasonRejected reasonRejectedFromJson( - Object? reasonRejected, [ - enums.ReasonRejected? defaultValue, -]) { - return enums.ReasonRejected.values - .firstWhereOrNull((e) => e.value == reasonRejected) ?? - defaultValue ?? - enums.ReasonRejected.swaggerGeneratedUnknown; -} - -enums.ReasonRejected? reasonRejectedNullableFromJson( - Object? reasonRejected, [ - enums.ReasonRejected? defaultValue, -]) { - if (reasonRejected == null) { - return null; - } - return enums.ReasonRejected.values - .firstWhereOrNull((e) => e.value == reasonRejected) ?? - defaultValue; -} - -String reasonRejectedExplodedListToJson( - List? reasonRejected) { - return reasonRejected?.map((e) => e.value!).join(',') ?? ''; -} - -List reasonRejectedListToJson( - List? reasonRejected) { - if (reasonRejected == null) { - return []; - } - - return reasonRejected.map((e) => e.value!).toList(); -} - -List reasonRejectedListFromJson( - List? reasonRejected, [ - List? defaultValue, -]) { - if (reasonRejected == null) { - return defaultValue ?? []; - } - - return reasonRejected - .map((e) => reasonRejectedFromJson(e.toString())) - .toList(); -} - -List? reasonRejectedNullableListFromJson( - List? reasonRejected, [ - List? defaultValue, -]) { - if (reasonRejected == null) { - return defaultValue; - } - - return reasonRejected - .map((e) => reasonRejectedFromJson(e.toString())) - .toList(); -} - -String? voterGroupIdNullableToJson(enums.VoterGroupId? voterGroupId) { - return voterGroupId?.value; -} - -String? voterGroupIdToJson(enums.VoterGroupId voterGroupId) { - return voterGroupId.value; -} - -enums.VoterGroupId voterGroupIdFromJson( - Object? voterGroupId, [ - enums.VoterGroupId? defaultValue, -]) { - return enums.VoterGroupId.values - .firstWhereOrNull((e) => e.value == voterGroupId) ?? - defaultValue ?? - enums.VoterGroupId.swaggerGeneratedUnknown; -} - -enums.VoterGroupId? voterGroupIdNullableFromJson( - Object? voterGroupId, [ - enums.VoterGroupId? defaultValue, -]) { - if (voterGroupId == null) { - return null; - } - return enums.VoterGroupId.values - .firstWhereOrNull((e) => e.value == voterGroupId) ?? - defaultValue; -} - -String voterGroupIdExplodedListToJson(List? voterGroupId) { - return voterGroupId?.map((e) => e.value!).join(',') ?? ''; -} - -List voterGroupIdListToJson(List? voterGroupId) { - if (voterGroupId == null) { - return []; - } - - return voterGroupId.map((e) => e.value!).toList(); -} - -List voterGroupIdListFromJson( - List? voterGroupId, [ - List? defaultValue, -]) { - if (voterGroupId == null) { - return defaultValue ?? []; - } - - return voterGroupId.map((e) => voterGroupIdFromJson(e.toString())).toList(); -} - -List? voterGroupIdNullableListFromJson( - List? voterGroupId, [ - List? defaultValue, -]) { - if (voterGroupId == null) { - return defaultValue; - } - - 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) { - return null; - } - - final year = date.year.toString(); - final month = date.month < 10 ? '0${date.month}' : date.month.toString(); - final day = date.day < 10 ? '0${date.day}' : date.day.toString(); - - return '$year-$month-$day'; -} - -class Wrapped { - final T value; - const Wrapped.value(this.value); -} diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart deleted file mode 100644 index dca02d68ab..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart +++ /dev/null @@ -1,612 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'cat_gateway_api.models.swagger.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -AccountVote _$AccountVoteFromJson(Map json) => AccountVote( - votePlanId: json['vote_plan_id'] as String, - votes: (json['votes'] as List?) - ?.map((e) => (e as num).toInt()) - .toList() ?? - [], - ); - -Map _$AccountVoteToJson(AccountVote instance) => - { - 'vote_plan_id': instance.votePlanId, - 'votes': instance.votes, - }; - -BlockDate _$BlockDateFromJson(Map json) => BlockDate( - epoch: (json['epoch'] as num).toInt(), - slotId: (json['slot_id'] as num).toInt(), - ); - -Map _$BlockDateToJson(BlockDate instance) => { - 'epoch': instance.epoch, - 'slot_id': instance.slotId, - }; - -Cip36Info _$Cip36InfoFromJson(Map json) => Cip36Info( - stakePubKey: json['stake_pub_key'] as String, - nonce: (json['nonce'] as num).toInt(), - slotNo: (json['slot_no'] as num).toInt(), - txn: (json['txn'] as num).toInt(), - voteKey: json['vote_key'] as String, - paymentAddress: json['payment_address'] as String, - isPayable: json['is_payable'] as bool, - cip36: json['cip36'] as bool, - ); - -Map _$Cip36InfoToJson(Cip36Info instance) => { - 'stake_pub_key': instance.stakePubKey, - 'nonce': instance.nonce, - 'slot_no': instance.slotNo, - 'txn': instance.txn, - 'vote_key': instance.voteKey, - 'payment_address': instance.paymentAddress, - 'is_payable': instance.isPayable, - 'cip36': instance.cip36, - }; - -Cip36Reporting _$Cip36ReportingFromJson(Map json) => - Cip36Reporting( - cip36: (json['cip36'] as List?) - ?.map((e) => Cip36Info.fromJson(e as Map)) - .toList() ?? - [], - invalids: (json['invalids'] as List?) - ?.map((e) => InvalidRegistrationsReport.fromJson( - e as Map)) - .toList() ?? - [], - ); - -Map _$Cip36ReportingToJson(Cip36Reporting instance) => - { - 'cip36': instance.cip36.map((e) => e.toJson()).toList(), - 'invalids': instance.invalids.map((e) => e.toJson()).toList(), - }; - -Cip36ReportingList _$Cip36ReportingListFromJson(Map json) => - Cip36ReportingList( - cip36: (json['cip36'] as List?) - ?.map((e) => Cip36Reporting.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$Cip36ReportingListToJson(Cip36ReportingList instance) => - { - 'cip36': instance.cip36.map((e) => e.toJson()).toList(), - }; - -ConfigBadRequest _$ConfigBadRequestFromJson(Map json) => - ConfigBadRequest( - error: json['error'] as String, - schemaValidationErrors: - (json['schema_validation_errors'] as List?) - ?.map((e) => e as String) - .toList() ?? - [], - ); - -Map _$ConfigBadRequestToJson(ConfigBadRequest instance) => - { - 'error': instance.error, - 'schema_validation_errors': instance.schemaValidationErrors, - }; - -ContentErrorDetail _$ContentErrorDetailFromJson(Map json) => - ContentErrorDetail( - loc: (json['loc'] as List?)?.map((e) => e as String).toList() ?? - [], - msg: json['msg'] as String?, - type: json['type'] as String?, - ); - -Map _$ContentErrorDetailToJson(ContentErrorDetail instance) => - { - 'loc': instance.loc, - 'msg': instance.msg, - 'type': instance.type, - }; - -DelegatePublicKey _$DelegatePublicKeyFromJson(Map json) => - DelegatePublicKey( - address: json['address'] as String, - ); - -Map _$DelegatePublicKeyToJson(DelegatePublicKey instance) => - { - 'address': instance.address, - }; - -Delegation _$DelegationFromJson(Map json) => Delegation( - votingKey: json['voting_key'] as String, - power: (json['power'] as num).toInt(), - ); - -Map _$DelegationToJson(Delegation instance) => - { - 'voting_key': instance.votingKey, - 'power': instance.power, - }; - -Delegations _$DelegationsFromJson(Map json) => Delegations( - delegations: (json['delegations'] as List?) - ?.map((e) => Delegation.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$DelegationsToJson(Delegations instance) => - { - 'delegations': instance.delegations.map((e) => e.toJson()).toList(), - }; - -DirectVoter _$DirectVoterFromJson(Map json) => DirectVoter( - votingKey: json['voting_key'] as String, - ); - -Map _$DirectVoterToJson(DirectVoter instance) => - { - 'voting_key': instance.votingKey, - }; - -Forbidden _$ForbiddenFromJson(Map json) => Forbidden( - id: json['id'] as String, - msg: json['msg'] as String, - required: (json['required'] as List?) - ?.map((e) => e as String) - .toList() ?? - [], - ); - -Map _$ForbiddenToJson(Forbidden instance) => { - 'id': instance.id, - 'msg': instance.msg, - 'required': instance.required, - }; - -FragmentStatus _$FragmentStatusFromJson(Map json) => - FragmentStatus(); - -Map _$FragmentStatusToJson(FragmentStatus instance) => - {}; - -FragmentsBatch _$FragmentsBatchFromJson(Map json) => - FragmentsBatch( - failFast: json['fail_fast'] as bool, - fragments: (json['fragments'] as List?) - ?.map((e) => e as String) - .toList() ?? - [], - ); - -Map _$FragmentsBatchToJson(FragmentsBatch instance) => - { - 'fail_fast': instance.failFast, - 'fragments': instance.fragments, - }; - -FragmentsProcessingSummary _$FragmentsProcessingSummaryFromJson( - Map json) => - FragmentsProcessingSummary( - accepted: (json['accepted'] as List?) - ?.map((e) => e as String) - .toList() ?? - [], - rejected: (json['rejected'] as List?) - ?.map((e) => RejectedFragment.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$FragmentsProcessingSummaryToJson( - FragmentsProcessingSummary instance) => - { - 'accepted': instance.accepted, - 'rejected': instance.rejected.map((e) => e.toJson()).toList(), - }; - -FrontendConfig _$FrontendConfigFromJson(Map json) => - FrontendConfig( - sentry: json['sentry'] == null - ? null - : Sentry.fromJson(json['sentry'] as Map), - ); - -Map _$FrontendConfigToJson(FrontendConfig instance) => - { - 'sentry': instance.sentry?.toJson(), - }; - -FullStakeInfo _$FullStakeInfoFromJson(Map json) => - FullStakeInfo( - volatile: StakeInfo.fromJson(json['volatile'] as Map), - persistent: - StakeInfo.fromJson(json['persistent'] as Map), - ); - -Map _$FullStakeInfoToJson(FullStakeInfo instance) => - { - 'volatile': instance.volatile.toJson(), - 'persistent': instance.persistent.toJson(), - }; - -Hash _$HashFromJson(Map json) => Hash( - hash: json['hash'] as String, - ); - -Map _$HashToJson(Hash instance) => { - 'hash': instance.hash, - }; - -InternalServerError _$InternalServerErrorFromJson(Map json) => - InternalServerError( - id: json['id'] as String, - msg: json['msg'] as String, - issue: json['issue'] as String?, - ); - -Map _$InternalServerErrorToJson( - InternalServerError instance) => - { - 'id': instance.id, - 'msg': instance.msg, - 'issue': instance.issue, - }; - -InvalidRegistrationsReport _$InvalidRegistrationsReportFromJson( - Map json) => - InvalidRegistrationsReport( - errorReport: (json['error_report'] as List?) - ?.map((e) => e as String) - .toList() ?? - [], - stakeAddress: json['stake_address'] as String, - voteKey: json['vote_key'] as String, - paymentAddress: json['payment_address'] as String, - isPayable: json['is_payable'] as bool, - cip36: json['cip36'] as bool, - ); - -Map _$InvalidRegistrationsReportToJson( - InvalidRegistrationsReport instance) => - { - 'error_report': instance.errorReport, - 'stake_address': instance.stakeAddress, - 'vote_key': instance.voteKey, - 'payment_address': instance.paymentAddress, - 'is_payable': instance.isPayable, - 'cip36': instance.cip36, - }; - -RbacRegistration _$RbacRegistrationFromJson(Map json) => - RbacRegistration( - txHash: json['tx_hash'] as String, - ); - -Map _$RbacRegistrationToJson(RbacRegistration instance) => - { - 'tx_hash': instance.txHash, - }; - -RbacRegistrationsResponse _$RbacRegistrationsResponseFromJson( - Map json) => - RbacRegistrationsResponse( - registrations: (json['registrations'] as List?) - ?.map((e) => RbacRegistration.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$RbacRegistrationsResponseToJson( - RbacRegistrationsResponse instance) => - { - 'registrations': instance.registrations.map((e) => e.toJson()).toList(), - }; - -RbacRole0ChainRootResponse _$RbacRole0ChainRootResponseFromJson( - Map json) => - RbacRole0ChainRootResponse( - chainRoot: json['chain_root'] as String, - ); - -Map _$RbacRole0ChainRootResponseToJson( - RbacRole0ChainRootResponse instance) => - { - 'chain_root': instance.chainRoot, - }; - -RegistrationInfo _$RegistrationInfoFromJson(Map json) => - RegistrationInfo( - rewardsAddress: json['rewards_address'] as String, - txHash: json['tx_hash'] as String, - nonce: (json['nonce'] as num).toInt(), - votingInfo: - VotingInfo.fromJson(json['voting_info'] as Map), - ); - -Map _$RegistrationInfoToJson(RegistrationInfo instance) => - { - 'rewards_address': instance.rewardsAddress, - 'tx_hash': instance.txHash, - 'nonce': instance.nonce, - 'voting_info': instance.votingInfo.toJson(), - }; - -RejectedFragment _$RejectedFragmentFromJson(Map json) => - RejectedFragment( - id: json['id'] as String, - poolNumber: (json['pool_number'] as num).toInt(), - reason: reasonRejectedFromJson(json['reason']), - ); - -Map _$RejectedFragmentToJson(RejectedFragment instance) => - { - 'id': instance.id, - 'pool_number': instance.poolNumber, - 'reason': reasonRejectedToJson(instance.reason), - }; - -Response$ _$Response$FromJson(Map json) => Response$( - chainRoot: json['chain_root'] as String, - ); - -Map _$Response$ToJson(Response$ instance) => { - 'chain_root': instance.chainRoot, - }; - -Sentry _$SentryFromJson(Map json) => Sentry( - dsn: json['dsn'] as String, - release: json['release'] as String?, - environment: json['environment'] as String?, - ); - -Map _$SentryToJson(Sentry instance) => { - 'dsn': instance.dsn, - 'release': instance.release, - 'environment': instance.environment, - }; - -ServiceUnavailable _$ServiceUnavailableFromJson(Map json) => - ServiceUnavailable( - id: json['id'] as String, - msg: json['msg'] as String, - ); - -Map _$ServiceUnavailableToJson(ServiceUnavailable instance) => - { - 'id': instance.id, - 'msg': instance.msg, - }; - -Slot _$SlotFromJson(Map json) => Slot( - slotNumber: (json['slot_number'] as num).toInt(), - blockHash: json['block_hash'] as String, - blockTime: DateTime.parse(json['block_time'] as String), - ); - -Map _$SlotToJson(Slot instance) => { - 'slot_number': instance.slotNumber, - 'block_hash': instance.blockHash, - 'block_time': instance.blockTime.toIso8601String(), - }; - -SlotInfo _$SlotInfoFromJson(Map json) => SlotInfo( - previous: json['previous'] == null - ? null - : Slot.fromJson(json['previous'] as Map), - current: json['current'] == null - ? null - : Slot.fromJson(json['current'] as Map), - next: json['next'] == null - ? null - : Slot.fromJson(json['next'] as Map), - ); - -Map _$SlotInfoToJson(SlotInfo instance) => { - 'previous': instance.previous?.toJson(), - 'current': instance.current?.toJson(), - 'next': instance.next?.toJson(), - }; - -StakeInfo _$StakeInfoFromJson(Map json) => StakeInfo( - adaAmount: (json['ada_amount'] as num).toInt(), - slotNumber: (json['slot_number'] as num).toInt(), - nativeTokens: (json['native_tokens'] as List?) - ?.map((e) => - StakedNativeTokenInfo.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$StakeInfoToJson(StakeInfo instance) => { - 'ada_amount': instance.adaAmount, - 'slot_number': instance.slotNumber, - 'native_tokens': instance.nativeTokens.map((e) => e.toJson()).toList(), - }; - -StakedNativeTokenInfo _$StakedNativeTokenInfoFromJson( - Map json) => - StakedNativeTokenInfo( - policyHash: json['policy_hash'] as String, - assetName: json['asset_name'] as String, - amount: (json['amount'] as num).toInt(), - ); - -Map _$StakedNativeTokenInfoToJson( - StakedNativeTokenInfo instance) => - { - 'policy_hash': instance.policyHash, - 'asset_name': instance.assetName, - 'amount': instance.amount, - }; - -StatusInABlock _$StatusInABlockFromJson(Map json) => - StatusInABlock( - date: BlockDate.fromJson(json['date'] as Map), - block: Hash.fromJson(json['block'] as Map), - ); - -Map _$StatusInABlockToJson(StatusInABlock instance) => - { - 'date': instance.date.toJson(), - 'block': instance.block.toJson(), - }; - -StatusPending _$StatusPendingFromJson(Map json) => - StatusPending(); - -Map _$StatusPendingToJson(StatusPending instance) => - {}; - -StatusRejected _$StatusRejectedFromJson(Map json) => - StatusRejected( - reason: json['reason'] as String, - ); - -Map _$StatusRejectedToJson(StatusRejected instance) => - { - 'reason': instance.reason, - }; - -SyncState _$SyncStateFromJson(Map json) => SyncState( - slotNumber: (json['slot_number'] as num).toInt(), - blockHash: json['block_hash'] as String, - lastUpdated: DateTime.parse(json['last_updated'] as String), - ); - -Map _$SyncStateToJson(SyncState instance) => { - 'slot_number': instance.slotNumber, - 'block_hash': instance.blockHash, - 'last_updated': instance.lastUpdated.toIso8601String(), - }; - -TooManyRequests _$TooManyRequestsFromJson(Map json) => - TooManyRequests( - id: json['id'] as String, - msg: json['msg'] as String, - ); - -Map _$TooManyRequestsToJson(TooManyRequests instance) => - { - 'id': instance.id, - 'msg': instance.msg, - }; - -Unauthorized _$UnauthorizedFromJson(Map json) => Unauthorized( - id: json['id'] as String, - msg: json['msg'] as String, - ); - -Map _$UnauthorizedToJson(Unauthorized instance) => - { - 'id': instance.id, - 'msg': instance.msg, - }; - -UnprocessableContent _$UnprocessableContentFromJson( - Map json) => - UnprocessableContent( - detail: (json['detail'] as List?) - ?.map( - (e) => ContentErrorDetail.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$UnprocessableContentToJson( - UnprocessableContent instance) => - { - 'detail': instance.detail.map((e) => e.toJson()).toList(), - }; - -VotePlan _$VotePlanFromJson(Map json) => VotePlan( - votingToken: json['voting_token'] as String, - ); - -Map _$VotePlanToJson(VotePlan instance) => { - 'voting_token': instance.votingToken, - }; - -VoterInfo _$VoterInfoFromJson(Map json) => VoterInfo( - votingPower: (json['voting_power'] as num).toInt(), - votingGroup: voterGroupIdFromJson(json['voting_group']), - delegationsPower: (json['delegations_power'] as num).toInt(), - delegationsCount: (json['delegations_count'] as num).toInt(), - votingPowerSaturation: - (json['voting_power_saturation'] as num).toDouble(), - delegatorAddresses: (json['delegator_addresses'] as List?) - ?.map( - (e) => DelegatePublicKey.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$VoterInfoToJson(VoterInfo instance) => { - 'voting_power': instance.votingPower, - 'voting_group': voterGroupIdToJson(instance.votingGroup), - 'delegations_power': instance.delegationsPower, - 'delegations_count': instance.delegationsCount, - 'voting_power_saturation': instance.votingPowerSaturation, - 'delegator_addresses': - instance.delegatorAddresses?.map((e) => e.toJson()).toList(), - }; - -VoterRegistration _$VoterRegistrationFromJson(Map json) => - VoterRegistration( - voterInfo: VoterInfo.fromJson(json['voter_info'] as Map), - asAt: DateTime.parse(json['as_at'] as String), - lastUpdated: DateTime.parse(json['last_updated'] as String), - $final: json['final'] as bool, - ); - -Map _$VoterRegistrationToJson(VoterRegistration instance) => - { - 'voter_info': instance.voterInfo.toJson(), - 'as_at': instance.asAt.toIso8601String(), - 'last_updated': instance.lastUpdated.toIso8601String(), - 'final': instance.$final, - }; - -VotingInfo _$VotingInfoFromJson(Map json) => VotingInfo(); - -Map _$VotingInfoToJson(VotingInfo instance) => - {}; - -VotingInfoDelegations _$VotingInfoDelegationsFromJson( - Map json) => - VotingInfoDelegations( - type: votingInfoDelegationsTypeFromJson(json['type']), - delegations: (json['delegations'] as List?) - ?.map((e) => Delegation.fromJson(e as Map)) - .toList() ?? - [], - ); - -Map _$VotingInfoDelegationsToJson( - VotingInfoDelegations instance) => - { - 'type': votingInfoDelegationsTypeToJson(instance.type), - 'delegations': instance.delegations.map((e) => e.toJson()).toList(), - }; - -VotingInfoDirectVoter _$VotingInfoDirectVoterFromJson( - Map json) => - VotingInfoDirectVoter( - type: votingInfoDirectVoterTypeFromJson(json['type']), - votingKey: json['voting_key'] as String, - ); - -Map _$VotingInfoDirectVoterToJson( - VotingInfoDirectVoter instance) => - { - 'type': votingInfoDirectVoterTypeToJson(instance.type), - 'voting_key': instance.votingKey, - }; diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.swagger.chopper.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.swagger.chopper.dart deleted file mode 100644 index 57ab55da52..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.swagger.chopper.dart +++ /dev/null @@ -1,364 +0,0 @@ -// Generated code - -part of 'cat_gateway_api.swagger.dart'; - -// ************************************************************************** -// ChopperGenerator -// ************************************************************************** - -// coverage:ignore-file -// ignore_for_file: type=lint -final class _$CatGatewayApi extends CatGatewayApi { - _$CatGatewayApi([ChopperClient? client]) { - if (client == null) return; - this.client = client; - } - - @override - final Type definitionType = CatGatewayApi; - - @override - Future> _apiV1HealthStartedGet() { - final Uri $url = Uri.parse('/api/v1/health/started'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send($request); - } - - @override - Future> _apiV1HealthReadyGet() { - final Uri $url = Uri.parse('/api/v1/health/ready'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send($request); - } - - @override - Future> _apiV1HealthLiveGet() { - final Uri $url = Uri.parse('/api/v1/health/live'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send($request); - } - - @override - Future> _apiV1HealthInspectionPut({ - String? logLevel, - String? queryInspection, - }) { - final Uri $url = Uri.parse('/api/v1/health/inspection'); - final Map $params = { - 'log_level': logLevel, - 'query_inspection': queryInspection, - }; - final Request $request = Request( - 'PUT', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> - _apiDraftCardanoRegistrationStakeAddressGet({ - required String? stakeAddress, - String? network, - int? slotNumber, - }) { - final Uri $url = - Uri.parse('/api/draft/cardano/registration/${stakeAddress}'); - final Map $params = { - 'network': network, - 'slot_number': slotNumber, - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> _apiDraftCardanoSyncStateGet({String? network}) { - final Uri $url = Uri.parse('/api/draft/cardano/sync_state'); - final Map $params = {'network': network}; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> _apiDraftCardanoDateTimeToSlotNumberGet({ - DateTime? dateTime, - String? network, - }) { - final Uri $url = Uri.parse('/api/draft/cardano/date_time_to_slot_number'); - final Map $params = { - 'date_time': dateTime, - 'network': network, - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> - _apiDraftCardanoCip36LatestRegistrationStakeAddrGet( - {required String? stakePubKey}) { - final Uri $url = - Uri.parse('/api/draft/cardano/cip36/latest_registration/stake_addr'); - final Map $params = { - 'stake_pub_key': stakePubKey - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> - _apiDraftCardanoCip36LatestRegistrationStakeKeyHashGet( - {required String? stakeKeyHash}) { - final Uri $url = Uri.parse( - '/api/draft/cardano/cip36/latest_registration/stake_key_hash'); - final Map $params = { - 'stake_key_hash': stakeKeyHash - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> - _apiDraftCardanoCip36LatestRegistrationVoteKeyGet( - {required String? voteKey}) { - final Uri $url = - Uri.parse('/api/draft/cardano/cip36/latest_registration/vote_key'); - final Map $params = {'vote_key': voteKey}; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> _apiDraftRbacChainRootStakeAddressGet( - {required String? stakeAddress}) { - final Uri $url = Uri.parse('/api/draft/rbac/chain_root/${stakeAddress}'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send($request); - } - - @override - Future> - _apiDraftRbacRegistrationsChainRootGet({required String? chainRoot}) { - final Uri $url = Uri.parse('/api/draft/rbac/registrations/${chainRoot}'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client - .send($request); - } - - @override - Future> - _apiDraftRbacRole0ChainRootRole0KeyGet({required String? role0Key}) { - final Uri $url = Uri.parse('/api/draft/rbac/role0_chain_root/${role0Key}'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client - .send($request); - } - - @override - Future> _apiDraftCardanoAssetsStakeAddressGet({ - required String? stakeAddress, - String? network, - int? slotNumber, - }) { - final Uri $url = Uri.parse('/api/draft/cardano/assets/${stakeAddress}'); - final Map $params = { - 'network': network, - 'slot_number': slotNumber, - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> _apiDraftConfigFrontendGet() { - final Uri $url = Uri.parse('/api/draft/config/frontend'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send($request); - } - - @override - Future> _apiDraftConfigFrontendPut({ - Object? ip, - required FrontendConfig? body, - }) { - final Uri $url = Uri.parse('/api/draft/config/frontend'); - final Map $params = {'IP': ip}; - final $body = body; - final Request $request = Request( - 'PUT', - $url, - client.baseUrl, - body: $body, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> _apiDraftConfigFrontendSchemaGet() { - final Uri $url = Uri.parse('/api/draft/config/frontend/schema'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send($request); - } - - @override - Future> _apiV1RegistrationVoterVotingKeyGet({ - required String? votingKey, - int? eventIndex, - bool? withDelegators, - }) { - final Uri $url = Uri.parse('/api/v1/registration/voter/${votingKey}'); - final Map $params = { - 'event_index': eventIndex, - 'with_delegators': withDelegators, - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } - - @override - Future> _apiV0MessagePost( - {required Object? body}) { - final Uri $url = Uri.parse('/api/v0/message'); - final $body = body; - final Request $request = Request( - 'POST', - $url, - client.baseUrl, - body: $body, - ); - return client - .send($request); - } - - @override - Future>> _apiV0VoteActivePlansGet() { - final Uri $url = Uri.parse('/api/v0/vote/active/plans'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send, VotePlan>($request); - } - - @override - Future>> _apiV1VotesPlanAccountVotesAccountIdGet( - {required String? accountId}) { - final Uri $url = Uri.parse('/api/v1/votes/plan/account-votes/${accountId}'); - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - ); - return client.send, AccountVote>($request); - } - - @override - Future> _apiV1FragmentsPost( - {required FragmentsBatch? body}) { - final Uri $url = Uri.parse('/api/v1/fragments'); - final $body = body; - final Request $request = Request( - 'POST', - $url, - client.baseUrl, - body: $body, - ); - return client - .send($request); - } - - @override - Future> _apiV1FragmentsStatusesGet( - {required List? fragmentIds}) { - final Uri $url = Uri.parse('/api/v1/fragments/statuses'); - final Map $params = { - 'fragment_ids': fragmentIds - }; - final Request $request = Request( - 'GET', - $url, - client.baseUrl, - parameters: $params, - ); - return client.send($request); - } -} diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.swagger.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.swagger.dart deleted file mode 100644 index 18da5dd442..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.swagger.dart +++ /dev/null @@ -1,538 +0,0 @@ -// ignore_for_file: type=lint - -import 'package:json_annotation/json_annotation.dart'; -import 'package:collection/collection.dart'; -import 'dart:convert'; - -import 'cat_gateway_api.models.swagger.dart'; -import 'package:chopper/chopper.dart'; - -import 'client_mapping.dart'; -import 'dart:async'; -import 'package:http/http.dart' as http; -import 'package:http/http.dart' show MultipartFile; -import 'package:chopper/chopper.dart' as chopper; -import 'cat_gateway_api.enums.swagger.dart' as enums; -export 'cat_gateway_api.enums.swagger.dart'; -export 'cat_gateway_api.models.swagger.dart'; - -part 'cat_gateway_api.swagger.chopper.dart'; - -// ************************************************************************** -// SwaggerChopperGenerator -// ************************************************************************** - -@ChopperApi() -abstract class CatGatewayApi extends ChopperService { - static CatGatewayApi create({ - ChopperClient? client, - http.Client? httpClient, - Authenticator? authenticator, - ErrorConverter? errorConverter, - Converter? converter, - Uri? baseUrl, - Iterable? interceptors, - }) { - if (client != null) { - return _$CatGatewayApi(client); - } - - final newClient = ChopperClient( - services: [_$CatGatewayApi()], - converter: converter ?? $JsonSerializableConverter(), - interceptors: interceptors ?? [], - client: httpClient, - authenticator: authenticator, - errorConverter: errorConverter, - baseUrl: baseUrl ?? Uri.parse('http://')); - return _$CatGatewayApi(newClient); - } - - ///Service Started - Future apiV1HealthStartedGet() { - return _apiV1HealthStartedGet(); - } - - ///Service Started - @Get(path: '/api/v1/health/started') - Future _apiV1HealthStartedGet(); - - ///Service Ready - Future apiV1HealthReadyGet() { - return _apiV1HealthReadyGet(); - } - - ///Service Ready - @Get(path: '/api/v1/health/ready') - Future _apiV1HealthReadyGet(); - - ///Service Live - Future apiV1HealthLiveGet() { - return _apiV1HealthLiveGet(); - } - - ///Service Live - @Get(path: '/api/v1/health/live') - Future _apiV1HealthLiveGet(); - - ///Service Inspection Control. - ///@param log_level The log level to use for the service. Controls what detail gets logged. - ///@param query_inspection Enable or disable Verbose Query inspection in the logs. Used to find query performance issues. - Future apiV1HealthInspectionPut({ - enums.LogLevel? logLevel, - enums.DeepQueryInspectionFlag? queryInspection, - }) { - return _apiV1HealthInspectionPut( - logLevel: logLevel?.value?.toString(), - queryInspection: queryInspection?.value?.toString()); - } - - ///Service Inspection Control. - ///@param log_level The log level to use for the service. Controls what detail gets logged. - ///@param query_inspection Enable or disable Verbose Query inspection in the logs. Used to find query performance issues. - @Put( - path: '/api/v1/health/inspection', - optionalBody: true, - ) - Future _apiV1HealthInspectionPut({ - @Query('log_level') String? logLevel, - @Query('query_inspection') String? queryInspection, - }); - - ///Get registration info. - ///@param stake_address The stake address of the user. Should be a valid Bech32 encoded address followed by the https://cips.cardano.org/cip/CIP-19/#stake-addresses. - ///@param network Cardano network type. If omitted network type is identified from the stake address. If specified it must be correspondent to the network type encoded in the stake address. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - ///@param slot_number Slot number at which the staked ADA amount should be calculated. If omitted latest slot number is used. - Future> - apiDraftCardanoRegistrationStakeAddressGet({ - required String? stakeAddress, - enums.Network? network, - int? slotNumber, - }) { - generatedMapping.putIfAbsent( - RegistrationInfo, () => RegistrationInfo.fromJsonFactory); - - return _apiDraftCardanoRegistrationStakeAddressGet( - stakeAddress: stakeAddress, - network: network?.value?.toString(), - slotNumber: slotNumber); - } - - ///Get registration info. - ///@param stake_address The stake address of the user. Should be a valid Bech32 encoded address followed by the https://cips.cardano.org/cip/CIP-19/#stake-addresses. - ///@param network Cardano network type. If omitted network type is identified from the stake address. If specified it must be correspondent to the network type encoded in the stake address. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - ///@param slot_number Slot number at which the staked ADA amount should be calculated. If omitted latest slot number is used. - @Get(path: '/api/draft/cardano/registration/{stake_address}') - Future> - _apiDraftCardanoRegistrationStakeAddressGet({ - @Path('stake_address') required String? stakeAddress, - @Query('network') String? network, - @Query('slot_number') int? slotNumber, - }); - - ///Get Cardano follower's sync state. - ///@param network Cardano network type. If omitted `mainnet` network type is defined. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - Future> apiDraftCardanoSyncStateGet( - {enums.Network? network}) { - generatedMapping.putIfAbsent(SyncState, () => SyncState.fromJsonFactory); - - return _apiDraftCardanoSyncStateGet(network: network?.value?.toString()); - } - - ///Get Cardano follower's sync state. - ///@param network Cardano network type. If omitted `mainnet` network type is defined. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - @Get(path: '/api/draft/cardano/sync_state') - Future> _apiDraftCardanoSyncStateGet( - {@Query('network') String? network}); - - ///Get Cardano slot info to the provided date-time. - ///@param date_time The date-time for which the slot number should be calculated. If omitted current date time is used. - ///@param network Cardano network type. If omitted `mainnet` network type is defined. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - Future> apiDraftCardanoDateTimeToSlotNumberGet({ - DateTime? dateTime, - enums.Network? network, - }) { - generatedMapping.putIfAbsent(SlotInfo, () => SlotInfo.fromJsonFactory); - - return _apiDraftCardanoDateTimeToSlotNumberGet( - dateTime: dateTime, network: network?.value?.toString()); - } - - ///Get Cardano slot info to the provided date-time. - ///@param date_time The date-time for which the slot number should be calculated. If omitted current date time is used. - ///@param network Cardano network type. If omitted `mainnet` network type is defined. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - @Get(path: '/api/draft/cardano/date_time_to_slot_number') - Future> _apiDraftCardanoDateTimeToSlotNumberGet({ - @Query('date_time') DateTime? dateTime, - @Query('network') String? network, - }); - - ///Get latest CIP36 registrations from stake address. - ///@param stake_pub_key Stake Public Key to find the latest registration for. - Future> - apiDraftCardanoCip36LatestRegistrationStakeAddrGet( - {required String? stakePubKey}) { - generatedMapping.putIfAbsent( - Cip36Reporting, () => Cip36Reporting.fromJsonFactory); - - return _apiDraftCardanoCip36LatestRegistrationStakeAddrGet( - stakePubKey: stakePubKey); - } - - ///Get latest CIP36 registrations from stake address. - ///@param stake_pub_key Stake Public Key to find the latest registration for. - @Get(path: '/api/draft/cardano/cip36/latest_registration/stake_addr') - Future> - _apiDraftCardanoCip36LatestRegistrationStakeAddrGet( - {@Query('stake_pub_key') required String? stakePubKey}); - - ///Get latest CIP36 registrations from a stake key hash. - ///@param stake_key_hash Stake Key Hash to find the latest registration for. - Future> - apiDraftCardanoCip36LatestRegistrationStakeKeyHashGet( - {required String? stakeKeyHash}) { - generatedMapping.putIfAbsent( - Cip36Reporting, () => Cip36Reporting.fromJsonFactory); - - return _apiDraftCardanoCip36LatestRegistrationStakeKeyHashGet( - stakeKeyHash: stakeKeyHash); - } - - ///Get latest CIP36 registrations from a stake key hash. - ///@param stake_key_hash Stake Key Hash to find the latest registration for. - @Get(path: '/api/draft/cardano/cip36/latest_registration/stake_key_hash') - Future> - _apiDraftCardanoCip36LatestRegistrationStakeKeyHashGet( - {@Query('stake_key_hash') required String? stakeKeyHash}); - - ///Get latest CIP36 registrations from voting key. - ///@param vote_key Voting Key to find CIP36 registrations for. - Future> - apiDraftCardanoCip36LatestRegistrationVoteKeyGet( - {required String? voteKey}) { - generatedMapping.putIfAbsent( - Cip36ReportingList, () => Cip36ReportingList.fromJsonFactory); - - return _apiDraftCardanoCip36LatestRegistrationVoteKeyGet(voteKey: voteKey); - } - - ///Get latest CIP36 registrations from voting key. - ///@param vote_key Voting Key to find CIP36 registrations for. - @Get(path: '/api/draft/cardano/cip36/latest_registration/vote_key') - Future> - _apiDraftCardanoCip36LatestRegistrationVoteKeyGet( - {@Query('vote_key') required String? voteKey}); - - ///Get RBAC chain root - ///@param stake_address Stake address to get the chain root for. - Future> apiDraftRbacChainRootStakeAddressGet( - {required String? stakeAddress}) { - generatedMapping.putIfAbsent(Response$, () => Response$.fromJsonFactory); - - return _apiDraftRbacChainRootStakeAddressGet(stakeAddress: stakeAddress); - } - - ///Get RBAC chain root - ///@param stake_address Stake address to get the chain root for. - @Get(path: '/api/draft/rbac/chain_root/{stake_address}') - Future> _apiDraftRbacChainRootStakeAddressGet( - {@Path('stake_address') required String? stakeAddress}); - - ///Get registrations by RBAC chain root - ///@param chain_root Chain root to get the registrations for. - Future> - apiDraftRbacRegistrationsChainRootGet({required String? chainRoot}) { - generatedMapping.putIfAbsent(RbacRegistrationsResponse, - () => RbacRegistrationsResponse.fromJsonFactory); - - return _apiDraftRbacRegistrationsChainRootGet(chainRoot: chainRoot); - } - - ///Get registrations by RBAC chain root - ///@param chain_root Chain root to get the registrations for. - @Get(path: '/api/draft/rbac/registrations/{chain_root}') - Future> - _apiDraftRbacRegistrationsChainRootGet( - {@Path('chain_root') required String? chainRoot}); - - ///Get RBAC chain root for a given role0 key. - ///@param role0_key Role0 key to get the chain root for. - Future> - apiDraftRbacRole0ChainRootRole0KeyGet({required String? role0Key}) { - generatedMapping.putIfAbsent(RbacRole0ChainRootResponse, - () => RbacRole0ChainRootResponse.fromJsonFactory); - - return _apiDraftRbacRole0ChainRootRole0KeyGet(role0Key: role0Key); - } - - ///Get RBAC chain root for a given role0 key. - ///@param role0_key Role0 key to get the chain root for. - @Get(path: '/api/draft/rbac/role0_chain_root/{role0_key}') - Future> - _apiDraftRbacRole0ChainRootRole0KeyGet( - {@Path('role0_key') required String? role0Key}); - - ///Get staked ADA amount. - ///@param stake_address The stake address of the user. Should be a valid Bech32 encoded address followed by the https://cips.cardano.org/cip/CIP-19/#stake-addresses. - ///@param network Cardano network type. If omitted network type is identified from the stake address. If specified it must be correspondent to the network type encoded in the stake address. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - ///@param slot_number Slot number at which the staked ADA amount should be calculated. If omitted latest slot number is used. - Future> apiDraftCardanoAssetsStakeAddressGet({ - required String? stakeAddress, - enums.Network? network, - int? slotNumber, - }) { - generatedMapping.putIfAbsent( - FullStakeInfo, () => FullStakeInfo.fromJsonFactory); - - return _apiDraftCardanoAssetsStakeAddressGet( - stakeAddress: stakeAddress, - network: network?.value?.toString(), - slotNumber: slotNumber); - } - - ///Get staked ADA amount. - ///@param stake_address The stake address of the user. Should be a valid Bech32 encoded address followed by the https://cips.cardano.org/cip/CIP-19/#stake-addresses. - ///@param network Cardano network type. If omitted network type is identified from the stake address. If specified it must be correspondent to the network type encoded in the stake address. As `preprod` and `preview` network types in the stake address encoded as a `testnet`, to specify `preprod` or `preview` network type use this query parameter. - ///@param slot_number Slot number at which the staked ADA amount should be calculated. If omitted latest slot number is used. - @Get(path: '/api/draft/cardano/assets/{stake_address}') - Future> - _apiDraftCardanoAssetsStakeAddressGet({ - @Path('stake_address') required String? stakeAddress, - @Query('network') String? network, - @Query('slot_number') int? slotNumber, - }); - - ///Get the configuration for the frontend. - Future> apiDraftConfigFrontendGet() { - generatedMapping.putIfAbsent( - FrontendConfig, () => FrontendConfig.fromJsonFactory); - - return _apiDraftConfigFrontendGet(); - } - - ///Get the configuration for the frontend. - @Get(path: '/api/draft/config/frontend') - Future> _apiDraftConfigFrontendGet(); - - ///Set the frontend configuration. - ///@param IP *OPTIONAL* The IP Address to set the configuration for. - Future apiDraftConfigFrontendPut({ - Object? ip, - required FrontendConfig? body, - }) { - return _apiDraftConfigFrontendPut(ip: ip, body: body); - } - - ///Set the frontend configuration. - ///@param IP *OPTIONAL* The IP Address to set the configuration for. - @Put( - path: '/api/draft/config/frontend', - optionalBody: true, - ) - Future _apiDraftConfigFrontendPut({ - @Query('IP') Object? ip, - @Body() required FrontendConfig? body, - }); - - ///Get the frontend configuration JSON schema. - Future> apiDraftConfigFrontendSchemaGet() { - generatedMapping.putIfAbsent( - FrontendConfig, () => FrontendConfig.fromJsonFactory); - - return _apiDraftConfigFrontendSchemaGet(); - } - - ///Get the frontend configuration JSON schema. - @Get(path: '/api/draft/config/frontend/schema') - Future> _apiDraftConfigFrontendSchemaGet(); - - ///Voter's info - ///@param voting_key A Voters Public ED25519 Key (as registered in their most recent valid [CIP-15](https://cips.cardano.org/cips/cip15) or [CIP-36](https://cips.cardano.org/cips/cip36) registration). - ///@param event_index The Event Index to return results for. See [GET Events](Link to events endpoint) for details on retrieving all valid event IDs. - ///@param with_delegators If this optional flag is set, the response will include the delegator's list in the response. Otherwise, it will be omitted. - @deprecated - Future> - apiV1RegistrationVoterVotingKeyGet({ - required String? votingKey, - int? eventIndex, - bool? withDelegators, - }) { - generatedMapping.putIfAbsent( - VoterRegistration, () => VoterRegistration.fromJsonFactory); - - return _apiV1RegistrationVoterVotingKeyGet( - votingKey: votingKey, - eventIndex: eventIndex, - withDelegators: withDelegators); - } - - ///Voter's info - ///@param voting_key A Voters Public ED25519 Key (as registered in their most recent valid [CIP-15](https://cips.cardano.org/cips/cip15) or [CIP-36](https://cips.cardano.org/cips/cip36) registration). - ///@param event_index The Event Index to return results for. See [GET Events](Link to events endpoint) for details on retrieving all valid event IDs. - ///@param with_delegators If this optional flag is set, the response will include the delegator's list in the response. Otherwise, it will be omitted. - @deprecated - @Get(path: '/api/v1/registration/voter/{voting_key}') - Future> - _apiV1RegistrationVoterVotingKeyGet({ - @Path('voting_key') required String? votingKey, - @Query('event_index') int? eventIndex, - @Query('with_delegators') bool? withDelegators, - }); - - ///Posts a signed transaction. - @deprecated - Future> apiV0MessagePost( - {required Object? body}) { - generatedMapping.putIfAbsent(FragmentsProcessingSummary, - () => FragmentsProcessingSummary.fromJsonFactory); - - return _apiV0MessagePost(body: body); - } - - ///Posts a signed transaction. - @deprecated - @Post( - path: '/api/v0/message', - optionalBody: true, - ) - Future> _apiV0MessagePost( - {@Body() required Object? body}); - - ///Get all active vote plans endpoint. - @deprecated - Future>> apiV0VoteActivePlansGet() { - generatedMapping.putIfAbsent(VotePlan, () => VotePlan.fromJsonFactory); - - return _apiV0VoteActivePlansGet(); - } - - ///Get all active vote plans endpoint. - @deprecated - @Get(path: '/api/v0/vote/active/plans') - Future>> _apiV0VoteActivePlansGet(); - - ///Get Account Votes - ///@param account_id A account ID to get the votes for. - @deprecated - Future>> - apiV1VotesPlanAccountVotesAccountIdGet({required String? accountId}) { - generatedMapping.putIfAbsent( - AccountVote, () => AccountVote.fromJsonFactory); - - return _apiV1VotesPlanAccountVotesAccountIdGet(accountId: accountId); - } - - ///Get Account Votes - ///@param account_id A account ID to get the votes for. - @deprecated - @Get(path: '/api/v1/votes/plan/account-votes/{account_id}') - Future>> - _apiV1VotesPlanAccountVotesAccountIdGet( - {@Path('account_id') required String? accountId}); - - ///Process fragments - @deprecated - Future> apiV1FragmentsPost( - {required FragmentsBatch? body}) { - generatedMapping.putIfAbsent(FragmentsProcessingSummary, - () => FragmentsProcessingSummary.fromJsonFactory); - - return _apiV1FragmentsPost(body: body); - } - - ///Process fragments - @deprecated - @Post( - path: '/api/v1/fragments', - optionalBody: true, - ) - Future> _apiV1FragmentsPost( - {@Body() required FragmentsBatch? body}); - - ///Get Fragment Statuses - ///@param fragment_ids Comma-separated list of fragment ids for which the statuses will be retrieved. - @deprecated - Future> apiV1FragmentsStatusesGet( - {required List? fragmentIds}) { - return _apiV1FragmentsStatusesGet(fragmentIds: fragmentIds); - } - - ///Get Fragment Statuses - ///@param fragment_ids Comma-separated list of fragment ids for which the statuses will be retrieved. - @deprecated - @Get(path: '/api/v1/fragments/statuses') - Future> _apiV1FragmentsStatusesGet( - {@Query('fragment_ids') required List? fragmentIds}); -} - -typedef $JsonFactory = T Function(Map json); - -class $CustomJsonDecoder { - $CustomJsonDecoder(this.factories); - - final Map factories; - - dynamic decode(dynamic entity) { - if (entity is Iterable) { - return _decodeList(entity); - } - - if (entity is T) { - return entity; - } - - if (isTypeOf()) { - return entity; - } - - if (isTypeOf()) { - return entity; - } - - if (entity is Map) { - return _decodeMap(entity); - } - - return entity; - } - - T _decodeMap(Map values) { - final jsonFactory = factories[T]; - if (jsonFactory == null || jsonFactory is! $JsonFactory) { - return throw "Could not find factory for type $T. Is '$T: $T.fromJsonFactory' included in the CustomJsonDecoder instance creation in bootstrapper.dart?"; - } - - return jsonFactory(values); - } - - List _decodeList(Iterable values) => - values.where((v) => v != null).map((v) => decode(v) as T).toList(); -} - -class $JsonSerializableConverter extends chopper.JsonConverter { - @override - FutureOr> convertResponse( - chopper.Response response) async { - if (response.bodyString.isEmpty) { - // In rare cases, when let's say 204 (no content) is returned - - // we cannot decode the missing json with the result type specified - return chopper.Response(response.base, null, error: response.error); - } - - if (ResultType == String) { - return response.copyWith(); - } - - if (ResultType == DateTime) { - return response.copyWith( - body: DateTime.parse((response.body as String).replaceAll('"', '')) - as ResultType); - } - - final jsonRes = await super.convertResponse(response); - return jsonRes.copyWith( - body: $jsonDecoder.decode(jsonRes.body) as ResultType); - } -} - -final $jsonDecoder = $CustomJsonDecoder(generatedMapping); diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/client_index.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/client_index.dart deleted file mode 100644 index f3649ba012..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/client_index.dart +++ /dev/null @@ -1 +0,0 @@ -export 'cat_gateway_api.swagger.dart' show CatGatewayApi; diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/client_mapping.dart b/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/client_mapping.dart deleted file mode 100644 index 1b4bf0d85b..0000000000 --- a/catalyst_voices/packages/internal/catalyst_voices_services/lib/generated/catalyst_gateway/client_mapping.dart +++ /dev/null @@ -1 +0,0 @@ -final Map)> generatedMapping = {}; diff --git a/catalyst_voices/packages/internal/catalyst_voices_services/pubspec.yaml b/catalyst_voices/packages/internal/catalyst_voices_services/pubspec.yaml index da798ffe29..a89cff21ca 100644 --- a/catalyst_voices/packages/internal/catalyst_voices_services/pubspec.yaml +++ b/catalyst_voices/packages/internal/catalyst_voices_services/pubspec.yaml @@ -15,7 +15,6 @@ dependencies: path: ../catalyst_voices_models catalyst_voices_repositories: path: ../catalyst_voices_repositories - chopper: ^7.2.0 convert: ^3.1.1 cryptography: ^2.7.0 ed25519_hd_key: ^2.3.0 @@ -23,7 +22,6 @@ dependencies: flutter: sdk: flutter flutter_secure_storage: ^9.2.2 - json_annotation: ^4.8.1 logging: ^1.2.0 path: ^1.9.0 rxdart: ^0.27.7 @@ -33,7 +31,4 @@ dependencies: dev_dependencies: build_runner: ^2.4.12 catalyst_analysis: ^2.0.0 - chopper_generator: ^7.2.0 - json_serializable: ^6.7.1 - swagger_dart_code_generator: ^2.15.2 test: ^1.24.9 diff --git a/justfile b/justfile index 2446ee2be6..b1414f3e4a 100644 --- a/justfile +++ b/justfile @@ -20,7 +20,6 @@ check-spelling: pre-push: check-markdown check-spelling just catalyst-gateway/pre-push just catalyst_voices/pre-push - earthly ./catalyst_voices+code-generator --platform=linux/amd64 --save_locally=true # Run cat-gateway natively on preprod run-cat-gateway: