diff --git a/graphql-contracts b/graphql-contracts index 3340962..39f32e3 160000 --- a/graphql-contracts +++ b/graphql-contracts @@ -1 +1 @@ -Subproject commit 3340962c024cd33935f8f3669ef86a31ca3e1128 +Subproject commit 39f32e3d3663e3ea724573d54973984645ae1853 diff --git a/lib/features/mapflow/application/place_cubit.dart b/lib/features/mapflow/application/place_cubit.dart index 2c51c98..7f67b3b 100644 --- a/lib/features/mapflow/application/place_cubit.dart +++ b/lib/features/mapflow/application/place_cubit.dart @@ -20,6 +20,8 @@ class PlaceState { required this.hasTelegramAuth, required this.userCoordinate, required this.reviewDraft, + required this.searchQuery, + required this.searchMessage, }); static final _distance = Distance(); @@ -31,6 +33,8 @@ class PlaceState { final bool hasTelegramAuth; final LatLng? userCoordinate; final VoiceReviewDraft reviewDraft; + final String searchQuery; + final String searchMessage; List get recommendations { final selected = selectedTrait; @@ -70,6 +74,8 @@ class PlaceState { bool? hasTelegramAuth, Object? userCoordinate = _unset, VoiceReviewDraft? reviewDraft, + String? searchQuery, + String? searchMessage, }) { return PlaceState( selectedTrait: identical(selectedTrait, _unset) @@ -87,6 +93,8 @@ class PlaceState { ? this.userCoordinate : userCoordinate as LatLng?, reviewDraft: reviewDraft ?? this.reviewDraft, + searchQuery: searchQuery ?? this.searchQuery, + searchMessage: searchMessage ?? this.searchMessage, ); } } @@ -156,6 +164,8 @@ class PlaceCubit extends Cubit { hasTelegramAuth: _authRepository.hasTelegramAuth, userCoordinate: userCoordinate, reviewDraft: _emptyDraft, + searchQuery: '', + searchMessage: '', ), ), ); @@ -192,6 +202,54 @@ class PlaceCubit extends Cubit { emit(PlaceViewState.ready(value.copyWith(selectedPlaceId: placeId))); } + Future searchPlaces(String query) async { + final value = _requireReady(); + final normalizedQuery = query.trim(); + if (normalizedQuery.isEmpty) { + await clearSearch(); + return; + } + + final result = await _placesRepository.searchPlaces(normalizedQuery); + emit( + PlaceViewState.ready( + value.copyWith( + places: result.places, + selectedPlaceId: result.places.isEmpty + ? null + : result.places.first.id, + selectedTrait: null, + searchQuery: normalizedQuery, + searchMessage: result.message, + ), + ), + ); + } + + Future clearSearch() async { + final value = _requireReady(); + final places = await _placesRepository.fetchPlaces(); + emit( + PlaceViewState.ready( + value.copyWith( + places: places, + selectedPlaceId: places.isEmpty ? null : places.first.id, + selectedTrait: null, + searchQuery: '', + searchMessage: '', + ), + ), + ); + } + + Future toggleFavorite(PlaceRecommendation place) async { + final value = _requireReady(); + final updated = place.isFavorite + ? await _placesRepository.removeFavoritePlace(place.id) + : await _placesRepository.addFavoritePlace(place.id); + emit(PlaceViewState.ready(value.copyWith(places: _replacePlace(updated)))); + } + void setReviewPlace(String placeName) { final value = _requireReady(); emit( @@ -219,6 +277,9 @@ class PlaceCubit extends Cubit { required String audioObjectKey, required String audioContentBase64, required String audioMimeType, + required bool addToFavorites, + required Map recordingPayload, + required List promptHintsShown, }) async { final value = _requireReady(); if (!value.hasTelegramAuth) { @@ -230,10 +291,15 @@ class PlaceCubit extends Cubit { googlePlaceId: place.googlePlaceId, googleName: place.name, coordinate: place.coordinate, + googlePrimaryType: place.googlePrimaryType, + googleTypes: place.googleTypes, durationSeconds: draft.duration.inSeconds, audioObjectKey: audioObjectKey, audioContentBase64: audioContentBase64, audioMimeType: audioMimeType, + addToFavorites: addToFavorites, + recordingPayload: recordingPayload, + promptHintsShown: promptHintsShown, ); final places = await _placesRepository.fetchPlaces(); @@ -244,11 +310,21 @@ class PlaceCubit extends Cubit { places: places, selectedPlaceId: selectedPlace, reviewDraft: _emptyDraft, + searchQuery: '', + searchMessage: '', ), ), ); } + List _replacePlace(PlaceRecommendation updated) { + final value = _requireReady(); + return [ + for (final place in value.places) + if (place.id == updated.id) updated else place, + ]; + } + PlaceState _requireReady() { final value = state.placeState; if (value == null) { @@ -266,6 +342,8 @@ class PlaceCubit extends Cubit { hasTelegramAuth: hasTelegramAuth, userCoordinate: null, reviewDraft: _emptyDraft, + searchQuery: '', + searchMessage: '', ); } } diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.ast.gql.dart new file mode 100644 index 0000000..31dd7a7 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.ast.gql.dart @@ -0,0 +1,175 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:gql/ast.dart' as _i1; + +const AddFavoritePlace = _i1.OperationDefinitionNode( + type: _i1.OperationType.mutation, + name: _i1.NameNode(value: 'AddFavoritePlace'), + variableDefinitions: [ + _i1.VariableDefinitionNode( + variable: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')), + type: _i1.NamedTypeNode(name: _i1.NameNode(value: 'ID'), isNonNull: true), + defaultValue: _i1.DefaultValueNode(value: null), + directives: [], + ), + ], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'addFavoritePlace'), + alias: null, + arguments: [ + _i1.ArgumentNode( + name: _i1.NameNode(value: 'placeId'), + value: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')), + ), + ], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePlaceId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'latitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'longitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePrimaryType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleTypes'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRating'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'photoUrls'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'experiences'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ], + ), + ), + ], + ), + ), + ], + ), +); +const document = _i1.DocumentNode(definitions: [AddFavoritePlace]); diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart new file mode 100644 index 0000000..38c7f76 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart @@ -0,0 +1,132 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/json_object.dart' as _i2; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'add_favorite_place.data.gql.g.dart'; + +abstract class GAddFavoritePlaceData + implements Built { + GAddFavoritePlaceData._(); + + factory GAddFavoritePlaceData([ + void Function(GAddFavoritePlaceDataBuilder b) updates, + ]) = _$GAddFavoritePlaceData; + + static void _initializeBuilder(GAddFavoritePlaceDataBuilder b) => + b..G__typename = 'Mutation'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + GAddFavoritePlaceData_addFavoritePlace get addFavoritePlace; + static Serializer get serializer => + _$gAddFavoritePlaceDataSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GAddFavoritePlaceData.serializer, this) + as Map); + + static GAddFavoritePlaceData? fromJson(Map json) => + _i1.serializers.deserializeWith(GAddFavoritePlaceData.serializer, json); +} + +abstract class GAddFavoritePlaceData_addFavoritePlace + implements + Built< + GAddFavoritePlaceData_addFavoritePlace, + GAddFavoritePlaceData_addFavoritePlaceBuilder + > { + GAddFavoritePlaceData_addFavoritePlace._(); + + factory GAddFavoritePlaceData_addFavoritePlace([ + void Function(GAddFavoritePlaceData_addFavoritePlaceBuilder b) updates, + ]) = _$GAddFavoritePlaceData_addFavoritePlace; + + static void _initializeBuilder( + GAddFavoritePlaceData_addFavoritePlaceBuilder b, + ) => b..G__typename = 'Place'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + String get googlePlaceId; + String get name; + double get latitude; + double get longitude; + String? get googlePrimaryType; + BuiltList get googleTypes; + String? get googleBusinessStatus; + double? get googleRating; + int? get googleUserRatingCount; + _i2.JsonObject? get googleRegularOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours; + BuiltList get photoUrls; + BuiltList get traits; + bool get isFavorite; + BuiltList get experiences; + static Serializer get serializer => + _$gAddFavoritePlaceDataAddFavoritePlaceSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GAddFavoritePlaceData_addFavoritePlace.serializer, + this, + ) + as Map); + + static GAddFavoritePlaceData_addFavoritePlace? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GAddFavoritePlaceData_addFavoritePlace.serializer, + json, + ); +} + +abstract class GAddFavoritePlaceData_addFavoritePlace_experiences + implements + Built< + GAddFavoritePlaceData_addFavoritePlace_experiences, + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder + > { + GAddFavoritePlaceData_addFavoritePlace_experiences._(); + + factory GAddFavoritePlaceData_addFavoritePlace_experiences([ + void Function(GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder b) + updates, + ]) = _$GAddFavoritePlaceData_addFavoritePlace_experiences; + + static void _initializeBuilder( + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder b, + ) => b..G__typename = 'VoiceExperience'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + _i3.GVoiceExperienceStatus get status; + String get createdAt; + static Serializer + get serializer => + _$gAddFavoritePlaceDataAddFavoritePlaceExperiencesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GAddFavoritePlaceData_addFavoritePlace_experiences.serializer, + this, + ) + as Map); + + static GAddFavoritePlaceData_addFavoritePlace_experiences? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GAddFavoritePlaceData_addFavoritePlace_experiences.serializer, + json, + ); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.g.dart new file mode 100644 index 0000000..adcb4e1 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.g.dart @@ -0,0 +1,1124 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'add_favorite_place.data.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gAddFavoritePlaceDataSerializer = + _$GAddFavoritePlaceDataSerializer(); +Serializer +_$gAddFavoritePlaceDataAddFavoritePlaceSerializer = + _$GAddFavoritePlaceData_addFavoritePlaceSerializer(); +Serializer +_$gAddFavoritePlaceDataAddFavoritePlaceExperiencesSerializer = + _$GAddFavoritePlaceData_addFavoritePlace_experiencesSerializer(); + +class _$GAddFavoritePlaceDataSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GAddFavoritePlaceData, + _$GAddFavoritePlaceData, + ]; + @override + final String wireName = 'GAddFavoritePlaceData'; + + @override + Iterable serialize( + Serializers serializers, + GAddFavoritePlaceData object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'addFavoritePlace', + serializers.serialize( + object.addFavoritePlace, + specifiedType: const FullType(GAddFavoritePlaceData_addFavoritePlace), + ), + ]; + + return result; + } + + @override + GAddFavoritePlaceData deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GAddFavoritePlaceDataBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'addFavoritePlace': + result.addFavoritePlace.replace( + serializers.deserialize( + value, + specifiedType: const FullType( + GAddFavoritePlaceData_addFavoritePlace, + ), + )! + as GAddFavoritePlaceData_addFavoritePlace, + ); + break; + } + } + + return result.build(); + } +} + +class _$GAddFavoritePlaceData_addFavoritePlaceSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GAddFavoritePlaceData_addFavoritePlace, + _$GAddFavoritePlaceData_addFavoritePlace, + ]; + @override + final String wireName = 'GAddFavoritePlaceData_addFavoritePlace'; + + @override + Iterable serialize( + Serializers serializers, + GAddFavoritePlaceData_addFavoritePlace object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'googlePlaceId', + serializers.serialize( + object.googlePlaceId, + specifiedType: const FullType(String), + ), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + 'latitude', + serializers.serialize( + object.latitude, + specifiedType: const FullType(double), + ), + 'longitude', + serializers.serialize( + object.longitude, + specifiedType: const FullType(double), + ), + 'googleTypes', + serializers.serialize( + object.googleTypes, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'photoUrls', + serializers.serialize( + object.photoUrls, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'traits', + serializers.serialize( + object.traits, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'isFavorite', + serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ), + 'experiences', + serializers.serialize( + object.experiences, + specifiedType: const FullType(BuiltList, const [ + const FullType(GAddFavoritePlaceData_addFavoritePlace_experiences), + ]), + ), + ]; + Object? value; + value = object.googlePrimaryType; + if (value != null) { + result + ..add('googlePrimaryType') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleBusinessStatus; + if (value != null) { + result + ..add('googleBusinessStatus') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleRating; + if (value != null) { + result + ..add('googleRating') + ..add( + serializers.serialize(value, specifiedType: const FullType(double)), + ); + } + value = object.googleUserRatingCount; + if (value != null) { + result + ..add('googleUserRatingCount') + ..add(serializers.serialize(value, specifiedType: const FullType(int))); + } + value = object.googleRegularOpeningHours; + if (value != null) { + result + ..add('googleRegularOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + value = object.googleCurrentOpeningHours; + if (value != null) { + result + ..add('googleCurrentOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + return result; + } + + @override + GAddFavoritePlaceData_addFavoritePlace deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GAddFavoritePlaceData_addFavoritePlaceBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'googlePlaceId': + result.googlePlaceId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'name': + result.name = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'latitude': + result.latitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'longitude': + result.longitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'googlePrimaryType': + result.googlePrimaryType = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleTypes': + result.googleTypes.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'googleBusinessStatus': + result.googleBusinessStatus = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleRating': + result.googleRating = + serializers.deserialize( + value, + specifiedType: const FullType(double), + ) + as double?; + break; + case 'googleUserRatingCount': + result.googleUserRatingCount = + serializers.deserialize(value, specifiedType: const FullType(int)) + as int?; + break; + case 'googleRegularOpeningHours': + result.googleRegularOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'googleCurrentOpeningHours': + result.googleCurrentOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'photoUrls': + result.photoUrls.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'traits': + result.traits.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'isFavorite': + result.isFavorite = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + case 'experiences': + result.experiences.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType( + GAddFavoritePlaceData_addFavoritePlace_experiences, + ), + ]), + )! + as BuiltList, + ); + break; + } + } + + return result.build(); + } +} + +class _$GAddFavoritePlaceData_addFavoritePlace_experiencesSerializer + implements + StructuredSerializer< + GAddFavoritePlaceData_addFavoritePlace_experiences + > { + @override + final Iterable types = const [ + GAddFavoritePlaceData_addFavoritePlace_experiences, + _$GAddFavoritePlaceData_addFavoritePlace_experiences, + ]; + @override + final String wireName = 'GAddFavoritePlaceData_addFavoritePlace_experiences'; + + @override + Iterable serialize( + Serializers serializers, + GAddFavoritePlaceData_addFavoritePlace_experiences object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'status', + serializers.serialize( + object.status, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + ), + 'createdAt', + serializers.serialize( + object.createdAt, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GAddFavoritePlaceData_addFavoritePlace_experiences deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'status': + result.status = + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + )! + as _i3.GVoiceExperienceStatus; + break; + case 'createdAt': + result.createdAt = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + +class _$GAddFavoritePlaceData extends GAddFavoritePlaceData { + @override + final String G__typename; + @override + final GAddFavoritePlaceData_addFavoritePlace addFavoritePlace; + + factory _$GAddFavoritePlaceData([ + void Function(GAddFavoritePlaceDataBuilder)? updates, + ]) => (GAddFavoritePlaceDataBuilder()..update(updates))._build(); + + _$GAddFavoritePlaceData._({ + required this.G__typename, + required this.addFavoritePlace, + }) : super._(); + @override + GAddFavoritePlaceData rebuild( + void Function(GAddFavoritePlaceDataBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GAddFavoritePlaceDataBuilder toBuilder() => + GAddFavoritePlaceDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GAddFavoritePlaceData && + G__typename == other.G__typename && + addFavoritePlace == other.addFavoritePlace; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, addFavoritePlace.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GAddFavoritePlaceData') + ..add('G__typename', G__typename) + ..add('addFavoritePlace', addFavoritePlace)) + .toString(); + } +} + +class GAddFavoritePlaceDataBuilder + implements Builder { + _$GAddFavoritePlaceData? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + GAddFavoritePlaceData_addFavoritePlaceBuilder? _addFavoritePlace; + GAddFavoritePlaceData_addFavoritePlaceBuilder get addFavoritePlace => + _$this._addFavoritePlace ??= + GAddFavoritePlaceData_addFavoritePlaceBuilder(); + set addFavoritePlace( + GAddFavoritePlaceData_addFavoritePlaceBuilder? addFavoritePlace, + ) => _$this._addFavoritePlace = addFavoritePlace; + + GAddFavoritePlaceDataBuilder() { + GAddFavoritePlaceData._initializeBuilder(this); + } + + GAddFavoritePlaceDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _addFavoritePlace = $v.addFavoritePlace.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GAddFavoritePlaceData other) { + _$v = other as _$GAddFavoritePlaceData; + } + + @override + void update(void Function(GAddFavoritePlaceDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GAddFavoritePlaceData build() => _build(); + + _$GAddFavoritePlaceData _build() { + _$GAddFavoritePlaceData _$result; + try { + _$result = + _$v ?? + _$GAddFavoritePlaceData._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GAddFavoritePlaceData', + 'G__typename', + ), + addFavoritePlace: addFavoritePlace.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'addFavoritePlace'; + addFavoritePlace.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GAddFavoritePlaceData', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GAddFavoritePlaceData_addFavoritePlace + extends GAddFavoritePlaceData_addFavoritePlace { + @override + final String G__typename; + @override + final String id; + @override + final String googlePlaceId; + @override + final String name; + @override + final double latitude; + @override + final double longitude; + @override + final String? googlePrimaryType; + @override + final BuiltList googleTypes; + @override + final String? googleBusinessStatus; + @override + final double? googleRating; + @override + final int? googleUserRatingCount; + @override + final _i2.JsonObject? googleRegularOpeningHours; + @override + final _i2.JsonObject? googleCurrentOpeningHours; + @override + final BuiltList photoUrls; + @override + final BuiltList traits; + @override + final bool isFavorite; + @override + final BuiltList + experiences; + + factory _$GAddFavoritePlaceData_addFavoritePlace([ + void Function(GAddFavoritePlaceData_addFavoritePlaceBuilder)? updates, + ]) => (GAddFavoritePlaceData_addFavoritePlaceBuilder()..update(updates)) + ._build(); + + _$GAddFavoritePlaceData_addFavoritePlace._({ + required this.G__typename, + required this.id, + required this.googlePlaceId, + required this.name, + required this.latitude, + required this.longitude, + this.googlePrimaryType, + required this.googleTypes, + this.googleBusinessStatus, + this.googleRating, + this.googleUserRatingCount, + this.googleRegularOpeningHours, + this.googleCurrentOpeningHours, + required this.photoUrls, + required this.traits, + required this.isFavorite, + required this.experiences, + }) : super._(); + @override + GAddFavoritePlaceData_addFavoritePlace rebuild( + void Function(GAddFavoritePlaceData_addFavoritePlaceBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GAddFavoritePlaceData_addFavoritePlaceBuilder toBuilder() => + GAddFavoritePlaceData_addFavoritePlaceBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GAddFavoritePlaceData_addFavoritePlace && + G__typename == other.G__typename && + id == other.id && + googlePlaceId == other.googlePlaceId && + name == other.name && + latitude == other.latitude && + longitude == other.longitude && + googlePrimaryType == other.googlePrimaryType && + googleTypes == other.googleTypes && + googleBusinessStatus == other.googleBusinessStatus && + googleRating == other.googleRating && + googleUserRatingCount == other.googleUserRatingCount && + googleRegularOpeningHours == other.googleRegularOpeningHours && + googleCurrentOpeningHours == other.googleCurrentOpeningHours && + photoUrls == other.photoUrls && + traits == other.traits && + isFavorite == other.isFavorite && + experiences == other.experiences; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, googlePlaceId.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, latitude.hashCode); + _$hash = $jc(_$hash, longitude.hashCode); + _$hash = $jc(_$hash, googlePrimaryType.hashCode); + _$hash = $jc(_$hash, googleTypes.hashCode); + _$hash = $jc(_$hash, googleBusinessStatus.hashCode); + _$hash = $jc(_$hash, googleRating.hashCode); + _$hash = $jc(_$hash, googleUserRatingCount.hashCode); + _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); + _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); + _$hash = $jc(_$hash, photoUrls.hashCode); + _$hash = $jc(_$hash, traits.hashCode); + _$hash = $jc(_$hash, isFavorite.hashCode); + _$hash = $jc(_$hash, experiences.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GAddFavoritePlaceData_addFavoritePlace', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('googlePlaceId', googlePlaceId) + ..add('name', name) + ..add('latitude', latitude) + ..add('longitude', longitude) + ..add('googlePrimaryType', googlePrimaryType) + ..add('googleTypes', googleTypes) + ..add('googleBusinessStatus', googleBusinessStatus) + ..add('googleRating', googleRating) + ..add('googleUserRatingCount', googleUserRatingCount) + ..add('googleRegularOpeningHours', googleRegularOpeningHours) + ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) + ..add('photoUrls', photoUrls) + ..add('traits', traits) + ..add('isFavorite', isFavorite) + ..add('experiences', experiences)) + .toString(); + } +} + +class GAddFavoritePlaceData_addFavoritePlaceBuilder + implements + Builder< + GAddFavoritePlaceData_addFavoritePlace, + GAddFavoritePlaceData_addFavoritePlaceBuilder + > { + _$GAddFavoritePlaceData_addFavoritePlace? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + String? _googlePlaceId; + String? get googlePlaceId => _$this._googlePlaceId; + set googlePlaceId(String? googlePlaceId) => + _$this._googlePlaceId = googlePlaceId; + + String? _name; + String? get name => _$this._name; + set name(String? name) => _$this._name = name; + + double? _latitude; + double? get latitude => _$this._latitude; + set latitude(double? latitude) => _$this._latitude = latitude; + + double? _longitude; + double? get longitude => _$this._longitude; + set longitude(double? longitude) => _$this._longitude = longitude; + + String? _googlePrimaryType; + String? get googlePrimaryType => _$this._googlePrimaryType; + set googlePrimaryType(String? googlePrimaryType) => + _$this._googlePrimaryType = googlePrimaryType; + + ListBuilder? _googleTypes; + ListBuilder get googleTypes => + _$this._googleTypes ??= ListBuilder(); + set googleTypes(ListBuilder? googleTypes) => + _$this._googleTypes = googleTypes; + + String? _googleBusinessStatus; + String? get googleBusinessStatus => _$this._googleBusinessStatus; + set googleBusinessStatus(String? googleBusinessStatus) => + _$this._googleBusinessStatus = googleBusinessStatus; + + double? _googleRating; + double? get googleRating => _$this._googleRating; + set googleRating(double? googleRating) => _$this._googleRating = googleRating; + + int? _googleUserRatingCount; + int? get googleUserRatingCount => _$this._googleUserRatingCount; + set googleUserRatingCount(int? googleUserRatingCount) => + _$this._googleUserRatingCount = googleUserRatingCount; + + _i2.JsonObject? _googleRegularOpeningHours; + _i2.JsonObject? get googleRegularOpeningHours => + _$this._googleRegularOpeningHours; + set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => + _$this._googleRegularOpeningHours = googleRegularOpeningHours; + + _i2.JsonObject? _googleCurrentOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours => + _$this._googleCurrentOpeningHours; + set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => + _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; + + ListBuilder? _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= ListBuilder(); + set photoUrls(ListBuilder? photoUrls) => + _$this._photoUrls = photoUrls; + + ListBuilder? _traits; + ListBuilder get traits => _$this._traits ??= ListBuilder(); + set traits(ListBuilder? traits) => _$this._traits = traits; + + bool? _isFavorite; + bool? get isFavorite => _$this._isFavorite; + set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; + + ListBuilder? _experiences; + ListBuilder + get experiences => _$this._experiences ??= + ListBuilder(); + set experiences( + ListBuilder? + experiences, + ) => _$this._experiences = experiences; + + GAddFavoritePlaceData_addFavoritePlaceBuilder() { + GAddFavoritePlaceData_addFavoritePlace._initializeBuilder(this); + } + + GAddFavoritePlaceData_addFavoritePlaceBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _googlePlaceId = $v.googlePlaceId; + _name = $v.name; + _latitude = $v.latitude; + _longitude = $v.longitude; + _googlePrimaryType = $v.googlePrimaryType; + _googleTypes = $v.googleTypes.toBuilder(); + _googleBusinessStatus = $v.googleBusinessStatus; + _googleRating = $v.googleRating; + _googleUserRatingCount = $v.googleUserRatingCount; + _googleRegularOpeningHours = $v.googleRegularOpeningHours; + _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; + _photoUrls = $v.photoUrls.toBuilder(); + _traits = $v.traits.toBuilder(); + _isFavorite = $v.isFavorite; + _experiences = $v.experiences.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GAddFavoritePlaceData_addFavoritePlace other) { + _$v = other as _$GAddFavoritePlaceData_addFavoritePlace; + } + + @override + void update( + void Function(GAddFavoritePlaceData_addFavoritePlaceBuilder)? updates, + ) { + if (updates != null) updates(this); + } + + @override + GAddFavoritePlaceData_addFavoritePlace build() => _build(); + + _$GAddFavoritePlaceData_addFavoritePlace _build() { + _$GAddFavoritePlaceData_addFavoritePlace _$result; + try { + _$result = + _$v ?? + _$GAddFavoritePlaceData_addFavoritePlace._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GAddFavoritePlaceData_addFavoritePlace', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GAddFavoritePlaceData_addFavoritePlace', + 'id', + ), + googlePlaceId: BuiltValueNullFieldError.checkNotNull( + googlePlaceId, + r'GAddFavoritePlaceData_addFavoritePlace', + 'googlePlaceId', + ), + name: BuiltValueNullFieldError.checkNotNull( + name, + r'GAddFavoritePlaceData_addFavoritePlace', + 'name', + ), + latitude: BuiltValueNullFieldError.checkNotNull( + latitude, + r'GAddFavoritePlaceData_addFavoritePlace', + 'latitude', + ), + longitude: BuiltValueNullFieldError.checkNotNull( + longitude, + r'GAddFavoritePlaceData_addFavoritePlace', + 'longitude', + ), + googlePrimaryType: googlePrimaryType, + googleTypes: googleTypes.build(), + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + photoUrls: photoUrls.build(), + traits: traits.build(), + isFavorite: BuiltValueNullFieldError.checkNotNull( + isFavorite, + r'GAddFavoritePlaceData_addFavoritePlace', + 'isFavorite', + ), + experiences: experiences.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'googleTypes'; + googleTypes.build(); + + _$failedField = 'photoUrls'; + photoUrls.build(); + _$failedField = 'traits'; + traits.build(); + + _$failedField = 'experiences'; + experiences.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GAddFavoritePlaceData_addFavoritePlace', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GAddFavoritePlaceData_addFavoritePlace_experiences + extends GAddFavoritePlaceData_addFavoritePlace_experiences { + @override + final String G__typename; + @override + final String id; + @override + final _i3.GVoiceExperienceStatus status; + @override + final String createdAt; + + factory _$GAddFavoritePlaceData_addFavoritePlace_experiences([ + void Function(GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder)? + updates, + ]) => + (GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder() + ..update(updates)) + ._build(); + + _$GAddFavoritePlaceData_addFavoritePlace_experiences._({ + required this.G__typename, + required this.id, + required this.status, + required this.createdAt, + }) : super._(); + @override + GAddFavoritePlaceData_addFavoritePlace_experiences rebuild( + void Function(GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder) + updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder toBuilder() => + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder() + ..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GAddFavoritePlaceData_addFavoritePlace_experiences && + G__typename == other.G__typename && + id == other.id && + status == other.status && + createdAt == other.createdAt; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, status.hashCode); + _$hash = $jc(_$hash, createdAt.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GAddFavoritePlaceData_addFavoritePlace_experiences', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('status', status) + ..add('createdAt', createdAt)) + .toString(); + } +} + +class GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder + implements + Builder< + GAddFavoritePlaceData_addFavoritePlace_experiences, + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder + > { + _$GAddFavoritePlaceData_addFavoritePlace_experiences? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + _i3.GVoiceExperienceStatus? _status; + _i3.GVoiceExperienceStatus? get status => _$this._status; + set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; + + String? _createdAt; + String? get createdAt => _$this._createdAt; + set createdAt(String? createdAt) => _$this._createdAt = createdAt; + + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder() { + GAddFavoritePlaceData_addFavoritePlace_experiences._initializeBuilder(this); + } + + GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _status = $v.status; + _createdAt = $v.createdAt; + _$v = null; + } + return this; + } + + @override + void replace(GAddFavoritePlaceData_addFavoritePlace_experiences other) { + _$v = other as _$GAddFavoritePlaceData_addFavoritePlace_experiences; + } + + @override + void update( + void Function(GAddFavoritePlaceData_addFavoritePlace_experiencesBuilder)? + updates, + ) { + if (updates != null) updates(this); + } + + @override + GAddFavoritePlaceData_addFavoritePlace_experiences build() => _build(); + + _$GAddFavoritePlaceData_addFavoritePlace_experiences _build() { + final _$result = + _$v ?? + _$GAddFavoritePlaceData_addFavoritePlace_experiences._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GAddFavoritePlaceData_addFavoritePlace_experiences', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GAddFavoritePlaceData_addFavoritePlace_experiences', + 'id', + ), + status: BuiltValueNullFieldError.checkNotNull( + status, + r'GAddFavoritePlaceData_addFavoritePlace_experiences', + 'status', + ), + createdAt: BuiltValueNullFieldError.checkNotNull( + createdAt, + r'GAddFavoritePlaceData_addFavoritePlace_experiences', + 'createdAt', + ), + ); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.dart new file mode 100644 index 0000000..ab0926f --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.dart @@ -0,0 +1,98 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:ferry_exec/ferry_exec.dart' as _i1; +import 'package:gql_exec/gql_exec.dart' as _i4; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.ast.gql.dart' + as _i5; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart' + as _i2; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i6; + +part 'add_favorite_place.req.gql.g.dart'; + +abstract class GAddFavoritePlaceReq + implements + Built, + _i1.OperationRequest< + _i2.GAddFavoritePlaceData, + _i3.GAddFavoritePlaceVars + > { + GAddFavoritePlaceReq._(); + + factory GAddFavoritePlaceReq([ + void Function(GAddFavoritePlaceReqBuilder b) updates, + ]) = _$GAddFavoritePlaceReq; + + static void _initializeBuilder(GAddFavoritePlaceReqBuilder b) => b + ..operation = _i4.Operation( + document: _i5.document, + operationName: 'AddFavoritePlace', + ) + ..executeOnListen = true; + + @override + _i3.GAddFavoritePlaceVars get vars; + @override + _i4.Operation get operation; + @override + _i4.Request get execRequest => _i4.Request( + operation: operation, + variables: vars.toJson(), + context: context ?? const _i4.Context(), + ); + + @override + String? get requestId; + @override + @BuiltValueField(serialize: false) + _i2.GAddFavoritePlaceData? Function( + _i2.GAddFavoritePlaceData?, + _i2.GAddFavoritePlaceData?, + )? + get updateResult; + @override + _i2.GAddFavoritePlaceData? get optimisticResponse; + @override + String? get updateCacheHandlerKey; + @override + Map? get updateCacheHandlerContext; + @override + _i1.FetchPolicy? get fetchPolicy; + @override + bool get executeOnListen; + @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override + _i2.GAddFavoritePlaceData? parseData(Map json) => + _i2.GAddFavoritePlaceData.fromJson(json); + + @override + Map varsToJson() => vars.toJson(); + + @override + Map dataToJson(_i2.GAddFavoritePlaceData data) => + data.toJson(); + + @override + _i1.OperationRequest<_i2.GAddFavoritePlaceData, _i3.GAddFavoritePlaceVars> + transformOperation(_i4.Operation Function(_i4.Operation) transform) => + this.rebuild((b) => b..operation = transform(operation)); + + static Serializer get serializer => + _$gAddFavoritePlaceReqSerializer; + + Map toJson() => + (_i6.serializers.serializeWith(GAddFavoritePlaceReq.serializer, this) + as Map); + + static GAddFavoritePlaceReq? fromJson(Map json) => + _i6.serializers.deserializeWith(GAddFavoritePlaceReq.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.g.dart new file mode 100644 index 0000000..f8da689 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.g.dart @@ -0,0 +1,442 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'add_favorite_place.req.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gAddFavoritePlaceReqSerializer = + _$GAddFavoritePlaceReqSerializer(); + +class _$GAddFavoritePlaceReqSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GAddFavoritePlaceReq, + _$GAddFavoritePlaceReq, + ]; + @override + final String wireName = 'GAddFavoritePlaceReq'; + + @override + Iterable serialize( + Serializers serializers, + GAddFavoritePlaceReq object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'vars', + serializers.serialize( + object.vars, + specifiedType: const FullType(_i3.GAddFavoritePlaceVars), + ), + 'operation', + serializers.serialize( + object.operation, + specifiedType: const FullType(_i4.Operation), + ), + 'executeOnListen', + serializers.serialize( + object.executeOnListen, + specifiedType: const FullType(bool), + ), + ]; + Object? value; + value = object.requestId; + if (value != null) { + result + ..add('requestId') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.optimisticResponse; + if (value != null) { + result + ..add('optimisticResponse') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.GAddFavoritePlaceData), + ), + ); + } + value = object.updateCacheHandlerKey; + if (value != null) { + result + ..add('updateCacheHandlerKey') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.updateCacheHandlerContext; + if (value != null) { + result + ..add('updateCacheHandlerContext') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ), + ); + } + value = object.fetchPolicy; + if (value != null) { + result + ..add('fetchPolicy') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ), + ); + } + return result; + } + + @override + GAddFavoritePlaceReq deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GAddFavoritePlaceReqBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'vars': + result.vars.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GAddFavoritePlaceVars), + )! + as _i3.GAddFavoritePlaceVars, + ); + break; + case 'operation': + result.operation = + serializers.deserialize( + value, + specifiedType: const FullType(_i4.Operation), + )! + as _i4.Operation; + break; + case 'requestId': + result.requestId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'optimisticResponse': + result.optimisticResponse.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i2.GAddFavoritePlaceData), + )! + as _i2.GAddFavoritePlaceData, + ); + break; + case 'updateCacheHandlerKey': + result.updateCacheHandlerKey = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'updateCacheHandlerContext': + result.updateCacheHandlerContext = + serializers.deserialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ) + as Map?; + break; + case 'fetchPolicy': + result.fetchPolicy = + serializers.deserialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ) + as _i1.FetchPolicy?; + break; + case 'executeOnListen': + result.executeOnListen = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + } + } + + return result.build(); + } +} + +class _$GAddFavoritePlaceReq extends GAddFavoritePlaceReq { + @override + final _i3.GAddFavoritePlaceVars vars; + @override + final _i4.Operation operation; + @override + final String? requestId; + @override + final _i2.GAddFavoritePlaceData? Function( + _i2.GAddFavoritePlaceData?, + _i2.GAddFavoritePlaceData?, + )? + updateResult; + @override + final _i2.GAddFavoritePlaceData? optimisticResponse; + @override + final String? updateCacheHandlerKey; + @override + final Map? updateCacheHandlerContext; + @override + final _i1.FetchPolicy? fetchPolicy; + @override + final bool executeOnListen; + @override + final _i4.Context? context; + + factory _$GAddFavoritePlaceReq([ + void Function(GAddFavoritePlaceReqBuilder)? updates, + ]) => (GAddFavoritePlaceReqBuilder()..update(updates))._build(); + + _$GAddFavoritePlaceReq._({ + required this.vars, + required this.operation, + this.requestId, + this.updateResult, + this.optimisticResponse, + this.updateCacheHandlerKey, + this.updateCacheHandlerContext, + this.fetchPolicy, + required this.executeOnListen, + this.context, + }) : super._(); + @override + GAddFavoritePlaceReq rebuild( + void Function(GAddFavoritePlaceReqBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GAddFavoritePlaceReqBuilder toBuilder() => + GAddFavoritePlaceReqBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GAddFavoritePlaceReq && + vars == other.vars && + operation == other.operation && + requestId == other.requestId && + updateResult == other.updateResult && + optimisticResponse == other.optimisticResponse && + updateCacheHandlerKey == other.updateCacheHandlerKey && + updateCacheHandlerContext == other.updateCacheHandlerContext && + fetchPolicy == other.fetchPolicy && + executeOnListen == other.executeOnListen && + context == other.context; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, vars.hashCode); + _$hash = $jc(_$hash, operation.hashCode); + _$hash = $jc(_$hash, requestId.hashCode); + _$hash = $jc(_$hash, updateResult.hashCode); + _$hash = $jc(_$hash, optimisticResponse.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerKey.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); + _$hash = $jc(_$hash, fetchPolicy.hashCode); + _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GAddFavoritePlaceReq') + ..add('vars', vars) + ..add('operation', operation) + ..add('requestId', requestId) + ..add('updateResult', updateResult) + ..add('optimisticResponse', optimisticResponse) + ..add('updateCacheHandlerKey', updateCacheHandlerKey) + ..add('updateCacheHandlerContext', updateCacheHandlerContext) + ..add('fetchPolicy', fetchPolicy) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) + .toString(); + } +} + +class GAddFavoritePlaceReqBuilder + implements Builder { + _$GAddFavoritePlaceReq? _$v; + + _i3.GAddFavoritePlaceVarsBuilder? _vars; + _i3.GAddFavoritePlaceVarsBuilder get vars => + _$this._vars ??= _i3.GAddFavoritePlaceVarsBuilder(); + set vars(_i3.GAddFavoritePlaceVarsBuilder? vars) => _$this._vars = vars; + + _i4.Operation? _operation; + _i4.Operation? get operation => _$this._operation; + set operation(_i4.Operation? operation) => _$this._operation = operation; + + String? _requestId; + String? get requestId => _$this._requestId; + set requestId(String? requestId) => _$this._requestId = requestId; + + _i2.GAddFavoritePlaceData? Function( + _i2.GAddFavoritePlaceData?, + _i2.GAddFavoritePlaceData?, + )? + _updateResult; + _i2.GAddFavoritePlaceData? Function( + _i2.GAddFavoritePlaceData?, + _i2.GAddFavoritePlaceData?, + )? + get updateResult => _$this._updateResult; + set updateResult( + _i2.GAddFavoritePlaceData? Function( + _i2.GAddFavoritePlaceData?, + _i2.GAddFavoritePlaceData?, + )? + updateResult, + ) => _$this._updateResult = updateResult; + + _i2.GAddFavoritePlaceDataBuilder? _optimisticResponse; + _i2.GAddFavoritePlaceDataBuilder get optimisticResponse => + _$this._optimisticResponse ??= _i2.GAddFavoritePlaceDataBuilder(); + set optimisticResponse( + _i2.GAddFavoritePlaceDataBuilder? optimisticResponse, + ) => _$this._optimisticResponse = optimisticResponse; + + String? _updateCacheHandlerKey; + String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey; + set updateCacheHandlerKey(String? updateCacheHandlerKey) => + _$this._updateCacheHandlerKey = updateCacheHandlerKey; + + Map? _updateCacheHandlerContext; + Map? get updateCacheHandlerContext => + _$this._updateCacheHandlerContext; + set updateCacheHandlerContext( + Map? updateCacheHandlerContext, + ) => _$this._updateCacheHandlerContext = updateCacheHandlerContext; + + _i1.FetchPolicy? _fetchPolicy; + _i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy; + set fetchPolicy(_i1.FetchPolicy? fetchPolicy) => + _$this._fetchPolicy = fetchPolicy; + + bool? _executeOnListen; + bool? get executeOnListen => _$this._executeOnListen; + set executeOnListen(bool? executeOnListen) => + _$this._executeOnListen = executeOnListen; + + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + + GAddFavoritePlaceReqBuilder() { + GAddFavoritePlaceReq._initializeBuilder(this); + } + + GAddFavoritePlaceReqBuilder get _$this { + final $v = _$v; + if ($v != null) { + _vars = $v.vars.toBuilder(); + _operation = $v.operation; + _requestId = $v.requestId; + _updateResult = $v.updateResult; + _optimisticResponse = $v.optimisticResponse?.toBuilder(); + _updateCacheHandlerKey = $v.updateCacheHandlerKey; + _updateCacheHandlerContext = $v.updateCacheHandlerContext; + _fetchPolicy = $v.fetchPolicy; + _executeOnListen = $v.executeOnListen; + _context = $v.context; + _$v = null; + } + return this; + } + + @override + void replace(GAddFavoritePlaceReq other) { + _$v = other as _$GAddFavoritePlaceReq; + } + + @override + void update(void Function(GAddFavoritePlaceReqBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GAddFavoritePlaceReq build() => _build(); + + _$GAddFavoritePlaceReq _build() { + _$GAddFavoritePlaceReq _$result; + try { + _$result = + _$v ?? + _$GAddFavoritePlaceReq._( + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, + r'GAddFavoritePlaceReq', + 'operation', + ), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, + r'GAddFavoritePlaceReq', + 'executeOnListen', + ), + context: context, + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'vars'; + vars.build(); + + _$failedField = 'optimisticResponse'; + _optimisticResponse?.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GAddFavoritePlaceReq', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart new file mode 100644 index 0000000..5d55e2a --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart @@ -0,0 +1,30 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'add_favorite_place.var.gql.g.dart'; + +abstract class GAddFavoritePlaceVars + implements Built { + GAddFavoritePlaceVars._(); + + factory GAddFavoritePlaceVars([ + void Function(GAddFavoritePlaceVarsBuilder b) updates, + ]) = _$GAddFavoritePlaceVars; + + String get placeId; + static Serializer get serializer => + _$gAddFavoritePlaceVarsSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GAddFavoritePlaceVars.serializer, this) + as Map); + + static GAddFavoritePlaceVars? fromJson(Map json) => + _i1.serializers.deserializeWith(GAddFavoritePlaceVars.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.g.dart new file mode 100644 index 0000000..ba27b4f --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.g.dart @@ -0,0 +1,155 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'add_favorite_place.var.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gAddFavoritePlaceVarsSerializer = + _$GAddFavoritePlaceVarsSerializer(); + +class _$GAddFavoritePlaceVarsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GAddFavoritePlaceVars, + _$GAddFavoritePlaceVars, + ]; + @override + final String wireName = 'GAddFavoritePlaceVars'; + + @override + Iterable serialize( + Serializers serializers, + GAddFavoritePlaceVars object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'placeId', + serializers.serialize( + object.placeId, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GAddFavoritePlaceVars deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GAddFavoritePlaceVarsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'placeId': + result.placeId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + +class _$GAddFavoritePlaceVars extends GAddFavoritePlaceVars { + @override + final String placeId; + + factory _$GAddFavoritePlaceVars([ + void Function(GAddFavoritePlaceVarsBuilder)? updates, + ]) => (GAddFavoritePlaceVarsBuilder()..update(updates))._build(); + + _$GAddFavoritePlaceVars._({required this.placeId}) : super._(); + @override + GAddFavoritePlaceVars rebuild( + void Function(GAddFavoritePlaceVarsBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GAddFavoritePlaceVarsBuilder toBuilder() => + GAddFavoritePlaceVarsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GAddFavoritePlaceVars && placeId == other.placeId; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, placeId.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GAddFavoritePlaceVars', + )..add('placeId', placeId)).toString(); + } +} + +class GAddFavoritePlaceVarsBuilder + implements Builder { + _$GAddFavoritePlaceVars? _$v; + + String? _placeId; + String? get placeId => _$this._placeId; + set placeId(String? placeId) => _$this._placeId = placeId; + + GAddFavoritePlaceVarsBuilder(); + + GAddFavoritePlaceVarsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _placeId = $v.placeId; + _$v = null; + } + return this; + } + + @override + void replace(GAddFavoritePlaceVars other) { + _$v = other as _$GAddFavoritePlaceVars; + } + + @override + void update(void Function(GAddFavoritePlaceVarsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GAddFavoritePlaceVars build() => _build(); + + _$GAddFavoritePlaceVars _build() { + final _$result = + _$v ?? + _$GAddFavoritePlaceVars._( + placeId: BuiltValueNullFieldError.checkNotNull( + placeId, + r'GAddFavoritePlaceVars', + 'placeId', + ), + ); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.ast.gql.dart new file mode 100644 index 0000000..49c3d7c --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.ast.gql.dart @@ -0,0 +1,163 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:gql/ast.dart' as _i1; + +const FavoritePlaces = _i1.OperationDefinitionNode( + type: _i1.OperationType.query, + name: _i1.NameNode(value: 'FavoritePlaces'), + variableDefinitions: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'favoritePlaces'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePlaceId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'latitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'longitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePrimaryType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleTypes'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRating'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'photoUrls'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'experiences'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ], + ), + ), + ], + ), + ), + ], + ), +); +const document = _i1.DocumentNode(definitions: [FavoritePlaces]); diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart new file mode 100644 index 0000000..1fb7bac --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart @@ -0,0 +1,130 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/json_object.dart' as _i2; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'favorite_places.data.gql.g.dart'; + +abstract class GFavoritePlacesData + implements Built { + GFavoritePlacesData._(); + + factory GFavoritePlacesData([ + void Function(GFavoritePlacesDataBuilder b) updates, + ]) = _$GFavoritePlacesData; + + static void _initializeBuilder(GFavoritePlacesDataBuilder b) => + b..G__typename = 'Query'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + BuiltList get favoritePlaces; + static Serializer get serializer => + _$gFavoritePlacesDataSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GFavoritePlacesData.serializer, this) + as Map); + + static GFavoritePlacesData? fromJson(Map json) => + _i1.serializers.deserializeWith(GFavoritePlacesData.serializer, json); +} + +abstract class GFavoritePlacesData_favoritePlaces + implements + Built< + GFavoritePlacesData_favoritePlaces, + GFavoritePlacesData_favoritePlacesBuilder + > { + GFavoritePlacesData_favoritePlaces._(); + + factory GFavoritePlacesData_favoritePlaces([ + void Function(GFavoritePlacesData_favoritePlacesBuilder b) updates, + ]) = _$GFavoritePlacesData_favoritePlaces; + + static void _initializeBuilder(GFavoritePlacesData_favoritePlacesBuilder b) => + b..G__typename = 'Place'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + String get googlePlaceId; + String get name; + double get latitude; + double get longitude; + String? get googlePrimaryType; + BuiltList get googleTypes; + String? get googleBusinessStatus; + double? get googleRating; + int? get googleUserRatingCount; + _i2.JsonObject? get googleRegularOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours; + BuiltList get photoUrls; + BuiltList get traits; + bool get isFavorite; + BuiltList get experiences; + static Serializer get serializer => + _$gFavoritePlacesDataFavoritePlacesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GFavoritePlacesData_favoritePlaces.serializer, + this, + ) + as Map); + + static GFavoritePlacesData_favoritePlaces? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GFavoritePlacesData_favoritePlaces.serializer, + json, + ); +} + +abstract class GFavoritePlacesData_favoritePlaces_experiences + implements + Built< + GFavoritePlacesData_favoritePlaces_experiences, + GFavoritePlacesData_favoritePlaces_experiencesBuilder + > { + GFavoritePlacesData_favoritePlaces_experiences._(); + + factory GFavoritePlacesData_favoritePlaces_experiences([ + void Function(GFavoritePlacesData_favoritePlaces_experiencesBuilder b) + updates, + ]) = _$GFavoritePlacesData_favoritePlaces_experiences; + + static void _initializeBuilder( + GFavoritePlacesData_favoritePlaces_experiencesBuilder b, + ) => b..G__typename = 'VoiceExperience'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + _i3.GVoiceExperienceStatus get status; + String get createdAt; + static Serializer + get serializer => _$gFavoritePlacesDataFavoritePlacesExperiencesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GFavoritePlacesData_favoritePlaces_experiences.serializer, + this, + ) + as Map); + + static GFavoritePlacesData_favoritePlaces_experiences? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GFavoritePlacesData_favoritePlaces_experiences.serializer, + json, + ); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.g.dart new file mode 100644 index 0000000..351579c --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.g.dart @@ -0,0 +1,1117 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'favorite_places.data.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gFavoritePlacesDataSerializer = + _$GFavoritePlacesDataSerializer(); +Serializer +_$gFavoritePlacesDataFavoritePlacesSerializer = + _$GFavoritePlacesData_favoritePlacesSerializer(); +Serializer +_$gFavoritePlacesDataFavoritePlacesExperiencesSerializer = + _$GFavoritePlacesData_favoritePlaces_experiencesSerializer(); + +class _$GFavoritePlacesDataSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GFavoritePlacesData, + _$GFavoritePlacesData, + ]; + @override + final String wireName = 'GFavoritePlacesData'; + + @override + Iterable serialize( + Serializers serializers, + GFavoritePlacesData object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'favoritePlaces', + serializers.serialize( + object.favoritePlaces, + specifiedType: const FullType(BuiltList, const [ + const FullType(GFavoritePlacesData_favoritePlaces), + ]), + ), + ]; + + return result; + } + + @override + GFavoritePlacesData deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GFavoritePlacesDataBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'favoritePlaces': + result.favoritePlaces.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(GFavoritePlacesData_favoritePlaces), + ]), + )! + as BuiltList, + ); + break; + } + } + + return result.build(); + } +} + +class _$GFavoritePlacesData_favoritePlacesSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GFavoritePlacesData_favoritePlaces, + _$GFavoritePlacesData_favoritePlaces, + ]; + @override + final String wireName = 'GFavoritePlacesData_favoritePlaces'; + + @override + Iterable serialize( + Serializers serializers, + GFavoritePlacesData_favoritePlaces object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'googlePlaceId', + serializers.serialize( + object.googlePlaceId, + specifiedType: const FullType(String), + ), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + 'latitude', + serializers.serialize( + object.latitude, + specifiedType: const FullType(double), + ), + 'longitude', + serializers.serialize( + object.longitude, + specifiedType: const FullType(double), + ), + 'googleTypes', + serializers.serialize( + object.googleTypes, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'photoUrls', + serializers.serialize( + object.photoUrls, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'traits', + serializers.serialize( + object.traits, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'isFavorite', + serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ), + 'experiences', + serializers.serialize( + object.experiences, + specifiedType: const FullType(BuiltList, const [ + const FullType(GFavoritePlacesData_favoritePlaces_experiences), + ]), + ), + ]; + Object? value; + value = object.googlePrimaryType; + if (value != null) { + result + ..add('googlePrimaryType') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleBusinessStatus; + if (value != null) { + result + ..add('googleBusinessStatus') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleRating; + if (value != null) { + result + ..add('googleRating') + ..add( + serializers.serialize(value, specifiedType: const FullType(double)), + ); + } + value = object.googleUserRatingCount; + if (value != null) { + result + ..add('googleUserRatingCount') + ..add(serializers.serialize(value, specifiedType: const FullType(int))); + } + value = object.googleRegularOpeningHours; + if (value != null) { + result + ..add('googleRegularOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + value = object.googleCurrentOpeningHours; + if (value != null) { + result + ..add('googleCurrentOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + return result; + } + + @override + GFavoritePlacesData_favoritePlaces deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GFavoritePlacesData_favoritePlacesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'googlePlaceId': + result.googlePlaceId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'name': + result.name = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'latitude': + result.latitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'longitude': + result.longitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'googlePrimaryType': + result.googlePrimaryType = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleTypes': + result.googleTypes.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'googleBusinessStatus': + result.googleBusinessStatus = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleRating': + result.googleRating = + serializers.deserialize( + value, + specifiedType: const FullType(double), + ) + as double?; + break; + case 'googleUserRatingCount': + result.googleUserRatingCount = + serializers.deserialize(value, specifiedType: const FullType(int)) + as int?; + break; + case 'googleRegularOpeningHours': + result.googleRegularOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'googleCurrentOpeningHours': + result.googleCurrentOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'photoUrls': + result.photoUrls.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'traits': + result.traits.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'isFavorite': + result.isFavorite = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + case 'experiences': + result.experiences.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType( + GFavoritePlacesData_favoritePlaces_experiences, + ), + ]), + )! + as BuiltList, + ); + break; + } + } + + return result.build(); + } +} + +class _$GFavoritePlacesData_favoritePlaces_experiencesSerializer + implements + StructuredSerializer { + @override + final Iterable types = const [ + GFavoritePlacesData_favoritePlaces_experiences, + _$GFavoritePlacesData_favoritePlaces_experiences, + ]; + @override + final String wireName = 'GFavoritePlacesData_favoritePlaces_experiences'; + + @override + Iterable serialize( + Serializers serializers, + GFavoritePlacesData_favoritePlaces_experiences object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'status', + serializers.serialize( + object.status, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + ), + 'createdAt', + serializers.serialize( + object.createdAt, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GFavoritePlacesData_favoritePlaces_experiences deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GFavoritePlacesData_favoritePlaces_experiencesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'status': + result.status = + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + )! + as _i3.GVoiceExperienceStatus; + break; + case 'createdAt': + result.createdAt = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + +class _$GFavoritePlacesData extends GFavoritePlacesData { + @override + final String G__typename; + @override + final BuiltList favoritePlaces; + + factory _$GFavoritePlacesData([ + void Function(GFavoritePlacesDataBuilder)? updates, + ]) => (GFavoritePlacesDataBuilder()..update(updates))._build(); + + _$GFavoritePlacesData._({ + required this.G__typename, + required this.favoritePlaces, + }) : super._(); + @override + GFavoritePlacesData rebuild( + void Function(GFavoritePlacesDataBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GFavoritePlacesDataBuilder toBuilder() => + GFavoritePlacesDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GFavoritePlacesData && + G__typename == other.G__typename && + favoritePlaces == other.favoritePlaces; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, favoritePlaces.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GFavoritePlacesData') + ..add('G__typename', G__typename) + ..add('favoritePlaces', favoritePlaces)) + .toString(); + } +} + +class GFavoritePlacesDataBuilder + implements Builder { + _$GFavoritePlacesData? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + ListBuilder? _favoritePlaces; + ListBuilder get favoritePlaces => + _$this._favoritePlaces ??= + ListBuilder(); + set favoritePlaces( + ListBuilder? favoritePlaces, + ) => _$this._favoritePlaces = favoritePlaces; + + GFavoritePlacesDataBuilder() { + GFavoritePlacesData._initializeBuilder(this); + } + + GFavoritePlacesDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _favoritePlaces = $v.favoritePlaces.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GFavoritePlacesData other) { + _$v = other as _$GFavoritePlacesData; + } + + @override + void update(void Function(GFavoritePlacesDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GFavoritePlacesData build() => _build(); + + _$GFavoritePlacesData _build() { + _$GFavoritePlacesData _$result; + try { + _$result = + _$v ?? + _$GFavoritePlacesData._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GFavoritePlacesData', + 'G__typename', + ), + favoritePlaces: favoritePlaces.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'favoritePlaces'; + favoritePlaces.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GFavoritePlacesData', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GFavoritePlacesData_favoritePlaces + extends GFavoritePlacesData_favoritePlaces { + @override + final String G__typename; + @override + final String id; + @override + final String googlePlaceId; + @override + final String name; + @override + final double latitude; + @override + final double longitude; + @override + final String? googlePrimaryType; + @override + final BuiltList googleTypes; + @override + final String? googleBusinessStatus; + @override + final double? googleRating; + @override + final int? googleUserRatingCount; + @override + final _i2.JsonObject? googleRegularOpeningHours; + @override + final _i2.JsonObject? googleCurrentOpeningHours; + @override + final BuiltList photoUrls; + @override + final BuiltList traits; + @override + final bool isFavorite; + @override + final BuiltList experiences; + + factory _$GFavoritePlacesData_favoritePlaces([ + void Function(GFavoritePlacesData_favoritePlacesBuilder)? updates, + ]) => (GFavoritePlacesData_favoritePlacesBuilder()..update(updates))._build(); + + _$GFavoritePlacesData_favoritePlaces._({ + required this.G__typename, + required this.id, + required this.googlePlaceId, + required this.name, + required this.latitude, + required this.longitude, + this.googlePrimaryType, + required this.googleTypes, + this.googleBusinessStatus, + this.googleRating, + this.googleUserRatingCount, + this.googleRegularOpeningHours, + this.googleCurrentOpeningHours, + required this.photoUrls, + required this.traits, + required this.isFavorite, + required this.experiences, + }) : super._(); + @override + GFavoritePlacesData_favoritePlaces rebuild( + void Function(GFavoritePlacesData_favoritePlacesBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GFavoritePlacesData_favoritePlacesBuilder toBuilder() => + GFavoritePlacesData_favoritePlacesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GFavoritePlacesData_favoritePlaces && + G__typename == other.G__typename && + id == other.id && + googlePlaceId == other.googlePlaceId && + name == other.name && + latitude == other.latitude && + longitude == other.longitude && + googlePrimaryType == other.googlePrimaryType && + googleTypes == other.googleTypes && + googleBusinessStatus == other.googleBusinessStatus && + googleRating == other.googleRating && + googleUserRatingCount == other.googleUserRatingCount && + googleRegularOpeningHours == other.googleRegularOpeningHours && + googleCurrentOpeningHours == other.googleCurrentOpeningHours && + photoUrls == other.photoUrls && + traits == other.traits && + isFavorite == other.isFavorite && + experiences == other.experiences; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, googlePlaceId.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, latitude.hashCode); + _$hash = $jc(_$hash, longitude.hashCode); + _$hash = $jc(_$hash, googlePrimaryType.hashCode); + _$hash = $jc(_$hash, googleTypes.hashCode); + _$hash = $jc(_$hash, googleBusinessStatus.hashCode); + _$hash = $jc(_$hash, googleRating.hashCode); + _$hash = $jc(_$hash, googleUserRatingCount.hashCode); + _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); + _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); + _$hash = $jc(_$hash, photoUrls.hashCode); + _$hash = $jc(_$hash, traits.hashCode); + _$hash = $jc(_$hash, isFavorite.hashCode); + _$hash = $jc(_$hash, experiences.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GFavoritePlacesData_favoritePlaces') + ..add('G__typename', G__typename) + ..add('id', id) + ..add('googlePlaceId', googlePlaceId) + ..add('name', name) + ..add('latitude', latitude) + ..add('longitude', longitude) + ..add('googlePrimaryType', googlePrimaryType) + ..add('googleTypes', googleTypes) + ..add('googleBusinessStatus', googleBusinessStatus) + ..add('googleRating', googleRating) + ..add('googleUserRatingCount', googleUserRatingCount) + ..add('googleRegularOpeningHours', googleRegularOpeningHours) + ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) + ..add('photoUrls', photoUrls) + ..add('traits', traits) + ..add('isFavorite', isFavorite) + ..add('experiences', experiences)) + .toString(); + } +} + +class GFavoritePlacesData_favoritePlacesBuilder + implements + Builder< + GFavoritePlacesData_favoritePlaces, + GFavoritePlacesData_favoritePlacesBuilder + > { + _$GFavoritePlacesData_favoritePlaces? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + String? _googlePlaceId; + String? get googlePlaceId => _$this._googlePlaceId; + set googlePlaceId(String? googlePlaceId) => + _$this._googlePlaceId = googlePlaceId; + + String? _name; + String? get name => _$this._name; + set name(String? name) => _$this._name = name; + + double? _latitude; + double? get latitude => _$this._latitude; + set latitude(double? latitude) => _$this._latitude = latitude; + + double? _longitude; + double? get longitude => _$this._longitude; + set longitude(double? longitude) => _$this._longitude = longitude; + + String? _googlePrimaryType; + String? get googlePrimaryType => _$this._googlePrimaryType; + set googlePrimaryType(String? googlePrimaryType) => + _$this._googlePrimaryType = googlePrimaryType; + + ListBuilder? _googleTypes; + ListBuilder get googleTypes => + _$this._googleTypes ??= ListBuilder(); + set googleTypes(ListBuilder? googleTypes) => + _$this._googleTypes = googleTypes; + + String? _googleBusinessStatus; + String? get googleBusinessStatus => _$this._googleBusinessStatus; + set googleBusinessStatus(String? googleBusinessStatus) => + _$this._googleBusinessStatus = googleBusinessStatus; + + double? _googleRating; + double? get googleRating => _$this._googleRating; + set googleRating(double? googleRating) => _$this._googleRating = googleRating; + + int? _googleUserRatingCount; + int? get googleUserRatingCount => _$this._googleUserRatingCount; + set googleUserRatingCount(int? googleUserRatingCount) => + _$this._googleUserRatingCount = googleUserRatingCount; + + _i2.JsonObject? _googleRegularOpeningHours; + _i2.JsonObject? get googleRegularOpeningHours => + _$this._googleRegularOpeningHours; + set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => + _$this._googleRegularOpeningHours = googleRegularOpeningHours; + + _i2.JsonObject? _googleCurrentOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours => + _$this._googleCurrentOpeningHours; + set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => + _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; + + ListBuilder? _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= ListBuilder(); + set photoUrls(ListBuilder? photoUrls) => + _$this._photoUrls = photoUrls; + + ListBuilder? _traits; + ListBuilder get traits => _$this._traits ??= ListBuilder(); + set traits(ListBuilder? traits) => _$this._traits = traits; + + bool? _isFavorite; + bool? get isFavorite => _$this._isFavorite; + set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; + + ListBuilder? _experiences; + ListBuilder get experiences => + _$this._experiences ??= + ListBuilder(); + set experiences( + ListBuilder? experiences, + ) => _$this._experiences = experiences; + + GFavoritePlacesData_favoritePlacesBuilder() { + GFavoritePlacesData_favoritePlaces._initializeBuilder(this); + } + + GFavoritePlacesData_favoritePlacesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _googlePlaceId = $v.googlePlaceId; + _name = $v.name; + _latitude = $v.latitude; + _longitude = $v.longitude; + _googlePrimaryType = $v.googlePrimaryType; + _googleTypes = $v.googleTypes.toBuilder(); + _googleBusinessStatus = $v.googleBusinessStatus; + _googleRating = $v.googleRating; + _googleUserRatingCount = $v.googleUserRatingCount; + _googleRegularOpeningHours = $v.googleRegularOpeningHours; + _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; + _photoUrls = $v.photoUrls.toBuilder(); + _traits = $v.traits.toBuilder(); + _isFavorite = $v.isFavorite; + _experiences = $v.experiences.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GFavoritePlacesData_favoritePlaces other) { + _$v = other as _$GFavoritePlacesData_favoritePlaces; + } + + @override + void update( + void Function(GFavoritePlacesData_favoritePlacesBuilder)? updates, + ) { + if (updates != null) updates(this); + } + + @override + GFavoritePlacesData_favoritePlaces build() => _build(); + + _$GFavoritePlacesData_favoritePlaces _build() { + _$GFavoritePlacesData_favoritePlaces _$result; + try { + _$result = + _$v ?? + _$GFavoritePlacesData_favoritePlaces._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GFavoritePlacesData_favoritePlaces', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GFavoritePlacesData_favoritePlaces', + 'id', + ), + googlePlaceId: BuiltValueNullFieldError.checkNotNull( + googlePlaceId, + r'GFavoritePlacesData_favoritePlaces', + 'googlePlaceId', + ), + name: BuiltValueNullFieldError.checkNotNull( + name, + r'GFavoritePlacesData_favoritePlaces', + 'name', + ), + latitude: BuiltValueNullFieldError.checkNotNull( + latitude, + r'GFavoritePlacesData_favoritePlaces', + 'latitude', + ), + longitude: BuiltValueNullFieldError.checkNotNull( + longitude, + r'GFavoritePlacesData_favoritePlaces', + 'longitude', + ), + googlePrimaryType: googlePrimaryType, + googleTypes: googleTypes.build(), + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + photoUrls: photoUrls.build(), + traits: traits.build(), + isFavorite: BuiltValueNullFieldError.checkNotNull( + isFavorite, + r'GFavoritePlacesData_favoritePlaces', + 'isFavorite', + ), + experiences: experiences.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'googleTypes'; + googleTypes.build(); + + _$failedField = 'photoUrls'; + photoUrls.build(); + _$failedField = 'traits'; + traits.build(); + + _$failedField = 'experiences'; + experiences.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GFavoritePlacesData_favoritePlaces', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GFavoritePlacesData_favoritePlaces_experiences + extends GFavoritePlacesData_favoritePlaces_experiences { + @override + final String G__typename; + @override + final String id; + @override + final _i3.GVoiceExperienceStatus status; + @override + final String createdAt; + + factory _$GFavoritePlacesData_favoritePlaces_experiences([ + void Function(GFavoritePlacesData_favoritePlaces_experiencesBuilder)? + updates, + ]) => + (GFavoritePlacesData_favoritePlaces_experiencesBuilder()..update(updates)) + ._build(); + + _$GFavoritePlacesData_favoritePlaces_experiences._({ + required this.G__typename, + required this.id, + required this.status, + required this.createdAt, + }) : super._(); + @override + GFavoritePlacesData_favoritePlaces_experiences rebuild( + void Function(GFavoritePlacesData_favoritePlaces_experiencesBuilder) + updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GFavoritePlacesData_favoritePlaces_experiencesBuilder toBuilder() => + GFavoritePlacesData_favoritePlaces_experiencesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GFavoritePlacesData_favoritePlaces_experiences && + G__typename == other.G__typename && + id == other.id && + status == other.status && + createdAt == other.createdAt; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, status.hashCode); + _$hash = $jc(_$hash, createdAt.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GFavoritePlacesData_favoritePlaces_experiences', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('status', status) + ..add('createdAt', createdAt)) + .toString(); + } +} + +class GFavoritePlacesData_favoritePlaces_experiencesBuilder + implements + Builder< + GFavoritePlacesData_favoritePlaces_experiences, + GFavoritePlacesData_favoritePlaces_experiencesBuilder + > { + _$GFavoritePlacesData_favoritePlaces_experiences? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + _i3.GVoiceExperienceStatus? _status; + _i3.GVoiceExperienceStatus? get status => _$this._status; + set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; + + String? _createdAt; + String? get createdAt => _$this._createdAt; + set createdAt(String? createdAt) => _$this._createdAt = createdAt; + + GFavoritePlacesData_favoritePlaces_experiencesBuilder() { + GFavoritePlacesData_favoritePlaces_experiences._initializeBuilder(this); + } + + GFavoritePlacesData_favoritePlaces_experiencesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _status = $v.status; + _createdAt = $v.createdAt; + _$v = null; + } + return this; + } + + @override + void replace(GFavoritePlacesData_favoritePlaces_experiences other) { + _$v = other as _$GFavoritePlacesData_favoritePlaces_experiences; + } + + @override + void update( + void Function(GFavoritePlacesData_favoritePlaces_experiencesBuilder)? + updates, + ) { + if (updates != null) updates(this); + } + + @override + GFavoritePlacesData_favoritePlaces_experiences build() => _build(); + + _$GFavoritePlacesData_favoritePlaces_experiences _build() { + final _$result = + _$v ?? + _$GFavoritePlacesData_favoritePlaces_experiences._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GFavoritePlacesData_favoritePlaces_experiences', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GFavoritePlacesData_favoritePlaces_experiences', + 'id', + ), + status: BuiltValueNullFieldError.checkNotNull( + status, + r'GFavoritePlacesData_favoritePlaces_experiences', + 'status', + ), + createdAt: BuiltValueNullFieldError.checkNotNull( + createdAt, + r'GFavoritePlacesData_favoritePlaces_experiences', + 'createdAt', + ), + ); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.dart new file mode 100644 index 0000000..a24b553 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.dart @@ -0,0 +1,95 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:ferry_exec/ferry_exec.dart' as _i1; +import 'package:gql_exec/gql_exec.dart' as _i4; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.ast.gql.dart' + as _i5; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart' + as _i2; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i6; + +part 'favorite_places.req.gql.g.dart'; + +abstract class GFavoritePlacesReq + implements + Built, + _i1.OperationRequest<_i2.GFavoritePlacesData, _i3.GFavoritePlacesVars> { + GFavoritePlacesReq._(); + + factory GFavoritePlacesReq([ + void Function(GFavoritePlacesReqBuilder b) updates, + ]) = _$GFavoritePlacesReq; + + static void _initializeBuilder(GFavoritePlacesReqBuilder b) => b + ..operation = _i4.Operation( + document: _i5.document, + operationName: 'FavoritePlaces', + ) + ..executeOnListen = true; + + @override + _i3.GFavoritePlacesVars get vars; + @override + _i4.Operation get operation; + @override + _i4.Request get execRequest => _i4.Request( + operation: operation, + variables: vars.toJson(), + context: context ?? const _i4.Context(), + ); + + @override + String? get requestId; + @override + @BuiltValueField(serialize: false) + _i2.GFavoritePlacesData? Function( + _i2.GFavoritePlacesData?, + _i2.GFavoritePlacesData?, + )? + get updateResult; + @override + _i2.GFavoritePlacesData? get optimisticResponse; + @override + String? get updateCacheHandlerKey; + @override + Map? get updateCacheHandlerContext; + @override + _i1.FetchPolicy? get fetchPolicy; + @override + bool get executeOnListen; + @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override + _i2.GFavoritePlacesData? parseData(Map json) => + _i2.GFavoritePlacesData.fromJson(json); + + @override + Map varsToJson() => vars.toJson(); + + @override + Map dataToJson(_i2.GFavoritePlacesData data) => + data.toJson(); + + @override + _i1.OperationRequest<_i2.GFavoritePlacesData, _i3.GFavoritePlacesVars> + transformOperation(_i4.Operation Function(_i4.Operation) transform) => + this.rebuild((b) => b..operation = transform(operation)); + + static Serializer get serializer => + _$gFavoritePlacesReqSerializer; + + Map toJson() => + (_i6.serializers.serializeWith(GFavoritePlacesReq.serializer, this) + as Map); + + static GFavoritePlacesReq? fromJson(Map json) => + _i6.serializers.deserializeWith(GFavoritePlacesReq.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.g.dart new file mode 100644 index 0000000..4711185 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.g.dart @@ -0,0 +1,438 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'favorite_places.req.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gFavoritePlacesReqSerializer = + _$GFavoritePlacesReqSerializer(); + +class _$GFavoritePlacesReqSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GFavoritePlacesReq, _$GFavoritePlacesReq]; + @override + final String wireName = 'GFavoritePlacesReq'; + + @override + Iterable serialize( + Serializers serializers, + GFavoritePlacesReq object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'vars', + serializers.serialize( + object.vars, + specifiedType: const FullType(_i3.GFavoritePlacesVars), + ), + 'operation', + serializers.serialize( + object.operation, + specifiedType: const FullType(_i4.Operation), + ), + 'executeOnListen', + serializers.serialize( + object.executeOnListen, + specifiedType: const FullType(bool), + ), + ]; + Object? value; + value = object.requestId; + if (value != null) { + result + ..add('requestId') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.optimisticResponse; + if (value != null) { + result + ..add('optimisticResponse') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.GFavoritePlacesData), + ), + ); + } + value = object.updateCacheHandlerKey; + if (value != null) { + result + ..add('updateCacheHandlerKey') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.updateCacheHandlerContext; + if (value != null) { + result + ..add('updateCacheHandlerContext') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ), + ); + } + value = object.fetchPolicy; + if (value != null) { + result + ..add('fetchPolicy') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ), + ); + } + return result; + } + + @override + GFavoritePlacesReq deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GFavoritePlacesReqBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'vars': + result.vars.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GFavoritePlacesVars), + )! + as _i3.GFavoritePlacesVars, + ); + break; + case 'operation': + result.operation = + serializers.deserialize( + value, + specifiedType: const FullType(_i4.Operation), + )! + as _i4.Operation; + break; + case 'requestId': + result.requestId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'optimisticResponse': + result.optimisticResponse.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i2.GFavoritePlacesData), + )! + as _i2.GFavoritePlacesData, + ); + break; + case 'updateCacheHandlerKey': + result.updateCacheHandlerKey = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'updateCacheHandlerContext': + result.updateCacheHandlerContext = + serializers.deserialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ) + as Map?; + break; + case 'fetchPolicy': + result.fetchPolicy = + serializers.deserialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ) + as _i1.FetchPolicy?; + break; + case 'executeOnListen': + result.executeOnListen = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + } + } + + return result.build(); + } +} + +class _$GFavoritePlacesReq extends GFavoritePlacesReq { + @override + final _i3.GFavoritePlacesVars vars; + @override + final _i4.Operation operation; + @override + final String? requestId; + @override + final _i2.GFavoritePlacesData? Function( + _i2.GFavoritePlacesData?, + _i2.GFavoritePlacesData?, + )? + updateResult; + @override + final _i2.GFavoritePlacesData? optimisticResponse; + @override + final String? updateCacheHandlerKey; + @override + final Map? updateCacheHandlerContext; + @override + final _i1.FetchPolicy? fetchPolicy; + @override + final bool executeOnListen; + @override + final _i4.Context? context; + + factory _$GFavoritePlacesReq([ + void Function(GFavoritePlacesReqBuilder)? updates, + ]) => (GFavoritePlacesReqBuilder()..update(updates))._build(); + + _$GFavoritePlacesReq._({ + required this.vars, + required this.operation, + this.requestId, + this.updateResult, + this.optimisticResponse, + this.updateCacheHandlerKey, + this.updateCacheHandlerContext, + this.fetchPolicy, + required this.executeOnListen, + this.context, + }) : super._(); + @override + GFavoritePlacesReq rebuild( + void Function(GFavoritePlacesReqBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GFavoritePlacesReqBuilder toBuilder() => + GFavoritePlacesReqBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GFavoritePlacesReq && + vars == other.vars && + operation == other.operation && + requestId == other.requestId && + updateResult == other.updateResult && + optimisticResponse == other.optimisticResponse && + updateCacheHandlerKey == other.updateCacheHandlerKey && + updateCacheHandlerContext == other.updateCacheHandlerContext && + fetchPolicy == other.fetchPolicy && + executeOnListen == other.executeOnListen && + context == other.context; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, vars.hashCode); + _$hash = $jc(_$hash, operation.hashCode); + _$hash = $jc(_$hash, requestId.hashCode); + _$hash = $jc(_$hash, updateResult.hashCode); + _$hash = $jc(_$hash, optimisticResponse.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerKey.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); + _$hash = $jc(_$hash, fetchPolicy.hashCode); + _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GFavoritePlacesReq') + ..add('vars', vars) + ..add('operation', operation) + ..add('requestId', requestId) + ..add('updateResult', updateResult) + ..add('optimisticResponse', optimisticResponse) + ..add('updateCacheHandlerKey', updateCacheHandlerKey) + ..add('updateCacheHandlerContext', updateCacheHandlerContext) + ..add('fetchPolicy', fetchPolicy) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) + .toString(); + } +} + +class GFavoritePlacesReqBuilder + implements Builder { + _$GFavoritePlacesReq? _$v; + + _i3.GFavoritePlacesVarsBuilder? _vars; + _i3.GFavoritePlacesVarsBuilder get vars => + _$this._vars ??= _i3.GFavoritePlacesVarsBuilder(); + set vars(_i3.GFavoritePlacesVarsBuilder? vars) => _$this._vars = vars; + + _i4.Operation? _operation; + _i4.Operation? get operation => _$this._operation; + set operation(_i4.Operation? operation) => _$this._operation = operation; + + String? _requestId; + String? get requestId => _$this._requestId; + set requestId(String? requestId) => _$this._requestId = requestId; + + _i2.GFavoritePlacesData? Function( + _i2.GFavoritePlacesData?, + _i2.GFavoritePlacesData?, + )? + _updateResult; + _i2.GFavoritePlacesData? Function( + _i2.GFavoritePlacesData?, + _i2.GFavoritePlacesData?, + )? + get updateResult => _$this._updateResult; + set updateResult( + _i2.GFavoritePlacesData? Function( + _i2.GFavoritePlacesData?, + _i2.GFavoritePlacesData?, + )? + updateResult, + ) => _$this._updateResult = updateResult; + + _i2.GFavoritePlacesDataBuilder? _optimisticResponse; + _i2.GFavoritePlacesDataBuilder get optimisticResponse => + _$this._optimisticResponse ??= _i2.GFavoritePlacesDataBuilder(); + set optimisticResponse(_i2.GFavoritePlacesDataBuilder? optimisticResponse) => + _$this._optimisticResponse = optimisticResponse; + + String? _updateCacheHandlerKey; + String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey; + set updateCacheHandlerKey(String? updateCacheHandlerKey) => + _$this._updateCacheHandlerKey = updateCacheHandlerKey; + + Map? _updateCacheHandlerContext; + Map? get updateCacheHandlerContext => + _$this._updateCacheHandlerContext; + set updateCacheHandlerContext( + Map? updateCacheHandlerContext, + ) => _$this._updateCacheHandlerContext = updateCacheHandlerContext; + + _i1.FetchPolicy? _fetchPolicy; + _i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy; + set fetchPolicy(_i1.FetchPolicy? fetchPolicy) => + _$this._fetchPolicy = fetchPolicy; + + bool? _executeOnListen; + bool? get executeOnListen => _$this._executeOnListen; + set executeOnListen(bool? executeOnListen) => + _$this._executeOnListen = executeOnListen; + + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + + GFavoritePlacesReqBuilder() { + GFavoritePlacesReq._initializeBuilder(this); + } + + GFavoritePlacesReqBuilder get _$this { + final $v = _$v; + if ($v != null) { + _vars = $v.vars.toBuilder(); + _operation = $v.operation; + _requestId = $v.requestId; + _updateResult = $v.updateResult; + _optimisticResponse = $v.optimisticResponse?.toBuilder(); + _updateCacheHandlerKey = $v.updateCacheHandlerKey; + _updateCacheHandlerContext = $v.updateCacheHandlerContext; + _fetchPolicy = $v.fetchPolicy; + _executeOnListen = $v.executeOnListen; + _context = $v.context; + _$v = null; + } + return this; + } + + @override + void replace(GFavoritePlacesReq other) { + _$v = other as _$GFavoritePlacesReq; + } + + @override + void update(void Function(GFavoritePlacesReqBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GFavoritePlacesReq build() => _build(); + + _$GFavoritePlacesReq _build() { + _$GFavoritePlacesReq _$result; + try { + _$result = + _$v ?? + _$GFavoritePlacesReq._( + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, + r'GFavoritePlacesReq', + 'operation', + ), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, + r'GFavoritePlacesReq', + 'executeOnListen', + ), + context: context, + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'vars'; + vars.build(); + + _$failedField = 'optimisticResponse'; + _optimisticResponse?.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GFavoritePlacesReq', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart new file mode 100644 index 0000000..f784772 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'favorite_places.var.gql.g.dart'; + +abstract class GFavoritePlacesVars + implements Built { + GFavoritePlacesVars._(); + + factory GFavoritePlacesVars([ + void Function(GFavoritePlacesVarsBuilder b) updates, + ]) = _$GFavoritePlacesVars; + + static Serializer get serializer => + _$gFavoritePlacesVarsSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GFavoritePlacesVars.serializer, this) + as Map); + + static GFavoritePlacesVars? fromJson(Map json) => + _i1.serializers.deserializeWith(GFavoritePlacesVars.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.g.dart new file mode 100644 index 0000000..1e9673d --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.g.dart @@ -0,0 +1,99 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'favorite_places.var.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gFavoritePlacesVarsSerializer = + _$GFavoritePlacesVarsSerializer(); + +class _$GFavoritePlacesVarsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GFavoritePlacesVars, + _$GFavoritePlacesVars, + ]; + @override + final String wireName = 'GFavoritePlacesVars'; + + @override + Iterable serialize( + Serializers serializers, + GFavoritePlacesVars object, { + FullType specifiedType = FullType.unspecified, + }) { + return []; + } + + @override + GFavoritePlacesVars deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + return GFavoritePlacesVarsBuilder().build(); + } +} + +class _$GFavoritePlacesVars extends GFavoritePlacesVars { + factory _$GFavoritePlacesVars([ + void Function(GFavoritePlacesVarsBuilder)? updates, + ]) => (GFavoritePlacesVarsBuilder()..update(updates))._build(); + + _$GFavoritePlacesVars._() : super._(); + @override + GFavoritePlacesVars rebuild( + void Function(GFavoritePlacesVarsBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GFavoritePlacesVarsBuilder toBuilder() => + GFavoritePlacesVarsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GFavoritePlacesVars; + } + + @override + int get hashCode { + return 586165499; + } + + @override + String toString() { + return newBuiltValueToStringHelper(r'GFavoritePlacesVars').toString(); + } +} + +class GFavoritePlacesVarsBuilder + implements Builder { + _$GFavoritePlacesVars? _$v; + + GFavoritePlacesVarsBuilder(); + + @override + void replace(GFavoritePlacesVars other) { + _$v = other as _$GFavoritePlacesVars; + } + + @override + void update(void Function(GFavoritePlacesVarsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GFavoritePlacesVars build() => _build(); + + _$GFavoritePlacesVars _build() { + final _$result = _$v ?? _$GFavoritePlacesVars._(); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/nearby_places.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/nearby_places.ast.gql.dart index e02b4bf..c4f8669 100644 --- a/lib/features/mapflow/data/graphql/__generated__/nearby_places.ast.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/nearby_places.ast.gql.dart @@ -82,6 +82,62 @@ const NearbyPlaces = _i1.OperationDefinitionNode( directives: [], selectionSet: null, ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRating'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'photoUrls'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), _i1.FieldNode( name: _i1.NameNode(value: 'experiences'), alias: null, @@ -103,13 +159,6 @@ const NearbyPlaces = _i1.OperationDefinitionNode( directives: [], selectionSet: null, ), - _i1.FieldNode( - name: _i1.NameNode(value: 'analysis'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), _i1.FieldNode( name: _i1.NameNode(value: 'createdAt'), alias: null, diff --git a/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.dart index e405985..3652ce8 100644 --- a/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.dart @@ -4,10 +4,10 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; -import 'package:built_value/json_object.dart' as _i3; +import 'package:built_value/json_object.dart' as _i2; import 'package:built_value/serializer.dart'; import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' - as _i2; + as _i3; import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' as _i1; @@ -62,6 +62,14 @@ abstract class GNearbyPlacesData_nearbyPlaces double get longitude; String? get googlePrimaryType; BuiltList get googleTypes; + String? get googleBusinessStatus; + double? get googleRating; + int? get googleUserRatingCount; + _i2.JsonObject? get googleRegularOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours; + BuiltList get photoUrls; + BuiltList get traits; + bool get isFavorite; BuiltList get experiences; static Serializer get serializer => _$gNearbyPlacesDataNearbyPlacesSerializer; @@ -99,8 +107,7 @@ abstract class GNearbyPlacesData_nearbyPlaces_experiences @BuiltValueField(wireName: '__typename') String get G__typename; String get id; - _i2.GVoiceExperienceStatus get status; - _i3.JsonObject? get analysis; + _i3.GVoiceExperienceStatus get status; String get createdAt; static Serializer get serializer => _$gNearbyPlacesDataNearbyPlacesExperiencesSerializer; diff --git a/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.g.dart index 8d92ed8..68d958f 100644 --- a/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/nearby_places.data.gql.g.dart @@ -134,6 +134,25 @@ class _$GNearbyPlacesData_nearbyPlacesSerializer const FullType(String), ]), ), + 'photoUrls', + serializers.serialize( + object.photoUrls, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'traits', + serializers.serialize( + object.traits, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'isFavorite', + serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ), 'experiences', serializers.serialize( object.experiences, @@ -151,6 +170,50 @@ class _$GNearbyPlacesData_nearbyPlacesSerializer serializers.serialize(value, specifiedType: const FullType(String)), ); } + value = object.googleBusinessStatus; + if (value != null) { + result + ..add('googleBusinessStatus') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleRating; + if (value != null) { + result + ..add('googleRating') + ..add( + serializers.serialize(value, specifiedType: const FullType(double)), + ); + } + value = object.googleUserRatingCount; + if (value != null) { + result + ..add('googleUserRatingCount') + ..add(serializers.serialize(value, specifiedType: const FullType(int))); + } + value = object.googleRegularOpeningHours; + if (value != null) { + result + ..add('googleRegularOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + value = object.googleCurrentOpeningHours; + if (value != null) { + result + ..add('googleCurrentOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } return result; } @@ -235,6 +298,73 @@ class _$GNearbyPlacesData_nearbyPlacesSerializer as BuiltList, ); break; + case 'googleBusinessStatus': + result.googleBusinessStatus = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleRating': + result.googleRating = + serializers.deserialize( + value, + specifiedType: const FullType(double), + ) + as double?; + break; + case 'googleUserRatingCount': + result.googleUserRatingCount = + serializers.deserialize(value, specifiedType: const FullType(int)) + as int?; + break; + case 'googleRegularOpeningHours': + result.googleRegularOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'googleCurrentOpeningHours': + result.googleCurrentOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'photoUrls': + result.photoUrls.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'traits': + result.traits.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'isFavorite': + result.isFavorite = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; case 'experiences': result.experiences.replace( serializers.deserialize( @@ -281,7 +411,7 @@ class _$GNearbyPlacesData_nearbyPlaces_experiencesSerializer 'status', serializers.serialize( object.status, - specifiedType: const FullType(_i2.GVoiceExperienceStatus), + specifiedType: const FullType(_i3.GVoiceExperienceStatus), ), 'createdAt', serializers.serialize( @@ -289,18 +419,7 @@ class _$GNearbyPlacesData_nearbyPlaces_experiencesSerializer specifiedType: const FullType(String), ), ]; - Object? value; - value = object.analysis; - if (value != null) { - result - ..add('analysis') - ..add( - serializers.serialize( - value, - specifiedType: const FullType(_i3.JsonObject), - ), - ); - } + return result; } @@ -338,17 +457,9 @@ class _$GNearbyPlacesData_nearbyPlaces_experiencesSerializer result.status = serializers.deserialize( value, - specifiedType: const FullType(_i2.GVoiceExperienceStatus), + specifiedType: const FullType(_i3.GVoiceExperienceStatus), )! - as _i2.GVoiceExperienceStatus; - break; - case 'analysis': - result.analysis = - serializers.deserialize( - value, - specifiedType: const FullType(_i3.JsonObject), - ) - as _i3.JsonObject?; + as _i3.GVoiceExperienceStatus; break; case 'createdAt': result.createdAt = @@ -502,6 +613,22 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces { @override final BuiltList googleTypes; @override + final String? googleBusinessStatus; + @override + final double? googleRating; + @override + final int? googleUserRatingCount; + @override + final _i2.JsonObject? googleRegularOpeningHours; + @override + final _i2.JsonObject? googleCurrentOpeningHours; + @override + final BuiltList photoUrls; + @override + final BuiltList traits; + @override + final bool isFavorite; + @override final BuiltList experiences; factory _$GNearbyPlacesData_nearbyPlaces([ @@ -517,6 +644,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces { required this.longitude, this.googlePrimaryType, required this.googleTypes, + this.googleBusinessStatus, + this.googleRating, + this.googleUserRatingCount, + this.googleRegularOpeningHours, + this.googleCurrentOpeningHours, + required this.photoUrls, + required this.traits, + required this.isFavorite, required this.experiences, }) : super._(); @override @@ -540,6 +675,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces { longitude == other.longitude && googlePrimaryType == other.googlePrimaryType && googleTypes == other.googleTypes && + googleBusinessStatus == other.googleBusinessStatus && + googleRating == other.googleRating && + googleUserRatingCount == other.googleUserRatingCount && + googleRegularOpeningHours == other.googleRegularOpeningHours && + googleCurrentOpeningHours == other.googleCurrentOpeningHours && + photoUrls == other.photoUrls && + traits == other.traits && + isFavorite == other.isFavorite && experiences == other.experiences; } @@ -554,6 +697,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces { _$hash = $jc(_$hash, longitude.hashCode); _$hash = $jc(_$hash, googlePrimaryType.hashCode); _$hash = $jc(_$hash, googleTypes.hashCode); + _$hash = $jc(_$hash, googleBusinessStatus.hashCode); + _$hash = $jc(_$hash, googleRating.hashCode); + _$hash = $jc(_$hash, googleUserRatingCount.hashCode); + _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); + _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); + _$hash = $jc(_$hash, photoUrls.hashCode); + _$hash = $jc(_$hash, traits.hashCode); + _$hash = $jc(_$hash, isFavorite.hashCode); _$hash = $jc(_$hash, experiences.hashCode); _$hash = $jf(_$hash); return _$hash; @@ -570,6 +721,14 @@ class _$GNearbyPlacesData_nearbyPlaces extends GNearbyPlacesData_nearbyPlaces { ..add('longitude', longitude) ..add('googlePrimaryType', googlePrimaryType) ..add('googleTypes', googleTypes) + ..add('googleBusinessStatus', googleBusinessStatus) + ..add('googleRating', googleRating) + ..add('googleUserRatingCount', googleUserRatingCount) + ..add('googleRegularOpeningHours', googleRegularOpeningHours) + ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) + ..add('photoUrls', photoUrls) + ..add('traits', traits) + ..add('isFavorite', isFavorite) ..add('experiences', experiences)) .toString(); } @@ -619,6 +778,46 @@ class GNearbyPlacesData_nearbyPlacesBuilder set googleTypes(ListBuilder? googleTypes) => _$this._googleTypes = googleTypes; + String? _googleBusinessStatus; + String? get googleBusinessStatus => _$this._googleBusinessStatus; + set googleBusinessStatus(String? googleBusinessStatus) => + _$this._googleBusinessStatus = googleBusinessStatus; + + double? _googleRating; + double? get googleRating => _$this._googleRating; + set googleRating(double? googleRating) => _$this._googleRating = googleRating; + + int? _googleUserRatingCount; + int? get googleUserRatingCount => _$this._googleUserRatingCount; + set googleUserRatingCount(int? googleUserRatingCount) => + _$this._googleUserRatingCount = googleUserRatingCount; + + _i2.JsonObject? _googleRegularOpeningHours; + _i2.JsonObject? get googleRegularOpeningHours => + _$this._googleRegularOpeningHours; + set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => + _$this._googleRegularOpeningHours = googleRegularOpeningHours; + + _i2.JsonObject? _googleCurrentOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours => + _$this._googleCurrentOpeningHours; + set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => + _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; + + ListBuilder? _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= ListBuilder(); + set photoUrls(ListBuilder? photoUrls) => + _$this._photoUrls = photoUrls; + + ListBuilder? _traits; + ListBuilder get traits => _$this._traits ??= ListBuilder(); + set traits(ListBuilder? traits) => _$this._traits = traits; + + bool? _isFavorite; + bool? get isFavorite => _$this._isFavorite; + set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; + ListBuilder? _experiences; ListBuilder get experiences => _$this._experiences ??= @@ -642,6 +841,14 @@ class GNearbyPlacesData_nearbyPlacesBuilder _longitude = $v.longitude; _googlePrimaryType = $v.googlePrimaryType; _googleTypes = $v.googleTypes.toBuilder(); + _googleBusinessStatus = $v.googleBusinessStatus; + _googleRating = $v.googleRating; + _googleUserRatingCount = $v.googleUserRatingCount; + _googleRegularOpeningHours = $v.googleRegularOpeningHours; + _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; + _photoUrls = $v.photoUrls.toBuilder(); + _traits = $v.traits.toBuilder(); + _isFavorite = $v.isFavorite; _experiences = $v.experiences.toBuilder(); _$v = null; } @@ -699,6 +906,18 @@ class GNearbyPlacesData_nearbyPlacesBuilder ), googlePrimaryType: googlePrimaryType, googleTypes: googleTypes.build(), + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + photoUrls: photoUrls.build(), + traits: traits.build(), + isFavorite: BuiltValueNullFieldError.checkNotNull( + isFavorite, + r'GNearbyPlacesData_nearbyPlaces', + 'isFavorite', + ), experiences: experiences.build(), ); } catch (_) { @@ -706,6 +925,12 @@ class GNearbyPlacesData_nearbyPlacesBuilder try { _$failedField = 'googleTypes'; googleTypes.build(); + + _$failedField = 'photoUrls'; + photoUrls.build(); + _$failedField = 'traits'; + traits.build(); + _$failedField = 'experiences'; experiences.build(); } catch (e) { @@ -729,9 +954,7 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences @override final String id; @override - final _i2.GVoiceExperienceStatus status; - @override - final _i3.JsonObject? analysis; + final _i3.GVoiceExperienceStatus status; @override final String createdAt; @@ -744,7 +967,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences required this.G__typename, required this.id, required this.status, - this.analysis, required this.createdAt, }) : super._(); @override @@ -763,7 +985,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences G__typename == other.G__typename && id == other.id && status == other.status && - analysis == other.analysis && createdAt == other.createdAt; } @@ -773,7 +994,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences _$hash = $jc(_$hash, G__typename.hashCode); _$hash = $jc(_$hash, id.hashCode); _$hash = $jc(_$hash, status.hashCode); - _$hash = $jc(_$hash, analysis.hashCode); _$hash = $jc(_$hash, createdAt.hashCode); _$hash = $jf(_$hash); return _$hash; @@ -787,7 +1007,6 @@ class _$GNearbyPlacesData_nearbyPlaces_experiences ..add('G__typename', G__typename) ..add('id', id) ..add('status', status) - ..add('analysis', analysis) ..add('createdAt', createdAt)) .toString(); } @@ -809,13 +1028,9 @@ class GNearbyPlacesData_nearbyPlaces_experiencesBuilder String? get id => _$this._id; set id(String? id) => _$this._id = id; - _i2.GVoiceExperienceStatus? _status; - _i2.GVoiceExperienceStatus? get status => _$this._status; - set status(_i2.GVoiceExperienceStatus? status) => _$this._status = status; - - _i3.JsonObject? _analysis; - _i3.JsonObject? get analysis => _$this._analysis; - set analysis(_i3.JsonObject? analysis) => _$this._analysis = analysis; + _i3.GVoiceExperienceStatus? _status; + _i3.GVoiceExperienceStatus? get status => _$this._status; + set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; String? _createdAt; String? get createdAt => _$this._createdAt; @@ -831,7 +1046,6 @@ class GNearbyPlacesData_nearbyPlaces_experiencesBuilder _G__typename = $v.G__typename; _id = $v.id; _status = $v.status; - _analysis = $v.analysis; _createdAt = $v.createdAt; _$v = null; } @@ -872,7 +1086,6 @@ class GNearbyPlacesData_nearbyPlaces_experiencesBuilder r'GNearbyPlacesData_nearbyPlaces_experiences', 'status', ), - analysis: analysis, createdAt: BuiltValueNullFieldError.checkNotNull( createdAt, r'GNearbyPlacesData_nearbyPlaces_experiences', diff --git a/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart index 470745d..f8d00fe 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.ast.gql.dart @@ -67,6 +67,62 @@ const Places = _i1.OperationDefinitionNode( directives: [], selectionSet: null, ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRating'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'photoUrls'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), _i1.FieldNode( name: _i1.NameNode(value: 'experiences'), alias: null, @@ -88,13 +144,6 @@ const Places = _i1.OperationDefinitionNode( directives: [], selectionSet: null, ), - _i1.FieldNode( - name: _i1.NameNode(value: 'analysis'), - alias: null, - arguments: [], - directives: [], - selectionSet: null, - ), _i1.FieldNode( name: _i1.NameNode(value: 'createdAt'), alias: null, diff --git a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart index 99dfec3..f79e86c 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.dart @@ -4,10 +4,10 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; -import 'package:built_value/json_object.dart' as _i3; +import 'package:built_value/json_object.dart' as _i2; import 'package:built_value/serializer.dart'; import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' - as _i2; + as _i3; import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' as _i1; @@ -55,6 +55,14 @@ abstract class GPlacesData_places double get longitude; String? get googlePrimaryType; BuiltList get googleTypes; + String? get googleBusinessStatus; + double? get googleRating; + int? get googleUserRatingCount; + _i2.JsonObject? get googleRegularOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours; + BuiltList get photoUrls; + BuiltList get traits; + bool get isFavorite; BuiltList get experiences; static Serializer get serializer => _$gPlacesDataPlacesSerializer; @@ -85,8 +93,7 @@ abstract class GPlacesData_places_experiences @BuiltValueField(wireName: '__typename') String get G__typename; String get id; - _i2.GVoiceExperienceStatus get status; - _i3.JsonObject? get analysis; + _i3.GVoiceExperienceStatus get status; String get createdAt; static Serializer get serializer => _$gPlacesDataPlacesExperiencesSerializer; diff --git a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart index b198553..4f46c57 100644 --- a/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/places.data.gql.g.dart @@ -128,6 +128,25 @@ class _$GPlacesData_placesSerializer const FullType(String), ]), ), + 'photoUrls', + serializers.serialize( + object.photoUrls, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'traits', + serializers.serialize( + object.traits, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'isFavorite', + serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ), 'experiences', serializers.serialize( object.experiences, @@ -145,6 +164,50 @@ class _$GPlacesData_placesSerializer serializers.serialize(value, specifiedType: const FullType(String)), ); } + value = object.googleBusinessStatus; + if (value != null) { + result + ..add('googleBusinessStatus') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleRating; + if (value != null) { + result + ..add('googleRating') + ..add( + serializers.serialize(value, specifiedType: const FullType(double)), + ); + } + value = object.googleUserRatingCount; + if (value != null) { + result + ..add('googleUserRatingCount') + ..add(serializers.serialize(value, specifiedType: const FullType(int))); + } + value = object.googleRegularOpeningHours; + if (value != null) { + result + ..add('googleRegularOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + value = object.googleCurrentOpeningHours; + if (value != null) { + result + ..add('googleCurrentOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } return result; } @@ -229,6 +292,73 @@ class _$GPlacesData_placesSerializer as BuiltList, ); break; + case 'googleBusinessStatus': + result.googleBusinessStatus = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleRating': + result.googleRating = + serializers.deserialize( + value, + specifiedType: const FullType(double), + ) + as double?; + break; + case 'googleUserRatingCount': + result.googleUserRatingCount = + serializers.deserialize(value, specifiedType: const FullType(int)) + as int?; + break; + case 'googleRegularOpeningHours': + result.googleRegularOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'googleCurrentOpeningHours': + result.googleCurrentOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'photoUrls': + result.photoUrls.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'traits': + result.traits.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'isFavorite': + result.isFavorite = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; case 'experiences': result.experiences.replace( serializers.deserialize( @@ -274,7 +404,7 @@ class _$GPlacesData_places_experiencesSerializer 'status', serializers.serialize( object.status, - specifiedType: const FullType(_i2.GVoiceExperienceStatus), + specifiedType: const FullType(_i3.GVoiceExperienceStatus), ), 'createdAt', serializers.serialize( @@ -282,18 +412,7 @@ class _$GPlacesData_places_experiencesSerializer specifiedType: const FullType(String), ), ]; - Object? value; - value = object.analysis; - if (value != null) { - result - ..add('analysis') - ..add( - serializers.serialize( - value, - specifiedType: const FullType(_i3.JsonObject), - ), - ); - } + return result; } @@ -331,17 +450,9 @@ class _$GPlacesData_places_experiencesSerializer result.status = serializers.deserialize( value, - specifiedType: const FullType(_i2.GVoiceExperienceStatus), + specifiedType: const FullType(_i3.GVoiceExperienceStatus), )! - as _i2.GVoiceExperienceStatus; - break; - case 'analysis': - result.analysis = - serializers.deserialize( - value, - specifiedType: const FullType(_i3.JsonObject), - ) - as _i3.JsonObject?; + as _i3.GVoiceExperienceStatus; break; case 'createdAt': result.createdAt = @@ -492,6 +603,22 @@ class _$GPlacesData_places extends GPlacesData_places { @override final BuiltList googleTypes; @override + final String? googleBusinessStatus; + @override + final double? googleRating; + @override + final int? googleUserRatingCount; + @override + final _i2.JsonObject? googleRegularOpeningHours; + @override + final _i2.JsonObject? googleCurrentOpeningHours; + @override + final BuiltList photoUrls; + @override + final BuiltList traits; + @override + final bool isFavorite; + @override final BuiltList experiences; factory _$GPlacesData_places([ @@ -507,6 +634,14 @@ class _$GPlacesData_places extends GPlacesData_places { required this.longitude, this.googlePrimaryType, required this.googleTypes, + this.googleBusinessStatus, + this.googleRating, + this.googleUserRatingCount, + this.googleRegularOpeningHours, + this.googleCurrentOpeningHours, + required this.photoUrls, + required this.traits, + required this.isFavorite, required this.experiences, }) : super._(); @override @@ -530,6 +665,14 @@ class _$GPlacesData_places extends GPlacesData_places { longitude == other.longitude && googlePrimaryType == other.googlePrimaryType && googleTypes == other.googleTypes && + googleBusinessStatus == other.googleBusinessStatus && + googleRating == other.googleRating && + googleUserRatingCount == other.googleUserRatingCount && + googleRegularOpeningHours == other.googleRegularOpeningHours && + googleCurrentOpeningHours == other.googleCurrentOpeningHours && + photoUrls == other.photoUrls && + traits == other.traits && + isFavorite == other.isFavorite && experiences == other.experiences; } @@ -544,6 +687,14 @@ class _$GPlacesData_places extends GPlacesData_places { _$hash = $jc(_$hash, longitude.hashCode); _$hash = $jc(_$hash, googlePrimaryType.hashCode); _$hash = $jc(_$hash, googleTypes.hashCode); + _$hash = $jc(_$hash, googleBusinessStatus.hashCode); + _$hash = $jc(_$hash, googleRating.hashCode); + _$hash = $jc(_$hash, googleUserRatingCount.hashCode); + _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); + _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); + _$hash = $jc(_$hash, photoUrls.hashCode); + _$hash = $jc(_$hash, traits.hashCode); + _$hash = $jc(_$hash, isFavorite.hashCode); _$hash = $jc(_$hash, experiences.hashCode); _$hash = $jf(_$hash); return _$hash; @@ -560,6 +711,14 @@ class _$GPlacesData_places extends GPlacesData_places { ..add('longitude', longitude) ..add('googlePrimaryType', googlePrimaryType) ..add('googleTypes', googleTypes) + ..add('googleBusinessStatus', googleBusinessStatus) + ..add('googleRating', googleRating) + ..add('googleUserRatingCount', googleUserRatingCount) + ..add('googleRegularOpeningHours', googleRegularOpeningHours) + ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) + ..add('photoUrls', photoUrls) + ..add('traits', traits) + ..add('isFavorite', isFavorite) ..add('experiences', experiences)) .toString(); } @@ -605,6 +764,46 @@ class GPlacesData_placesBuilder set googleTypes(ListBuilder? googleTypes) => _$this._googleTypes = googleTypes; + String? _googleBusinessStatus; + String? get googleBusinessStatus => _$this._googleBusinessStatus; + set googleBusinessStatus(String? googleBusinessStatus) => + _$this._googleBusinessStatus = googleBusinessStatus; + + double? _googleRating; + double? get googleRating => _$this._googleRating; + set googleRating(double? googleRating) => _$this._googleRating = googleRating; + + int? _googleUserRatingCount; + int? get googleUserRatingCount => _$this._googleUserRatingCount; + set googleUserRatingCount(int? googleUserRatingCount) => + _$this._googleUserRatingCount = googleUserRatingCount; + + _i2.JsonObject? _googleRegularOpeningHours; + _i2.JsonObject? get googleRegularOpeningHours => + _$this._googleRegularOpeningHours; + set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => + _$this._googleRegularOpeningHours = googleRegularOpeningHours; + + _i2.JsonObject? _googleCurrentOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours => + _$this._googleCurrentOpeningHours; + set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => + _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; + + ListBuilder? _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= ListBuilder(); + set photoUrls(ListBuilder? photoUrls) => + _$this._photoUrls = photoUrls; + + ListBuilder? _traits; + ListBuilder get traits => _$this._traits ??= ListBuilder(); + set traits(ListBuilder? traits) => _$this._traits = traits; + + bool? _isFavorite; + bool? get isFavorite => _$this._isFavorite; + set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; + ListBuilder? _experiences; ListBuilder get experiences => _$this._experiences ??= ListBuilder(); @@ -626,6 +825,14 @@ class GPlacesData_placesBuilder _longitude = $v.longitude; _googlePrimaryType = $v.googlePrimaryType; _googleTypes = $v.googleTypes.toBuilder(); + _googleBusinessStatus = $v.googleBusinessStatus; + _googleRating = $v.googleRating; + _googleUserRatingCount = $v.googleUserRatingCount; + _googleRegularOpeningHours = $v.googleRegularOpeningHours; + _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; + _photoUrls = $v.photoUrls.toBuilder(); + _traits = $v.traits.toBuilder(); + _isFavorite = $v.isFavorite; _experiences = $v.experiences.toBuilder(); _$v = null; } @@ -683,6 +890,18 @@ class GPlacesData_placesBuilder ), googlePrimaryType: googlePrimaryType, googleTypes: googleTypes.build(), + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + photoUrls: photoUrls.build(), + traits: traits.build(), + isFavorite: BuiltValueNullFieldError.checkNotNull( + isFavorite, + r'GPlacesData_places', + 'isFavorite', + ), experiences: experiences.build(), ); } catch (_) { @@ -690,6 +909,12 @@ class GPlacesData_placesBuilder try { _$failedField = 'googleTypes'; googleTypes.build(); + + _$failedField = 'photoUrls'; + photoUrls.build(); + _$failedField = 'traits'; + traits.build(); + _$failedField = 'experiences'; experiences.build(); } catch (e) { @@ -712,9 +937,7 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences { @override final String id; @override - final _i2.GVoiceExperienceStatus status; - @override - final _i3.JsonObject? analysis; + final _i3.GVoiceExperienceStatus status; @override final String createdAt; @@ -726,7 +949,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences { required this.G__typename, required this.id, required this.status, - this.analysis, required this.createdAt, }) : super._(); @override @@ -745,7 +967,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences { G__typename == other.G__typename && id == other.id && status == other.status && - analysis == other.analysis && createdAt == other.createdAt; } @@ -755,7 +976,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences { _$hash = $jc(_$hash, G__typename.hashCode); _$hash = $jc(_$hash, id.hashCode); _$hash = $jc(_$hash, status.hashCode); - _$hash = $jc(_$hash, analysis.hashCode); _$hash = $jc(_$hash, createdAt.hashCode); _$hash = $jf(_$hash); return _$hash; @@ -767,7 +987,6 @@ class _$GPlacesData_places_experiences extends GPlacesData_places_experiences { ..add('G__typename', G__typename) ..add('id', id) ..add('status', status) - ..add('analysis', analysis) ..add('createdAt', createdAt)) .toString(); } @@ -789,13 +1008,9 @@ class GPlacesData_places_experiencesBuilder String? get id => _$this._id; set id(String? id) => _$this._id = id; - _i2.GVoiceExperienceStatus? _status; - _i2.GVoiceExperienceStatus? get status => _$this._status; - set status(_i2.GVoiceExperienceStatus? status) => _$this._status = status; - - _i3.JsonObject? _analysis; - _i3.JsonObject? get analysis => _$this._analysis; - set analysis(_i3.JsonObject? analysis) => _$this._analysis = analysis; + _i3.GVoiceExperienceStatus? _status; + _i3.GVoiceExperienceStatus? get status => _$this._status; + set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; String? _createdAt; String? get createdAt => _$this._createdAt; @@ -811,7 +1026,6 @@ class GPlacesData_places_experiencesBuilder _G__typename = $v.G__typename; _id = $v.id; _status = $v.status; - _analysis = $v.analysis; _createdAt = $v.createdAt; _$v = null; } @@ -850,7 +1064,6 @@ class GPlacesData_places_experiencesBuilder r'GPlacesData_places_experiences', 'status', ), - analysis: analysis, createdAt: BuiltValueNullFieldError.checkNotNull( createdAt, r'GPlacesData_places_experiences', diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.ast.gql.dart new file mode 100644 index 0000000..348883a --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.ast.gql.dart @@ -0,0 +1,175 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:gql/ast.dart' as _i1; + +const RemoveFavoritePlace = _i1.OperationDefinitionNode( + type: _i1.OperationType.mutation, + name: _i1.NameNode(value: 'RemoveFavoritePlace'), + variableDefinitions: [ + _i1.VariableDefinitionNode( + variable: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')), + type: _i1.NamedTypeNode(name: _i1.NameNode(value: 'ID'), isNonNull: true), + defaultValue: _i1.DefaultValueNode(value: null), + directives: [], + ), + ], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'removeFavoritePlace'), + alias: null, + arguments: [ + _i1.ArgumentNode( + name: _i1.NameNode(value: 'placeId'), + value: _i1.VariableNode(name: _i1.NameNode(value: 'placeId')), + ), + ], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePlaceId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'latitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'longitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePrimaryType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleTypes'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRating'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'photoUrls'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'experiences'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ], + ), + ), + ], + ), + ), + ], + ), +); +const document = _i1.DocumentNode(definitions: [RemoveFavoritePlace]); diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart new file mode 100644 index 0000000..1472a26 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart @@ -0,0 +1,138 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/json_object.dart' as _i2; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'remove_favorite_place.data.gql.g.dart'; + +abstract class GRemoveFavoritePlaceData + implements + Built { + GRemoveFavoritePlaceData._(); + + factory GRemoveFavoritePlaceData([ + void Function(GRemoveFavoritePlaceDataBuilder b) updates, + ]) = _$GRemoveFavoritePlaceData; + + static void _initializeBuilder(GRemoveFavoritePlaceDataBuilder b) => + b..G__typename = 'Mutation'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + GRemoveFavoritePlaceData_removeFavoritePlace get removeFavoritePlace; + static Serializer get serializer => + _$gRemoveFavoritePlaceDataSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GRemoveFavoritePlaceData.serializer, this) + as Map); + + static GRemoveFavoritePlaceData? fromJson(Map json) => _i1 + .serializers + .deserializeWith(GRemoveFavoritePlaceData.serializer, json); +} + +abstract class GRemoveFavoritePlaceData_removeFavoritePlace + implements + Built< + GRemoveFavoritePlaceData_removeFavoritePlace, + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder + > { + GRemoveFavoritePlaceData_removeFavoritePlace._(); + + factory GRemoveFavoritePlaceData_removeFavoritePlace([ + void Function(GRemoveFavoritePlaceData_removeFavoritePlaceBuilder b) + updates, + ]) = _$GRemoveFavoritePlaceData_removeFavoritePlace; + + static void _initializeBuilder( + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder b, + ) => b..G__typename = 'Place'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + String get googlePlaceId; + String get name; + double get latitude; + double get longitude; + String? get googlePrimaryType; + BuiltList get googleTypes; + String? get googleBusinessStatus; + double? get googleRating; + int? get googleUserRatingCount; + _i2.JsonObject? get googleRegularOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours; + BuiltList get photoUrls; + BuiltList get traits; + bool get isFavorite; + BuiltList + get experiences; + static Serializer + get serializer => _$gRemoveFavoritePlaceDataRemoveFavoritePlaceSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GRemoveFavoritePlaceData_removeFavoritePlace.serializer, + this, + ) + as Map); + + static GRemoveFavoritePlaceData_removeFavoritePlace? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GRemoveFavoritePlaceData_removeFavoritePlace.serializer, + json, + ); +} + +abstract class GRemoveFavoritePlaceData_removeFavoritePlace_experiences + implements + Built< + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder + > { + GRemoveFavoritePlaceData_removeFavoritePlace_experiences._(); + + factory GRemoveFavoritePlaceData_removeFavoritePlace_experiences([ + void Function( + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder b, + ) + updates, + ]) = _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences; + + static void _initializeBuilder( + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder b, + ) => b..G__typename = 'VoiceExperience'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + _i3.GVoiceExperienceStatus get status; + String get createdAt; + static Serializer + get serializer => + _$gRemoveFavoritePlaceDataRemoveFavoritePlaceExperiencesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GRemoveFavoritePlaceData_removeFavoritePlace_experiences.serializer, + this, + ) + as Map); + + static GRemoveFavoritePlaceData_removeFavoritePlace_experiences? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GRemoveFavoritePlaceData_removeFavoritePlace_experiences.serializer, + json, + ); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.g.dart new file mode 100644 index 0000000..61cd8d0 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.g.dart @@ -0,0 +1,1141 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'remove_favorite_place.data.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gRemoveFavoritePlaceDataSerializer = + _$GRemoveFavoritePlaceDataSerializer(); +Serializer +_$gRemoveFavoritePlaceDataRemoveFavoritePlaceSerializer = + _$GRemoveFavoritePlaceData_removeFavoritePlaceSerializer(); +Serializer +_$gRemoveFavoritePlaceDataRemoveFavoritePlaceExperiencesSerializer = + _$GRemoveFavoritePlaceData_removeFavoritePlace_experiencesSerializer(); + +class _$GRemoveFavoritePlaceDataSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GRemoveFavoritePlaceData, + _$GRemoveFavoritePlaceData, + ]; + @override + final String wireName = 'GRemoveFavoritePlaceData'; + + @override + Iterable serialize( + Serializers serializers, + GRemoveFavoritePlaceData object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'removeFavoritePlace', + serializers.serialize( + object.removeFavoritePlace, + specifiedType: const FullType( + GRemoveFavoritePlaceData_removeFavoritePlace, + ), + ), + ]; + + return result; + } + + @override + GRemoveFavoritePlaceData deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GRemoveFavoritePlaceDataBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'removeFavoritePlace': + result.removeFavoritePlace.replace( + serializers.deserialize( + value, + specifiedType: const FullType( + GRemoveFavoritePlaceData_removeFavoritePlace, + ), + )! + as GRemoveFavoritePlaceData_removeFavoritePlace, + ); + break; + } + } + + return result.build(); + } +} + +class _$GRemoveFavoritePlaceData_removeFavoritePlaceSerializer + implements + StructuredSerializer { + @override + final Iterable types = const [ + GRemoveFavoritePlaceData_removeFavoritePlace, + _$GRemoveFavoritePlaceData_removeFavoritePlace, + ]; + @override + final String wireName = 'GRemoveFavoritePlaceData_removeFavoritePlace'; + + @override + Iterable serialize( + Serializers serializers, + GRemoveFavoritePlaceData_removeFavoritePlace object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'googlePlaceId', + serializers.serialize( + object.googlePlaceId, + specifiedType: const FullType(String), + ), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + 'latitude', + serializers.serialize( + object.latitude, + specifiedType: const FullType(double), + ), + 'longitude', + serializers.serialize( + object.longitude, + specifiedType: const FullType(double), + ), + 'googleTypes', + serializers.serialize( + object.googleTypes, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'photoUrls', + serializers.serialize( + object.photoUrls, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'traits', + serializers.serialize( + object.traits, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'isFavorite', + serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ), + 'experiences', + serializers.serialize( + object.experiences, + specifiedType: const FullType(BuiltList, const [ + const FullType( + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + ), + ]), + ), + ]; + Object? value; + value = object.googlePrimaryType; + if (value != null) { + result + ..add('googlePrimaryType') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleBusinessStatus; + if (value != null) { + result + ..add('googleBusinessStatus') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleRating; + if (value != null) { + result + ..add('googleRating') + ..add( + serializers.serialize(value, specifiedType: const FullType(double)), + ); + } + value = object.googleUserRatingCount; + if (value != null) { + result + ..add('googleUserRatingCount') + ..add(serializers.serialize(value, specifiedType: const FullType(int))); + } + value = object.googleRegularOpeningHours; + if (value != null) { + result + ..add('googleRegularOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + value = object.googleCurrentOpeningHours; + if (value != null) { + result + ..add('googleCurrentOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + return result; + } + + @override + GRemoveFavoritePlaceData_removeFavoritePlace deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GRemoveFavoritePlaceData_removeFavoritePlaceBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'googlePlaceId': + result.googlePlaceId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'name': + result.name = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'latitude': + result.latitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'longitude': + result.longitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'googlePrimaryType': + result.googlePrimaryType = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleTypes': + result.googleTypes.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'googleBusinessStatus': + result.googleBusinessStatus = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleRating': + result.googleRating = + serializers.deserialize( + value, + specifiedType: const FullType(double), + ) + as double?; + break; + case 'googleUserRatingCount': + result.googleUserRatingCount = + serializers.deserialize(value, specifiedType: const FullType(int)) + as int?; + break; + case 'googleRegularOpeningHours': + result.googleRegularOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'googleCurrentOpeningHours': + result.googleCurrentOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'photoUrls': + result.photoUrls.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'traits': + result.traits.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'isFavorite': + result.isFavorite = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + case 'experiences': + result.experiences.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType( + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + ), + ]), + )! + as BuiltList, + ); + break; + } + } + + return result.build(); + } +} + +class _$GRemoveFavoritePlaceData_removeFavoritePlace_experiencesSerializer + implements + StructuredSerializer< + GRemoveFavoritePlaceData_removeFavoritePlace_experiences + > { + @override + final Iterable types = const [ + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + ]; + @override + final String wireName = + 'GRemoveFavoritePlaceData_removeFavoritePlace_experiences'; + + @override + Iterable serialize( + Serializers serializers, + GRemoveFavoritePlaceData_removeFavoritePlace_experiences object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'status', + serializers.serialize( + object.status, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + ), + 'createdAt', + serializers.serialize( + object.createdAt, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GRemoveFavoritePlaceData_removeFavoritePlace_experiences deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'status': + result.status = + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + )! + as _i3.GVoiceExperienceStatus; + break; + case 'createdAt': + result.createdAt = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + +class _$GRemoveFavoritePlaceData extends GRemoveFavoritePlaceData { + @override + final String G__typename; + @override + final GRemoveFavoritePlaceData_removeFavoritePlace removeFavoritePlace; + + factory _$GRemoveFavoritePlaceData([ + void Function(GRemoveFavoritePlaceDataBuilder)? updates, + ]) => (GRemoveFavoritePlaceDataBuilder()..update(updates))._build(); + + _$GRemoveFavoritePlaceData._({ + required this.G__typename, + required this.removeFavoritePlace, + }) : super._(); + @override + GRemoveFavoritePlaceData rebuild( + void Function(GRemoveFavoritePlaceDataBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GRemoveFavoritePlaceDataBuilder toBuilder() => + GRemoveFavoritePlaceDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GRemoveFavoritePlaceData && + G__typename == other.G__typename && + removeFavoritePlace == other.removeFavoritePlace; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, removeFavoritePlace.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GRemoveFavoritePlaceData') + ..add('G__typename', G__typename) + ..add('removeFavoritePlace', removeFavoritePlace)) + .toString(); + } +} + +class GRemoveFavoritePlaceDataBuilder + implements + Builder { + _$GRemoveFavoritePlaceData? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder? _removeFavoritePlace; + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder get removeFavoritePlace => + _$this._removeFavoritePlace ??= + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder(); + set removeFavoritePlace( + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder? removeFavoritePlace, + ) => _$this._removeFavoritePlace = removeFavoritePlace; + + GRemoveFavoritePlaceDataBuilder() { + GRemoveFavoritePlaceData._initializeBuilder(this); + } + + GRemoveFavoritePlaceDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _removeFavoritePlace = $v.removeFavoritePlace.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GRemoveFavoritePlaceData other) { + _$v = other as _$GRemoveFavoritePlaceData; + } + + @override + void update(void Function(GRemoveFavoritePlaceDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GRemoveFavoritePlaceData build() => _build(); + + _$GRemoveFavoritePlaceData _build() { + _$GRemoveFavoritePlaceData _$result; + try { + _$result = + _$v ?? + _$GRemoveFavoritePlaceData._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GRemoveFavoritePlaceData', + 'G__typename', + ), + removeFavoritePlace: removeFavoritePlace.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'removeFavoritePlace'; + removeFavoritePlace.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GRemoveFavoritePlaceData', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GRemoveFavoritePlaceData_removeFavoritePlace + extends GRemoveFavoritePlaceData_removeFavoritePlace { + @override + final String G__typename; + @override + final String id; + @override + final String googlePlaceId; + @override + final String name; + @override + final double latitude; + @override + final double longitude; + @override + final String? googlePrimaryType; + @override + final BuiltList googleTypes; + @override + final String? googleBusinessStatus; + @override + final double? googleRating; + @override + final int? googleUserRatingCount; + @override + final _i2.JsonObject? googleRegularOpeningHours; + @override + final _i2.JsonObject? googleCurrentOpeningHours; + @override + final BuiltList photoUrls; + @override + final BuiltList traits; + @override + final bool isFavorite; + @override + final BuiltList + experiences; + + factory _$GRemoveFavoritePlaceData_removeFavoritePlace([ + void Function(GRemoveFavoritePlaceData_removeFavoritePlaceBuilder)? updates, + ]) => (GRemoveFavoritePlaceData_removeFavoritePlaceBuilder()..update(updates)) + ._build(); + + _$GRemoveFavoritePlaceData_removeFavoritePlace._({ + required this.G__typename, + required this.id, + required this.googlePlaceId, + required this.name, + required this.latitude, + required this.longitude, + this.googlePrimaryType, + required this.googleTypes, + this.googleBusinessStatus, + this.googleRating, + this.googleUserRatingCount, + this.googleRegularOpeningHours, + this.googleCurrentOpeningHours, + required this.photoUrls, + required this.traits, + required this.isFavorite, + required this.experiences, + }) : super._(); + @override + GRemoveFavoritePlaceData_removeFavoritePlace rebuild( + void Function(GRemoveFavoritePlaceData_removeFavoritePlaceBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder toBuilder() => + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GRemoveFavoritePlaceData_removeFavoritePlace && + G__typename == other.G__typename && + id == other.id && + googlePlaceId == other.googlePlaceId && + name == other.name && + latitude == other.latitude && + longitude == other.longitude && + googlePrimaryType == other.googlePrimaryType && + googleTypes == other.googleTypes && + googleBusinessStatus == other.googleBusinessStatus && + googleRating == other.googleRating && + googleUserRatingCount == other.googleUserRatingCount && + googleRegularOpeningHours == other.googleRegularOpeningHours && + googleCurrentOpeningHours == other.googleCurrentOpeningHours && + photoUrls == other.photoUrls && + traits == other.traits && + isFavorite == other.isFavorite && + experiences == other.experiences; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, googlePlaceId.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, latitude.hashCode); + _$hash = $jc(_$hash, longitude.hashCode); + _$hash = $jc(_$hash, googlePrimaryType.hashCode); + _$hash = $jc(_$hash, googleTypes.hashCode); + _$hash = $jc(_$hash, googleBusinessStatus.hashCode); + _$hash = $jc(_$hash, googleRating.hashCode); + _$hash = $jc(_$hash, googleUserRatingCount.hashCode); + _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); + _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); + _$hash = $jc(_$hash, photoUrls.hashCode); + _$hash = $jc(_$hash, traits.hashCode); + _$hash = $jc(_$hash, isFavorite.hashCode); + _$hash = $jc(_$hash, experiences.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GRemoveFavoritePlaceData_removeFavoritePlace', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('googlePlaceId', googlePlaceId) + ..add('name', name) + ..add('latitude', latitude) + ..add('longitude', longitude) + ..add('googlePrimaryType', googlePrimaryType) + ..add('googleTypes', googleTypes) + ..add('googleBusinessStatus', googleBusinessStatus) + ..add('googleRating', googleRating) + ..add('googleUserRatingCount', googleUserRatingCount) + ..add('googleRegularOpeningHours', googleRegularOpeningHours) + ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) + ..add('photoUrls', photoUrls) + ..add('traits', traits) + ..add('isFavorite', isFavorite) + ..add('experiences', experiences)) + .toString(); + } +} + +class GRemoveFavoritePlaceData_removeFavoritePlaceBuilder + implements + Builder< + GRemoveFavoritePlaceData_removeFavoritePlace, + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder + > { + _$GRemoveFavoritePlaceData_removeFavoritePlace? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + String? _googlePlaceId; + String? get googlePlaceId => _$this._googlePlaceId; + set googlePlaceId(String? googlePlaceId) => + _$this._googlePlaceId = googlePlaceId; + + String? _name; + String? get name => _$this._name; + set name(String? name) => _$this._name = name; + + double? _latitude; + double? get latitude => _$this._latitude; + set latitude(double? latitude) => _$this._latitude = latitude; + + double? _longitude; + double? get longitude => _$this._longitude; + set longitude(double? longitude) => _$this._longitude = longitude; + + String? _googlePrimaryType; + String? get googlePrimaryType => _$this._googlePrimaryType; + set googlePrimaryType(String? googlePrimaryType) => + _$this._googlePrimaryType = googlePrimaryType; + + ListBuilder? _googleTypes; + ListBuilder get googleTypes => + _$this._googleTypes ??= ListBuilder(); + set googleTypes(ListBuilder? googleTypes) => + _$this._googleTypes = googleTypes; + + String? _googleBusinessStatus; + String? get googleBusinessStatus => _$this._googleBusinessStatus; + set googleBusinessStatus(String? googleBusinessStatus) => + _$this._googleBusinessStatus = googleBusinessStatus; + + double? _googleRating; + double? get googleRating => _$this._googleRating; + set googleRating(double? googleRating) => _$this._googleRating = googleRating; + + int? _googleUserRatingCount; + int? get googleUserRatingCount => _$this._googleUserRatingCount; + set googleUserRatingCount(int? googleUserRatingCount) => + _$this._googleUserRatingCount = googleUserRatingCount; + + _i2.JsonObject? _googleRegularOpeningHours; + _i2.JsonObject? get googleRegularOpeningHours => + _$this._googleRegularOpeningHours; + set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => + _$this._googleRegularOpeningHours = googleRegularOpeningHours; + + _i2.JsonObject? _googleCurrentOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours => + _$this._googleCurrentOpeningHours; + set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => + _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; + + ListBuilder? _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= ListBuilder(); + set photoUrls(ListBuilder? photoUrls) => + _$this._photoUrls = photoUrls; + + ListBuilder? _traits; + ListBuilder get traits => _$this._traits ??= ListBuilder(); + set traits(ListBuilder? traits) => _$this._traits = traits; + + bool? _isFavorite; + bool? get isFavorite => _$this._isFavorite; + set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; + + ListBuilder? + _experiences; + ListBuilder + get experiences => _$this._experiences ??= + ListBuilder(); + set experiences( + ListBuilder? + experiences, + ) => _$this._experiences = experiences; + + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder() { + GRemoveFavoritePlaceData_removeFavoritePlace._initializeBuilder(this); + } + + GRemoveFavoritePlaceData_removeFavoritePlaceBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _googlePlaceId = $v.googlePlaceId; + _name = $v.name; + _latitude = $v.latitude; + _longitude = $v.longitude; + _googlePrimaryType = $v.googlePrimaryType; + _googleTypes = $v.googleTypes.toBuilder(); + _googleBusinessStatus = $v.googleBusinessStatus; + _googleRating = $v.googleRating; + _googleUserRatingCount = $v.googleUserRatingCount; + _googleRegularOpeningHours = $v.googleRegularOpeningHours; + _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; + _photoUrls = $v.photoUrls.toBuilder(); + _traits = $v.traits.toBuilder(); + _isFavorite = $v.isFavorite; + _experiences = $v.experiences.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GRemoveFavoritePlaceData_removeFavoritePlace other) { + _$v = other as _$GRemoveFavoritePlaceData_removeFavoritePlace; + } + + @override + void update( + void Function(GRemoveFavoritePlaceData_removeFavoritePlaceBuilder)? updates, + ) { + if (updates != null) updates(this); + } + + @override + GRemoveFavoritePlaceData_removeFavoritePlace build() => _build(); + + _$GRemoveFavoritePlaceData_removeFavoritePlace _build() { + _$GRemoveFavoritePlaceData_removeFavoritePlace _$result; + try { + _$result = + _$v ?? + _$GRemoveFavoritePlaceData_removeFavoritePlace._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'id', + ), + googlePlaceId: BuiltValueNullFieldError.checkNotNull( + googlePlaceId, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'googlePlaceId', + ), + name: BuiltValueNullFieldError.checkNotNull( + name, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'name', + ), + latitude: BuiltValueNullFieldError.checkNotNull( + latitude, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'latitude', + ), + longitude: BuiltValueNullFieldError.checkNotNull( + longitude, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'longitude', + ), + googlePrimaryType: googlePrimaryType, + googleTypes: googleTypes.build(), + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + photoUrls: photoUrls.build(), + traits: traits.build(), + isFavorite: BuiltValueNullFieldError.checkNotNull( + isFavorite, + r'GRemoveFavoritePlaceData_removeFavoritePlace', + 'isFavorite', + ), + experiences: experiences.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'googleTypes'; + googleTypes.build(); + + _$failedField = 'photoUrls'; + photoUrls.build(); + _$failedField = 'traits'; + traits.build(); + + _$failedField = 'experiences'; + experiences.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GRemoveFavoritePlaceData_removeFavoritePlace', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences + extends GRemoveFavoritePlaceData_removeFavoritePlace_experiences { + @override + final String G__typename; + @override + final String id; + @override + final _i3.GVoiceExperienceStatus status; + @override + final String createdAt; + + factory _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences([ + void Function( + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder, + )? + updates, + ]) => + (GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder() + ..update(updates)) + ._build(); + + _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences._({ + required this.G__typename, + required this.id, + required this.status, + required this.createdAt, + }) : super._(); + @override + GRemoveFavoritePlaceData_removeFavoritePlace_experiences rebuild( + void Function( + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder, + ) + updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder toBuilder() => + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder() + ..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GRemoveFavoritePlaceData_removeFavoritePlace_experiences && + G__typename == other.G__typename && + id == other.id && + status == other.status && + createdAt == other.createdAt; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, status.hashCode); + _$hash = $jc(_$hash, createdAt.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GRemoveFavoritePlaceData_removeFavoritePlace_experiences', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('status', status) + ..add('createdAt', createdAt)) + .toString(); + } +} + +class GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder + implements + Builder< + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder + > { + _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + _i3.GVoiceExperienceStatus? _status; + _i3.GVoiceExperienceStatus? get status => _$this._status; + set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; + + String? _createdAt; + String? get createdAt => _$this._createdAt; + set createdAt(String? createdAt) => _$this._createdAt = createdAt; + + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder() { + GRemoveFavoritePlaceData_removeFavoritePlace_experiences._initializeBuilder( + this, + ); + } + + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _status = $v.status; + _createdAt = $v.createdAt; + _$v = null; + } + return this; + } + + @override + void replace(GRemoveFavoritePlaceData_removeFavoritePlace_experiences other) { + _$v = other as _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences; + } + + @override + void update( + void Function( + GRemoveFavoritePlaceData_removeFavoritePlace_experiencesBuilder, + )? + updates, + ) { + if (updates != null) updates(this); + } + + @override + GRemoveFavoritePlaceData_removeFavoritePlace_experiences build() => _build(); + + _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences _build() { + final _$result = + _$v ?? + _$GRemoveFavoritePlaceData_removeFavoritePlace_experiences._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GRemoveFavoritePlaceData_removeFavoritePlace_experiences', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GRemoveFavoritePlaceData_removeFavoritePlace_experiences', + 'id', + ), + status: BuiltValueNullFieldError.checkNotNull( + status, + r'GRemoveFavoritePlaceData_removeFavoritePlace_experiences', + 'status', + ), + createdAt: BuiltValueNullFieldError.checkNotNull( + createdAt, + r'GRemoveFavoritePlaceData_removeFavoritePlace_experiences', + 'createdAt', + ), + ); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.dart new file mode 100644 index 0000000..7f3a138 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.dart @@ -0,0 +1,101 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:ferry_exec/ferry_exec.dart' as _i1; +import 'package:gql_exec/gql_exec.dart' as _i4; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.ast.gql.dart' + as _i5; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart' + as _i2; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i6; + +part 'remove_favorite_place.req.gql.g.dart'; + +abstract class GRemoveFavoritePlaceReq + implements + Built, + _i1.OperationRequest< + _i2.GRemoveFavoritePlaceData, + _i3.GRemoveFavoritePlaceVars + > { + GRemoveFavoritePlaceReq._(); + + factory GRemoveFavoritePlaceReq([ + void Function(GRemoveFavoritePlaceReqBuilder b) updates, + ]) = _$GRemoveFavoritePlaceReq; + + static void _initializeBuilder(GRemoveFavoritePlaceReqBuilder b) => b + ..operation = _i4.Operation( + document: _i5.document, + operationName: 'RemoveFavoritePlace', + ) + ..executeOnListen = true; + + @override + _i3.GRemoveFavoritePlaceVars get vars; + @override + _i4.Operation get operation; + @override + _i4.Request get execRequest => _i4.Request( + operation: operation, + variables: vars.toJson(), + context: context ?? const _i4.Context(), + ); + + @override + String? get requestId; + @override + @BuiltValueField(serialize: false) + _i2.GRemoveFavoritePlaceData? Function( + _i2.GRemoveFavoritePlaceData?, + _i2.GRemoveFavoritePlaceData?, + )? + get updateResult; + @override + _i2.GRemoveFavoritePlaceData? get optimisticResponse; + @override + String? get updateCacheHandlerKey; + @override + Map? get updateCacheHandlerContext; + @override + _i1.FetchPolicy? get fetchPolicy; + @override + bool get executeOnListen; + @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override + _i2.GRemoveFavoritePlaceData? parseData(Map json) => + _i2.GRemoveFavoritePlaceData.fromJson(json); + + @override + Map varsToJson() => vars.toJson(); + + @override + Map dataToJson(_i2.GRemoveFavoritePlaceData data) => + data.toJson(); + + @override + _i1.OperationRequest< + _i2.GRemoveFavoritePlaceData, + _i3.GRemoveFavoritePlaceVars + > + transformOperation(_i4.Operation Function(_i4.Operation) transform) => + this.rebuild((b) => b..operation = transform(operation)); + + static Serializer get serializer => + _$gRemoveFavoritePlaceReqSerializer; + + Map toJson() => + (_i6.serializers.serializeWith(GRemoveFavoritePlaceReq.serializer, this) + as Map); + + static GRemoveFavoritePlaceReq? fromJson(Map json) => + _i6.serializers.deserializeWith(GRemoveFavoritePlaceReq.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.g.dart new file mode 100644 index 0000000..4c11d27 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.g.dart @@ -0,0 +1,443 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'remove_favorite_place.req.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gRemoveFavoritePlaceReqSerializer = + _$GRemoveFavoritePlaceReqSerializer(); + +class _$GRemoveFavoritePlaceReqSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GRemoveFavoritePlaceReq, + _$GRemoveFavoritePlaceReq, + ]; + @override + final String wireName = 'GRemoveFavoritePlaceReq'; + + @override + Iterable serialize( + Serializers serializers, + GRemoveFavoritePlaceReq object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'vars', + serializers.serialize( + object.vars, + specifiedType: const FullType(_i3.GRemoveFavoritePlaceVars), + ), + 'operation', + serializers.serialize( + object.operation, + specifiedType: const FullType(_i4.Operation), + ), + 'executeOnListen', + serializers.serialize( + object.executeOnListen, + specifiedType: const FullType(bool), + ), + ]; + Object? value; + value = object.requestId; + if (value != null) { + result + ..add('requestId') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.optimisticResponse; + if (value != null) { + result + ..add('optimisticResponse') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.GRemoveFavoritePlaceData), + ), + ); + } + value = object.updateCacheHandlerKey; + if (value != null) { + result + ..add('updateCacheHandlerKey') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.updateCacheHandlerContext; + if (value != null) { + result + ..add('updateCacheHandlerContext') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ), + ); + } + value = object.fetchPolicy; + if (value != null) { + result + ..add('fetchPolicy') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ), + ); + } + return result; + } + + @override + GRemoveFavoritePlaceReq deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GRemoveFavoritePlaceReqBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'vars': + result.vars.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GRemoveFavoritePlaceVars), + )! + as _i3.GRemoveFavoritePlaceVars, + ); + break; + case 'operation': + result.operation = + serializers.deserialize( + value, + specifiedType: const FullType(_i4.Operation), + )! + as _i4.Operation; + break; + case 'requestId': + result.requestId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'optimisticResponse': + result.optimisticResponse.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i2.GRemoveFavoritePlaceData), + )! + as _i2.GRemoveFavoritePlaceData, + ); + break; + case 'updateCacheHandlerKey': + result.updateCacheHandlerKey = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'updateCacheHandlerContext': + result.updateCacheHandlerContext = + serializers.deserialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ) + as Map?; + break; + case 'fetchPolicy': + result.fetchPolicy = + serializers.deserialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ) + as _i1.FetchPolicy?; + break; + case 'executeOnListen': + result.executeOnListen = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + } + } + + return result.build(); + } +} + +class _$GRemoveFavoritePlaceReq extends GRemoveFavoritePlaceReq { + @override + final _i3.GRemoveFavoritePlaceVars vars; + @override + final _i4.Operation operation; + @override + final String? requestId; + @override + final _i2.GRemoveFavoritePlaceData? Function( + _i2.GRemoveFavoritePlaceData?, + _i2.GRemoveFavoritePlaceData?, + )? + updateResult; + @override + final _i2.GRemoveFavoritePlaceData? optimisticResponse; + @override + final String? updateCacheHandlerKey; + @override + final Map? updateCacheHandlerContext; + @override + final _i1.FetchPolicy? fetchPolicy; + @override + final bool executeOnListen; + @override + final _i4.Context? context; + + factory _$GRemoveFavoritePlaceReq([ + void Function(GRemoveFavoritePlaceReqBuilder)? updates, + ]) => (GRemoveFavoritePlaceReqBuilder()..update(updates))._build(); + + _$GRemoveFavoritePlaceReq._({ + required this.vars, + required this.operation, + this.requestId, + this.updateResult, + this.optimisticResponse, + this.updateCacheHandlerKey, + this.updateCacheHandlerContext, + this.fetchPolicy, + required this.executeOnListen, + this.context, + }) : super._(); + @override + GRemoveFavoritePlaceReq rebuild( + void Function(GRemoveFavoritePlaceReqBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GRemoveFavoritePlaceReqBuilder toBuilder() => + GRemoveFavoritePlaceReqBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GRemoveFavoritePlaceReq && + vars == other.vars && + operation == other.operation && + requestId == other.requestId && + updateResult == other.updateResult && + optimisticResponse == other.optimisticResponse && + updateCacheHandlerKey == other.updateCacheHandlerKey && + updateCacheHandlerContext == other.updateCacheHandlerContext && + fetchPolicy == other.fetchPolicy && + executeOnListen == other.executeOnListen && + context == other.context; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, vars.hashCode); + _$hash = $jc(_$hash, operation.hashCode); + _$hash = $jc(_$hash, requestId.hashCode); + _$hash = $jc(_$hash, updateResult.hashCode); + _$hash = $jc(_$hash, optimisticResponse.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerKey.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); + _$hash = $jc(_$hash, fetchPolicy.hashCode); + _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GRemoveFavoritePlaceReq') + ..add('vars', vars) + ..add('operation', operation) + ..add('requestId', requestId) + ..add('updateResult', updateResult) + ..add('optimisticResponse', optimisticResponse) + ..add('updateCacheHandlerKey', updateCacheHandlerKey) + ..add('updateCacheHandlerContext', updateCacheHandlerContext) + ..add('fetchPolicy', fetchPolicy) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) + .toString(); + } +} + +class GRemoveFavoritePlaceReqBuilder + implements + Builder { + _$GRemoveFavoritePlaceReq? _$v; + + _i3.GRemoveFavoritePlaceVarsBuilder? _vars; + _i3.GRemoveFavoritePlaceVarsBuilder get vars => + _$this._vars ??= _i3.GRemoveFavoritePlaceVarsBuilder(); + set vars(_i3.GRemoveFavoritePlaceVarsBuilder? vars) => _$this._vars = vars; + + _i4.Operation? _operation; + _i4.Operation? get operation => _$this._operation; + set operation(_i4.Operation? operation) => _$this._operation = operation; + + String? _requestId; + String? get requestId => _$this._requestId; + set requestId(String? requestId) => _$this._requestId = requestId; + + _i2.GRemoveFavoritePlaceData? Function( + _i2.GRemoveFavoritePlaceData?, + _i2.GRemoveFavoritePlaceData?, + )? + _updateResult; + _i2.GRemoveFavoritePlaceData? Function( + _i2.GRemoveFavoritePlaceData?, + _i2.GRemoveFavoritePlaceData?, + )? + get updateResult => _$this._updateResult; + set updateResult( + _i2.GRemoveFavoritePlaceData? Function( + _i2.GRemoveFavoritePlaceData?, + _i2.GRemoveFavoritePlaceData?, + )? + updateResult, + ) => _$this._updateResult = updateResult; + + _i2.GRemoveFavoritePlaceDataBuilder? _optimisticResponse; + _i2.GRemoveFavoritePlaceDataBuilder get optimisticResponse => + _$this._optimisticResponse ??= _i2.GRemoveFavoritePlaceDataBuilder(); + set optimisticResponse( + _i2.GRemoveFavoritePlaceDataBuilder? optimisticResponse, + ) => _$this._optimisticResponse = optimisticResponse; + + String? _updateCacheHandlerKey; + String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey; + set updateCacheHandlerKey(String? updateCacheHandlerKey) => + _$this._updateCacheHandlerKey = updateCacheHandlerKey; + + Map? _updateCacheHandlerContext; + Map? get updateCacheHandlerContext => + _$this._updateCacheHandlerContext; + set updateCacheHandlerContext( + Map? updateCacheHandlerContext, + ) => _$this._updateCacheHandlerContext = updateCacheHandlerContext; + + _i1.FetchPolicy? _fetchPolicy; + _i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy; + set fetchPolicy(_i1.FetchPolicy? fetchPolicy) => + _$this._fetchPolicy = fetchPolicy; + + bool? _executeOnListen; + bool? get executeOnListen => _$this._executeOnListen; + set executeOnListen(bool? executeOnListen) => + _$this._executeOnListen = executeOnListen; + + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + + GRemoveFavoritePlaceReqBuilder() { + GRemoveFavoritePlaceReq._initializeBuilder(this); + } + + GRemoveFavoritePlaceReqBuilder get _$this { + final $v = _$v; + if ($v != null) { + _vars = $v.vars.toBuilder(); + _operation = $v.operation; + _requestId = $v.requestId; + _updateResult = $v.updateResult; + _optimisticResponse = $v.optimisticResponse?.toBuilder(); + _updateCacheHandlerKey = $v.updateCacheHandlerKey; + _updateCacheHandlerContext = $v.updateCacheHandlerContext; + _fetchPolicy = $v.fetchPolicy; + _executeOnListen = $v.executeOnListen; + _context = $v.context; + _$v = null; + } + return this; + } + + @override + void replace(GRemoveFavoritePlaceReq other) { + _$v = other as _$GRemoveFavoritePlaceReq; + } + + @override + void update(void Function(GRemoveFavoritePlaceReqBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GRemoveFavoritePlaceReq build() => _build(); + + _$GRemoveFavoritePlaceReq _build() { + _$GRemoveFavoritePlaceReq _$result; + try { + _$result = + _$v ?? + _$GRemoveFavoritePlaceReq._( + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, + r'GRemoveFavoritePlaceReq', + 'operation', + ), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, + r'GRemoveFavoritePlaceReq', + 'executeOnListen', + ), + context: context, + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'vars'; + vars.build(); + + _$failedField = 'optimisticResponse'; + _optimisticResponse?.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GRemoveFavoritePlaceReq', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart new file mode 100644 index 0000000..77e85e8 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart @@ -0,0 +1,32 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'remove_favorite_place.var.gql.g.dart'; + +abstract class GRemoveFavoritePlaceVars + implements + Built { + GRemoveFavoritePlaceVars._(); + + factory GRemoveFavoritePlaceVars([ + void Function(GRemoveFavoritePlaceVarsBuilder b) updates, + ]) = _$GRemoveFavoritePlaceVars; + + String get placeId; + static Serializer get serializer => + _$gRemoveFavoritePlaceVarsSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GRemoveFavoritePlaceVars.serializer, this) + as Map); + + static GRemoveFavoritePlaceVars? fromJson(Map json) => _i1 + .serializers + .deserializeWith(GRemoveFavoritePlaceVars.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.g.dart new file mode 100644 index 0000000..08e22ec --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.g.dart @@ -0,0 +1,156 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'remove_favorite_place.var.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gRemoveFavoritePlaceVarsSerializer = + _$GRemoveFavoritePlaceVarsSerializer(); + +class _$GRemoveFavoritePlaceVarsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GRemoveFavoritePlaceVars, + _$GRemoveFavoritePlaceVars, + ]; + @override + final String wireName = 'GRemoveFavoritePlaceVars'; + + @override + Iterable serialize( + Serializers serializers, + GRemoveFavoritePlaceVars object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'placeId', + serializers.serialize( + object.placeId, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GRemoveFavoritePlaceVars deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GRemoveFavoritePlaceVarsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'placeId': + result.placeId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + +class _$GRemoveFavoritePlaceVars extends GRemoveFavoritePlaceVars { + @override + final String placeId; + + factory _$GRemoveFavoritePlaceVars([ + void Function(GRemoveFavoritePlaceVarsBuilder)? updates, + ]) => (GRemoveFavoritePlaceVarsBuilder()..update(updates))._build(); + + _$GRemoveFavoritePlaceVars._({required this.placeId}) : super._(); + @override + GRemoveFavoritePlaceVars rebuild( + void Function(GRemoveFavoritePlaceVarsBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GRemoveFavoritePlaceVarsBuilder toBuilder() => + GRemoveFavoritePlaceVarsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GRemoveFavoritePlaceVars && placeId == other.placeId; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, placeId.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GRemoveFavoritePlaceVars', + )..add('placeId', placeId)).toString(); + } +} + +class GRemoveFavoritePlaceVarsBuilder + implements + Builder { + _$GRemoveFavoritePlaceVars? _$v; + + String? _placeId; + String? get placeId => _$this._placeId; + set placeId(String? placeId) => _$this._placeId = placeId; + + GRemoveFavoritePlaceVarsBuilder(); + + GRemoveFavoritePlaceVarsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _placeId = $v.placeId; + _$v = null; + } + return this; + } + + @override + void replace(GRemoveFavoritePlaceVars other) { + _$v = other as _$GRemoveFavoritePlaceVars; + } + + @override + void update(void Function(GRemoveFavoritePlaceVarsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GRemoveFavoritePlaceVars build() => _build(); + + _$GRemoveFavoritePlaceVars _build() { + final _$result = + _$v ?? + _$GRemoveFavoritePlaceVars._( + placeId: BuiltValueNullFieldError.checkNotNull( + placeId, + r'GRemoveFavoritePlaceVars', + 'placeId', + ), + ); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/schema.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/schema.ast.gql.dart index 36578ea..94bedfd 100644 --- a/lib/features/mapflow/data/graphql/__generated__/schema.ast.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/schema.ast.gql.dart @@ -106,6 +106,111 @@ const Place = _i1.ObjectTypeDefinitionNode( isNonNull: true, ), ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googleRating'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Float'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Int'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googlePayload'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'googlePhotos'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'photoUrls'), + directives: [], + args: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + isNonNull: true, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'photoAttributions'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'traits'), + directives: [], + args: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + isNonNull: true, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'isFavorite'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Boolean'), + isNonNull: true, + ), + ), _i1.FieldDefinitionNode( name: _i1.NameNode(value: 'experiences'), directives: [], @@ -270,6 +375,27 @@ const VoiceExperience = _i1.ObjectTypeDefinitionNode( isNonNull: false, ), ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'recordingPayload'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'promptHintsShown'), + directives: [], + args: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + isNonNull: true, + ), + ), _i1.FieldDefinitionNode( name: _i1.NameNode(value: 'createdAt'), directives: [], @@ -321,6 +447,27 @@ const CreateVoiceExperienceInput = _i1.InputObjectTypeDefinitionNode( ), defaultValue: null, ), + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'googlePrimaryType'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: false, + ), + defaultValue: null, + ), + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'googleTypes'), + directives: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + isNonNull: false, + ), + defaultValue: _i1.ListValueNode(values: []), + ), _i1.InputValueDefinitionNode( name: _i1.NameNode(value: 'durationSeconds'), directives: [], @@ -357,6 +504,36 @@ const CreateVoiceExperienceInput = _i1.InputObjectTypeDefinitionNode( ), defaultValue: null, ), + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'addToFavorites'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Boolean'), + isNonNull: false, + ), + defaultValue: _i1.BooleanValueNode(value: false), + ), + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'recordingPayload'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'JSON'), + isNonNull: false, + ), + defaultValue: null, + ), + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'promptHintsShown'), + directives: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + isNonNull: false, + ), + defaultValue: _i1.ListValueNode(values: []), + ), ], ); const NearbyPlacesInput = _i1.InputObjectTypeDefinitionNode( @@ -392,6 +569,21 @@ const NearbyPlacesInput = _i1.InputObjectTypeDefinitionNode( ), ], ); +const SearchPlacesInput = _i1.InputObjectTypeDefinitionNode( + name: _i1.NameNode(value: 'SearchPlacesInput'), + directives: [], + fields: [ + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'query'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + defaultValue: null, + ), + ], +); const AuthenticateTelegramInput = _i1.InputObjectTypeDefinitionNode( name: _i1.NameNode(value: 'AuthenticateTelegramInput'), directives: [], @@ -551,6 +743,34 @@ const TelegramBotLoginSession = _i1.ObjectTypeDefinitionNode( ), ], ); +const SearchPlacesPayload = _i1.ObjectTypeDefinitionNode( + name: _i1.NameNode(value: 'SearchPlacesPayload'), + directives: [], + interfaces: [], + fields: [ + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'message'), + directives: [], + args: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'String'), + isNonNull: true, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'places'), + directives: [], + args: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Place'), + isNonNull: true, + ), + isNonNull: true, + ), + ), + ], +); const Query = _i1.ObjectTypeDefinitionNode( name: _i1.NameNode(value: 'Query'), directives: [], @@ -586,6 +806,18 @@ const Query = _i1.ObjectTypeDefinitionNode( isNonNull: true, ), ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'favoritePlaces'), + directives: [], + args: [], + type: _i1.ListTypeNode( + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Place'), + isNonNull: true, + ), + isNonNull: true, + ), + ), _i1.FieldDefinitionNode( name: _i1.NameNode(value: 'nearbyPlaces'), directives: [], @@ -608,6 +840,25 @@ const Query = _i1.ObjectTypeDefinitionNode( isNonNull: true, ), ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'searchPlaces'), + directives: [], + args: [ + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'input'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'SearchPlacesInput'), + isNonNull: true, + ), + defaultValue: null, + ), + ], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'SearchPlacesPayload'), + isNonNull: true, + ), + ), _i1.FieldDefinitionNode( name: _i1.NameNode(value: 'voiceExperiences'), directives: [], @@ -712,6 +963,44 @@ const Mutation = _i1.ObjectTypeDefinitionNode( isNonNull: true, ), ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'addFavoritePlace'), + directives: [], + args: [ + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'placeId'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'ID'), + isNonNull: true, + ), + defaultValue: null, + ), + ], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Place'), + isNonNull: true, + ), + ), + _i1.FieldDefinitionNode( + name: _i1.NameNode(value: 'removeFavoritePlace'), + directives: [], + args: [ + _i1.InputValueDefinitionNode( + name: _i1.NameNode(value: 'placeId'), + directives: [], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'ID'), + isNonNull: true, + ), + defaultValue: null, + ), + ], + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Place'), + isNonNull: true, + ), + ), ], ); const document = _i1.DocumentNode( @@ -723,11 +1012,13 @@ const document = _i1.DocumentNode( VoiceExperience, CreateVoiceExperienceInput, NearbyPlacesInput, + SearchPlacesInput, AuthenticateTelegramInput, AuthenticateTelegramLoginInput, AuthPayload, TelegramBotLoginPayload, TelegramBotLoginSession, + SearchPlacesPayload, Query, Mutation, ], diff --git a/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart b/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart index 194a028..f4b5818 100644 --- a/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart @@ -4,9 +4,10 @@ // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; +import 'package:built_value/json_object.dart' as _i1; import 'package:built_value/serializer.dart'; import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' - as _i1; + as _i2; part 'schema.schema.gql.g.dart'; @@ -53,21 +54,26 @@ abstract class GCreateVoiceExperienceInput String get googleName; double get latitude; double get longitude; + String? get googlePrimaryType; + BuiltList? get googleTypes; int get durationSeconds; String get audioObjectKey; String get audioContentBase64; String get audioMimeType; + bool? get addToFavorites; + _i1.JsonObject? get recordingPayload; + BuiltList? get promptHintsShown; static Serializer get serializer => _$gCreateVoiceExperienceInputSerializer; Map toJson() => - (_i1.serializers.serializeWith( + (_i2.serializers.serializeWith( GCreateVoiceExperienceInput.serializer, this, ) as Map); - static GCreateVoiceExperienceInput? fromJson(Map json) => _i1 + static GCreateVoiceExperienceInput? fromJson(Map json) => _i2 .serializers .deserializeWith(GCreateVoiceExperienceInput.serializer, json); } @@ -87,11 +93,31 @@ abstract class GNearbyPlacesInput _$gNearbyPlacesInputSerializer; Map toJson() => - (_i1.serializers.serializeWith(GNearbyPlacesInput.serializer, this) + (_i2.serializers.serializeWith(GNearbyPlacesInput.serializer, this) as Map); static GNearbyPlacesInput? fromJson(Map json) => - _i1.serializers.deserializeWith(GNearbyPlacesInput.serializer, json); + _i2.serializers.deserializeWith(GNearbyPlacesInput.serializer, json); +} + +abstract class GSearchPlacesInput + implements Built { + GSearchPlacesInput._(); + + factory GSearchPlacesInput([ + void Function(GSearchPlacesInputBuilder b) updates, + ]) = _$GSearchPlacesInput; + + String get query; + static Serializer get serializer => + _$gSearchPlacesInputSerializer; + + Map toJson() => + (_i2.serializers.serializeWith(GSearchPlacesInput.serializer, this) + as Map); + + static GSearchPlacesInput? fromJson(Map json) => + _i2.serializers.deserializeWith(GSearchPlacesInput.serializer, json); } abstract class GAuthenticateTelegramInput @@ -108,13 +134,13 @@ abstract class GAuthenticateTelegramInput _$gAuthenticateTelegramInputSerializer; Map toJson() => - (_i1.serializers.serializeWith( + (_i2.serializers.serializeWith( GAuthenticateTelegramInput.serializer, this, ) as Map); - static GAuthenticateTelegramInput? fromJson(Map json) => _i1 + static GAuthenticateTelegramInput? fromJson(Map json) => _i2 .serializers .deserializeWith(GAuthenticateTelegramInput.serializer, json); } @@ -142,14 +168,14 @@ abstract class GAuthenticateTelegramLoginInput _$gAuthenticateTelegramLoginInputSerializer; Map toJson() => - (_i1.serializers.serializeWith( + (_i2.serializers.serializeWith( GAuthenticateTelegramLoginInput.serializer, this, ) as Map); static GAuthenticateTelegramLoginInput? fromJson(Map json) => - _i1.serializers.deserializeWith( + _i2.serializers.deserializeWith( GAuthenticateTelegramLoginInput.serializer, json, ); diff --git a/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.g.dart index 427e062..0056f6e 100644 --- a/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/schema.schema.gql.g.dart @@ -55,6 +55,8 @@ _$gCreateVoiceExperienceInputSerializer = _$GCreateVoiceExperienceInputSerializer(); Serializer _$gNearbyPlacesInputSerializer = _$GNearbyPlacesInputSerializer(); +Serializer _$gSearchPlacesInputSerializer = + _$GSearchPlacesInputSerializer(); Serializer _$gAuthenticateTelegramInputSerializer = _$GAuthenticateTelegramInputSerializer(); Serializer @@ -141,7 +143,60 @@ class _$GCreateVoiceExperienceInputSerializer specifiedType: const FullType(String), ), ]; - + Object? value; + value = object.googlePrimaryType; + if (value != null) { + result + ..add('googlePrimaryType') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleTypes; + if (value != null) { + result + ..add('googleTypes') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + ); + } + value = object.addToFavorites; + if (value != null) { + result + ..add('addToFavorites') + ..add( + serializers.serialize(value, specifiedType: const FullType(bool)), + ); + } + value = object.recordingPayload; + if (value != null) { + result + ..add('recordingPayload') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i1.JsonObject), + ), + ); + } + value = object.promptHintsShown; + if (value != null) { + result + ..add('promptHintsShown') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + ); + } return result; } @@ -191,6 +246,25 @@ class _$GCreateVoiceExperienceInputSerializer )! as double; break; + case 'googlePrimaryType': + result.googlePrimaryType = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleTypes': + result.googleTypes.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; case 'durationSeconds': result.durationSeconds = serializers.deserialize( @@ -223,6 +297,33 @@ class _$GCreateVoiceExperienceInputSerializer )! as String; break; + case 'addToFavorites': + result.addToFavorites = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) + as bool?; + break; + case 'recordingPayload': + result.recordingPayload = + serializers.deserialize( + value, + specifiedType: const FullType(_i1.JsonObject), + ) + as _i1.JsonObject?; + break; + case 'promptHintsShown': + result.promptHintsShown.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; } } @@ -309,6 +410,59 @@ class _$GNearbyPlacesInputSerializer } } +class _$GSearchPlacesInputSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GSearchPlacesInput, _$GSearchPlacesInput]; + @override + final String wireName = 'GSearchPlacesInput'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesInput object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'query', + serializers.serialize( + object.query, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GSearchPlacesInput deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesInputBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'query': + result.query = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + class _$GAuthenticateTelegramInputSerializer implements StructuredSerializer { @override @@ -515,6 +669,10 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput { @override final double longitude; @override + final String? googlePrimaryType; + @override + final BuiltList? googleTypes; + @override final int durationSeconds; @override final String audioObjectKey; @@ -522,6 +680,12 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput { final String audioContentBase64; @override final String audioMimeType; + @override + final bool? addToFavorites; + @override + final _i1.JsonObject? recordingPayload; + @override + final BuiltList? promptHintsShown; factory _$GCreateVoiceExperienceInput([ void Function(GCreateVoiceExperienceInputBuilder)? updates, @@ -532,10 +696,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput { required this.googleName, required this.latitude, required this.longitude, + this.googlePrimaryType, + this.googleTypes, required this.durationSeconds, required this.audioObjectKey, required this.audioContentBase64, required this.audioMimeType, + this.addToFavorites, + this.recordingPayload, + this.promptHintsShown, }) : super._(); @override GCreateVoiceExperienceInput rebuild( @@ -554,10 +723,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput { googleName == other.googleName && latitude == other.latitude && longitude == other.longitude && + googlePrimaryType == other.googlePrimaryType && + googleTypes == other.googleTypes && durationSeconds == other.durationSeconds && audioObjectKey == other.audioObjectKey && audioContentBase64 == other.audioContentBase64 && - audioMimeType == other.audioMimeType; + audioMimeType == other.audioMimeType && + addToFavorites == other.addToFavorites && + recordingPayload == other.recordingPayload && + promptHintsShown == other.promptHintsShown; } @override @@ -567,10 +741,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput { _$hash = $jc(_$hash, googleName.hashCode); _$hash = $jc(_$hash, latitude.hashCode); _$hash = $jc(_$hash, longitude.hashCode); + _$hash = $jc(_$hash, googlePrimaryType.hashCode); + _$hash = $jc(_$hash, googleTypes.hashCode); _$hash = $jc(_$hash, durationSeconds.hashCode); _$hash = $jc(_$hash, audioObjectKey.hashCode); _$hash = $jc(_$hash, audioContentBase64.hashCode); _$hash = $jc(_$hash, audioMimeType.hashCode); + _$hash = $jc(_$hash, addToFavorites.hashCode); + _$hash = $jc(_$hash, recordingPayload.hashCode); + _$hash = $jc(_$hash, promptHintsShown.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -582,10 +761,15 @@ class _$GCreateVoiceExperienceInput extends GCreateVoiceExperienceInput { ..add('googleName', googleName) ..add('latitude', latitude) ..add('longitude', longitude) + ..add('googlePrimaryType', googlePrimaryType) + ..add('googleTypes', googleTypes) ..add('durationSeconds', durationSeconds) ..add('audioObjectKey', audioObjectKey) ..add('audioContentBase64', audioContentBase64) - ..add('audioMimeType', audioMimeType)) + ..add('audioMimeType', audioMimeType) + ..add('addToFavorites', addToFavorites) + ..add('recordingPayload', recordingPayload) + ..add('promptHintsShown', promptHintsShown)) .toString(); } } @@ -615,6 +799,17 @@ class GCreateVoiceExperienceInputBuilder double? get longitude => _$this._longitude; set longitude(double? longitude) => _$this._longitude = longitude; + String? _googlePrimaryType; + String? get googlePrimaryType => _$this._googlePrimaryType; + set googlePrimaryType(String? googlePrimaryType) => + _$this._googlePrimaryType = googlePrimaryType; + + ListBuilder? _googleTypes; + ListBuilder get googleTypes => + _$this._googleTypes ??= ListBuilder(); + set googleTypes(ListBuilder? googleTypes) => + _$this._googleTypes = googleTypes; + int? _durationSeconds; int? get durationSeconds => _$this._durationSeconds; set durationSeconds(int? durationSeconds) => @@ -635,6 +830,22 @@ class GCreateVoiceExperienceInputBuilder set audioMimeType(String? audioMimeType) => _$this._audioMimeType = audioMimeType; + bool? _addToFavorites; + bool? get addToFavorites => _$this._addToFavorites; + set addToFavorites(bool? addToFavorites) => + _$this._addToFavorites = addToFavorites; + + _i1.JsonObject? _recordingPayload; + _i1.JsonObject? get recordingPayload => _$this._recordingPayload; + set recordingPayload(_i1.JsonObject? recordingPayload) => + _$this._recordingPayload = recordingPayload; + + ListBuilder? _promptHintsShown; + ListBuilder get promptHintsShown => + _$this._promptHintsShown ??= ListBuilder(); + set promptHintsShown(ListBuilder? promptHintsShown) => + _$this._promptHintsShown = promptHintsShown; + GCreateVoiceExperienceInputBuilder(); GCreateVoiceExperienceInputBuilder get _$this { @@ -644,10 +855,15 @@ class GCreateVoiceExperienceInputBuilder _googleName = $v.googleName; _latitude = $v.latitude; _longitude = $v.longitude; + _googlePrimaryType = $v.googlePrimaryType; + _googleTypes = $v.googleTypes?.toBuilder(); _durationSeconds = $v.durationSeconds; _audioObjectKey = $v.audioObjectKey; _audioContentBase64 = $v.audioContentBase64; _audioMimeType = $v.audioMimeType; + _addToFavorites = $v.addToFavorites; + _recordingPayload = $v.recordingPayload; + _promptHintsShown = $v.promptHintsShown?.toBuilder(); _$v = null; } return this; @@ -667,50 +883,74 @@ class GCreateVoiceExperienceInputBuilder GCreateVoiceExperienceInput build() => _build(); _$GCreateVoiceExperienceInput _build() { - final _$result = - _$v ?? - _$GCreateVoiceExperienceInput._( - googlePlaceId: BuiltValueNullFieldError.checkNotNull( - googlePlaceId, - r'GCreateVoiceExperienceInput', - 'googlePlaceId', - ), - googleName: BuiltValueNullFieldError.checkNotNull( - googleName, - r'GCreateVoiceExperienceInput', - 'googleName', - ), - latitude: BuiltValueNullFieldError.checkNotNull( - latitude, - r'GCreateVoiceExperienceInput', - 'latitude', - ), - longitude: BuiltValueNullFieldError.checkNotNull( - longitude, - r'GCreateVoiceExperienceInput', - 'longitude', - ), - durationSeconds: BuiltValueNullFieldError.checkNotNull( - durationSeconds, - r'GCreateVoiceExperienceInput', - 'durationSeconds', - ), - audioObjectKey: BuiltValueNullFieldError.checkNotNull( - audioObjectKey, - r'GCreateVoiceExperienceInput', - 'audioObjectKey', - ), - audioContentBase64: BuiltValueNullFieldError.checkNotNull( - audioContentBase64, - r'GCreateVoiceExperienceInput', - 'audioContentBase64', - ), - audioMimeType: BuiltValueNullFieldError.checkNotNull( - audioMimeType, - r'GCreateVoiceExperienceInput', - 'audioMimeType', - ), + _$GCreateVoiceExperienceInput _$result; + try { + _$result = + _$v ?? + _$GCreateVoiceExperienceInput._( + googlePlaceId: BuiltValueNullFieldError.checkNotNull( + googlePlaceId, + r'GCreateVoiceExperienceInput', + 'googlePlaceId', + ), + googleName: BuiltValueNullFieldError.checkNotNull( + googleName, + r'GCreateVoiceExperienceInput', + 'googleName', + ), + latitude: BuiltValueNullFieldError.checkNotNull( + latitude, + r'GCreateVoiceExperienceInput', + 'latitude', + ), + longitude: BuiltValueNullFieldError.checkNotNull( + longitude, + r'GCreateVoiceExperienceInput', + 'longitude', + ), + googlePrimaryType: googlePrimaryType, + googleTypes: _googleTypes?.build(), + durationSeconds: BuiltValueNullFieldError.checkNotNull( + durationSeconds, + r'GCreateVoiceExperienceInput', + 'durationSeconds', + ), + audioObjectKey: BuiltValueNullFieldError.checkNotNull( + audioObjectKey, + r'GCreateVoiceExperienceInput', + 'audioObjectKey', + ), + audioContentBase64: BuiltValueNullFieldError.checkNotNull( + audioContentBase64, + r'GCreateVoiceExperienceInput', + 'audioContentBase64', + ), + audioMimeType: BuiltValueNullFieldError.checkNotNull( + audioMimeType, + r'GCreateVoiceExperienceInput', + 'audioMimeType', + ), + addToFavorites: addToFavorites, + recordingPayload: recordingPayload, + promptHintsShown: _promptHintsShown?.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'googleTypes'; + _googleTypes?.build(); + + _$failedField = 'promptHintsShown'; + _promptHintsShown?.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GCreateVoiceExperienceInput', + _$failedField, + e.toString(), ); + } + rethrow; + } replace(_$result); return _$result; } @@ -838,6 +1078,93 @@ class GNearbyPlacesInputBuilder } } +class _$GSearchPlacesInput extends GSearchPlacesInput { + @override + final String query; + + factory _$GSearchPlacesInput([ + void Function(GSearchPlacesInputBuilder)? updates, + ]) => (GSearchPlacesInputBuilder()..update(updates))._build(); + + _$GSearchPlacesInput._({required this.query}) : super._(); + @override + GSearchPlacesInput rebuild( + void Function(GSearchPlacesInputBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesInputBuilder toBuilder() => + GSearchPlacesInputBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesInput && query == other.query; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, query.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GSearchPlacesInput', + )..add('query', query)).toString(); + } +} + +class GSearchPlacesInputBuilder + implements Builder { + _$GSearchPlacesInput? _$v; + + String? _query; + String? get query => _$this._query; + set query(String? query) => _$this._query = query; + + GSearchPlacesInputBuilder(); + + GSearchPlacesInputBuilder get _$this { + final $v = _$v; + if ($v != null) { + _query = $v.query; + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesInput other) { + _$v = other as _$GSearchPlacesInput; + } + + @override + void update(void Function(GSearchPlacesInputBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesInput build() => _build(); + + _$GSearchPlacesInput _build() { + final _$result = + _$v ?? + _$GSearchPlacesInput._( + query: BuiltValueNullFieldError.checkNotNull( + query, + r'GSearchPlacesInput', + 'query', + ), + ); + replace(_$result); + return _$result; + } +} + class _$GAuthenticateTelegramInput extends GAuthenticateTelegramInput { @override final String initData; diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.ast.gql.dart new file mode 100644 index 0000000..0e5b1ba --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.ast.gql.dart @@ -0,0 +1,195 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:gql/ast.dart' as _i1; + +const SearchPlaces = _i1.OperationDefinitionNode( + type: _i1.OperationType.query, + name: _i1.NameNode(value: 'SearchPlaces'), + variableDefinitions: [ + _i1.VariableDefinitionNode( + variable: _i1.VariableNode(name: _i1.NameNode(value: 'input')), + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'SearchPlacesInput'), + isNonNull: true, + ), + defaultValue: _i1.DefaultValueNode(value: null), + directives: [], + ), + ], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'searchPlaces'), + alias: null, + arguments: [ + _i1.ArgumentNode( + name: _i1.NameNode(value: 'input'), + value: _i1.VariableNode(name: _i1.NameNode(value: 'input')), + ), + ], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'message'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'places'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePlaceId'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'latitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'longitude'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googlePrimaryType'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleTypes'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleBusinessStatus'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRating'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleUserRatingCount'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleRegularOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'googleCurrentOpeningHours'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'photoUrls'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'traits'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'isFavorite'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'experiences'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode( + selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'status'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'createdAt'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), +); +const document = _i1.DocumentNode(definitions: [SearchPlaces]); diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart new file mode 100644 index 0000000..04b64dd --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart @@ -0,0 +1,167 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/json_object.dart' as _i2; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'search_places.data.gql.g.dart'; + +abstract class GSearchPlacesData + implements Built { + GSearchPlacesData._(); + + factory GSearchPlacesData([ + void Function(GSearchPlacesDataBuilder b) updates, + ]) = _$GSearchPlacesData; + + static void _initializeBuilder(GSearchPlacesDataBuilder b) => + b..G__typename = 'Query'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + GSearchPlacesData_searchPlaces get searchPlaces; + static Serializer get serializer => + _$gSearchPlacesDataSerializer; + + Map toJson() => + (_i1.serializers.serializeWith(GSearchPlacesData.serializer, this) + as Map); + + static GSearchPlacesData? fromJson(Map json) => + _i1.serializers.deserializeWith(GSearchPlacesData.serializer, json); +} + +abstract class GSearchPlacesData_searchPlaces + implements + Built< + GSearchPlacesData_searchPlaces, + GSearchPlacesData_searchPlacesBuilder + > { + GSearchPlacesData_searchPlaces._(); + + factory GSearchPlacesData_searchPlaces([ + void Function(GSearchPlacesData_searchPlacesBuilder b) updates, + ]) = _$GSearchPlacesData_searchPlaces; + + static void _initializeBuilder(GSearchPlacesData_searchPlacesBuilder b) => + b..G__typename = 'SearchPlacesPayload'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get message; + BuiltList get places; + static Serializer get serializer => + _$gSearchPlacesDataSearchPlacesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GSearchPlacesData_searchPlaces.serializer, + this, + ) + as Map); + + static GSearchPlacesData_searchPlaces? fromJson(Map json) => + _i1.serializers.deserializeWith( + GSearchPlacesData_searchPlaces.serializer, + json, + ); +} + +abstract class GSearchPlacesData_searchPlaces_places + implements + Built< + GSearchPlacesData_searchPlaces_places, + GSearchPlacesData_searchPlaces_placesBuilder + > { + GSearchPlacesData_searchPlaces_places._(); + + factory GSearchPlacesData_searchPlaces_places([ + void Function(GSearchPlacesData_searchPlaces_placesBuilder b) updates, + ]) = _$GSearchPlacesData_searchPlaces_places; + + static void _initializeBuilder( + GSearchPlacesData_searchPlaces_placesBuilder b, + ) => b..G__typename = 'Place'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + String get googlePlaceId; + String get name; + double get latitude; + double get longitude; + String? get googlePrimaryType; + BuiltList get googleTypes; + String? get googleBusinessStatus; + double? get googleRating; + int? get googleUserRatingCount; + _i2.JsonObject? get googleRegularOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours; + BuiltList get photoUrls; + BuiltList get traits; + bool get isFavorite; + BuiltList get experiences; + static Serializer get serializer => + _$gSearchPlacesDataSearchPlacesPlacesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GSearchPlacesData_searchPlaces_places.serializer, + this, + ) + as Map); + + static GSearchPlacesData_searchPlaces_places? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GSearchPlacesData_searchPlaces_places.serializer, + json, + ); +} + +abstract class GSearchPlacesData_searchPlaces_places_experiences + implements + Built< + GSearchPlacesData_searchPlaces_places_experiences, + GSearchPlacesData_searchPlaces_places_experiencesBuilder + > { + GSearchPlacesData_searchPlaces_places_experiences._(); + + factory GSearchPlacesData_searchPlaces_places_experiences([ + void Function(GSearchPlacesData_searchPlaces_places_experiencesBuilder b) + updates, + ]) = _$GSearchPlacesData_searchPlaces_places_experiences; + + static void _initializeBuilder( + GSearchPlacesData_searchPlaces_places_experiencesBuilder b, + ) => b..G__typename = 'VoiceExperience'; + + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + _i3.GVoiceExperienceStatus get status; + String get createdAt; + static Serializer + get serializer => _$gSearchPlacesDataSearchPlacesPlacesExperiencesSerializer; + + Map toJson() => + (_i1.serializers.serializeWith( + GSearchPlacesData_searchPlaces_places_experiences.serializer, + this, + ) + as Map); + + static GSearchPlacesData_searchPlaces_places_experiences? fromJson( + Map json, + ) => _i1.serializers.deserializeWith( + GSearchPlacesData_searchPlaces_places_experiences.serializer, + json, + ); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.data.gql.g.dart new file mode 100644 index 0000000..5f428d1 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.data.gql.g.dart @@ -0,0 +1,1344 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'search_places.data.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gSearchPlacesDataSerializer = + _$GSearchPlacesDataSerializer(); +Serializer +_$gSearchPlacesDataSearchPlacesSerializer = + _$GSearchPlacesData_searchPlacesSerializer(); +Serializer +_$gSearchPlacesDataSearchPlacesPlacesSerializer = + _$GSearchPlacesData_searchPlaces_placesSerializer(); +Serializer +_$gSearchPlacesDataSearchPlacesPlacesExperiencesSerializer = + _$GSearchPlacesData_searchPlaces_places_experiencesSerializer(); + +class _$GSearchPlacesDataSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GSearchPlacesData, _$GSearchPlacesData]; + @override + final String wireName = 'GSearchPlacesData'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesData object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'searchPlaces', + serializers.serialize( + object.searchPlaces, + specifiedType: const FullType(GSearchPlacesData_searchPlaces), + ), + ]; + + return result; + } + + @override + GSearchPlacesData deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesDataBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'searchPlaces': + result.searchPlaces.replace( + serializers.deserialize( + value, + specifiedType: const FullType(GSearchPlacesData_searchPlaces), + )! + as GSearchPlacesData_searchPlaces, + ); + break; + } + } + + return result.build(); + } +} + +class _$GSearchPlacesData_searchPlacesSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GSearchPlacesData_searchPlaces, + _$GSearchPlacesData_searchPlaces, + ]; + @override + final String wireName = 'GSearchPlacesData_searchPlaces'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesData_searchPlaces object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'message', + serializers.serialize( + object.message, + specifiedType: const FullType(String), + ), + 'places', + serializers.serialize( + object.places, + specifiedType: const FullType(BuiltList, const [ + const FullType(GSearchPlacesData_searchPlaces_places), + ]), + ), + ]; + + return result; + } + + @override + GSearchPlacesData_searchPlaces deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesData_searchPlacesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'message': + result.message = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'places': + result.places.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(GSearchPlacesData_searchPlaces_places), + ]), + )! + as BuiltList, + ); + break; + } + } + + return result.build(); + } +} + +class _$GSearchPlacesData_searchPlaces_placesSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GSearchPlacesData_searchPlaces_places, + _$GSearchPlacesData_searchPlaces_places, + ]; + @override + final String wireName = 'GSearchPlacesData_searchPlaces_places'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesData_searchPlaces_places object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'googlePlaceId', + serializers.serialize( + object.googlePlaceId, + specifiedType: const FullType(String), + ), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + 'latitude', + serializers.serialize( + object.latitude, + specifiedType: const FullType(double), + ), + 'longitude', + serializers.serialize( + object.longitude, + specifiedType: const FullType(double), + ), + 'googleTypes', + serializers.serialize( + object.googleTypes, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'photoUrls', + serializers.serialize( + object.photoUrls, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'traits', + serializers.serialize( + object.traits, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), + 'isFavorite', + serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ), + 'experiences', + serializers.serialize( + object.experiences, + specifiedType: const FullType(BuiltList, const [ + const FullType(GSearchPlacesData_searchPlaces_places_experiences), + ]), + ), + ]; + Object? value; + value = object.googlePrimaryType; + if (value != null) { + result + ..add('googlePrimaryType') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleBusinessStatus; + if (value != null) { + result + ..add('googleBusinessStatus') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.googleRating; + if (value != null) { + result + ..add('googleRating') + ..add( + serializers.serialize(value, specifiedType: const FullType(double)), + ); + } + value = object.googleUserRatingCount; + if (value != null) { + result + ..add('googleUserRatingCount') + ..add(serializers.serialize(value, specifiedType: const FullType(int))); + } + value = object.googleRegularOpeningHours; + if (value != null) { + result + ..add('googleRegularOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + value = object.googleCurrentOpeningHours; + if (value != null) { + result + ..add('googleCurrentOpeningHours') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ), + ); + } + return result; + } + + @override + GSearchPlacesData_searchPlaces_places deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesData_searchPlaces_placesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'googlePlaceId': + result.googlePlaceId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'name': + result.name = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'latitude': + result.latitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'longitude': + result.longitude = + serializers.deserialize( + value, + specifiedType: const FullType(double), + )! + as double; + break; + case 'googlePrimaryType': + result.googlePrimaryType = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleTypes': + result.googleTypes.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'googleBusinessStatus': + result.googleBusinessStatus = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'googleRating': + result.googleRating = + serializers.deserialize( + value, + specifiedType: const FullType(double), + ) + as double?; + break; + case 'googleUserRatingCount': + result.googleUserRatingCount = + serializers.deserialize(value, specifiedType: const FullType(int)) + as int?; + break; + case 'googleRegularOpeningHours': + result.googleRegularOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'googleCurrentOpeningHours': + result.googleCurrentOpeningHours = + serializers.deserialize( + value, + specifiedType: const FullType(_i2.JsonObject), + ) + as _i2.JsonObject?; + break; + case 'photoUrls': + result.photoUrls.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'traits': + result.traits.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; + case 'isFavorite': + result.isFavorite = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + case 'experiences': + result.experiences.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType( + GSearchPlacesData_searchPlaces_places_experiences, + ), + ]), + )! + as BuiltList, + ); + break; + } + } + + return result.build(); + } +} + +class _$GSearchPlacesData_searchPlaces_places_experiencesSerializer + implements + StructuredSerializer< + GSearchPlacesData_searchPlaces_places_experiences + > { + @override + final Iterable types = const [ + GSearchPlacesData_searchPlaces_places_experiences, + _$GSearchPlacesData_searchPlaces_places_experiences, + ]; + @override + final String wireName = 'GSearchPlacesData_searchPlaces_places_experiences'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesData_searchPlaces_places_experiences object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + '__typename', + serializers.serialize( + object.G__typename, + specifiedType: const FullType(String), + ), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + 'status', + serializers.serialize( + object.status, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + ), + 'createdAt', + serializers.serialize( + object.createdAt, + specifiedType: const FullType(String), + ), + ]; + + return result; + } + + @override + GSearchPlacesData_searchPlaces_places_experiences deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesData_searchPlaces_places_experiencesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'id': + result.id = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + case 'status': + result.status = + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GVoiceExperienceStatus), + )! + as _i3.GVoiceExperienceStatus; + break; + case 'createdAt': + result.createdAt = + serializers.deserialize( + value, + specifiedType: const FullType(String), + )! + as String; + break; + } + } + + return result.build(); + } +} + +class _$GSearchPlacesData extends GSearchPlacesData { + @override + final String G__typename; + @override + final GSearchPlacesData_searchPlaces searchPlaces; + + factory _$GSearchPlacesData([ + void Function(GSearchPlacesDataBuilder)? updates, + ]) => (GSearchPlacesDataBuilder()..update(updates))._build(); + + _$GSearchPlacesData._({required this.G__typename, required this.searchPlaces}) + : super._(); + @override + GSearchPlacesData rebuild(void Function(GSearchPlacesDataBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesDataBuilder toBuilder() => + GSearchPlacesDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesData && + G__typename == other.G__typename && + searchPlaces == other.searchPlaces; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, searchPlaces.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GSearchPlacesData') + ..add('G__typename', G__typename) + ..add('searchPlaces', searchPlaces)) + .toString(); + } +} + +class GSearchPlacesDataBuilder + implements Builder { + _$GSearchPlacesData? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + GSearchPlacesData_searchPlacesBuilder? _searchPlaces; + GSearchPlacesData_searchPlacesBuilder get searchPlaces => + _$this._searchPlaces ??= GSearchPlacesData_searchPlacesBuilder(); + set searchPlaces(GSearchPlacesData_searchPlacesBuilder? searchPlaces) => + _$this._searchPlaces = searchPlaces; + + GSearchPlacesDataBuilder() { + GSearchPlacesData._initializeBuilder(this); + } + + GSearchPlacesDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _searchPlaces = $v.searchPlaces.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesData other) { + _$v = other as _$GSearchPlacesData; + } + + @override + void update(void Function(GSearchPlacesDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesData build() => _build(); + + _$GSearchPlacesData _build() { + _$GSearchPlacesData _$result; + try { + _$result = + _$v ?? + _$GSearchPlacesData._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GSearchPlacesData', + 'G__typename', + ), + searchPlaces: searchPlaces.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'searchPlaces'; + searchPlaces.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GSearchPlacesData', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GSearchPlacesData_searchPlaces extends GSearchPlacesData_searchPlaces { + @override + final String G__typename; + @override + final String message; + @override + final BuiltList places; + + factory _$GSearchPlacesData_searchPlaces([ + void Function(GSearchPlacesData_searchPlacesBuilder)? updates, + ]) => (GSearchPlacesData_searchPlacesBuilder()..update(updates))._build(); + + _$GSearchPlacesData_searchPlaces._({ + required this.G__typename, + required this.message, + required this.places, + }) : super._(); + @override + GSearchPlacesData_searchPlaces rebuild( + void Function(GSearchPlacesData_searchPlacesBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesData_searchPlacesBuilder toBuilder() => + GSearchPlacesData_searchPlacesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesData_searchPlaces && + G__typename == other.G__typename && + message == other.message && + places == other.places; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, message.hashCode); + _$hash = $jc(_$hash, places.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GSearchPlacesData_searchPlaces') + ..add('G__typename', G__typename) + ..add('message', message) + ..add('places', places)) + .toString(); + } +} + +class GSearchPlacesData_searchPlacesBuilder + implements + Builder< + GSearchPlacesData_searchPlaces, + GSearchPlacesData_searchPlacesBuilder + > { + _$GSearchPlacesData_searchPlaces? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _message; + String? get message => _$this._message; + set message(String? message) => _$this._message = message; + + ListBuilder? _places; + ListBuilder get places => + _$this._places ??= ListBuilder(); + set places(ListBuilder? places) => + _$this._places = places; + + GSearchPlacesData_searchPlacesBuilder() { + GSearchPlacesData_searchPlaces._initializeBuilder(this); + } + + GSearchPlacesData_searchPlacesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _message = $v.message; + _places = $v.places.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesData_searchPlaces other) { + _$v = other as _$GSearchPlacesData_searchPlaces; + } + + @override + void update(void Function(GSearchPlacesData_searchPlacesBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesData_searchPlaces build() => _build(); + + _$GSearchPlacesData_searchPlaces _build() { + _$GSearchPlacesData_searchPlaces _$result; + try { + _$result = + _$v ?? + _$GSearchPlacesData_searchPlaces._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GSearchPlacesData_searchPlaces', + 'G__typename', + ), + message: BuiltValueNullFieldError.checkNotNull( + message, + r'GSearchPlacesData_searchPlaces', + 'message', + ), + places: places.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'places'; + places.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GSearchPlacesData_searchPlaces', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GSearchPlacesData_searchPlaces_places + extends GSearchPlacesData_searchPlaces_places { + @override + final String G__typename; + @override + final String id; + @override + final String googlePlaceId; + @override + final String name; + @override + final double latitude; + @override + final double longitude; + @override + final String? googlePrimaryType; + @override + final BuiltList googleTypes; + @override + final String? googleBusinessStatus; + @override + final double? googleRating; + @override + final int? googleUserRatingCount; + @override + final _i2.JsonObject? googleRegularOpeningHours; + @override + final _i2.JsonObject? googleCurrentOpeningHours; + @override + final BuiltList photoUrls; + @override + final BuiltList traits; + @override + final bool isFavorite; + @override + final BuiltList + experiences; + + factory _$GSearchPlacesData_searchPlaces_places([ + void Function(GSearchPlacesData_searchPlaces_placesBuilder)? updates, + ]) => (GSearchPlacesData_searchPlaces_placesBuilder()..update(updates)) + ._build(); + + _$GSearchPlacesData_searchPlaces_places._({ + required this.G__typename, + required this.id, + required this.googlePlaceId, + required this.name, + required this.latitude, + required this.longitude, + this.googlePrimaryType, + required this.googleTypes, + this.googleBusinessStatus, + this.googleRating, + this.googleUserRatingCount, + this.googleRegularOpeningHours, + this.googleCurrentOpeningHours, + required this.photoUrls, + required this.traits, + required this.isFavorite, + required this.experiences, + }) : super._(); + @override + GSearchPlacesData_searchPlaces_places rebuild( + void Function(GSearchPlacesData_searchPlaces_placesBuilder) updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesData_searchPlaces_placesBuilder toBuilder() => + GSearchPlacesData_searchPlaces_placesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesData_searchPlaces_places && + G__typename == other.G__typename && + id == other.id && + googlePlaceId == other.googlePlaceId && + name == other.name && + latitude == other.latitude && + longitude == other.longitude && + googlePrimaryType == other.googlePrimaryType && + googleTypes == other.googleTypes && + googleBusinessStatus == other.googleBusinessStatus && + googleRating == other.googleRating && + googleUserRatingCount == other.googleUserRatingCount && + googleRegularOpeningHours == other.googleRegularOpeningHours && + googleCurrentOpeningHours == other.googleCurrentOpeningHours && + photoUrls == other.photoUrls && + traits == other.traits && + isFavorite == other.isFavorite && + experiences == other.experiences; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, googlePlaceId.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, latitude.hashCode); + _$hash = $jc(_$hash, longitude.hashCode); + _$hash = $jc(_$hash, googlePrimaryType.hashCode); + _$hash = $jc(_$hash, googleTypes.hashCode); + _$hash = $jc(_$hash, googleBusinessStatus.hashCode); + _$hash = $jc(_$hash, googleRating.hashCode); + _$hash = $jc(_$hash, googleUserRatingCount.hashCode); + _$hash = $jc(_$hash, googleRegularOpeningHours.hashCode); + _$hash = $jc(_$hash, googleCurrentOpeningHours.hashCode); + _$hash = $jc(_$hash, photoUrls.hashCode); + _$hash = $jc(_$hash, traits.hashCode); + _$hash = $jc(_$hash, isFavorite.hashCode); + _$hash = $jc(_$hash, experiences.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GSearchPlacesData_searchPlaces_places', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('googlePlaceId', googlePlaceId) + ..add('name', name) + ..add('latitude', latitude) + ..add('longitude', longitude) + ..add('googlePrimaryType', googlePrimaryType) + ..add('googleTypes', googleTypes) + ..add('googleBusinessStatus', googleBusinessStatus) + ..add('googleRating', googleRating) + ..add('googleUserRatingCount', googleUserRatingCount) + ..add('googleRegularOpeningHours', googleRegularOpeningHours) + ..add('googleCurrentOpeningHours', googleCurrentOpeningHours) + ..add('photoUrls', photoUrls) + ..add('traits', traits) + ..add('isFavorite', isFavorite) + ..add('experiences', experiences)) + .toString(); + } +} + +class GSearchPlacesData_searchPlaces_placesBuilder + implements + Builder< + GSearchPlacesData_searchPlaces_places, + GSearchPlacesData_searchPlaces_placesBuilder + > { + _$GSearchPlacesData_searchPlaces_places? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + String? _googlePlaceId; + String? get googlePlaceId => _$this._googlePlaceId; + set googlePlaceId(String? googlePlaceId) => + _$this._googlePlaceId = googlePlaceId; + + String? _name; + String? get name => _$this._name; + set name(String? name) => _$this._name = name; + + double? _latitude; + double? get latitude => _$this._latitude; + set latitude(double? latitude) => _$this._latitude = latitude; + + double? _longitude; + double? get longitude => _$this._longitude; + set longitude(double? longitude) => _$this._longitude = longitude; + + String? _googlePrimaryType; + String? get googlePrimaryType => _$this._googlePrimaryType; + set googlePrimaryType(String? googlePrimaryType) => + _$this._googlePrimaryType = googlePrimaryType; + + ListBuilder? _googleTypes; + ListBuilder get googleTypes => + _$this._googleTypes ??= ListBuilder(); + set googleTypes(ListBuilder? googleTypes) => + _$this._googleTypes = googleTypes; + + String? _googleBusinessStatus; + String? get googleBusinessStatus => _$this._googleBusinessStatus; + set googleBusinessStatus(String? googleBusinessStatus) => + _$this._googleBusinessStatus = googleBusinessStatus; + + double? _googleRating; + double? get googleRating => _$this._googleRating; + set googleRating(double? googleRating) => _$this._googleRating = googleRating; + + int? _googleUserRatingCount; + int? get googleUserRatingCount => _$this._googleUserRatingCount; + set googleUserRatingCount(int? googleUserRatingCount) => + _$this._googleUserRatingCount = googleUserRatingCount; + + _i2.JsonObject? _googleRegularOpeningHours; + _i2.JsonObject? get googleRegularOpeningHours => + _$this._googleRegularOpeningHours; + set googleRegularOpeningHours(_i2.JsonObject? googleRegularOpeningHours) => + _$this._googleRegularOpeningHours = googleRegularOpeningHours; + + _i2.JsonObject? _googleCurrentOpeningHours; + _i2.JsonObject? get googleCurrentOpeningHours => + _$this._googleCurrentOpeningHours; + set googleCurrentOpeningHours(_i2.JsonObject? googleCurrentOpeningHours) => + _$this._googleCurrentOpeningHours = googleCurrentOpeningHours; + + ListBuilder? _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= ListBuilder(); + set photoUrls(ListBuilder? photoUrls) => + _$this._photoUrls = photoUrls; + + ListBuilder? _traits; + ListBuilder get traits => _$this._traits ??= ListBuilder(); + set traits(ListBuilder? traits) => _$this._traits = traits; + + bool? _isFavorite; + bool? get isFavorite => _$this._isFavorite; + set isFavorite(bool? isFavorite) => _$this._isFavorite = isFavorite; + + ListBuilder? _experiences; + ListBuilder + get experiences => _$this._experiences ??= + ListBuilder(); + set experiences( + ListBuilder? experiences, + ) => _$this._experiences = experiences; + + GSearchPlacesData_searchPlaces_placesBuilder() { + GSearchPlacesData_searchPlaces_places._initializeBuilder(this); + } + + GSearchPlacesData_searchPlaces_placesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _googlePlaceId = $v.googlePlaceId; + _name = $v.name; + _latitude = $v.latitude; + _longitude = $v.longitude; + _googlePrimaryType = $v.googlePrimaryType; + _googleTypes = $v.googleTypes.toBuilder(); + _googleBusinessStatus = $v.googleBusinessStatus; + _googleRating = $v.googleRating; + _googleUserRatingCount = $v.googleUserRatingCount; + _googleRegularOpeningHours = $v.googleRegularOpeningHours; + _googleCurrentOpeningHours = $v.googleCurrentOpeningHours; + _photoUrls = $v.photoUrls.toBuilder(); + _traits = $v.traits.toBuilder(); + _isFavorite = $v.isFavorite; + _experiences = $v.experiences.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesData_searchPlaces_places other) { + _$v = other as _$GSearchPlacesData_searchPlaces_places; + } + + @override + void update( + void Function(GSearchPlacesData_searchPlaces_placesBuilder)? updates, + ) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesData_searchPlaces_places build() => _build(); + + _$GSearchPlacesData_searchPlaces_places _build() { + _$GSearchPlacesData_searchPlaces_places _$result; + try { + _$result = + _$v ?? + _$GSearchPlacesData_searchPlaces_places._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GSearchPlacesData_searchPlaces_places', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GSearchPlacesData_searchPlaces_places', + 'id', + ), + googlePlaceId: BuiltValueNullFieldError.checkNotNull( + googlePlaceId, + r'GSearchPlacesData_searchPlaces_places', + 'googlePlaceId', + ), + name: BuiltValueNullFieldError.checkNotNull( + name, + r'GSearchPlacesData_searchPlaces_places', + 'name', + ), + latitude: BuiltValueNullFieldError.checkNotNull( + latitude, + r'GSearchPlacesData_searchPlaces_places', + 'latitude', + ), + longitude: BuiltValueNullFieldError.checkNotNull( + longitude, + r'GSearchPlacesData_searchPlaces_places', + 'longitude', + ), + googlePrimaryType: googlePrimaryType, + googleTypes: googleTypes.build(), + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + photoUrls: photoUrls.build(), + traits: traits.build(), + isFavorite: BuiltValueNullFieldError.checkNotNull( + isFavorite, + r'GSearchPlacesData_searchPlaces_places', + 'isFavorite', + ), + experiences: experiences.build(), + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'googleTypes'; + googleTypes.build(); + + _$failedField = 'photoUrls'; + photoUrls.build(); + _$failedField = 'traits'; + traits.build(); + + _$failedField = 'experiences'; + experiences.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GSearchPlacesData_searchPlaces_places', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GSearchPlacesData_searchPlaces_places_experiences + extends GSearchPlacesData_searchPlaces_places_experiences { + @override + final String G__typename; + @override + final String id; + @override + final _i3.GVoiceExperienceStatus status; + @override + final String createdAt; + + factory _$GSearchPlacesData_searchPlaces_places_experiences([ + void Function(GSearchPlacesData_searchPlaces_places_experiencesBuilder)? + updates, + ]) => + (GSearchPlacesData_searchPlaces_places_experiencesBuilder() + ..update(updates)) + ._build(); + + _$GSearchPlacesData_searchPlaces_places_experiences._({ + required this.G__typename, + required this.id, + required this.status, + required this.createdAt, + }) : super._(); + @override + GSearchPlacesData_searchPlaces_places_experiences rebuild( + void Function(GSearchPlacesData_searchPlaces_places_experiencesBuilder) + updates, + ) => (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesData_searchPlaces_places_experiencesBuilder toBuilder() => + GSearchPlacesData_searchPlaces_places_experiencesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesData_searchPlaces_places_experiences && + G__typename == other.G__typename && + id == other.id && + status == other.status && + createdAt == other.createdAt; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, G__typename.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, status.hashCode); + _$hash = $jc(_$hash, createdAt.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GSearchPlacesData_searchPlaces_places_experiences', + ) + ..add('G__typename', G__typename) + ..add('id', id) + ..add('status', status) + ..add('createdAt', createdAt)) + .toString(); + } +} + +class GSearchPlacesData_searchPlaces_places_experiencesBuilder + implements + Builder< + GSearchPlacesData_searchPlaces_places_experiences, + GSearchPlacesData_searchPlaces_places_experiencesBuilder + > { + _$GSearchPlacesData_searchPlaces_places_experiences? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + String? get id => _$this._id; + set id(String? id) => _$this._id = id; + + _i3.GVoiceExperienceStatus? _status; + _i3.GVoiceExperienceStatus? get status => _$this._status; + set status(_i3.GVoiceExperienceStatus? status) => _$this._status = status; + + String? _createdAt; + String? get createdAt => _$this._createdAt; + set createdAt(String? createdAt) => _$this._createdAt = createdAt; + + GSearchPlacesData_searchPlaces_places_experiencesBuilder() { + GSearchPlacesData_searchPlaces_places_experiences._initializeBuilder(this); + } + + GSearchPlacesData_searchPlaces_places_experiencesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _status = $v.status; + _createdAt = $v.createdAt; + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesData_searchPlaces_places_experiences other) { + _$v = other as _$GSearchPlacesData_searchPlaces_places_experiences; + } + + @override + void update( + void Function(GSearchPlacesData_searchPlaces_places_experiencesBuilder)? + updates, + ) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesData_searchPlaces_places_experiences build() => _build(); + + _$GSearchPlacesData_searchPlaces_places_experiences _build() { + final _$result = + _$v ?? + _$GSearchPlacesData_searchPlaces_places_experiences._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, + r'GSearchPlacesData_searchPlaces_places_experiences', + 'G__typename', + ), + id: BuiltValueNullFieldError.checkNotNull( + id, + r'GSearchPlacesData_searchPlaces_places_experiences', + 'id', + ), + status: BuiltValueNullFieldError.checkNotNull( + status, + r'GSearchPlacesData_searchPlaces_places_experiences', + 'status', + ), + createdAt: BuiltValueNullFieldError.checkNotNull( + createdAt, + r'GSearchPlacesData_searchPlaces_places_experiences', + 'createdAt', + ), + ); + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.req.gql.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.req.gql.dart new file mode 100644 index 0000000..bf2a350 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.req.gql.dart @@ -0,0 +1,93 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:ferry_exec/ferry_exec.dart' as _i1; +import 'package:gql_exec/gql_exec.dart' as _i4; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.ast.gql.dart' + as _i5; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart' + as _i2; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart' + as _i3; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i6; + +part 'search_places.req.gql.g.dart'; + +abstract class GSearchPlacesReq + implements + Built, + _i1.OperationRequest<_i2.GSearchPlacesData, _i3.GSearchPlacesVars> { + GSearchPlacesReq._(); + + factory GSearchPlacesReq([void Function(GSearchPlacesReqBuilder b) updates]) = + _$GSearchPlacesReq; + + static void _initializeBuilder(GSearchPlacesReqBuilder b) => b + ..operation = _i4.Operation( + document: _i5.document, + operationName: 'SearchPlaces', + ) + ..executeOnListen = true; + + @override + _i3.GSearchPlacesVars get vars; + @override + _i4.Operation get operation; + @override + _i4.Request get execRequest => _i4.Request( + operation: operation, + variables: vars.toJson(), + context: context ?? const _i4.Context(), + ); + + @override + String? get requestId; + @override + @BuiltValueField(serialize: false) + _i2.GSearchPlacesData? Function( + _i2.GSearchPlacesData?, + _i2.GSearchPlacesData?, + )? + get updateResult; + @override + _i2.GSearchPlacesData? get optimisticResponse; + @override + String? get updateCacheHandlerKey; + @override + Map? get updateCacheHandlerContext; + @override + _i1.FetchPolicy? get fetchPolicy; + @override + bool get executeOnListen; + @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override + _i2.GSearchPlacesData? parseData(Map json) => + _i2.GSearchPlacesData.fromJson(json); + + @override + Map varsToJson() => vars.toJson(); + + @override + Map dataToJson(_i2.GSearchPlacesData data) => data.toJson(); + + @override + _i1.OperationRequest<_i2.GSearchPlacesData, _i3.GSearchPlacesVars> + transformOperation(_i4.Operation Function(_i4.Operation) transform) => + this.rebuild((b) => b..operation = transform(operation)); + + static Serializer get serializer => + _$gSearchPlacesReqSerializer; + + Map toJson() => + (_i6.serializers.serializeWith(GSearchPlacesReq.serializer, this) + as Map); + + static GSearchPlacesReq? fromJson(Map json) => + _i6.serializers.deserializeWith(GSearchPlacesReq.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.req.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.req.gql.g.dart new file mode 100644 index 0000000..5f0af05 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.req.gql.g.dart @@ -0,0 +1,437 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'search_places.req.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gSearchPlacesReqSerializer = + _$GSearchPlacesReqSerializer(); + +class _$GSearchPlacesReqSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GSearchPlacesReq, _$GSearchPlacesReq]; + @override + final String wireName = 'GSearchPlacesReq'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesReq object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'vars', + serializers.serialize( + object.vars, + specifiedType: const FullType(_i3.GSearchPlacesVars), + ), + 'operation', + serializers.serialize( + object.operation, + specifiedType: const FullType(_i4.Operation), + ), + 'executeOnListen', + serializers.serialize( + object.executeOnListen, + specifiedType: const FullType(bool), + ), + ]; + Object? value; + value = object.requestId; + if (value != null) { + result + ..add('requestId') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.optimisticResponse; + if (value != null) { + result + ..add('optimisticResponse') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i2.GSearchPlacesData), + ), + ); + } + value = object.updateCacheHandlerKey; + if (value != null) { + result + ..add('updateCacheHandlerKey') + ..add( + serializers.serialize(value, specifiedType: const FullType(String)), + ); + } + value = object.updateCacheHandlerContext; + if (value != null) { + result + ..add('updateCacheHandlerContext') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ), + ); + } + value = object.fetchPolicy; + if (value != null) { + result + ..add('fetchPolicy') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ), + ); + } + return result; + } + + @override + GSearchPlacesReq deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesReqBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'vars': + result.vars.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i3.GSearchPlacesVars), + )! + as _i3.GSearchPlacesVars, + ); + break; + case 'operation': + result.operation = + serializers.deserialize( + value, + specifiedType: const FullType(_i4.Operation), + )! + as _i4.Operation; + break; + case 'requestId': + result.requestId = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'optimisticResponse': + result.optimisticResponse.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i2.GSearchPlacesData), + )! + as _i2.GSearchPlacesData, + ); + break; + case 'updateCacheHandlerKey': + result.updateCacheHandlerKey = + serializers.deserialize( + value, + specifiedType: const FullType(String), + ) + as String?; + break; + case 'updateCacheHandlerContext': + result.updateCacheHandlerContext = + serializers.deserialize( + value, + specifiedType: const FullType(Map, const [ + const FullType(String), + const FullType(dynamic), + ]), + ) + as Map?; + break; + case 'fetchPolicy': + result.fetchPolicy = + serializers.deserialize( + value, + specifiedType: const FullType(_i1.FetchPolicy), + ) + as _i1.FetchPolicy?; + break; + case 'executeOnListen': + result.executeOnListen = + serializers.deserialize( + value, + specifiedType: const FullType(bool), + )! + as bool; + break; + } + } + + return result.build(); + } +} + +class _$GSearchPlacesReq extends GSearchPlacesReq { + @override + final _i3.GSearchPlacesVars vars; + @override + final _i4.Operation operation; + @override + final String? requestId; + @override + final _i2.GSearchPlacesData? Function( + _i2.GSearchPlacesData?, + _i2.GSearchPlacesData?, + )? + updateResult; + @override + final _i2.GSearchPlacesData? optimisticResponse; + @override + final String? updateCacheHandlerKey; + @override + final Map? updateCacheHandlerContext; + @override + final _i1.FetchPolicy? fetchPolicy; + @override + final bool executeOnListen; + @override + final _i4.Context? context; + + factory _$GSearchPlacesReq([ + void Function(GSearchPlacesReqBuilder)? updates, + ]) => (GSearchPlacesReqBuilder()..update(updates))._build(); + + _$GSearchPlacesReq._({ + required this.vars, + required this.operation, + this.requestId, + this.updateResult, + this.optimisticResponse, + this.updateCacheHandlerKey, + this.updateCacheHandlerContext, + this.fetchPolicy, + required this.executeOnListen, + this.context, + }) : super._(); + @override + GSearchPlacesReq rebuild(void Function(GSearchPlacesReqBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesReqBuilder toBuilder() => + GSearchPlacesReqBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesReq && + vars == other.vars && + operation == other.operation && + requestId == other.requestId && + updateResult == other.updateResult && + optimisticResponse == other.optimisticResponse && + updateCacheHandlerKey == other.updateCacheHandlerKey && + updateCacheHandlerContext == other.updateCacheHandlerContext && + fetchPolicy == other.fetchPolicy && + executeOnListen == other.executeOnListen && + context == other.context; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, vars.hashCode); + _$hash = $jc(_$hash, operation.hashCode); + _$hash = $jc(_$hash, requestId.hashCode); + _$hash = $jc(_$hash, updateResult.hashCode); + _$hash = $jc(_$hash, optimisticResponse.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerKey.hashCode); + _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); + _$hash = $jc(_$hash, fetchPolicy.hashCode); + _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GSearchPlacesReq') + ..add('vars', vars) + ..add('operation', operation) + ..add('requestId', requestId) + ..add('updateResult', updateResult) + ..add('optimisticResponse', optimisticResponse) + ..add('updateCacheHandlerKey', updateCacheHandlerKey) + ..add('updateCacheHandlerContext', updateCacheHandlerContext) + ..add('fetchPolicy', fetchPolicy) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) + .toString(); + } +} + +class GSearchPlacesReqBuilder + implements Builder { + _$GSearchPlacesReq? _$v; + + _i3.GSearchPlacesVarsBuilder? _vars; + _i3.GSearchPlacesVarsBuilder get vars => + _$this._vars ??= _i3.GSearchPlacesVarsBuilder(); + set vars(_i3.GSearchPlacesVarsBuilder? vars) => _$this._vars = vars; + + _i4.Operation? _operation; + _i4.Operation? get operation => _$this._operation; + set operation(_i4.Operation? operation) => _$this._operation = operation; + + String? _requestId; + String? get requestId => _$this._requestId; + set requestId(String? requestId) => _$this._requestId = requestId; + + _i2.GSearchPlacesData? Function( + _i2.GSearchPlacesData?, + _i2.GSearchPlacesData?, + )? + _updateResult; + _i2.GSearchPlacesData? Function( + _i2.GSearchPlacesData?, + _i2.GSearchPlacesData?, + )? + get updateResult => _$this._updateResult; + set updateResult( + _i2.GSearchPlacesData? Function( + _i2.GSearchPlacesData?, + _i2.GSearchPlacesData?, + )? + updateResult, + ) => _$this._updateResult = updateResult; + + _i2.GSearchPlacesDataBuilder? _optimisticResponse; + _i2.GSearchPlacesDataBuilder get optimisticResponse => + _$this._optimisticResponse ??= _i2.GSearchPlacesDataBuilder(); + set optimisticResponse(_i2.GSearchPlacesDataBuilder? optimisticResponse) => + _$this._optimisticResponse = optimisticResponse; + + String? _updateCacheHandlerKey; + String? get updateCacheHandlerKey => _$this._updateCacheHandlerKey; + set updateCacheHandlerKey(String? updateCacheHandlerKey) => + _$this._updateCacheHandlerKey = updateCacheHandlerKey; + + Map? _updateCacheHandlerContext; + Map? get updateCacheHandlerContext => + _$this._updateCacheHandlerContext; + set updateCacheHandlerContext( + Map? updateCacheHandlerContext, + ) => _$this._updateCacheHandlerContext = updateCacheHandlerContext; + + _i1.FetchPolicy? _fetchPolicy; + _i1.FetchPolicy? get fetchPolicy => _$this._fetchPolicy; + set fetchPolicy(_i1.FetchPolicy? fetchPolicy) => + _$this._fetchPolicy = fetchPolicy; + + bool? _executeOnListen; + bool? get executeOnListen => _$this._executeOnListen; + set executeOnListen(bool? executeOnListen) => + _$this._executeOnListen = executeOnListen; + + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + + GSearchPlacesReqBuilder() { + GSearchPlacesReq._initializeBuilder(this); + } + + GSearchPlacesReqBuilder get _$this { + final $v = _$v; + if ($v != null) { + _vars = $v.vars.toBuilder(); + _operation = $v.operation; + _requestId = $v.requestId; + _updateResult = $v.updateResult; + _optimisticResponse = $v.optimisticResponse?.toBuilder(); + _updateCacheHandlerKey = $v.updateCacheHandlerKey; + _updateCacheHandlerContext = $v.updateCacheHandlerContext; + _fetchPolicy = $v.fetchPolicy; + _executeOnListen = $v.executeOnListen; + _context = $v.context; + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesReq other) { + _$v = other as _$GSearchPlacesReq; + } + + @override + void update(void Function(GSearchPlacesReqBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesReq build() => _build(); + + _$GSearchPlacesReq _build() { + _$GSearchPlacesReq _$result; + try { + _$result = + _$v ?? + _$GSearchPlacesReq._( + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, + r'GSearchPlacesReq', + 'operation', + ), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, + r'GSearchPlacesReq', + 'executeOnListen', + ), + context: context, + ); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'vars'; + vars.build(); + + _$failedField = 'optimisticResponse'; + _optimisticResponse?.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GSearchPlacesReq', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart new file mode 100644 index 0000000..3b71743 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart @@ -0,0 +1,32 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' + as _i1; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/serializers.gql.dart' + as _i2; + +part 'search_places.var.gql.g.dart'; + +abstract class GSearchPlacesVars + implements Built { + GSearchPlacesVars._(); + + factory GSearchPlacesVars([ + void Function(GSearchPlacesVarsBuilder b) updates, + ]) = _$GSearchPlacesVars; + + _i1.GSearchPlacesInput get input; + static Serializer get serializer => + _$gSearchPlacesVarsSerializer; + + Map toJson() => + (_i2.serializers.serializeWith(GSearchPlacesVars.serializer, this) + as Map); + + static GSearchPlacesVars? fromJson(Map json) => + _i2.serializers.deserializeWith(GSearchPlacesVars.serializer, json); +} diff --git a/lib/features/mapflow/data/graphql/__generated__/search_places.var.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/search_places.var.gql.g.dart new file mode 100644 index 0000000..e30e993 --- /dev/null +++ b/lib/features/mapflow/data/graphql/__generated__/search_places.var.gql.g.dart @@ -0,0 +1,161 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'search_places.var.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gSearchPlacesVarsSerializer = + _$GSearchPlacesVarsSerializer(); + +class _$GSearchPlacesVarsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GSearchPlacesVars, _$GSearchPlacesVars]; + @override + final String wireName = 'GSearchPlacesVars'; + + @override + Iterable serialize( + Serializers serializers, + GSearchPlacesVars object, { + FullType specifiedType = FullType.unspecified, + }) { + final result = [ + 'input', + serializers.serialize( + object.input, + specifiedType: const FullType(_i1.GSearchPlacesInput), + ), + ]; + + return result; + } + + @override + GSearchPlacesVars deserialize( + Serializers serializers, + Iterable serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GSearchPlacesVarsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'input': + result.input.replace( + serializers.deserialize( + value, + specifiedType: const FullType(_i1.GSearchPlacesInput), + )! + as _i1.GSearchPlacesInput, + ); + break; + } + } + + return result.build(); + } +} + +class _$GSearchPlacesVars extends GSearchPlacesVars { + @override + final _i1.GSearchPlacesInput input; + + factory _$GSearchPlacesVars([ + void Function(GSearchPlacesVarsBuilder)? updates, + ]) => (GSearchPlacesVarsBuilder()..update(updates))._build(); + + _$GSearchPlacesVars._({required this.input}) : super._(); + @override + GSearchPlacesVars rebuild(void Function(GSearchPlacesVarsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GSearchPlacesVarsBuilder toBuilder() => + GSearchPlacesVarsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GSearchPlacesVars && input == other.input; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, input.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper( + r'GSearchPlacesVars', + )..add('input', input)).toString(); + } +} + +class GSearchPlacesVarsBuilder + implements Builder { + _$GSearchPlacesVars? _$v; + + _i1.GSearchPlacesInputBuilder? _input; + _i1.GSearchPlacesInputBuilder get input => + _$this._input ??= _i1.GSearchPlacesInputBuilder(); + set input(_i1.GSearchPlacesInputBuilder? input) => _$this._input = input; + + GSearchPlacesVarsBuilder(); + + GSearchPlacesVarsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _input = $v.input.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GSearchPlacesVars other) { + _$v = other as _$GSearchPlacesVars; + } + + @override + void update(void Function(GSearchPlacesVarsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GSearchPlacesVars build() => _build(); + + _$GSearchPlacesVars _build() { + _$GSearchPlacesVars _$result; + try { + _$result = _$v ?? _$GSearchPlacesVars._(input: input.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'input'; + input.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'GSearchPlacesVars', + _$failedField, + e.toString(), + ); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart index ec66d6f..5dd6fc8 100644 --- a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.dart @@ -8,6 +8,15 @@ import 'package:built_value/standard_json_plugin.dart' show StandardJsonPlugin; import 'package:ferry_exec/ferry_exec.dart'; import 'package:gql_code_builder_serializers/gql_code_builder_serializers.dart' show OperationSerializer; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.data.gql.dart' + show + GAddFavoritePlaceData, + GAddFavoritePlaceData_addFavoritePlace, + GAddFavoritePlaceData_addFavoritePlace_experiences; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.req.gql.dart' + show GAddFavoritePlaceReq; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/add_favorite_place.var.gql.dart' + show GAddFavoritePlaceVars; import 'package:mapflow/features/mapflow/data/graphql/__generated__/authenticate_telegram.data.gql.dart' show GAuthenticateTelegramData, @@ -43,6 +52,15 @@ import 'package:mapflow/features/mapflow/data/graphql/__generated__/create_voice show GCreateVoiceExperienceReq; import 'package:mapflow/features/mapflow/data/graphql/__generated__/create_voice_experience.var.gql.dart' show GCreateVoiceExperienceVars; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.data.gql.dart' + show + GFavoritePlacesData, + GFavoritePlacesData_favoritePlaces, + GFavoritePlacesData_favoritePlaces_experiences; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.req.gql.dart' + show GFavoritePlacesReq; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/favorite_places.var.gql.dart' + show GFavoritePlacesVars; import 'package:mapflow/features/mapflow/data/graphql/__generated__/me.data.gql.dart' show GMeData, GMeData_me; import 'package:mapflow/features/mapflow/data/graphql/__generated__/me.req.gql.dart' @@ -64,13 +82,33 @@ import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.req.g show GPlacesReq; import 'package:mapflow/features/mapflow/data/graphql/__generated__/places.var.gql.dart' show GPlacesVars; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.data.gql.dart' + show + GRemoveFavoritePlaceData, + GRemoveFavoritePlaceData_removeFavoritePlace, + GRemoveFavoritePlaceData_removeFavoritePlace_experiences; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.req.gql.dart' + show GRemoveFavoritePlaceReq; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/remove_favorite_place.var.gql.dart' + show GRemoveFavoritePlaceVars; import 'package:mapflow/features/mapflow/data/graphql/__generated__/schema.schema.gql.dart' show GAuthenticateTelegramInput, GAuthenticateTelegramLoginInput, GCreateVoiceExperienceInput, GNearbyPlacesInput, + GSearchPlacesInput, GVoiceExperienceStatus; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.data.gql.dart' + show + GSearchPlacesData, + GSearchPlacesData_searchPlaces, + GSearchPlacesData_searchPlaces_places, + GSearchPlacesData_searchPlaces_places_experiences; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.req.gql.dart' + show GSearchPlacesReq; +import 'package:mapflow/features/mapflow/data/graphql/__generated__/search_places.var.gql.dart' + show GSearchPlacesVars; import 'package:mapflow/features/mapflow/data/graphql/__generated__/start_telegram_bot_login.data.gql.dart' show GStartTelegramBotLoginData, @@ -96,6 +134,11 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder() ..add(OperationSerializer()) ..addPlugin(StandardJsonPlugin()); @SerializersFor([ + GAddFavoritePlaceData, + GAddFavoritePlaceData_addFavoritePlace, + GAddFavoritePlaceData_addFavoritePlace_experiences, + GAddFavoritePlaceReq, + GAddFavoritePlaceVars, GAuthenticateTelegramData, GAuthenticateTelegramData_authenticateTelegram, GAuthenticateTelegramData_authenticateTelegram_user, @@ -118,6 +161,11 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder() GCreateVoiceExperienceInput, GCreateVoiceExperienceReq, GCreateVoiceExperienceVars, + GFavoritePlacesData, + GFavoritePlacesData_favoritePlaces, + GFavoritePlacesData_favoritePlaces_experiences, + GFavoritePlacesReq, + GFavoritePlacesVars, GMeData, GMeData_me, GMeReq, @@ -133,6 +181,18 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder() GPlacesData_places_experiences, GPlacesReq, GPlacesVars, + GRemoveFavoritePlaceData, + GRemoveFavoritePlaceData_removeFavoritePlace, + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + GRemoveFavoritePlaceReq, + GRemoveFavoritePlaceVars, + GSearchPlacesData, + GSearchPlacesData_searchPlaces, + GSearchPlacesData_searchPlaces_places, + GSearchPlacesData_searchPlaces_places_experiences, + GSearchPlacesInput, + GSearchPlacesReq, + GSearchPlacesVars, GStartTelegramBotLoginData, GStartTelegramBotLoginData_startTelegramBotLogin, GStartTelegramBotLoginReq, diff --git a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart index de935f3..743068d 100644 --- a/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/serializers.gql.g.dart @@ -9,6 +9,11 @@ part of 'serializers.gql.dart'; Serializers _$serializers = (Serializers().toBuilder() ..add(FetchPolicy.serializer) + ..add(GAddFavoritePlaceData.serializer) + ..add(GAddFavoritePlaceData_addFavoritePlace.serializer) + ..add(GAddFavoritePlaceData_addFavoritePlace_experiences.serializer) + ..add(GAddFavoritePlaceReq.serializer) + ..add(GAddFavoritePlaceVars.serializer) ..add(GAuthenticateTelegramData.serializer) ..add(GAuthenticateTelegramData_authenticateTelegram.serializer) ..add(GAuthenticateTelegramData_authenticateTelegram_user.serializer) @@ -41,6 +46,11 @@ Serializers _$serializers = ..add(GCreateVoiceExperienceInput.serializer) ..add(GCreateVoiceExperienceReq.serializer) ..add(GCreateVoiceExperienceVars.serializer) + ..add(GFavoritePlacesData.serializer) + ..add(GFavoritePlacesData_favoritePlaces.serializer) + ..add(GFavoritePlacesData_favoritePlaces_experiences.serializer) + ..add(GFavoritePlacesReq.serializer) + ..add(GFavoritePlacesVars.serializer) ..add(GMeData.serializer) ..add(GMeData_me.serializer) ..add(GMeReq.serializer) @@ -56,6 +66,20 @@ Serializers _$serializers = ..add(GPlacesData_places_experiences.serializer) ..add(GPlacesReq.serializer) ..add(GPlacesVars.serializer) + ..add(GRemoveFavoritePlaceData.serializer) + ..add(GRemoveFavoritePlaceData_removeFavoritePlace.serializer) + ..add( + GRemoveFavoritePlaceData_removeFavoritePlace_experiences.serializer, + ) + ..add(GRemoveFavoritePlaceReq.serializer) + ..add(GRemoveFavoritePlaceVars.serializer) + ..add(GSearchPlacesData.serializer) + ..add(GSearchPlacesData_searchPlaces.serializer) + ..add(GSearchPlacesData_searchPlaces_places.serializer) + ..add(GSearchPlacesData_searchPlaces_places_experiences.serializer) + ..add(GSearchPlacesInput.serializer) + ..add(GSearchPlacesReq.serializer) + ..add(GSearchPlacesVars.serializer) ..add(GStartTelegramBotLoginData.serializer) ..add(GStartTelegramBotLoginData_startTelegramBotLogin.serializer) ..add(GStartTelegramBotLoginReq.serializer) @@ -67,6 +91,12 @@ Serializers _$serializers = ..add(GVoiceExperiencesData_voiceExperiences_user.serializer) ..add(GVoiceExperiencesReq.serializer) ..add(GVoiceExperiencesVars.serializer) + ..addBuilderFactory( + const FullType(BuiltList, const [ + const FullType(GFavoritePlacesData_favoritePlaces), + ]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, const [ const FullType(GNearbyPlacesData_nearbyPlaces), @@ -79,6 +109,12 @@ Serializers _$serializers = ]), () => ListBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltList, const [ + const FullType(GSearchPlacesData_searchPlaces_places), + ]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, const [ const FullType(GVoiceExperiencesData_voiceExperiences), @@ -89,6 +125,67 @@ Serializers _$serializers = const FullType(BuiltList, const [const FullType(String)]), () => ListBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [ + const FullType( + GAddFavoritePlaceData_addFavoritePlace_experiences, + ), + ]), + () => + ListBuilder< + GAddFavoritePlaceData_addFavoritePlace_experiences + >(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [ + const FullType(GFavoritePlacesData_favoritePlaces_experiences), + ]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, const [ const FullType(GNearbyPlacesData_nearbyPlaces_experiences), @@ -99,11 +196,63 @@ Serializers _$serializers = const FullType(BuiltList, const [const FullType(String)]), () => ListBuilder(), ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) ..addBuilderFactory( const FullType(BuiltList, const [ const FullType(GPlacesData_places_experiences), ]), () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [ + const FullType( + GRemoveFavoritePlaceData_removeFavoritePlace_experiences, + ), + ]), + () => + ListBuilder< + GRemoveFavoritePlaceData_removeFavoritePlace_experiences + >(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, const [ + const FullType(GSearchPlacesData_searchPlaces_places_experiences), + ]), + () => + ListBuilder< + GSearchPlacesData_searchPlaces_places_experiences + >(), )) .build(); diff --git a/lib/features/mapflow/data/graphql/__generated__/voice_experiences.ast.gql.dart b/lib/features/mapflow/data/graphql/__generated__/voice_experiences.ast.gql.dart index 3e6b61e..c3203d0 100644 --- a/lib/features/mapflow/data/graphql/__generated__/voice_experiences.ast.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/voice_experiences.ast.gql.dart @@ -53,6 +53,20 @@ const VoiceExperiences = _i1.OperationDefinitionNode( directives: [], selectionSet: null, ), + _i1.FieldNode( + name: _i1.NameNode(value: 'recordingPayload'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), + _i1.FieldNode( + name: _i1.NameNode(value: 'promptHintsShown'), + alias: null, + arguments: [], + directives: [], + selectionSet: null, + ), _i1.FieldNode( name: _i1.NameNode(value: 'createdAt'), alias: null, diff --git a/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.dart b/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.dart index 37e7f76..f25f429 100644 --- a/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.dart +++ b/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.dart @@ -61,6 +61,8 @@ abstract class GVoiceExperiencesData_voiceExperiences int get durationSeconds; String? get transcript; _i3.JsonObject? get analysis; + _i3.JsonObject? get recordingPayload; + BuiltList get promptHintsShown; String get createdAt; GVoiceExperiencesData_voiceExperiences_place get place; GVoiceExperiencesData_voiceExperiences_user? get user; diff --git a/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.g.dart b/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.g.dart index 2f2d079..95a0ef7 100644 --- a/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.g.dart +++ b/lib/features/mapflow/data/graphql/__generated__/voice_experiences.data.gql.g.dart @@ -126,6 +126,13 @@ class _$GVoiceExperiencesData_voiceExperiencesSerializer object.durationSeconds, specifiedType: const FullType(int), ), + 'promptHintsShown', + serializers.serialize( + object.promptHintsShown, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + ), 'createdAt', serializers.serialize( object.createdAt, @@ -159,6 +166,17 @@ class _$GVoiceExperiencesData_voiceExperiencesSerializer ), ); } + value = object.recordingPayload; + if (value != null) { + result + ..add('recordingPayload') + ..add( + serializers.serialize( + value, + specifiedType: const FullType(_i3.JsonObject), + ), + ); + } value = object.user; if (value != null) { result @@ -237,6 +255,25 @@ class _$GVoiceExperiencesData_voiceExperiencesSerializer ) as _i3.JsonObject?; break; + case 'recordingPayload': + result.recordingPayload = + serializers.deserialize( + value, + specifiedType: const FullType(_i3.JsonObject), + ) + as _i3.JsonObject?; + break; + case 'promptHintsShown': + result.promptHintsShown.replace( + serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, const [ + const FullType(String), + ]), + )! + as BuiltList, + ); + break; case 'createdAt': result.createdAt = serializers.deserialize( @@ -582,6 +619,10 @@ class _$GVoiceExperiencesData_voiceExperiences @override final _i3.JsonObject? analysis; @override + final _i3.JsonObject? recordingPayload; + @override + final BuiltList promptHintsShown; + @override final String createdAt; @override final GVoiceExperiencesData_voiceExperiences_place place; @@ -600,6 +641,8 @@ class _$GVoiceExperiencesData_voiceExperiences required this.durationSeconds, this.transcript, this.analysis, + this.recordingPayload, + required this.promptHintsShown, required this.createdAt, required this.place, this.user, @@ -623,6 +666,8 @@ class _$GVoiceExperiencesData_voiceExperiences durationSeconds == other.durationSeconds && transcript == other.transcript && analysis == other.analysis && + recordingPayload == other.recordingPayload && + promptHintsShown == other.promptHintsShown && createdAt == other.createdAt && place == other.place && user == other.user; @@ -637,6 +682,8 @@ class _$GVoiceExperiencesData_voiceExperiences _$hash = $jc(_$hash, durationSeconds.hashCode); _$hash = $jc(_$hash, transcript.hashCode); _$hash = $jc(_$hash, analysis.hashCode); + _$hash = $jc(_$hash, recordingPayload.hashCode); + _$hash = $jc(_$hash, promptHintsShown.hashCode); _$hash = $jc(_$hash, createdAt.hashCode); _$hash = $jc(_$hash, place.hashCode); _$hash = $jc(_$hash, user.hashCode); @@ -655,6 +702,8 @@ class _$GVoiceExperiencesData_voiceExperiences ..add('durationSeconds', durationSeconds) ..add('transcript', transcript) ..add('analysis', analysis) + ..add('recordingPayload', recordingPayload) + ..add('promptHintsShown', promptHintsShown) ..add('createdAt', createdAt) ..add('place', place) ..add('user', user)) @@ -695,6 +744,17 @@ class GVoiceExperiencesData_voiceExperiencesBuilder _i3.JsonObject? get analysis => _$this._analysis; set analysis(_i3.JsonObject? analysis) => _$this._analysis = analysis; + _i3.JsonObject? _recordingPayload; + _i3.JsonObject? get recordingPayload => _$this._recordingPayload; + set recordingPayload(_i3.JsonObject? recordingPayload) => + _$this._recordingPayload = recordingPayload; + + ListBuilder? _promptHintsShown; + ListBuilder get promptHintsShown => + _$this._promptHintsShown ??= ListBuilder(); + set promptHintsShown(ListBuilder? promptHintsShown) => + _$this._promptHintsShown = promptHintsShown; + String? _createdAt; String? get createdAt => _$this._createdAt; set createdAt(String? createdAt) => _$this._createdAt = createdAt; @@ -724,6 +784,8 @@ class GVoiceExperiencesData_voiceExperiencesBuilder _durationSeconds = $v.durationSeconds; _transcript = $v.transcript; _analysis = $v.analysis; + _recordingPayload = $v.recordingPayload; + _promptHintsShown = $v.promptHintsShown.toBuilder(); _createdAt = $v.createdAt; _place = $v.place.toBuilder(); _user = $v.user?.toBuilder(); @@ -775,6 +837,8 @@ class GVoiceExperiencesData_voiceExperiencesBuilder ), transcript: transcript, analysis: analysis, + recordingPayload: recordingPayload, + promptHintsShown: promptHintsShown.build(), createdAt: BuiltValueNullFieldError.checkNotNull( createdAt, r'GVoiceExperiencesData_voiceExperiences', @@ -786,6 +850,9 @@ class GVoiceExperiencesData_voiceExperiencesBuilder } catch (_) { late String _$failedField; try { + _$failedField = 'promptHintsShown'; + promptHintsShown.build(); + _$failedField = 'place'; place.build(); _$failedField = 'user'; diff --git a/lib/features/mapflow/data/graphql/add_favorite_place.graphql b/lib/features/mapflow/data/graphql/add_favorite_place.graphql new file mode 100644 index 0000000..7cb4c4e --- /dev/null +++ b/lib/features/mapflow/data/graphql/add_favorite_place.graphql @@ -0,0 +1,24 @@ +mutation AddFavoritePlace($placeId: ID!) { + addFavoritePlace(placeId: $placeId) { + id + googlePlaceId + name + latitude + longitude + googlePrimaryType + googleTypes + googleBusinessStatus + googleRating + googleUserRatingCount + googleRegularOpeningHours + googleCurrentOpeningHours + photoUrls + traits + isFavorite + experiences { + id + status + createdAt + } + } +} diff --git a/lib/features/mapflow/data/graphql/favorite_places.graphql b/lib/features/mapflow/data/graphql/favorite_places.graphql new file mode 100644 index 0000000..a8b354f --- /dev/null +++ b/lib/features/mapflow/data/graphql/favorite_places.graphql @@ -0,0 +1,24 @@ +query FavoritePlaces { + favoritePlaces { + id + googlePlaceId + name + latitude + longitude + googlePrimaryType + googleTypes + googleBusinessStatus + googleRating + googleUserRatingCount + googleRegularOpeningHours + googleCurrentOpeningHours + photoUrls + traits + isFavorite + experiences { + id + status + createdAt + } + } +} diff --git a/lib/features/mapflow/data/graphql/nearby_places.graphql b/lib/features/mapflow/data/graphql/nearby_places.graphql index 4e79f13..da1bc48 100644 --- a/lib/features/mapflow/data/graphql/nearby_places.graphql +++ b/lib/features/mapflow/data/graphql/nearby_places.graphql @@ -7,10 +7,17 @@ query NearbyPlaces($input: NearbyPlacesInput!) { longitude googlePrimaryType googleTypes + googleBusinessStatus + googleRating + googleUserRatingCount + googleRegularOpeningHours + googleCurrentOpeningHours + photoUrls + traits + isFavorite experiences { id status - analysis createdAt } } diff --git a/lib/features/mapflow/data/graphql/places.graphql b/lib/features/mapflow/data/graphql/places.graphql index 51b2327..6e27f61 100644 --- a/lib/features/mapflow/data/graphql/places.graphql +++ b/lib/features/mapflow/data/graphql/places.graphql @@ -7,10 +7,17 @@ query Places { longitude googlePrimaryType googleTypes + googleBusinessStatus + googleRating + googleUserRatingCount + googleRegularOpeningHours + googleCurrentOpeningHours + photoUrls + traits + isFavorite experiences { id status - analysis createdAt } } diff --git a/lib/features/mapflow/data/graphql/remove_favorite_place.graphql b/lib/features/mapflow/data/graphql/remove_favorite_place.graphql new file mode 100644 index 0000000..e5e1b10 --- /dev/null +++ b/lib/features/mapflow/data/graphql/remove_favorite_place.graphql @@ -0,0 +1,24 @@ +mutation RemoveFavoritePlace($placeId: ID!) { + removeFavoritePlace(placeId: $placeId) { + id + googlePlaceId + name + latitude + longitude + googlePrimaryType + googleTypes + googleBusinessStatus + googleRating + googleUserRatingCount + googleRegularOpeningHours + googleCurrentOpeningHours + photoUrls + traits + isFavorite + experiences { + id + status + createdAt + } + } +} diff --git a/lib/features/mapflow/data/graphql/search_places.graphql b/lib/features/mapflow/data/graphql/search_places.graphql new file mode 100644 index 0000000..9294753 --- /dev/null +++ b/lib/features/mapflow/data/graphql/search_places.graphql @@ -0,0 +1,27 @@ +query SearchPlaces($input: SearchPlacesInput!) { + searchPlaces(input: $input) { + message + places { + id + googlePlaceId + name + latitude + longitude + googlePrimaryType + googleTypes + googleBusinessStatus + googleRating + googleUserRatingCount + googleRegularOpeningHours + googleCurrentOpeningHours + photoUrls + traits + isFavorite + experiences { + id + status + createdAt + } + } + } +} diff --git a/lib/features/mapflow/data/graphql/voice_experiences.graphql b/lib/features/mapflow/data/graphql/voice_experiences.graphql index 6c396e3..0eefe72 100644 --- a/lib/features/mapflow/data/graphql/voice_experiences.graphql +++ b/lib/features/mapflow/data/graphql/voice_experiences.graphql @@ -5,6 +5,8 @@ query VoiceExperiences { durationSeconds transcript analysis + recordingPayload + promptHintsShown createdAt place { name diff --git a/lib/features/mapflow/data/mapflow_data_mappers.dart b/lib/features/mapflow/data/mapflow_data_mappers.dart index c2aeb93..24bdd31 100644 --- a/lib/features/mapflow/data/mapflow_data_mappers.dart +++ b/lib/features/mapflow/data/mapflow_data_mappers.dart @@ -2,12 +2,16 @@ import 'package:built_value/json_object.dart'; import 'package:latlong2/latlong.dart'; import '../domain/place_models.dart'; +import 'graphql/__generated__/add_favorite_place.data.gql.dart'; import 'graphql/__generated__/authenticate_telegram.data.gql.dart'; import 'graphql/__generated__/authenticate_telegram_login.data.gql.dart'; import 'graphql/__generated__/complete_telegram_bot_login.data.gql.dart'; +import 'graphql/__generated__/favorite_places.data.gql.dart'; import 'graphql/__generated__/me.data.gql.dart'; import 'graphql/__generated__/nearby_places.data.gql.dart'; import 'graphql/__generated__/places.data.gql.dart'; +import 'graphql/__generated__/remove_favorite_place.data.gql.dart'; +import 'graphql/__generated__/search_places.data.gql.dart'; import 'graphql/__generated__/voice_experiences.data.gql.dart'; AppUser appUserFromMe(GMeData_me user) { @@ -96,11 +100,17 @@ PlaceRecommendation placeRecommendationFromPlace(GPlacesData_places place) { googlePlaceId: place.googlePlaceId, name: place.name, area: '', - photoUrls: const [], + photoUrls: place.photoUrls.toList().cast(), coordinate: LatLng(place.latitude, place.longitude), - traits: _traitsFromAnalyses(place.experiences.map((item) => item.analysis)), + traits: _traitsFromTags(place.traits), googlePrimaryType: place.googlePrimaryType, googleTypes: place.googleTypes.toList().cast(), + googleBusinessStatus: place.googleBusinessStatus, + googleRating: place.googleRating, + googleUserRatingCount: place.googleUserRatingCount, + googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), + googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + isFavorite: place.isFavorite, ); } @@ -112,11 +122,105 @@ PlaceRecommendation placeRecommendationFromNearbyPlace( googlePlaceId: place.googlePlaceId, name: place.name, area: '', - photoUrls: const [], + photoUrls: place.photoUrls.toList().cast(), coordinate: LatLng(place.latitude, place.longitude), - traits: _traitsFromAnalyses(place.experiences.map((item) => item.analysis)), + traits: _traitsFromTags(place.traits), googlePrimaryType: place.googlePrimaryType, googleTypes: place.googleTypes.toList().cast(), + googleBusinessStatus: place.googleBusinessStatus, + googleRating: place.googleRating, + googleUserRatingCount: place.googleUserRatingCount, + googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), + googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + isFavorite: place.isFavorite, + ); +} + +PlaceRecommendation placeRecommendationFromFavoritePlace( + GFavoritePlacesData_favoritePlaces place, +) { + return PlaceRecommendation( + id: place.id, + googlePlaceId: place.googlePlaceId, + name: place.name, + area: '', + photoUrls: place.photoUrls.toList().cast(), + coordinate: LatLng(place.latitude, place.longitude), + traits: _traitsFromTags(place.traits), + googlePrimaryType: place.googlePrimaryType, + googleTypes: place.googleTypes.toList().cast(), + googleBusinessStatus: place.googleBusinessStatus, + googleRating: place.googleRating, + googleUserRatingCount: place.googleUserRatingCount, + googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), + googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + isFavorite: place.isFavorite, + ); +} + +PlaceRecommendation placeRecommendationFromSearchPlace( + GSearchPlacesData_searchPlaces_places place, +) { + return PlaceRecommendation( + id: place.id, + googlePlaceId: place.googlePlaceId, + name: place.name, + area: '', + photoUrls: place.photoUrls.toList().cast(), + coordinate: LatLng(place.latitude, place.longitude), + traits: _traitsFromTags(place.traits), + googlePrimaryType: place.googlePrimaryType, + googleTypes: place.googleTypes.toList().cast(), + googleBusinessStatus: place.googleBusinessStatus, + googleRating: place.googleRating, + googleUserRatingCount: place.googleUserRatingCount, + googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), + googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + isFavorite: place.isFavorite, + ); +} + +PlaceRecommendation placeRecommendationFromAddedFavorite( + GAddFavoritePlaceData_addFavoritePlace place, +) { + return PlaceRecommendation( + id: place.id, + googlePlaceId: place.googlePlaceId, + name: place.name, + area: '', + photoUrls: place.photoUrls.toList().cast(), + coordinate: LatLng(place.latitude, place.longitude), + traits: _traitsFromTags(place.traits), + googlePrimaryType: place.googlePrimaryType, + googleTypes: place.googleTypes.toList().cast(), + googleBusinessStatus: place.googleBusinessStatus, + googleRating: place.googleRating, + googleUserRatingCount: place.googleUserRatingCount, + googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), + googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + isFavorite: place.isFavorite, + ); +} + +PlaceRecommendation placeRecommendationFromRemovedFavorite( + GRemoveFavoritePlaceData_removeFavoritePlace place, +) { + return PlaceRecommendation( + id: place.id, + googlePlaceId: place.googlePlaceId, + name: place.name, + area: '', + photoUrls: place.photoUrls.toList().cast(), + coordinate: LatLng(place.latitude, place.longitude), + traits: _traitsFromTags(place.traits), + googlePrimaryType: place.googlePrimaryType, + googleTypes: place.googleTypes.toList().cast(), + googleBusinessStatus: place.googleBusinessStatus, + googleRating: place.googleRating, + googleUserRatingCount: place.googleUserRatingCount, + googleRegularOpeningHours: _jsonMap(place.googleRegularOpeningHours), + googleCurrentOpeningHours: _jsonMap(place.googleCurrentOpeningHours), + isFavorite: place.isFavorite, ); } @@ -152,24 +256,12 @@ String _userDisplayName(GVoiceExperiencesData_voiceExperiences_user? user) { return telegramId; } -Set _traitsFromAnalyses(Iterable analyses) { +Set _traitsFromTags(Iterable tags) { final traits = {}; - for (final analysisObject in analyses) { - final analysis = _jsonMap(analysisObject); - if (analysis == null) { - continue; - } - - final tags = analysis['tags']; - if (tags is! List) { - continue; - } - - for (final tag in tags) { - final trait = _traitByTag(tag.toString()); - if (trait != null) { - traits.add(trait); - } + for (final tag in tags) { + final trait = _traitByTag(tag); + if (trait != null) { + traits.add(trait); } } diff --git a/lib/features/mapflow/data/places_repository.dart b/lib/features/mapflow/data/places_repository.dart index 1058e40..80b7382 100644 --- a/lib/features/mapflow/data/places_repository.dart +++ b/lib/features/mapflow/data/places_repository.dart @@ -1,8 +1,12 @@ import 'package:latlong2/latlong.dart'; import '../domain/place_models.dart'; +import 'graphql/__generated__/add_favorite_place.req.gql.dart'; +import 'graphql/__generated__/favorite_places.req.gql.dart'; import 'graphql/__generated__/nearby_places.req.gql.dart'; import 'graphql/__generated__/places.req.gql.dart'; +import 'graphql/__generated__/remove_favorite_place.req.gql.dart'; +import 'graphql/__generated__/search_places.req.gql.dart'; import 'mapflow_data_mappers.dart'; import 'mapflow_graphql_client.dart'; @@ -17,6 +21,13 @@ class PlacesRepository { return data.places.map(placeRecommendationFromPlace).toList(); } + Future> fetchFavoritePlaces() async { + final data = await _client.request(GFavoritePlacesReq()); + return data.favoritePlaces + .map(placeRecommendationFromFavoritePlace) + .toList(); + } + Future> fetchNearbyPlaces({ required LatLng coordinate, required int radiusMeters, @@ -31,4 +42,36 @@ class PlacesRepository { ); return data.nearbyPlaces.map(placeRecommendationFromNearbyPlace).toList(); } + + Future searchPlaces(String query) async { + final data = await _client.request( + GSearchPlacesReq((b) { + b.vars.input.query = query; + }), + ); + return PlaceSearchResult( + message: data.searchPlaces.message, + places: data.searchPlaces.places + .map(placeRecommendationFromSearchPlace) + .toList(), + ); + } + + Future addFavoritePlace(String placeId) async { + final data = await _client.request( + GAddFavoritePlaceReq((b) { + b.vars.placeId = placeId; + }), + ); + return placeRecommendationFromAddedFavorite(data.addFavoritePlace); + } + + Future removeFavoritePlace(String placeId) async { + final data = await _client.request( + GRemoveFavoritePlaceReq((b) { + b.vars.placeId = placeId; + }), + ); + return placeRecommendationFromRemovedFavorite(data.removeFavoritePlace); + } } diff --git a/lib/features/mapflow/data/voice_experiences_repository.dart b/lib/features/mapflow/data/voice_experiences_repository.dart index 90e3684..cf5ead7 100644 --- a/lib/features/mapflow/data/voice_experiences_repository.dart +++ b/lib/features/mapflow/data/voice_experiences_repository.dart @@ -1,3 +1,4 @@ +import 'package:built_value/json_object.dart'; import 'package:latlong2/latlong.dart'; import '../domain/place_models.dart'; @@ -16,10 +17,15 @@ class VoiceExperiencesRepository { required String googlePlaceId, required String googleName, required LatLng coordinate, + required String? googlePrimaryType, + required List googleTypes, required int durationSeconds, required String audioObjectKey, required String audioContentBase64, required String audioMimeType, + required bool addToFavorites, + required Map recordingPayload, + required List promptHintsShown, }) async { if (!_client.hasTelegramAuth) { throw StateError('Telegram authorization is required.'); @@ -32,10 +38,15 @@ class VoiceExperiencesRepository { ..googleName = googleName ..latitude = coordinate.latitude ..longitude = coordinate.longitude + ..googlePrimaryType = googlePrimaryType + ..googleTypes.addAll(googleTypes) ..durationSeconds = durationSeconds ..audioObjectKey = audioObjectKey ..audioContentBase64 = audioContentBase64 - ..audioMimeType = audioMimeType; + ..audioMimeType = audioMimeType + ..addToFavorites = addToFavorites + ..recordingPayload = JsonObject(recordingPayload) + ..promptHintsShown.addAll(promptHintsShown); }), ); } diff --git a/lib/features/mapflow/domain/place_models.dart b/lib/features/mapflow/domain/place_models.dart index 7b0bc0f..e1ada4d 100644 --- a/lib/features/mapflow/domain/place_models.dart +++ b/lib/features/mapflow/domain/place_models.dart @@ -139,6 +139,12 @@ class PlaceRecommendation { required this.traits, required this.googlePrimaryType, required this.googleTypes, + required this.googleBusinessStatus, + required this.googleRating, + required this.googleUserRatingCount, + required this.googleRegularOpeningHours, + required this.googleCurrentOpeningHours, + required this.isFavorite, }); final String id; @@ -150,8 +156,41 @@ class PlaceRecommendation { final Set traits; final String? googlePrimaryType; final List googleTypes; + final String? googleBusinessStatus; + final double? googleRating; + final int? googleUserRatingCount; + final Map? googleRegularOpeningHours; + final Map? googleCurrentOpeningHours; + final bool isFavorite; - String get coverPhotoUrl => photoUrls.first; + String? get coverPhotoUrl => photoUrls.isEmpty ? null : photoUrls.first; + + PlaceRecommendation copyWith({bool? isFavorite}) { + return PlaceRecommendation( + id: id, + googlePlaceId: googlePlaceId, + name: name, + area: area, + photoUrls: photoUrls, + coordinate: coordinate, + traits: traits, + googlePrimaryType: googlePrimaryType, + googleTypes: googleTypes, + googleBusinessStatus: googleBusinessStatus, + googleRating: googleRating, + googleUserRatingCount: googleUserRatingCount, + googleRegularOpeningHours: googleRegularOpeningHours, + googleCurrentOpeningHours: googleCurrentOpeningHours, + isFavorite: isFavorite ?? this.isFavorite, + ); + } +} + +class PlaceSearchResult { + const PlaceSearchResult({required this.message, required this.places}); + + final String message; + final List places; } class VoiceReviewDraft { diff --git a/lib/features/mapflow/presentation/mapflow_shell.dart b/lib/features/mapflow/presentation/mapflow_shell.dart index a0ffdcd..59737a2 100644 --- a/lib/features/mapflow/presentation/mapflow_shell.dart +++ b/lib/features/mapflow/presentation/mapflow_shell.dart @@ -111,6 +111,9 @@ class _MapContent extends StatelessWidget { alignment: Alignment.topLeft, child: _UserAvatar( user: state.currentUser, + onAdminReviews: state.currentUser?.isAdmin == true + ? () => context.push('/admin/reviews') + : null, onLogout: () { telegram_session.clearMapflowSession(); placeCubit.load(); @@ -119,15 +122,29 @@ class _MapContent extends StatelessWidget { ), ), ), - if (state.currentUser?.isAdmin == true) - SafeArea( - child: Align( - alignment: Alignment.topRight, - child: _AdminReviewsButton( - onPressed: () => context.push('/admin/reviews'), + SafeArea( + child: Align( + alignment: Alignment.topCenter, + child: _MapSearchButton( + query: state.searchQuery, + onSearch: placeCubit.searchPlaces, + onClear: state.searchQuery.isEmpty + ? null + : placeCubit.clearSearch, + ), + ), + ), + SafeArea( + child: Align( + alignment: Alignment.topRight, + child: _AddReviewButton( + onPressed: () => _openAddFlow( + context, + userCoordinate ?? selected?.coordinate, ), ), ), + ), Align( alignment: Alignment.bottomCenter, child: SafeArea( @@ -144,26 +161,12 @@ class _MapContent extends StatelessWidget { _PlaceCarousel( places: state.recommendations, onSelect: (place) => placeCubit.selectPlace(place.id), + onFavoriteToggle: placeCubit.toggleFavorite, ), ], ), ), ), - SafeArea( - child: Align( - alignment: Alignment.centerRight, - child: Padding( - padding: const EdgeInsets.only(right: 12), - child: FloatingActionButton( - onPressed: () => _openAddFlow( - context, - userCoordinate ?? selected?.coordinate, - ), - child: const Icon(Icons.add_location_alt_outlined), - ), - ), - ), - ), ], ), ); @@ -217,9 +220,14 @@ class _UserLocationMarker extends StatelessWidget { } class _UserAvatar extends StatelessWidget { - const _UserAvatar({required this.user, required this.onLogout}); + const _UserAvatar({ + required this.user, + required this.onAdminReviews, + required this.onLogout, + }); final AppUser? user; + final VoidCallback? onAdminReviews; final VoidCallback onLogout; @override @@ -238,12 +246,26 @@ class _UserAvatar extends StatelessWidget { shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), onSelected: (action) { switch (action) { + case _AvatarAction.adminReviews: + onAdminReviews?.call(); case _AvatarAction.logout: onLogout(); } }, - itemBuilder: (_) => const [ - PopupMenuItem<_AvatarAction>( + itemBuilder: (_) => [ + if (onAdminReviews != null) + const PopupMenuItem<_AvatarAction>( + value: _AvatarAction.adminReviews, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.table_rows_outlined, size: 18), + SizedBox(width: 10), + Text('Отзывы'), + ], + ), + ), + const PopupMenuItem<_AvatarAction>( value: _AvatarAction.logout, child: Row( mainAxisSize: MainAxisSize.min, @@ -287,8 +309,8 @@ class _UserAvatar extends StatelessWidget { } } -class _AdminReviewsButton extends StatelessWidget { - const _AdminReviewsButton({required this.onPressed}); +class _AddReviewButton extends StatelessWidget { + const _AddReviewButton({required this.onPressed}); final VoidCallback onPressed; @@ -299,24 +321,115 @@ class _AdminReviewsButton extends StatelessWidget { return Padding( padding: const EdgeInsets.only(top: 8, right: 12), - child: FilledButton.icon( + child: IconButton.filled( onPressed: onPressed, - icon: const Icon(Icons.table_rows_outlined, size: 18), - label: const Text('Отзывы'), + icon: const Icon(Icons.add_location_alt_outlined), style: FilledButton.styleFrom( backgroundColor: tokens.mapPanel, foregroundColor: colorScheme.onSurface, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(tokens.panelRadius), - ), - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), ), + tooltip: 'Добавить отзыв', ), ); } } -enum _AvatarAction { logout } +class _MapSearchButton extends StatelessWidget { + const _MapSearchButton({ + required this.query, + required this.onSearch, + required this.onClear, + }); + + final String query; + final Future Function(String) onSearch; + final Future Function()? onClear; + + @override + Widget build(BuildContext context) { + final tokens = context.mapflowTokens; + final label = query.isEmpty ? 'Поиск' : query; + + return Padding( + padding: const EdgeInsets.only(top: 8, left: 70, right: 70), + child: Material( + color: tokens.mapPanel, + borderRadius: BorderRadius.circular(tokens.panelRadius), + child: InkWell( + onTap: () => _openSearch(context), + borderRadius: BorderRadius.circular(tokens.panelRadius), + child: SizedBox( + height: 44, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(width: 12), + const Icon(Icons.auto_awesome_outlined, size: 18), + const SizedBox(width: 8), + Flexible( + child: Text( + label, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontWeight: FontWeight.w800), + ), + ), + if (onClear != null) ...[ + const SizedBox(width: 2), + IconButton( + onPressed: () => onClear!(), + icon: const Icon(Icons.close, size: 18), + tooltip: 'Сбросить', + ), + ] else + const SizedBox(width: 12), + ], + ), + ), + ), + ), + ); + } + + Future _openSearch(BuildContext context) async { + final controller = TextEditingController(text: query); + final result = await showDialog( + context: context, + builder: (context) { + return AlertDialog( + contentPadding: const EdgeInsets.fromLTRB(18, 18, 18, 8), + content: TextField( + controller: controller, + autofocus: true, + textInputAction: TextInputAction.search, + decoration: const InputDecoration( + prefixIcon: Icon(Icons.auto_awesome_outlined), + hintText: 'Что ищем?', + ), + onSubmitted: (value) => Navigator.of(context).pop(value), + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Отмена'), + ), + FilledButton( + onPressed: () => Navigator.of(context).pop(controller.text), + child: const Text('Найти'), + ), + ], + ); + }, + ); + controller.dispose(); + if (result == null) { + return; + } + await onSearch(result); + } +} + +enum _AvatarAction { adminReviews, logout } class _AvatarImage extends StatelessWidget { const _AvatarImage({required this.url, required this.fallback}); @@ -624,10 +737,15 @@ class _PlaceMarker extends StatelessWidget { } class _PlaceCarousel extends StatelessWidget { - const _PlaceCarousel({required this.places, required this.onSelect}); + const _PlaceCarousel({ + required this.places, + required this.onSelect, + required this.onFavoriteToggle, + }); final List places; final ValueChanged onSelect; + final ValueChanged onFavoriteToggle; @override Widget build(BuildContext context) { @@ -644,7 +762,11 @@ class _PlaceCarousel extends StatelessWidget { separatorBuilder: (_, _) => const SizedBox(width: 10), itemBuilder: (context, index) { final place = places[index]; - return PlacePhotoCard(place: place, onTap: () => onSelect(place)); + return PlacePhotoCard( + place: place, + onTap: () => onSelect(place), + onFavoriteToggle: () => onFavoriteToggle(place), + ); }, ), ); @@ -668,6 +790,14 @@ class AddExperienceFlow extends StatefulWidget { class _AddExperienceFlowState extends State { static const _minimumInformationUnits = 16.0; static const _nearbyPlaceRadiusMeters = 50; + static const _voicePromptHints = [ + 'атмосфера', + 'еда', + 'сервис', + 'люди', + 'шум', + 'цены', + ]; final _waveController = WaveformRecorderController( interval: const Duration(milliseconds: 45), @@ -691,6 +821,7 @@ class _AddExperienceFlowState extends State { var _voicePeakDb = -34.0; var _liveLevel = 0.0; DateTime? _lastInformationAt; + PlaceRecommendation? _selectedPlaceForSubmit; @override void initState() { @@ -810,6 +941,7 @@ class _AddExperienceFlowState extends State { 0 => _IntroStep(onNext: () => setState(() => _step = 1)), 1 => _VoiceStep( placeName: '', + promptHints: _voicePromptHints, hasTelegramAuth: widget.hasTelegramAuth, informationProgress: informationProgress, isRecording: _recording, @@ -833,27 +965,21 @@ class _AddExperienceFlowState extends State { radiusMeters: _nearbyPlaceRadiusMeters, isSubmitting: _submitting, onSelect: (place) async { - setState(() => _submitting = true); controller.setReviewPlace(place.name); - final file = _waveController.file; - if (file == null) { - throw StateError('Voice recording file is required.'); - } - final bytes = await file.readAsBytes(); - await controller.publishReview( - place: place, - audioObjectKey: - 'web-recording-${DateTime.now().microsecondsSinceEpoch}-${file.name}', - audioContentBase64: base64Encode(bytes), - audioMimeType: file.mimeType ?? 'audio/wav', - ); - if (!context.mounted) { - return; - } - context.pop(); + setState(() { + _selectedPlaceForSubmit = place; + _step = 3; + }); }, ), }; + final contentWithFavoriteStep = _step == 3 + ? _FavoriteStep( + place: _selectedPlaceForSubmit, + isSubmitting: _submitting, + onSubmit: _submitSelectedPlace, + ) + : content; return Scaffold( backgroundColor: tokens.darkSurface, @@ -869,7 +995,7 @@ class _AddExperienceFlowState extends State { children: [ _StoryProgress( step: _step, - total: 3, + total: 4, dark: true, onClose: () => context.pop(), ), @@ -877,7 +1003,10 @@ class _AddExperienceFlowState extends State { Expanded( child: AnimatedSwitcher( duration: const Duration(milliseconds: 220), - child: KeyedSubtree(key: ValueKey(_step), child: content), + child: KeyedSubtree( + key: ValueKey(_step), + child: contentWithFavoriteStep, + ), ), ), ], @@ -886,6 +1015,47 @@ class _AddExperienceFlowState extends State { ), ); } + + Future _submitSelectedPlace(bool addToFavorites) async { + final place = _selectedPlaceForSubmit; + if (place == null) { + throw StateError('Place is required to publish a review.'); + } + setState(() => _submitting = true); + final controller = context.read(); + final file = _waveController.file; + if (file == null) { + throw StateError('Voice recording file is required.'); + } + final bytes = await file.readAsBytes(); + await controller.publishReview( + place: place, + audioObjectKey: + 'web-recording-${DateTime.now().microsecondsSinceEpoch}-${file.name}', + audioContentBase64: base64Encode(bytes), + audioMimeType: file.mimeType ?? 'audio/wav', + addToFavorites: addToFavorites, + promptHintsShown: _voicePromptHints, + recordingPayload: { + 'source': 'web', + 'nearbyPlaceRadiusMeters': _nearbyPlaceRadiusMeters, + 'informationUnits': _informationUnits, + 'minimumInformationUnits': _minimumInformationUnits, + 'selectedPlace': { + 'googlePlaceId': place.googlePlaceId, + 'name': place.name, + 'googlePrimaryType': place.googlePrimaryType, + 'googleTypes': place.googleTypes, + 'latitude': place.coordinate.latitude, + 'longitude': place.coordinate.longitude, + }, + }, + ); + if (!mounted) { + return; + } + context.pop(); + } } class _IntroStep extends StatelessWidget { @@ -1020,6 +1190,71 @@ class _PlaceStep extends StatelessWidget { } } +class _FavoriteStep extends StatelessWidget { + const _FavoriteStep({ + required this.place, + required this.isSubmitting, + required this.onSubmit, + }); + + final PlaceRecommendation? place; + final bool isSubmitting; + final Future Function(bool) onSubmit; + + @override + Widget build(BuildContext context) { + final tokens = context.mapflowTokens; + final selectedPlace = place; + if (selectedPlace == null) { + return const SizedBox.shrink(); + } + + return _StepLayout( + body: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.favorite_border, color: tokens.onDark, size: 48), + const SizedBox(height: 18), + Text( + selectedPlace.name, + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineSmall?.copyWith( + color: tokens.onDark, + fontWeight: FontWeight.w900, + letterSpacing: 0, + ), + ), + const SizedBox(height: 26), + Row( + children: [ + Expanded( + child: OutlinedButton( + onPressed: isSubmitting ? null : () => onSubmit(false), + child: const Text('Не сейчас'), + ), + ), + const SizedBox(width: 10), + Expanded( + child: FilledButton( + onPressed: isSubmitting ? null : () => onSubmit(true), + child: isSubmitting + ? const SizedBox.square( + dimension: 18, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Text('В избранное'), + ), + ), + ], + ), + ], + ), + ); + } +} + class _NearbyPlaceCard extends StatelessWidget { const _NearbyPlaceCard({ required this.place, @@ -1130,6 +1365,7 @@ class _PlaceTypeChip extends StatelessWidget { class _VoiceStep extends StatelessWidget { const _VoiceStep({ required this.placeName, + required this.promptHints, required this.hasTelegramAuth, required this.informationProgress, required this.isRecording, @@ -1142,6 +1378,7 @@ class _VoiceStep extends StatelessWidget { }); final String placeName; + final List promptHints; final bool hasTelegramAuth; final double informationProgress; final bool isRecording; @@ -1171,6 +1408,26 @@ class _VoiceStep extends StatelessWidget { ), const SizedBox(height: 10), ], + Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Wrap( + alignment: WrapAlignment.center, + spacing: 6, + runSpacing: 6, + children: [ + for (final hint in promptHints) + Chip( + label: Text(hint), + side: BorderSide.none, + backgroundColor: tokens.onDark.withValues(alpha: 0.12), + labelStyle: TextStyle( + color: tokens.onDark.withValues(alpha: 0.92), + fontWeight: FontWeight.w700, + ), + ), + ], + ), + ), Expanded(child: _VoiceProgressGrid(progress: informationProgress)), if (!micAllowed) Padding( diff --git a/lib/features/mapflow/presentation/widgets/place_photo_card.dart b/lib/features/mapflow/presentation/widgets/place_photo_card.dart index c186a58..460e2eb 100644 --- a/lib/features/mapflow/presentation/widgets/place_photo_card.dart +++ b/lib/features/mapflow/presentation/widgets/place_photo_card.dart @@ -4,10 +4,16 @@ import '../../../../app/theme/mapflow_theme.dart'; import '../../domain/place_models.dart'; class PlacePhotoCard extends StatelessWidget { - const PlacePhotoCard({super.key, required this.place, required this.onTap}); + const PlacePhotoCard({ + super.key, + required this.place, + required this.onTap, + required this.onFavoriteToggle, + }); final PlaceRecommendation place; final VoidCallback onTap; + final VoidCallback onFavoriteToggle; @override Widget build(BuildContext context) { @@ -61,6 +67,23 @@ class PlacePhotoCard extends StatelessWidget { ), ), ), + Positioned( + top: 8, + right: 8, + child: IconButton.filledTonal( + onPressed: onFavoriteToggle, + icon: Icon( + place.isFavorite ? Icons.favorite : Icons.favorite_border, + size: 18, + ), + style: IconButton.styleFrom( + fixedSize: const Size.square(36), + minimumSize: const Size.square(36), + padding: EdgeInsets.zero, + ), + tooltip: 'Избранное', + ), + ), Positioned( left: 10, right: 10, diff --git a/widgetbook/lib/main.dart b/widgetbook/lib/main.dart index 9968209..61aa483 100644 --- a/widgetbook/lib/main.dart +++ b/widgetbook/lib/main.dart @@ -28,7 +28,11 @@ class MapflowWidgetbook extends StatelessWidget { builder: (_) => Center( child: SizedBox( height: 172, - child: PlacePhotoCard(place: _samplePlace, onTap: () {}), + child: PlacePhotoCard( + place: _samplePlace, + onTap: () {}, + onFavoriteToggle: () {}, + ), ), ), ), @@ -78,4 +82,10 @@ const _samplePlace = PlaceRecommendation( traits: {PlaceTrait.calm, PlaceTrait.clean}, googlePrimaryType: 'cafe', googleTypes: ['cafe'], + googleBusinessStatus: 'OPERATIONAL', + googleRating: 4.8, + googleUserRatingCount: 128, + googleRegularOpeningHours: null, + googleCurrentOpeningHours: null, + isFavorite: true, );