diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/address_component.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/address_component.freezed.dart new file mode 100644 index 0000000..66869d4 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/address_component.freezed.dart @@ -0,0 +1,248 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'address_component.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +AddressComponent _$AddressComponentFromJson(Map json) { + return _AddressComponent.fromJson(json); +} + +/// @nodoc +mixin _$AddressComponent { + /// Name of the address component, e.g. "Sydney". + String get name => throw _privateConstructorUsedError; + + /// Short name of the address component, e.g. "AU". + String get shortName => throw _privateConstructorUsedError; + + /// Types of the AddressComponent + /// + /// For a list of supported types, see [Address Component Types](https://developers.google.com/maps/documentation/geocoding/overview#Types) + List get types => throw _privateConstructorUsedError; + + /// Serializes this AddressComponent to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of AddressComponent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $AddressComponentCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AddressComponentCopyWith<$Res> { + factory $AddressComponentCopyWith( + AddressComponent value, $Res Function(AddressComponent) then) = + _$AddressComponentCopyWithImpl<$Res, AddressComponent>; + @useResult + $Res call({String name, String shortName, List types}); +} + +/// @nodoc +class _$AddressComponentCopyWithImpl<$Res, $Val extends AddressComponent> + implements $AddressComponentCopyWith<$Res> { + _$AddressComponentCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of AddressComponent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + Object? shortName = null, + Object? types = null, + }) { + return _then(_value.copyWith( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + shortName: null == shortName + ? _value.shortName + : shortName // ignore: cast_nullable_to_non_nullable + as String, + types: null == types + ? _value.types + : types // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$AddressComponentImplCopyWith<$Res> + implements $AddressComponentCopyWith<$Res> { + factory _$$AddressComponentImplCopyWith(_$AddressComponentImpl value, + $Res Function(_$AddressComponentImpl) then) = + __$$AddressComponentImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String name, String shortName, List types}); +} + +/// @nodoc +class __$$AddressComponentImplCopyWithImpl<$Res> + extends _$AddressComponentCopyWithImpl<$Res, _$AddressComponentImpl> + implements _$$AddressComponentImplCopyWith<$Res> { + __$$AddressComponentImplCopyWithImpl(_$AddressComponentImpl _value, + $Res Function(_$AddressComponentImpl) _then) + : super(_value, _then); + + /// Create a copy of AddressComponent + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + Object? shortName = null, + Object? types = null, + }) { + return _then(_$AddressComponentImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + shortName: null == shortName + ? _value.shortName + : shortName // ignore: cast_nullable_to_non_nullable + as String, + types: null == types + ? _value._types + : types // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$AddressComponentImpl + with DiagnosticableTreeMixin + implements _AddressComponent { + const _$AddressComponentImpl( + {required this.name, + required this.shortName, + required final List types}) + : _types = types; + + factory _$AddressComponentImpl.fromJson(Map json) => + _$$AddressComponentImplFromJson(json); + + /// Name of the address component, e.g. "Sydney". + @override + final String name; + + /// Short name of the address component, e.g. "AU". + @override + final String shortName; + + /// Types of the AddressComponent + /// + /// For a list of supported types, see [Address Component Types](https://developers.google.com/maps/documentation/geocoding/overview#Types) + final List _types; + + /// Types of the AddressComponent + /// + /// For a list of supported types, see [Address Component Types](https://developers.google.com/maps/documentation/geocoding/overview#Types) + @override + List get types { + if (_types is EqualUnmodifiableListView) return _types; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_types); + } + + @override + String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { + return 'AddressComponent(name: $name, shortName: $shortName, types: $types)'; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties + ..add(DiagnosticsProperty('type', 'AddressComponent')) + ..add(DiagnosticsProperty('name', name)) + ..add(DiagnosticsProperty('shortName', shortName)) + ..add(DiagnosticsProperty('types', types)); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AddressComponentImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.shortName, shortName) || + other.shortName == shortName) && + const DeepCollectionEquality().equals(other._types, _types)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, name, shortName, + const DeepCollectionEquality().hash(_types)); + + /// Create a copy of AddressComponent + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$AddressComponentImplCopyWith<_$AddressComponentImpl> get copyWith => + __$$AddressComponentImplCopyWithImpl<_$AddressComponentImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$AddressComponentImplToJson( + this, + ); + } +} + +abstract class _AddressComponent implements AddressComponent { + const factory _AddressComponent( + {required final String name, + required final String shortName, + required final List types}) = _$AddressComponentImpl; + + factory _AddressComponent.fromJson(Map json) = + _$AddressComponentImpl.fromJson; + + /// Name of the address component, e.g. "Sydney". + @override + String get name; + + /// Short name of the address component, e.g. "AU". + @override + String get shortName; + + /// Types of the AddressComponent + /// + /// For a list of supported types, see [Address Component Types](https://developers.google.com/maps/documentation/geocoding/overview#Types) + @override + List get types; + + /// Create a copy of AddressComponent + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$AddressComponentImplCopyWith<_$AddressComponentImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/address_component.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/address_component.g.dart new file mode 100644 index 0000000..634d61d --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/address_component.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'address_component.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$AddressComponentImpl _$$AddressComponentImplFromJson(Map json) => + _$AddressComponentImpl( + name: json['name'] as String, + shortName: json['shortName'] as String, + types: (json['types'] as List).map((e) => e as String).toList(), + ); + +Map _$$AddressComponentImplToJson( + _$AddressComponentImpl instance) => + { + 'name': instance.name, + 'shortName': instance.shortName, + 'types': instance.types, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.freezed.dart new file mode 100644 index 0000000..fd0b548 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.freezed.dart @@ -0,0 +1,217 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'author_attribution.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +AuthorAttribution _$AuthorAttributionFromJson(Map json) { + return _AuthorAttribution.fromJson(json); +} + +/// @nodoc +mixin _$AuthorAttribution { + /// The name of the author. + String get name => throw _privateConstructorUsedError; + + /// The profile photo URI of the author. + String get photoUri => throw _privateConstructorUsedError; + + /// The URI of the author. + String get uri => throw _privateConstructorUsedError; + + /// Serializes this AuthorAttribution to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of AuthorAttribution + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $AuthorAttributionCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AuthorAttributionCopyWith<$Res> { + factory $AuthorAttributionCopyWith( + AuthorAttribution value, $Res Function(AuthorAttribution) then) = + _$AuthorAttributionCopyWithImpl<$Res, AuthorAttribution>; + @useResult + $Res call({String name, String photoUri, String uri}); +} + +/// @nodoc +class _$AuthorAttributionCopyWithImpl<$Res, $Val extends AuthorAttribution> + implements $AuthorAttributionCopyWith<$Res> { + _$AuthorAttributionCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of AuthorAttribution + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + Object? photoUri = null, + Object? uri = null, + }) { + return _then(_value.copyWith( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + photoUri: null == photoUri + ? _value.photoUri + : photoUri // ignore: cast_nullable_to_non_nullable + as String, + uri: null == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$AuthorAttributionImplCopyWith<$Res> + implements $AuthorAttributionCopyWith<$Res> { + factory _$$AuthorAttributionImplCopyWith(_$AuthorAttributionImpl value, + $Res Function(_$AuthorAttributionImpl) then) = + __$$AuthorAttributionImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String name, String photoUri, String uri}); +} + +/// @nodoc +class __$$AuthorAttributionImplCopyWithImpl<$Res> + extends _$AuthorAttributionCopyWithImpl<$Res, _$AuthorAttributionImpl> + implements _$$AuthorAttributionImplCopyWith<$Res> { + __$$AuthorAttributionImplCopyWithImpl(_$AuthorAttributionImpl _value, + $Res Function(_$AuthorAttributionImpl) _then) + : super(_value, _then); + + /// Create a copy of AuthorAttribution + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + Object? photoUri = null, + Object? uri = null, + }) { + return _then(_$AuthorAttributionImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + photoUri: null == photoUri + ? _value.photoUri + : photoUri // ignore: cast_nullable_to_non_nullable + as String, + uri: null == uri + ? _value.uri + : uri // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$AuthorAttributionImpl implements _AuthorAttribution { + const _$AuthorAttributionImpl( + {required this.name, required this.photoUri, required this.uri}); + + factory _$AuthorAttributionImpl.fromJson(Map json) => + _$$AuthorAttributionImplFromJson(json); + + /// The name of the author. + @override + final String name; + + /// The profile photo URI of the author. + @override + final String photoUri; + + /// The URI of the author. + @override + final String uri; + + @override + String toString() { + return 'AuthorAttribution(name: $name, photoUri: $photoUri, uri: $uri)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AuthorAttributionImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.photoUri, photoUri) || + other.photoUri == photoUri) && + (identical(other.uri, uri) || other.uri == uri)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, name, photoUri, uri); + + /// Create a copy of AuthorAttribution + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$AuthorAttributionImplCopyWith<_$AuthorAttributionImpl> get copyWith => + __$$AuthorAttributionImplCopyWithImpl<_$AuthorAttributionImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$AuthorAttributionImplToJson( + this, + ); + } +} + +abstract class _AuthorAttribution implements AuthorAttribution { + const factory _AuthorAttribution( + {required final String name, + required final String photoUri, + required final String uri}) = _$AuthorAttributionImpl; + + factory _AuthorAttribution.fromJson(Map json) = + _$AuthorAttributionImpl.fromJson; + + /// The name of the author. + @override + String get name; + + /// The profile photo URI of the author. + @override + String get photoUri; + + /// The URI of the author. + @override + String get uri; + + /// Create a copy of AuthorAttribution + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$AuthorAttributionImplCopyWith<_$AuthorAttributionImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.g.dart new file mode 100644 index 0000000..d2d66bf --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/author_attribution.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'author_attribution.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$AuthorAttributionImpl _$$AuthorAttributionImplFromJson(Map json) => + _$AuthorAttributionImpl( + name: json['name'] as String, + photoUri: json['photoUri'] as String, + uri: json['uri'] as String, + ); + +Map _$$AuthorAttributionImplToJson( + _$AuthorAttributionImpl instance) => + { + 'name': instance.name, + 'photoUri': instance.photoUri, + 'uri': instance.uri, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/autocomplete_predictions.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/autocomplete_predictions.freezed.dart new file mode 100644 index 0000000..dc38e2e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/autocomplete_predictions.freezed.dart @@ -0,0 +1,329 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'autocomplete_predictions.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +AutocompletePrediction _$AutocompletePredictionFromJson( + Map json) { + return _AutocompletePrediction.fromJson(json); +} + +/// @nodoc +mixin _$AutocompletePrediction { + /// the straight-line distance between the place being referred to by getPlaceId() and the origin specified in the request. + int? get distanceMeters => throw _privateConstructorUsedError; + + /// the place ID of the place being referred to by this prediction. + String get placeId => throw _privateConstructorUsedError; + + /// the list of place types associated with the place referred to by getPlaceId() + List? get placeTypes => throw _privateConstructorUsedError; + + /// the primary text of a place. + String get primaryText => throw _privateConstructorUsedError; + + /// the secondary text of a place. + String get secondaryText => throw _privateConstructorUsedError; + + /// The full text of a place. + String get fullText => throw _privateConstructorUsedError; + + /// Serializes this AutocompletePrediction to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of AutocompletePrediction + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $AutocompletePredictionCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AutocompletePredictionCopyWith<$Res> { + factory $AutocompletePredictionCopyWith(AutocompletePrediction value, + $Res Function(AutocompletePrediction) then) = + _$AutocompletePredictionCopyWithImpl<$Res, AutocompletePrediction>; + @useResult + $Res call( + {int? distanceMeters, + String placeId, + List? placeTypes, + String primaryText, + String secondaryText, + String fullText}); +} + +/// @nodoc +class _$AutocompletePredictionCopyWithImpl<$Res, + $Val extends AutocompletePrediction> + implements $AutocompletePredictionCopyWith<$Res> { + _$AutocompletePredictionCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of AutocompletePrediction + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? distanceMeters = freezed, + Object? placeId = null, + Object? placeTypes = freezed, + Object? primaryText = null, + Object? secondaryText = null, + Object? fullText = null, + }) { + return _then(_value.copyWith( + distanceMeters: freezed == distanceMeters + ? _value.distanceMeters + : distanceMeters // ignore: cast_nullable_to_non_nullable + as int?, + placeId: null == placeId + ? _value.placeId + : placeId // ignore: cast_nullable_to_non_nullable + as String, + placeTypes: freezed == placeTypes + ? _value.placeTypes + : placeTypes // ignore: cast_nullable_to_non_nullable + as List?, + primaryText: null == primaryText + ? _value.primaryText + : primaryText // ignore: cast_nullable_to_non_nullable + as String, + secondaryText: null == secondaryText + ? _value.secondaryText + : secondaryText // ignore: cast_nullable_to_non_nullable + as String, + fullText: null == fullText + ? _value.fullText + : fullText // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$AutocompletePredictionImplCopyWith<$Res> + implements $AutocompletePredictionCopyWith<$Res> { + factory _$$AutocompletePredictionImplCopyWith( + _$AutocompletePredictionImpl value, + $Res Function(_$AutocompletePredictionImpl) then) = + __$$AutocompletePredictionImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {int? distanceMeters, + String placeId, + List? placeTypes, + String primaryText, + String secondaryText, + String fullText}); +} + +/// @nodoc +class __$$AutocompletePredictionImplCopyWithImpl<$Res> + extends _$AutocompletePredictionCopyWithImpl<$Res, + _$AutocompletePredictionImpl> + implements _$$AutocompletePredictionImplCopyWith<$Res> { + __$$AutocompletePredictionImplCopyWithImpl( + _$AutocompletePredictionImpl _value, + $Res Function(_$AutocompletePredictionImpl) _then) + : super(_value, _then); + + /// Create a copy of AutocompletePrediction + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? distanceMeters = freezed, + Object? placeId = null, + Object? placeTypes = freezed, + Object? primaryText = null, + Object? secondaryText = null, + Object? fullText = null, + }) { + return _then(_$AutocompletePredictionImpl( + distanceMeters: freezed == distanceMeters + ? _value.distanceMeters + : distanceMeters // ignore: cast_nullable_to_non_nullable + as int?, + placeId: null == placeId + ? _value.placeId + : placeId // ignore: cast_nullable_to_non_nullable + as String, + placeTypes: freezed == placeTypes + ? _value._placeTypes + : placeTypes // ignore: cast_nullable_to_non_nullable + as List?, + primaryText: null == primaryText + ? _value.primaryText + : primaryText // ignore: cast_nullable_to_non_nullable + as String, + secondaryText: null == secondaryText + ? _value.secondaryText + : secondaryText // ignore: cast_nullable_to_non_nullable + as String, + fullText: null == fullText + ? _value.fullText + : fullText // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$AutocompletePredictionImpl implements _AutocompletePrediction { + const _$AutocompletePredictionImpl( + {required this.distanceMeters, + required this.placeId, + final List? placeTypes, + required this.primaryText, + required this.secondaryText, + required this.fullText}) + : _placeTypes = placeTypes; + + factory _$AutocompletePredictionImpl.fromJson(Map json) => + _$$AutocompletePredictionImplFromJson(json); + + /// the straight-line distance between the place being referred to by getPlaceId() and the origin specified in the request. + @override + final int? distanceMeters; + + /// the place ID of the place being referred to by this prediction. + @override + final String placeId; + + /// the list of place types associated with the place referred to by getPlaceId() + final List? _placeTypes; + + /// the list of place types associated with the place referred to by getPlaceId() + @override + List? get placeTypes { + final value = _placeTypes; + if (value == null) return null; + if (_placeTypes is EqualUnmodifiableListView) return _placeTypes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + /// the primary text of a place. + @override + final String primaryText; + + /// the secondary text of a place. + @override + final String secondaryText; + + /// The full text of a place. + @override + final String fullText; + + @override + String toString() { + return 'AutocompletePrediction(distanceMeters: $distanceMeters, placeId: $placeId, placeTypes: $placeTypes, primaryText: $primaryText, secondaryText: $secondaryText, fullText: $fullText)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AutocompletePredictionImpl && + (identical(other.distanceMeters, distanceMeters) || + other.distanceMeters == distanceMeters) && + (identical(other.placeId, placeId) || other.placeId == placeId) && + const DeepCollectionEquality() + .equals(other._placeTypes, _placeTypes) && + (identical(other.primaryText, primaryText) || + other.primaryText == primaryText) && + (identical(other.secondaryText, secondaryText) || + other.secondaryText == secondaryText) && + (identical(other.fullText, fullText) || + other.fullText == fullText)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + distanceMeters, + placeId, + const DeepCollectionEquality().hash(_placeTypes), + primaryText, + secondaryText, + fullText); + + /// Create a copy of AutocompletePrediction + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$AutocompletePredictionImplCopyWith<_$AutocompletePredictionImpl> + get copyWith => __$$AutocompletePredictionImplCopyWithImpl< + _$AutocompletePredictionImpl>(this, _$identity); + + @override + Map toJson() { + return _$$AutocompletePredictionImplToJson( + this, + ); + } +} + +abstract class _AutocompletePrediction implements AutocompletePrediction { + const factory _AutocompletePrediction( + {required final int? distanceMeters, + required final String placeId, + final List? placeTypes, + required final String primaryText, + required final String secondaryText, + required final String fullText}) = _$AutocompletePredictionImpl; + + factory _AutocompletePrediction.fromJson(Map json) = + _$AutocompletePredictionImpl.fromJson; + + /// the straight-line distance between the place being referred to by getPlaceId() and the origin specified in the request. + @override + int? get distanceMeters; + + /// the place ID of the place being referred to by this prediction. + @override + String get placeId; + + /// the list of place types associated with the place referred to by getPlaceId() + @override + List? get placeTypes; + + /// the primary text of a place. + @override + String get primaryText; + + /// the secondary text of a place. + @override + String get secondaryText; + + /// The full text of a place. + @override + String get fullText; + + /// Create a copy of AutocompletePrediction + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$AutocompletePredictionImplCopyWith<_$AutocompletePredictionImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/autocomplete_predictions.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/autocomplete_predictions.g.dart new file mode 100644 index 0000000..c578445 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/autocomplete_predictions.g.dart @@ -0,0 +1,274 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'autocomplete_predictions.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$AutocompletePredictionImpl _$$AutocompletePredictionImplFromJson(Map json) => + _$AutocompletePredictionImpl( + distanceMeters: (json['distanceMeters'] as num?)?.toInt(), + placeId: json['placeId'] as String, + placeTypes: (json['placeTypes'] as List?) + ?.map((e) => PlaceType.fromJson(e as String)) + .toList(), + primaryText: json['primaryText'] as String, + secondaryText: json['secondaryText'] as String, + fullText: json['fullText'] as String, + ); + +Map _$$AutocompletePredictionImplToJson( + _$AutocompletePredictionImpl instance) => + { + 'distanceMeters': instance.distanceMeters, + 'placeId': instance.placeId, + 'placeTypes': + instance.placeTypes?.map((e) => _$PlaceTypeEnumMap[e]!).toList(), + 'primaryText': instance.primaryText, + 'secondaryText': instance.secondaryText, + 'fullText': instance.fullText, + }; + +const _$PlaceTypeEnumMap = { + PlaceType.OTHER: 'OTHER', + PlaceType.ACCOUNTING: 'ACCOUNTING', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_1: 'ADMINISTRATIVE_AREA_LEVEL_1', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_2: 'ADMINISTRATIVE_AREA_LEVEL_2', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_3: 'ADMINISTRATIVE_AREA_LEVEL_3', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_4: 'ADMINISTRATIVE_AREA_LEVEL_4', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_5: 'ADMINISTRATIVE_AREA_LEVEL_5', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_6: 'ADMINISTRATIVE_AREA_LEVEL_6', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_7: 'ADMINISTRATIVE_AREA_LEVEL_7', + PlaceType.AIRPORT: 'AIRPORT', + PlaceType.AMUSEMENT_PARK: 'AMUSEMENT_PARK', + PlaceType.AQUARIUM: 'AQUARIUM', + PlaceType.ARCHIPELAGO: 'ARCHIPELAGO', + PlaceType.ART_GALLERY: 'ART_GALLERY', + PlaceType.ATM: 'ATM', + PlaceType.BAKERY: 'BAKERY', + PlaceType.BANK: 'BANK', + PlaceType.BAR: 'BAR', + PlaceType.BEAUTY_SALON: 'BEAUTY_SALON', + PlaceType.BICYCLE_STORE: 'BICYCLE_STORE', + PlaceType.BOOK_STORE: 'BOOK_STORE', + PlaceType.BOWLING_ALLEY: 'BOWLING_ALLEY', + PlaceType.BUS_STATION: 'BUS_STATION', + PlaceType.CAFE: 'CAFE', + PlaceType.CAMPGROUND: 'CAMPGROUND', + PlaceType.CAR_DEALER: 'CAR_DEALER', + PlaceType.CAR_RENTAL: 'CAR_RENTAL', + PlaceType.CAR_REPAIR: 'CAR_REPAIR', + PlaceType.CAR_WASH: 'CAR_WASH', + PlaceType.CASINO: 'CASINO', + PlaceType.CEMETERY: 'CEMETERY', + PlaceType.CHURCH: 'CHURCH', + PlaceType.CITY_HALL: 'CITY_HALL', + PlaceType.CLOTHING_STORE: 'CLOTHING_STORE', + PlaceType.COLLOQUIAL_AREA: 'COLLOQUIAL_AREA', + PlaceType.CONTINENT: 'CONTINENT', + PlaceType.CONVENIENCE_STORE: 'CONVENIENCE_STORE', + PlaceType.COUNTRY: 'COUNTRY', + PlaceType.COURTHOUSE: 'COURTHOUSE', + PlaceType.DENTIST: 'DENTIST', + PlaceType.DEPARTMENT_STORE: 'DEPARTMENT_STORE', + PlaceType.DOCTOR: 'DOCTOR', + PlaceType.DRUGSTORE: 'DRUGSTORE', + PlaceType.ELECTRICIAN: 'ELECTRICIAN', + PlaceType.ELECTRONICS_STORE: 'ELECTRONICS_STORE', + PlaceType.EMBASSY: 'EMBASSY', + PlaceType.ESTABLISHMENT: 'ESTABLISHMENT', + PlaceType.FINANCE: 'FINANCE', + PlaceType.FIRE_STATION: 'FIRE_STATION', + PlaceType.FLOOR: 'FLOOR', + PlaceType.FLORIST: 'FLORIST', + PlaceType.FOOD: 'FOOD', + PlaceType.FUNERAL_HOME: 'FUNERAL_HOME', + PlaceType.FURNITURE_STORE: 'FURNITURE_STORE', + PlaceType.GAS_STATION: 'GAS_STATION', + PlaceType.GENERAL_CONTRACTOR: 'GENERAL_CONTRACTOR', + PlaceType.GEOCODE: 'GEOCODE', + PlaceType.GROCERY_OR_SUPERMARKET: 'GROCERY_OR_SUPERMARKET', + PlaceType.GYM: 'GYM', + PlaceType.HAIR_CARE: 'HAIR_CARE', + PlaceType.HARDWARE_STORE: 'HARDWARE_STORE', + PlaceType.HEALTH: 'HEALTH', + PlaceType.HINDU_TEMPLE: 'HINDU_TEMPLE', + PlaceType.HOME_GOODS_STORE: 'HOME_GOODS_STORE', + PlaceType.HOSPITAL: 'HOSPITAL', + PlaceType.INSURANCE_AGENCY: 'INSURANCE_AGENCY', + PlaceType.INTERSECTION: 'INTERSECTION', + PlaceType.JEWELRY_STORE: 'JEWELRY_STORE', + PlaceType.LAUNDRY: 'LAUNDRY', + PlaceType.LANDMARK: 'LANDMARK', + PlaceType.LAWYER: 'LAWYER', + PlaceType.LIBRARY: 'LIBRARY', + PlaceType.LIGHT_RAIL_STATION: 'LIGHT_RAIL_STATION', + PlaceType.LIQUOR_STORE: 'LIQUOR_STORE', + PlaceType.LOCAL_GOVERNMENT_OFFICE: 'LOCAL_GOVERNMENT_OFFICE', + PlaceType.LOCALITY: 'LOCALITY', + PlaceType.LOCKSMITH: 'LOCKSMITH', + PlaceType.LODGING: 'LODGING', + PlaceType.MEAL_DELIVERY: 'MEAL_DELIVERY', + PlaceType.MEAL_TAKEAWAY: 'MEAL_TAKEAWAY', + PlaceType.MOSQUE: 'MOSQUE', + PlaceType.MOVIE_RENTAL: 'MOVIE_RENTAL', + PlaceType.MOVIE_THEATER: 'MOVIE_THEATER', + PlaceType.MOVING_COMPANY: 'MOVING_COMPANY', + PlaceType.MUSEUM: 'MUSEUM', + PlaceType.NATURAL_FEATURE: 'NATURAL_FEATURE', + PlaceType.NEIGHBORHOOD: 'NEIGHBORHOOD', + PlaceType.NIGHT_CLUB: 'NIGHT_CLUB', + PlaceType.PAINTER: 'PAINTER', + PlaceType.PARK: 'PARK', + PlaceType.PARKING: 'PARKING', + PlaceType.PET_STORE: 'PET_STORE', + PlaceType.PHARMACY: 'PHARMACY', + PlaceType.PHYSIOTHERAPIST: 'PHYSIOTHERAPIST', + PlaceType.PLACE_OF_WORSHIP: 'PLACE_OF_WORSHIP', + PlaceType.PLUMBER: 'PLUMBER', + PlaceType.PLUS_CODE: 'PLUS_CODE', + PlaceType.POINT_OF_INTEREST: 'POINT_OF_INTEREST', + PlaceType.POLICE: 'POLICE', + PlaceType.POLITICAL: 'POLITICAL', + PlaceType.POST_BOX: 'POST_BOX', + PlaceType.POST_OFFICE: 'POST_OFFICE', + PlaceType.POSTAL_CODE_PREFIX: 'POSTAL_CODE_PREFIX', + PlaceType.POSTAL_CODE_SUFFIX: 'POSTAL_CODE_SUFFIX', + PlaceType.POSTAL_CODE: 'POSTAL_CODE', + PlaceType.POSTAL_TOWN: 'POSTAL_TOWN', + PlaceType.PREMISE: 'PREMISE', + PlaceType.PRIMARY_SCHOOL: 'PRIMARY_SCHOOL', + PlaceType.REAL_ESTATE_AGENCY: 'REAL_ESTATE_AGENCY', + PlaceType.RESTAURANT: 'RESTAURANT', + PlaceType.ROOFING_CONTRACTOR: 'ROOFING_CONTRACTOR', + PlaceType.ROOM: 'ROOM', + PlaceType.ROUTE: 'ROUTE', + PlaceType.RV_PARK: 'RV_PARK', + PlaceType.SCHOOL: 'SCHOOL', + PlaceType.SECONDARY_SCHOOL: 'SECONDARY_SCHOOL', + PlaceType.SHOE_STORE: 'SHOE_STORE', + PlaceType.SHOPPING_MALL: 'SHOPPING_MALL', + PlaceType.SPA: 'SPA', + PlaceType.STADIUM: 'STADIUM', + PlaceType.STORAGE: 'STORAGE', + PlaceType.STORE: 'STORE', + PlaceType.STREET_ADDRESS: 'STREET_ADDRESS', + PlaceType.STREET_NUMBER: 'STREET_NUMBER', + PlaceType.SUBLOCALITY_LEVEL_1: 'SUBLOCALITY_LEVEL_1', + PlaceType.SUBLOCALITY_LEVEL_2: 'SUBLOCALITY_LEVEL_2', + PlaceType.SUBLOCALITY_LEVEL_3: 'SUBLOCALITY_LEVEL_3', + PlaceType.SUBLOCALITY_LEVEL_4: 'SUBLOCALITY_LEVEL_4', + PlaceType.SUBLOCALITY_LEVEL_5: 'SUBLOCALITY_LEVEL_5', + PlaceType.SUBLOCALITY: 'SUBLOCALITY', + PlaceType.SUBPREMISE: 'SUBPREMISE', + PlaceType.SUBWAY_STATION: 'SUBWAY_STATION', + PlaceType.SUPERMARKET: 'SUPERMARKET', + PlaceType.SYNAGOGUE: 'SYNAGOGUE', + PlaceType.TAXI_STAND: 'TAXI_STAND', + PlaceType.TOURIST_ATTRACTION: 'TOURIST_ATTRACTION', + PlaceType.TOWN_SQUARE: 'TOWN_SQUARE', + PlaceType.TRAIN_STATION: 'TRAIN_STATION', + PlaceType.TRANSIT_STATION: 'TRANSIT_STATION', + PlaceType.TRAVEL_AGENCY: 'TRAVEL_AGENCY', + PlaceType.UNIVERSITY: 'UNIVERSITY', + PlaceType.VETERINARY_CARE: 'VETERINARY_CARE', + PlaceType.ZOO: 'ZOO', + PlaceType.AMERICAN_RESTAURANT: 'AMERICAN_RESTAURANT', + PlaceType.DISCOUNT_STORE: 'DISCOUNT_STORE', + PlaceType.ICE_CREAM_SHOP: 'ICE_CREAM_SHOP', + PlaceType.SANDWICH_SHOP: 'SANDWICH_SHOP', + PlaceType.AMUSEMENT_CENTER: 'AMUSEMENT_CENTER', + PlaceType.DOG_PARK: 'DOG_PARK', + PlaceType.INDIAN_RESTAURANT: 'INDIAN_RESTAURANT', + PlaceType.SCHOOL_DISTRICT: 'SCHOOL_DISTRICT', + PlaceType.ATHLETIC_FIELD: 'ATHLETIC_FIELD', + PlaceType.ELECTRIC_VEHICLE_CHARGING_STATION: + 'ELECTRIC_VEHICLE_CHARGING_STATION', + PlaceType.INDONESIAN_RESTAURANT: 'INDONESIAN_RESTAURANT', + PlaceType.SEAFOOD_RESTAURANT: 'SEAFOOD_RESTAURANT', + PlaceType.AUTO_PARTS_STORE: 'AUTO_PARTS_STORE', + PlaceType.EVENT_VENUE: 'EVENT_VENUE', + PlaceType.ITALIAN_RESTAURANT: 'ITALIAN_RESTAURANT', + PlaceType.SKI_RESORT: 'SKI_RESORT', + PlaceType.BANQUET_HALL: 'BANQUET_HALL', + PlaceType.EXTENDED_STAY_HOTEL: 'EXTENDED_STAY_HOTEL', + PlaceType.JAPANESE_RESTAURANT: 'JAPANESE_RESTAURANT', + PlaceType.SPANISH_RESTAURANT: 'SPANISH_RESTAURANT', + PlaceType.BARBECUE_RESTAURANT: 'BARBECUE_RESTAURANT', + PlaceType.FARM: 'FARM', + PlaceType.KOREAN_RESTAURANT: 'KOREAN_RESTAURANT', + PlaceType.SPORTING_GOODS_STORE: 'SPORTING_GOODS_STORE', + PlaceType.BARBER_SHOP: 'BARBER_SHOP', + PlaceType.FARMSTAY: 'FARMSTAY', + PlaceType.LEBANESE_RESTAURANT: 'LEBANESE_RESTAURANT', + PlaceType.SPORTS_CLUB: 'SPORTS_CLUB', + PlaceType.BED_AND_BREAKFAST: 'BED_AND_BREAKFAST', + PlaceType.FAST_FOOD_RESTAURANT: 'FAST_FOOD_RESTAURANT', + PlaceType.MARINA: 'MARINA', + PlaceType.SPORTS_COMPLEX: 'SPORTS_COMPLEX', + PlaceType.BRAZILIAN_RESTAURANT: 'BRAZILIAN_RESTAURANT', + PlaceType.FERRY_TERMINAL: 'FERRY_TERMINAL', + PlaceType.MARKET: 'MARKET', + PlaceType.STEAK_HOUSE: 'STEAK_HOUSE', + PlaceType.BREAKFAST_RESTAURANT: 'BREAKFAST_RESTAURANT', + PlaceType.FITNESS_CENTER: 'FITNESS_CENTER', + PlaceType.MEDICAL_LAB: 'MEDICAL_LAB', + PlaceType.SUSHI_RESTAURANT: 'SUSHI_RESTAURANT', + PlaceType.BRUNCH_RESTAURANT: 'BRUNCH_RESTAURANT', + PlaceType.FRENCH_RESTAURANT: 'FRENCH_RESTAURANT', + PlaceType.MEDITERRANEAN_RESTAURANT: 'MEDITERRANEAN_RESTAURANT', + PlaceType.SWIMMING_POOL: 'SWIMMING_POOL', + PlaceType.BUS_STOP: 'BUS_STOP', + PlaceType.GIFT_SHOP: 'GIFT_SHOP', + PlaceType.MEXICAN_RESTAURANT: 'MEXICAN_RESTAURANT', + PlaceType.TAILOR: 'TAILOR', + PlaceType.CAMPING_CABIN: 'CAMPING_CABIN', + PlaceType.GOLF_COURSE: 'GOLF_COURSE', + PlaceType.MIDDLE_EASTERN_RESTAURANT: 'MIDDLE_EASTERN_RESTAURANT', + PlaceType.TELECOMMUNICATIONS_SERVICE_PROVIDER: + 'TELECOMMUNICATIONS_SERVICE_PROVIDER', + PlaceType.CELL_PHONE_STORE: 'CELL_PHONE_STORE', + PlaceType.GREEK_RESTAURANT: 'GREEK_RESTAURANT', + PlaceType.MOTEL: 'MOTEL', + PlaceType.THAI_RESTAURANT: 'THAI_RESTAURANT', + PlaceType.CHILD_CARE_AGENCY: 'CHILD_CARE_AGENCY', + PlaceType.GROCERY_STORE: 'GROCERY_STORE', + PlaceType.NATIONAL_PARK: 'NATIONAL_PARK', + PlaceType.TRANSIT_DEPOT: 'TRANSIT_DEPOT', + PlaceType.CHINESE_RESTAURANT: 'CHINESE_RESTAURANT', + PlaceType.GUEST_HOUSE: 'GUEST_HOUSE', + PlaceType.PARK_AND_RIDE: 'PARK_AND_RIDE', + PlaceType.TRUCK_STOP: 'TRUCK_STOP', + PlaceType.COFFEE_SHOP: 'COFFEE_SHOP', + PlaceType.HAIR_SALON: 'HAIR_SALON', + PlaceType.PERFORMING_ARTS_THEATER: 'PERFORMING_ARTS_THEATER', + PlaceType.TURKISH_RESTAURANT: 'TURKISH_RESTAURANT', + PlaceType.COMMUNITY_CENTER: 'COMMUNITY_CENTER', + PlaceType.HAMBURGER_RESTAURANT: 'HAMBURGER_RESTAURANT', + PlaceType.PIZZA_RESTAURANT: 'PIZZA_RESTAURANT', + PlaceType.VEGAN_RESTAURANT: 'VEGAN_RESTAURANT', + PlaceType.CONSULTANT: 'CONSULTANT', + PlaceType.HELIPORT: 'HELIPORT', + PlaceType.PLAYGROUND: 'PLAYGROUND', + PlaceType.VEGETARIAN_RESTAURANT: 'VEGETARIAN_RESTAURANT', + PlaceType.CONVENTION_CENTER: 'CONVENTION_CENTER', + PlaceType.HIKING_AREA: 'HIKING_AREA', + PlaceType.PRESCHOOL: 'PRESCHOOL', + PlaceType.VIETNAMESE_RESTAURANT: 'VIETNAMESE_RESTAURANT', + PlaceType.COTTAGE: 'COTTAGE', + PlaceType.HISTORICAL_LANDMARK: 'HISTORICAL_LANDMARK', + PlaceType.PRIVATE_GUEST_ROOM: 'PRIVATE_GUEST_ROOM', + PlaceType.VISITOR_CENTER: 'VISITOR_CENTER', + PlaceType.COURIER_SERVICE: 'COURIER_SERVICE', + PlaceType.HOME_IMPROVEMENT_STORE: 'HOME_IMPROVEMENT_STORE', + PlaceType.RAMEN_RESTAURANT: 'RAMEN_RESTAURANT', + PlaceType.WEDDING_VENUE: 'WEDDING_VENUE', + PlaceType.CULTURAL_CENTER: 'CULTURAL_CENTER', + PlaceType.HOSTEL: 'HOSTEL', + PlaceType.RESORT_HOTEL: 'RESORT_HOTEL', + PlaceType.WHOLESALER: 'WHOLESALER', + PlaceType.DENTAL_CLINIC: 'DENTAL_CLINIC', + PlaceType.HOTEL: 'HOTEL', + PlaceType.REST_STOP: 'REST_STOP', +}; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.freezed.dart new file mode 100644 index 0000000..4f42337 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.freezed.dart @@ -0,0 +1,198 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'circular_bounds.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +CircularBounds _$CircularBoundsFromJson(Map json) { + return _CircularBounds.fromJson(json); +} + +/// @nodoc +mixin _$CircularBounds { + LatLng get center => throw _privateConstructorUsedError; + double get radius => throw _privateConstructorUsedError; + + /// Serializes this CircularBounds to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of CircularBounds + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $CircularBoundsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $CircularBoundsCopyWith<$Res> { + factory $CircularBoundsCopyWith( + CircularBounds value, $Res Function(CircularBounds) then) = + _$CircularBoundsCopyWithImpl<$Res, CircularBounds>; + @useResult + $Res call({LatLng center, double radius}); + + $LatLngCopyWith<$Res> get center; +} + +/// @nodoc +class _$CircularBoundsCopyWithImpl<$Res, $Val extends CircularBounds> + implements $CircularBoundsCopyWith<$Res> { + _$CircularBoundsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of CircularBounds + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? center = null, + Object? radius = null, + }) { + return _then(_value.copyWith( + center: null == center + ? _value.center + : center // ignore: cast_nullable_to_non_nullable + as LatLng, + radius: null == radius + ? _value.radius + : radius // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } + + /// Create a copy of CircularBounds + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $LatLngCopyWith<$Res> get center { + return $LatLngCopyWith<$Res>(_value.center, (value) { + return _then(_value.copyWith(center: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$CircularBoundsImplCopyWith<$Res> + implements $CircularBoundsCopyWith<$Res> { + factory _$$CircularBoundsImplCopyWith(_$CircularBoundsImpl value, + $Res Function(_$CircularBoundsImpl) then) = + __$$CircularBoundsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({LatLng center, double radius}); + + @override + $LatLngCopyWith<$Res> get center; +} + +/// @nodoc +class __$$CircularBoundsImplCopyWithImpl<$Res> + extends _$CircularBoundsCopyWithImpl<$Res, _$CircularBoundsImpl> + implements _$$CircularBoundsImplCopyWith<$Res> { + __$$CircularBoundsImplCopyWithImpl( + _$CircularBoundsImpl _value, $Res Function(_$CircularBoundsImpl) _then) + : super(_value, _then); + + /// Create a copy of CircularBounds + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? center = null, + Object? radius = null, + }) { + return _then(_$CircularBoundsImpl( + center: null == center + ? _value.center + : center // ignore: cast_nullable_to_non_nullable + as LatLng, + radius: null == radius + ? _value.radius + : radius // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$CircularBoundsImpl implements _CircularBounds { + const _$CircularBoundsImpl({required this.center, required this.radius}); + + factory _$CircularBoundsImpl.fromJson(Map json) => + _$$CircularBoundsImplFromJson(json); + + @override + final LatLng center; + @override + final double radius; + + @override + String toString() { + return 'CircularBounds(center: $center, radius: $radius)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$CircularBoundsImpl && + (identical(other.center, center) || other.center == center) && + (identical(other.radius, radius) || other.radius == radius)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, center, radius); + + /// Create a copy of CircularBounds + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$CircularBoundsImplCopyWith<_$CircularBoundsImpl> get copyWith => + __$$CircularBoundsImplCopyWithImpl<_$CircularBoundsImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$CircularBoundsImplToJson( + this, + ); + } +} + +abstract class _CircularBounds implements CircularBounds { + const factory _CircularBounds( + {required final LatLng center, + required final double radius}) = _$CircularBoundsImpl; + + factory _CircularBounds.fromJson(Map json) = + _$CircularBoundsImpl.fromJson; + + @override + LatLng get center; + @override + double get radius; + + /// Create a copy of CircularBounds + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$CircularBoundsImplCopyWith<_$CircularBoundsImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.g.dart new file mode 100644 index 0000000..7af6c4f --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/circular_bounds.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'circular_bounds.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$CircularBoundsImpl _$$CircularBoundsImplFromJson(Map json) => + _$CircularBoundsImpl( + center: LatLng.fromJson(Map.from(json['center'] as Map)), + radius: (json['radius'] as num).toDouble(), + ); + +Map _$$CircularBoundsImplToJson( + _$CircularBoundsImpl instance) => + { + 'center': instance.center.toJson(), + 'radius': instance.radius, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/fetch_photo_response.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/fetch_photo_response.freezed.dart new file mode 100644 index 0000000..48444a9 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/fetch_photo_response.freezed.dart @@ -0,0 +1,377 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'fetch_photo_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$FetchPlacePhotoResponse { + @optionalTypeArgs + TResult when({ + required TResult Function(Image image) image, + required TResult Function(String imageUrl) imageUrl, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(Image image)? image, + TResult? Function(String imageUrl)? imageUrl, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Image image)? image, + TResult Function(String imageUrl)? imageUrl, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(FetchPlacePhotoResponseImage value) image, + required TResult Function(FetchPlacePhotoResponseImageUrl value) imageUrl, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FetchPlacePhotoResponseImage value)? image, + TResult? Function(FetchPlacePhotoResponseImageUrl value)? imageUrl, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FetchPlacePhotoResponseImage value)? image, + TResult Function(FetchPlacePhotoResponseImageUrl value)? imageUrl, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $FetchPlacePhotoResponseCopyWith<$Res> { + factory $FetchPlacePhotoResponseCopyWith(FetchPlacePhotoResponse value, + $Res Function(FetchPlacePhotoResponse) then) = + _$FetchPlacePhotoResponseCopyWithImpl<$Res, FetchPlacePhotoResponse>; +} + +/// @nodoc +class _$FetchPlacePhotoResponseCopyWithImpl<$Res, + $Val extends FetchPlacePhotoResponse> + implements $FetchPlacePhotoResponseCopyWith<$Res> { + _$FetchPlacePhotoResponseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. +} + +/// @nodoc +abstract class _$$FetchPlacePhotoResponseImageImplCopyWith<$Res> { + factory _$$FetchPlacePhotoResponseImageImplCopyWith( + _$FetchPlacePhotoResponseImageImpl value, + $Res Function(_$FetchPlacePhotoResponseImageImpl) then) = + __$$FetchPlacePhotoResponseImageImplCopyWithImpl<$Res>; + @useResult + $Res call({Image image}); +} + +/// @nodoc +class __$$FetchPlacePhotoResponseImageImplCopyWithImpl<$Res> + extends _$FetchPlacePhotoResponseCopyWithImpl<$Res, + _$FetchPlacePhotoResponseImageImpl> + implements _$$FetchPlacePhotoResponseImageImplCopyWith<$Res> { + __$$FetchPlacePhotoResponseImageImplCopyWithImpl( + _$FetchPlacePhotoResponseImageImpl _value, + $Res Function(_$FetchPlacePhotoResponseImageImpl) _then) + : super(_value, _then); + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? image = null, + }) { + return _then(_$FetchPlacePhotoResponseImageImpl( + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as Image, + )); + } +} + +/// @nodoc + +class _$FetchPlacePhotoResponseImageImpl + implements FetchPlacePhotoResponseImage { + const _$FetchPlacePhotoResponseImageImpl(this.image); + + @override + final Image image; + + @override + String toString() { + return 'FetchPlacePhotoResponse.image(image: $image)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FetchPlacePhotoResponseImageImpl && + (identical(other.image, image) || other.image == image)); + } + + @override + int get hashCode => Object.hash(runtimeType, image); + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$FetchPlacePhotoResponseImageImplCopyWith< + _$FetchPlacePhotoResponseImageImpl> + get copyWith => __$$FetchPlacePhotoResponseImageImplCopyWithImpl< + _$FetchPlacePhotoResponseImageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Image image) image, + required TResult Function(String imageUrl) imageUrl, + }) { + return image(this.image); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(Image image)? image, + TResult? Function(String imageUrl)? imageUrl, + }) { + return image?.call(this.image); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Image image)? image, + TResult Function(String imageUrl)? imageUrl, + required TResult orElse(), + }) { + if (image != null) { + return image(this.image); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(FetchPlacePhotoResponseImage value) image, + required TResult Function(FetchPlacePhotoResponseImageUrl value) imageUrl, + }) { + return image(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FetchPlacePhotoResponseImage value)? image, + TResult? Function(FetchPlacePhotoResponseImageUrl value)? imageUrl, + }) { + return image?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FetchPlacePhotoResponseImage value)? image, + TResult Function(FetchPlacePhotoResponseImageUrl value)? imageUrl, + required TResult orElse(), + }) { + if (image != null) { + return image(this); + } + return orElse(); + } +} + +abstract class FetchPlacePhotoResponseImage implements FetchPlacePhotoResponse { + const factory FetchPlacePhotoResponseImage(final Image image) = + _$FetchPlacePhotoResponseImageImpl; + + Image get image; + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$FetchPlacePhotoResponseImageImplCopyWith< + _$FetchPlacePhotoResponseImageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$FetchPlacePhotoResponseImageUrlImplCopyWith<$Res> { + factory _$$FetchPlacePhotoResponseImageUrlImplCopyWith( + _$FetchPlacePhotoResponseImageUrlImpl value, + $Res Function(_$FetchPlacePhotoResponseImageUrlImpl) then) = + __$$FetchPlacePhotoResponseImageUrlImplCopyWithImpl<$Res>; + @useResult + $Res call({String imageUrl}); +} + +/// @nodoc +class __$$FetchPlacePhotoResponseImageUrlImplCopyWithImpl<$Res> + extends _$FetchPlacePhotoResponseCopyWithImpl<$Res, + _$FetchPlacePhotoResponseImageUrlImpl> + implements _$$FetchPlacePhotoResponseImageUrlImplCopyWith<$Res> { + __$$FetchPlacePhotoResponseImageUrlImplCopyWithImpl( + _$FetchPlacePhotoResponseImageUrlImpl _value, + $Res Function(_$FetchPlacePhotoResponseImageUrlImpl) _then) + : super(_value, _then); + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? imageUrl = null, + }) { + return _then(_$FetchPlacePhotoResponseImageUrlImpl( + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$FetchPlacePhotoResponseImageUrlImpl + implements FetchPlacePhotoResponseImageUrl { + const _$FetchPlacePhotoResponseImageUrlImpl(this.imageUrl); + + @override + final String imageUrl; + + @override + String toString() { + return 'FetchPlacePhotoResponse.imageUrl(imageUrl: $imageUrl)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FetchPlacePhotoResponseImageUrlImpl && + (identical(other.imageUrl, imageUrl) || + other.imageUrl == imageUrl)); + } + + @override + int get hashCode => Object.hash(runtimeType, imageUrl); + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$FetchPlacePhotoResponseImageUrlImplCopyWith< + _$FetchPlacePhotoResponseImageUrlImpl> + get copyWith => __$$FetchPlacePhotoResponseImageUrlImplCopyWithImpl< + _$FetchPlacePhotoResponseImageUrlImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(Image image) image, + required TResult Function(String imageUrl) imageUrl, + }) { + return imageUrl(this.imageUrl); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(Image image)? image, + TResult? Function(String imageUrl)? imageUrl, + }) { + return imageUrl?.call(this.imageUrl); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(Image image)? image, + TResult Function(String imageUrl)? imageUrl, + required TResult orElse(), + }) { + if (imageUrl != null) { + return imageUrl(this.imageUrl); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(FetchPlacePhotoResponseImage value) image, + required TResult Function(FetchPlacePhotoResponseImageUrl value) imageUrl, + }) { + return imageUrl(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FetchPlacePhotoResponseImage value)? image, + TResult? Function(FetchPlacePhotoResponseImageUrl value)? imageUrl, + }) { + return imageUrl?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FetchPlacePhotoResponseImage value)? image, + TResult Function(FetchPlacePhotoResponseImageUrl value)? imageUrl, + required TResult orElse(), + }) { + if (imageUrl != null) { + return imageUrl(this); + } + return orElse(); + } +} + +abstract class FetchPlacePhotoResponseImageUrl + implements FetchPlacePhotoResponse { + const factory FetchPlacePhotoResponseImageUrl(final String imageUrl) = + _$FetchPlacePhotoResponseImageUrlImpl; + + String get imageUrl; + + /// Create a copy of FetchPlacePhotoResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + _$$FetchPlacePhotoResponseImageUrlImplCopyWith< + _$FetchPlacePhotoResponseImageUrlImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/fetch_place_response.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/fetch_place_response.freezed.dart new file mode 100644 index 0000000..0c18e6e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/fetch_place_response.freezed.dart @@ -0,0 +1,173 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'fetch_place_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$FetchPlaceResponse { + /// the Place returned by the response. + Place? get place => throw _privateConstructorUsedError; + + /// Create a copy of FetchPlaceResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $FetchPlaceResponseCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $FetchPlaceResponseCopyWith<$Res> { + factory $FetchPlaceResponseCopyWith( + FetchPlaceResponse value, $Res Function(FetchPlaceResponse) then) = + _$FetchPlaceResponseCopyWithImpl<$Res, FetchPlaceResponse>; + @useResult + $Res call({Place? place}); + + $PlaceCopyWith<$Res>? get place; +} + +/// @nodoc +class _$FetchPlaceResponseCopyWithImpl<$Res, $Val extends FetchPlaceResponse> + implements $FetchPlaceResponseCopyWith<$Res> { + _$FetchPlaceResponseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of FetchPlaceResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? place = freezed, + }) { + return _then(_value.copyWith( + place: freezed == place + ? _value.place + : place // ignore: cast_nullable_to_non_nullable + as Place?, + ) as $Val); + } + + /// Create a copy of FetchPlaceResponse + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $PlaceCopyWith<$Res>? get place { + if (_value.place == null) { + return null; + } + + return $PlaceCopyWith<$Res>(_value.place!, (value) { + return _then(_value.copyWith(place: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$FetchPlacePhotoResponseImageImplCopyWith<$Res> + implements $FetchPlaceResponseCopyWith<$Res> { + factory _$$FetchPlacePhotoResponseImageImplCopyWith( + _$FetchPlacePhotoResponseImageImpl value, + $Res Function(_$FetchPlacePhotoResponseImageImpl) then) = + __$$FetchPlacePhotoResponseImageImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({Place? place}); + + @override + $PlaceCopyWith<$Res>? get place; +} + +/// @nodoc +class __$$FetchPlacePhotoResponseImageImplCopyWithImpl<$Res> + extends _$FetchPlaceResponseCopyWithImpl<$Res, + _$FetchPlacePhotoResponseImageImpl> + implements _$$FetchPlacePhotoResponseImageImplCopyWith<$Res> { + __$$FetchPlacePhotoResponseImageImplCopyWithImpl( + _$FetchPlacePhotoResponseImageImpl _value, + $Res Function(_$FetchPlacePhotoResponseImageImpl) _then) + : super(_value, _then); + + /// Create a copy of FetchPlaceResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? place = freezed, + }) { + return _then(_$FetchPlacePhotoResponseImageImpl( + freezed == place + ? _value.place + : place // ignore: cast_nullable_to_non_nullable + as Place?, + )); + } +} + +/// @nodoc + +class _$FetchPlacePhotoResponseImageImpl + implements _FetchPlacePhotoResponseImage { + const _$FetchPlacePhotoResponseImageImpl(this.place); + + /// the Place returned by the response. + @override + final Place? place; + + @override + String toString() { + return 'FetchPlaceResponse(place: $place)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FetchPlacePhotoResponseImageImpl && + (identical(other.place, place) || other.place == place)); + } + + @override + int get hashCode => Object.hash(runtimeType, place); + + /// Create a copy of FetchPlaceResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$FetchPlacePhotoResponseImageImplCopyWith< + _$FetchPlacePhotoResponseImageImpl> + get copyWith => __$$FetchPlacePhotoResponseImageImplCopyWithImpl< + _$FetchPlacePhotoResponseImageImpl>(this, _$identity); +} + +abstract class _FetchPlacePhotoResponseImage implements FetchPlaceResponse { + const factory _FetchPlacePhotoResponseImage(final Place? place) = + _$FetchPlacePhotoResponseImageImpl; + + /// the Place returned by the response. + @override + Place? get place; + + /// Create a copy of FetchPlaceResponse + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$FetchPlacePhotoResponseImageImplCopyWith< + _$FetchPlacePhotoResponseImageImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/find_autocomplete_predictions_response.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/find_autocomplete_predictions_response.freezed.dart new file mode 100644 index 0000000..637f4ec --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/find_autocomplete_predictions_response.freezed.dart @@ -0,0 +1,172 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'find_autocomplete_predictions_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$FindAutocompletePredictionsResponse { + /// the AutocompletePrediction list returned by the response. + List get predictions => + throw _privateConstructorUsedError; + + /// Create a copy of FindAutocompletePredictionsResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $FindAutocompletePredictionsResponseCopyWith< + FindAutocompletePredictionsResponse> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $FindAutocompletePredictionsResponseCopyWith<$Res> { + factory $FindAutocompletePredictionsResponseCopyWith( + FindAutocompletePredictionsResponse value, + $Res Function(FindAutocompletePredictionsResponse) then) = + _$FindAutocompletePredictionsResponseCopyWithImpl<$Res, + FindAutocompletePredictionsResponse>; + @useResult + $Res call({List predictions}); +} + +/// @nodoc +class _$FindAutocompletePredictionsResponseCopyWithImpl<$Res, + $Val extends FindAutocompletePredictionsResponse> + implements $FindAutocompletePredictionsResponseCopyWith<$Res> { + _$FindAutocompletePredictionsResponseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of FindAutocompletePredictionsResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? predictions = null, + }) { + return _then(_value.copyWith( + predictions: null == predictions + ? _value.predictions + : predictions // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$FindAutocompletePredictionsResponseImplCopyWith<$Res> + implements $FindAutocompletePredictionsResponseCopyWith<$Res> { + factory _$$FindAutocompletePredictionsResponseImplCopyWith( + _$FindAutocompletePredictionsResponseImpl value, + $Res Function(_$FindAutocompletePredictionsResponseImpl) then) = + __$$FindAutocompletePredictionsResponseImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({List predictions}); +} + +/// @nodoc +class __$$FindAutocompletePredictionsResponseImplCopyWithImpl<$Res> + extends _$FindAutocompletePredictionsResponseCopyWithImpl<$Res, + _$FindAutocompletePredictionsResponseImpl> + implements _$$FindAutocompletePredictionsResponseImplCopyWith<$Res> { + __$$FindAutocompletePredictionsResponseImplCopyWithImpl( + _$FindAutocompletePredictionsResponseImpl _value, + $Res Function(_$FindAutocompletePredictionsResponseImpl) _then) + : super(_value, _then); + + /// Create a copy of FindAutocompletePredictionsResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? predictions = null, + }) { + return _then(_$FindAutocompletePredictionsResponseImpl( + null == predictions + ? _value._predictions + : predictions // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc + +class _$FindAutocompletePredictionsResponseImpl + implements _FindAutocompletePredictionsResponse { + const _$FindAutocompletePredictionsResponseImpl( + final List predictions) + : _predictions = predictions; + + /// the AutocompletePrediction list returned by the response. + final List _predictions; + + /// the AutocompletePrediction list returned by the response. + @override + List get predictions { + if (_predictions is EqualUnmodifiableListView) return _predictions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_predictions); + } + + @override + String toString() { + return 'FindAutocompletePredictionsResponse(predictions: $predictions)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FindAutocompletePredictionsResponseImpl && + const DeepCollectionEquality() + .equals(other._predictions, _predictions)); + } + + @override + int get hashCode => Object.hash( + runtimeType, const DeepCollectionEquality().hash(_predictions)); + + /// Create a copy of FindAutocompletePredictionsResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$FindAutocompletePredictionsResponseImplCopyWith< + _$FindAutocompletePredictionsResponseImpl> + get copyWith => __$$FindAutocompletePredictionsResponseImplCopyWithImpl< + _$FindAutocompletePredictionsResponseImpl>(this, _$identity); +} + +abstract class _FindAutocompletePredictionsResponse + implements FindAutocompletePredictionsResponse { + const factory _FindAutocompletePredictionsResponse( + final List predictions) = + _$FindAutocompletePredictionsResponseImpl; + + /// the AutocompletePrediction list returned by the response. + @override + List get predictions; + + /// Create a copy of FindAutocompletePredictionsResponse + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$FindAutocompletePredictionsResponseImplCopyWith< + _$FindAutocompletePredictionsResponseImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng.freezed.dart new file mode 100644 index 0000000..a7c6b4e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng.freezed.dart @@ -0,0 +1,186 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'lat_lng.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +LatLng _$LatLngFromJson(Map json) { + return _LatLng.fromJson(json); +} + +/// @nodoc +mixin _$LatLng { + /// The latitude part of the coordinate, + double get lat => throw _privateConstructorUsedError; + + /// the longitude part of the coordinate. + double get lng => throw _privateConstructorUsedError; + + /// Serializes this LatLng to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of LatLng + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $LatLngCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LatLngCopyWith<$Res> { + factory $LatLngCopyWith(LatLng value, $Res Function(LatLng) then) = + _$LatLngCopyWithImpl<$Res, LatLng>; + @useResult + $Res call({double lat, double lng}); +} + +/// @nodoc +class _$LatLngCopyWithImpl<$Res, $Val extends LatLng> + implements $LatLngCopyWith<$Res> { + _$LatLngCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of LatLng + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? lat = null, + Object? lng = null, + }) { + return _then(_value.copyWith( + lat: null == lat + ? _value.lat + : lat // ignore: cast_nullable_to_non_nullable + as double, + lng: null == lng + ? _value.lng + : lng // ignore: cast_nullable_to_non_nullable + as double, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$LatLngImplCopyWith<$Res> implements $LatLngCopyWith<$Res> { + factory _$$LatLngImplCopyWith( + _$LatLngImpl value, $Res Function(_$LatLngImpl) then) = + __$$LatLngImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({double lat, double lng}); +} + +/// @nodoc +class __$$LatLngImplCopyWithImpl<$Res> + extends _$LatLngCopyWithImpl<$Res, _$LatLngImpl> + implements _$$LatLngImplCopyWith<$Res> { + __$$LatLngImplCopyWithImpl( + _$LatLngImpl _value, $Res Function(_$LatLngImpl) _then) + : super(_value, _then); + + /// Create a copy of LatLng + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? lat = null, + Object? lng = null, + }) { + return _then(_$LatLngImpl( + lat: null == lat + ? _value.lat + : lat // ignore: cast_nullable_to_non_nullable + as double, + lng: null == lng + ? _value.lng + : lng // ignore: cast_nullable_to_non_nullable + as double, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$LatLngImpl implements _LatLng { + const _$LatLngImpl({required this.lat, required this.lng}); + + factory _$LatLngImpl.fromJson(Map json) => + _$$LatLngImplFromJson(json); + + /// The latitude part of the coordinate, + @override + final double lat; + + /// the longitude part of the coordinate. + @override + final double lng; + + @override + String toString() { + return 'LatLng(lat: $lat, lng: $lng)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LatLngImpl && + (identical(other.lat, lat) || other.lat == lat) && + (identical(other.lng, lng) || other.lng == lng)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, lat, lng); + + /// Create a copy of LatLng + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$LatLngImplCopyWith<_$LatLngImpl> get copyWith => + __$$LatLngImplCopyWithImpl<_$LatLngImpl>(this, _$identity); + + @override + Map toJson() { + return _$$LatLngImplToJson( + this, + ); + } +} + +abstract class _LatLng implements LatLng { + const factory _LatLng( + {required final double lat, required final double lng}) = _$LatLngImpl; + + factory _LatLng.fromJson(Map json) = _$LatLngImpl.fromJson; + + /// The latitude part of the coordinate, + @override + double get lat; + + /// the longitude part of the coordinate. + @override + double get lng; + + /// Create a copy of LatLng + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$LatLngImplCopyWith<_$LatLngImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng.g.dart new file mode 100644 index 0000000..24cb159 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'lat_lng.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$LatLngImpl _$$LatLngImplFromJson(Map json) => _$LatLngImpl( + lat: (json['lat'] as num).toDouble(), + lng: (json['lng'] as num).toDouble(), + ); + +Map _$$LatLngImplToJson(_$LatLngImpl instance) => + { + 'lat': instance.lat, + 'lng': instance.lng, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng_bounds.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng_bounds.freezed.dart new file mode 100644 index 0000000..7e9eec4 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng_bounds.freezed.dart @@ -0,0 +1,221 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'lat_lng_bounds.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +LatLngBounds _$LatLngBoundsFromJson(Map json) { + return _LatLngBounds.fromJson(json); +} + +/// @nodoc +mixin _$LatLngBounds { + /// The southwest coordinate of the bounds. + LatLng get southwest => throw _privateConstructorUsedError; + + /// The northeast coordinate of the bounds. + LatLng get northeast => throw _privateConstructorUsedError; + + /// Serializes this LatLngBounds to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $LatLngBoundsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LatLngBoundsCopyWith<$Res> { + factory $LatLngBoundsCopyWith( + LatLngBounds value, $Res Function(LatLngBounds) then) = + _$LatLngBoundsCopyWithImpl<$Res, LatLngBounds>; + @useResult + $Res call({LatLng southwest, LatLng northeast}); + + $LatLngCopyWith<$Res> get southwest; + $LatLngCopyWith<$Res> get northeast; +} + +/// @nodoc +class _$LatLngBoundsCopyWithImpl<$Res, $Val extends LatLngBounds> + implements $LatLngBoundsCopyWith<$Res> { + _$LatLngBoundsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? southwest = null, + Object? northeast = null, + }) { + return _then(_value.copyWith( + southwest: null == southwest + ? _value.southwest + : southwest // ignore: cast_nullable_to_non_nullable + as LatLng, + northeast: null == northeast + ? _value.northeast + : northeast // ignore: cast_nullable_to_non_nullable + as LatLng, + ) as $Val); + } + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $LatLngCopyWith<$Res> get southwest { + return $LatLngCopyWith<$Res>(_value.southwest, (value) { + return _then(_value.copyWith(southwest: value) as $Val); + }); + } + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $LatLngCopyWith<$Res> get northeast { + return $LatLngCopyWith<$Res>(_value.northeast, (value) { + return _then(_value.copyWith(northeast: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$LatLngBoundsImplCopyWith<$Res> + implements $LatLngBoundsCopyWith<$Res> { + factory _$$LatLngBoundsImplCopyWith( + _$LatLngBoundsImpl value, $Res Function(_$LatLngBoundsImpl) then) = + __$$LatLngBoundsImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({LatLng southwest, LatLng northeast}); + + @override + $LatLngCopyWith<$Res> get southwest; + @override + $LatLngCopyWith<$Res> get northeast; +} + +/// @nodoc +class __$$LatLngBoundsImplCopyWithImpl<$Res> + extends _$LatLngBoundsCopyWithImpl<$Res, _$LatLngBoundsImpl> + implements _$$LatLngBoundsImplCopyWith<$Res> { + __$$LatLngBoundsImplCopyWithImpl( + _$LatLngBoundsImpl _value, $Res Function(_$LatLngBoundsImpl) _then) + : super(_value, _then); + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? southwest = null, + Object? northeast = null, + }) { + return _then(_$LatLngBoundsImpl( + southwest: null == southwest + ? _value.southwest + : southwest // ignore: cast_nullable_to_non_nullable + as LatLng, + northeast: null == northeast + ? _value.northeast + : northeast // ignore: cast_nullable_to_non_nullable + as LatLng, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$LatLngBoundsImpl implements _LatLngBounds { + const _$LatLngBoundsImpl({required this.southwest, required this.northeast}); + + factory _$LatLngBoundsImpl.fromJson(Map json) => + _$$LatLngBoundsImplFromJson(json); + + /// The southwest coordinate of the bounds. + @override + final LatLng southwest; + + /// The northeast coordinate of the bounds. + @override + final LatLng northeast; + + @override + String toString() { + return 'LatLngBounds(southwest: $southwest, northeast: $northeast)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LatLngBoundsImpl && + (identical(other.southwest, southwest) || + other.southwest == southwest) && + (identical(other.northeast, northeast) || + other.northeast == northeast)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, southwest, northeast); + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$LatLngBoundsImplCopyWith<_$LatLngBoundsImpl> get copyWith => + __$$LatLngBoundsImplCopyWithImpl<_$LatLngBoundsImpl>(this, _$identity); + + @override + Map toJson() { + return _$$LatLngBoundsImplToJson( + this, + ); + } +} + +abstract class _LatLngBounds implements LatLngBounds { + const factory _LatLngBounds( + {required final LatLng southwest, + required final LatLng northeast}) = _$LatLngBoundsImpl; + + factory _LatLngBounds.fromJson(Map json) = + _$LatLngBoundsImpl.fromJson; + + /// The southwest coordinate of the bounds. + @override + LatLng get southwest; + + /// The northeast coordinate of the bounds. + @override + LatLng get northeast; + + /// Create a copy of LatLngBounds + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$LatLngBoundsImplCopyWith<_$LatLngBoundsImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng_bounds.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng_bounds.g.dart new file mode 100644 index 0000000..d215aa1 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/lat_lng_bounds.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'lat_lng_bounds.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$LatLngBoundsImpl _$$LatLngBoundsImplFromJson(Map json) => _$LatLngBoundsImpl( + southwest: + LatLng.fromJson(Map.from(json['southwest'] as Map)), + northeast: + LatLng.fromJson(Map.from(json['northeast'] as Map)), + ); + +Map _$$LatLngBoundsImplToJson(_$LatLngBoundsImpl instance) => + { + 'southwest': instance.southwest.toJson(), + 'northeast': instance.northeast.toJson(), + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/opening_hours.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/opening_hours.freezed.dart new file mode 100644 index 0000000..0cb161e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/opening_hours.freezed.dart @@ -0,0 +1,213 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'opening_hours.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +OpeningHours _$OpeningHoursFromJson(Map json) { + return _OpeningHours.fromJson(json); +} + +/// @nodoc +mixin _$OpeningHours { + /// A list of Period objects that provide more detailed information that is equivalent to the data provided by getWeekdayText(). + List get periods => throw _privateConstructorUsedError; + + /// Returns a list of strings that represent opening and closing hours in human readable form. + List get weekdayText => throw _privateConstructorUsedError; + + /// Serializes this OpeningHours to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of OpeningHours + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $OpeningHoursCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $OpeningHoursCopyWith<$Res> { + factory $OpeningHoursCopyWith( + OpeningHours value, $Res Function(OpeningHours) then) = + _$OpeningHoursCopyWithImpl<$Res, OpeningHours>; + @useResult + $Res call({List periods, List weekdayText}); +} + +/// @nodoc +class _$OpeningHoursCopyWithImpl<$Res, $Val extends OpeningHours> + implements $OpeningHoursCopyWith<$Res> { + _$OpeningHoursCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of OpeningHours + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? periods = null, + Object? weekdayText = null, + }) { + return _then(_value.copyWith( + periods: null == periods + ? _value.periods + : periods // ignore: cast_nullable_to_non_nullable + as List, + weekdayText: null == weekdayText + ? _value.weekdayText + : weekdayText // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$OpeningHoursImplCopyWith<$Res> + implements $OpeningHoursCopyWith<$Res> { + factory _$$OpeningHoursImplCopyWith( + _$OpeningHoursImpl value, $Res Function(_$OpeningHoursImpl) then) = + __$$OpeningHoursImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({List periods, List weekdayText}); +} + +/// @nodoc +class __$$OpeningHoursImplCopyWithImpl<$Res> + extends _$OpeningHoursCopyWithImpl<$Res, _$OpeningHoursImpl> + implements _$$OpeningHoursImplCopyWith<$Res> { + __$$OpeningHoursImplCopyWithImpl( + _$OpeningHoursImpl _value, $Res Function(_$OpeningHoursImpl) _then) + : super(_value, _then); + + /// Create a copy of OpeningHours + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? periods = null, + Object? weekdayText = null, + }) { + return _then(_$OpeningHoursImpl( + periods: null == periods + ? _value._periods + : periods // ignore: cast_nullable_to_non_nullable + as List, + weekdayText: null == weekdayText + ? _value._weekdayText + : weekdayText // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$OpeningHoursImpl implements _OpeningHours { + const _$OpeningHoursImpl( + {required final List periods, + required final List weekdayText}) + : _periods = periods, + _weekdayText = weekdayText; + + factory _$OpeningHoursImpl.fromJson(Map json) => + _$$OpeningHoursImplFromJson(json); + + /// A list of Period objects that provide more detailed information that is equivalent to the data provided by getWeekdayText(). + final List _periods; + + /// A list of Period objects that provide more detailed information that is equivalent to the data provided by getWeekdayText(). + @override + List get periods { + if (_periods is EqualUnmodifiableListView) return _periods; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_periods); + } + + /// Returns a list of strings that represent opening and closing hours in human readable form. + final List _weekdayText; + + /// Returns a list of strings that represent opening and closing hours in human readable form. + @override + List get weekdayText { + if (_weekdayText is EqualUnmodifiableListView) return _weekdayText; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_weekdayText); + } + + @override + String toString() { + return 'OpeningHours(periods: $periods, weekdayText: $weekdayText)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$OpeningHoursImpl && + const DeepCollectionEquality().equals(other._periods, _periods) && + const DeepCollectionEquality() + .equals(other._weekdayText, _weekdayText)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_periods), + const DeepCollectionEquality().hash(_weekdayText)); + + /// Create a copy of OpeningHours + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$OpeningHoursImplCopyWith<_$OpeningHoursImpl> get copyWith => + __$$OpeningHoursImplCopyWithImpl<_$OpeningHoursImpl>(this, _$identity); + + @override + Map toJson() { + return _$$OpeningHoursImplToJson( + this, + ); + } +} + +abstract class _OpeningHours implements OpeningHours { + const factory _OpeningHours( + {required final List periods, + required final List weekdayText}) = _$OpeningHoursImpl; + + factory _OpeningHours.fromJson(Map json) = + _$OpeningHoursImpl.fromJson; + + /// A list of Period objects that provide more detailed information that is equivalent to the data provided by getWeekdayText(). + @override + List get periods; + + /// Returns a list of strings that represent opening and closing hours in human readable form. + @override + List get weekdayText; + + /// Create a copy of OpeningHours + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$OpeningHoursImplCopyWith<_$OpeningHoursImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/opening_hours.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/opening_hours.g.dart new file mode 100644 index 0000000..0b8d53e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/opening_hours.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'opening_hours.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$OpeningHoursImpl _$$OpeningHoursImplFromJson(Map json) => _$OpeningHoursImpl( + periods: (json['periods'] as List) + .map((e) => Period.fromJson(Map.from(e as Map))) + .toList(), + weekdayText: (json['weekdayText'] as List) + .map((e) => e as String) + .toList(), + ); + +Map _$$OpeningHoursImplToJson(_$OpeningHoursImpl instance) => + { + 'periods': instance.periods.map((e) => e.toJson()).toList(), + 'weekdayText': instance.weekdayText, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/period.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/period.freezed.dart new file mode 100644 index 0000000..fcbaf4f --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/period.freezed.dart @@ -0,0 +1,210 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'period.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +Period _$PeriodFromJson(Map json) { + return _Period.fromJson(json); +} + +/// @nodoc +mixin _$Period { + TimeOfWeek get open => throw _privateConstructorUsedError; + TimeOfWeek? get close => throw _privateConstructorUsedError; + + /// Serializes this Period to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $PeriodCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PeriodCopyWith<$Res> { + factory $PeriodCopyWith(Period value, $Res Function(Period) then) = + _$PeriodCopyWithImpl<$Res, Period>; + @useResult + $Res call({TimeOfWeek open, TimeOfWeek? close}); + + $TimeOfWeekCopyWith<$Res> get open; + $TimeOfWeekCopyWith<$Res>? get close; +} + +/// @nodoc +class _$PeriodCopyWithImpl<$Res, $Val extends Period> + implements $PeriodCopyWith<$Res> { + _$PeriodCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? open = null, + Object? close = freezed, + }) { + return _then(_value.copyWith( + open: null == open + ? _value.open + : open // ignore: cast_nullable_to_non_nullable + as TimeOfWeek, + close: freezed == close + ? _value.close + : close // ignore: cast_nullable_to_non_nullable + as TimeOfWeek?, + ) as $Val); + } + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $TimeOfWeekCopyWith<$Res> get open { + return $TimeOfWeekCopyWith<$Res>(_value.open, (value) { + return _then(_value.copyWith(open: value) as $Val); + }); + } + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $TimeOfWeekCopyWith<$Res>? get close { + if (_value.close == null) { + return null; + } + + return $TimeOfWeekCopyWith<$Res>(_value.close!, (value) { + return _then(_value.copyWith(close: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$PeriodImplCopyWith<$Res> implements $PeriodCopyWith<$Res> { + factory _$$PeriodImplCopyWith( + _$PeriodImpl value, $Res Function(_$PeriodImpl) then) = + __$$PeriodImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({TimeOfWeek open, TimeOfWeek? close}); + + @override + $TimeOfWeekCopyWith<$Res> get open; + @override + $TimeOfWeekCopyWith<$Res>? get close; +} + +/// @nodoc +class __$$PeriodImplCopyWithImpl<$Res> + extends _$PeriodCopyWithImpl<$Res, _$PeriodImpl> + implements _$$PeriodImplCopyWith<$Res> { + __$$PeriodImplCopyWithImpl( + _$PeriodImpl _value, $Res Function(_$PeriodImpl) _then) + : super(_value, _then); + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? open = null, + Object? close = freezed, + }) { + return _then(_$PeriodImpl( + open: null == open + ? _value.open + : open // ignore: cast_nullable_to_non_nullable + as TimeOfWeek, + close: freezed == close + ? _value.close + : close // ignore: cast_nullable_to_non_nullable + as TimeOfWeek?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PeriodImpl implements _Period { + const _$PeriodImpl({required this.open, required this.close}); + + factory _$PeriodImpl.fromJson(Map json) => + _$$PeriodImplFromJson(json); + + @override + final TimeOfWeek open; + @override + final TimeOfWeek? close; + + @override + String toString() { + return 'Period(open: $open, close: $close)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PeriodImpl && + (identical(other.open, open) || other.open == open) && + (identical(other.close, close) || other.close == close)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, open, close); + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$PeriodImplCopyWith<_$PeriodImpl> get copyWith => + __$$PeriodImplCopyWithImpl<_$PeriodImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PeriodImplToJson( + this, + ); + } +} + +abstract class _Period implements Period { + const factory _Period( + {required final TimeOfWeek open, + required final TimeOfWeek? close}) = _$PeriodImpl; + + factory _Period.fromJson(Map json) = _$PeriodImpl.fromJson; + + @override + TimeOfWeek get open; + @override + TimeOfWeek? get close; + + /// Create a copy of Period + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$PeriodImplCopyWith<_$PeriodImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/period.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/period.g.dart new file mode 100644 index 0000000..bb980e3 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/period.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'period.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$PeriodImpl _$$PeriodImplFromJson(Map json) => _$PeriodImpl( + open: TimeOfWeek.fromJson(Map.from(json['open'] as Map)), + close: json['close'] == null + ? null + : TimeOfWeek.fromJson( + Map.from(json['close'] as Map)), + ); + +Map _$$PeriodImplToJson(_$PeriodImpl instance) => + { + 'open': instance.open.toJson(), + 'close': instance.close?.toJson(), + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/photo_metadata.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/photo_metadata.freezed.dart new file mode 100644 index 0000000..5ff5e1c --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/photo_metadata.freezed.dart @@ -0,0 +1,246 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'photo_metadata.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +PhotoMetadata _$PhotoMetadataFromJson(Map json) { + return _PhotoMetadata.fromJson(json); +} + +/// @nodoc +mixin _$PhotoMetadata { + /// Non-empty String used to identify the underlying photo. + String get photoReference => throw _privateConstructorUsedError; + + /// The maximum width in which this photo is available. + int get width => throw _privateConstructorUsedError; + + /// The maximum height in which this photo is available. + int get height => throw _privateConstructorUsedError; + + /// The attributions that must be shown to the user if this photo is displayed. + String get attributions => throw _privateConstructorUsedError; + + /// Serializes this PhotoMetadata to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of PhotoMetadata + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $PhotoMetadataCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PhotoMetadataCopyWith<$Res> { + factory $PhotoMetadataCopyWith( + PhotoMetadata value, $Res Function(PhotoMetadata) then) = + _$PhotoMetadataCopyWithImpl<$Res, PhotoMetadata>; + @useResult + $Res call( + {String photoReference, int width, int height, String attributions}); +} + +/// @nodoc +class _$PhotoMetadataCopyWithImpl<$Res, $Val extends PhotoMetadata> + implements $PhotoMetadataCopyWith<$Res> { + _$PhotoMetadataCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of PhotoMetadata + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? photoReference = null, + Object? width = null, + Object? height = null, + Object? attributions = null, + }) { + return _then(_value.copyWith( + photoReference: null == photoReference + ? _value.photoReference + : photoReference // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _value.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + attributions: null == attributions + ? _value.attributions + : attributions // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PhotoMetadataImplCopyWith<$Res> + implements $PhotoMetadataCopyWith<$Res> { + factory _$$PhotoMetadataImplCopyWith( + _$PhotoMetadataImpl value, $Res Function(_$PhotoMetadataImpl) then) = + __$$PhotoMetadataImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String photoReference, int width, int height, String attributions}); +} + +/// @nodoc +class __$$PhotoMetadataImplCopyWithImpl<$Res> + extends _$PhotoMetadataCopyWithImpl<$Res, _$PhotoMetadataImpl> + implements _$$PhotoMetadataImplCopyWith<$Res> { + __$$PhotoMetadataImplCopyWithImpl( + _$PhotoMetadataImpl _value, $Res Function(_$PhotoMetadataImpl) _then) + : super(_value, _then); + + /// Create a copy of PhotoMetadata + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? photoReference = null, + Object? width = null, + Object? height = null, + Object? attributions = null, + }) { + return _then(_$PhotoMetadataImpl( + photoReference: null == photoReference + ? _value.photoReference + : photoReference // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _value.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + attributions: null == attributions + ? _value.attributions + : attributions // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PhotoMetadataImpl implements _PhotoMetadata { + const _$PhotoMetadataImpl( + {required this.photoReference, + required this.width, + required this.height, + required this.attributions}); + + factory _$PhotoMetadataImpl.fromJson(Map json) => + _$$PhotoMetadataImplFromJson(json); + + /// Non-empty String used to identify the underlying photo. + @override + final String photoReference; + + /// The maximum width in which this photo is available. + @override + final int width; + + /// The maximum height in which this photo is available. + @override + final int height; + + /// The attributions that must be shown to the user if this photo is displayed. + @override + final String attributions; + + @override + String toString() { + return 'PhotoMetadata(photoReference: $photoReference, width: $width, height: $height, attributions: $attributions)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PhotoMetadataImpl && + (identical(other.photoReference, photoReference) || + other.photoReference == photoReference) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.attributions, attributions) || + other.attributions == attributions)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, photoReference, width, height, attributions); + + /// Create a copy of PhotoMetadata + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$PhotoMetadataImplCopyWith<_$PhotoMetadataImpl> get copyWith => + __$$PhotoMetadataImplCopyWithImpl<_$PhotoMetadataImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PhotoMetadataImplToJson( + this, + ); + } +} + +abstract class _PhotoMetadata implements PhotoMetadata { + const factory _PhotoMetadata( + {required final String photoReference, + required final int width, + required final int height, + required final String attributions}) = _$PhotoMetadataImpl; + + factory _PhotoMetadata.fromJson(Map json) = + _$PhotoMetadataImpl.fromJson; + + /// Non-empty String used to identify the underlying photo. + @override + String get photoReference; + + /// The maximum width in which this photo is available. + @override + int get width; + + /// The maximum height in which this photo is available. + @override + int get height; + + /// The attributions that must be shown to the user if this photo is displayed. + @override + String get attributions; + + /// Create a copy of PhotoMetadata + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$PhotoMetadataImplCopyWith<_$PhotoMetadataImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/photo_metadata.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/photo_metadata.g.dart new file mode 100644 index 0000000..cbd5d86 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/photo_metadata.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'photo_metadata.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$PhotoMetadataImpl _$$PhotoMetadataImplFromJson(Map json) => + _$PhotoMetadataImpl( + photoReference: json['photoReference'] as String, + width: (json['width'] as num).toInt(), + height: (json['height'] as num).toInt(), + attributions: json['attributions'] as String, + ); + +Map _$$PhotoMetadataImplToJson(_$PhotoMetadataImpl instance) => + { + 'photoReference': instance.photoReference, + 'width': instance.width, + 'height': instance.height, + 'attributions': instance.attributions, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place.freezed.dart new file mode 100644 index 0000000..96ca3fe --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place.freezed.dart @@ -0,0 +1,695 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'place.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +Place _$PlaceFromJson(Map json) { + return _Place.fromJson(json); +} + +/// @nodoc +mixin _$Place { + String? get id => throw _privateConstructorUsedError; + String? get address => throw _privateConstructorUsedError; + List? get addressComponents => + throw _privateConstructorUsedError; + BusinessStatus? get businessStatus => throw _privateConstructorUsedError; + List? get attributions => throw _privateConstructorUsedError; + LatLng? get latLng => throw _privateConstructorUsedError; + String? get name => throw _privateConstructorUsedError; + String? get nameLanguageCode => throw _privateConstructorUsedError; + OpeningHours? get openingHours => throw _privateConstructorUsedError; + String? get phoneNumber => throw _privateConstructorUsedError; + List? get photoMetadatas => throw _privateConstructorUsedError; + PlusCode? get plusCode => throw _privateConstructorUsedError; + int? get priceLevel => throw _privateConstructorUsedError; + double? get rating => throw _privateConstructorUsedError; + List? get types => throw _privateConstructorUsedError; + int? get userRatingsTotal => throw _privateConstructorUsedError; + int? get utcOffsetMinutes => throw _privateConstructorUsedError; + LatLngBounds? get viewport => throw _privateConstructorUsedError; + Uri? get websiteUri => throw _privateConstructorUsedError; + List? get reviews => throw _privateConstructorUsedError; + + /// Serializes this Place to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $PlaceCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PlaceCopyWith<$Res> { + factory $PlaceCopyWith(Place value, $Res Function(Place) then) = + _$PlaceCopyWithImpl<$Res, Place>; + @useResult + $Res call( + {String? id, + String? address, + List? addressComponents, + BusinessStatus? businessStatus, + List? attributions, + LatLng? latLng, + String? name, + String? nameLanguageCode, + OpeningHours? openingHours, + String? phoneNumber, + List? photoMetadatas, + PlusCode? plusCode, + int? priceLevel, + double? rating, + List? types, + int? userRatingsTotal, + int? utcOffsetMinutes, + LatLngBounds? viewport, + Uri? websiteUri, + List? reviews}); + + $LatLngCopyWith<$Res>? get latLng; + $OpeningHoursCopyWith<$Res>? get openingHours; + $PlusCodeCopyWith<$Res>? get plusCode; + $LatLngBoundsCopyWith<$Res>? get viewport; +} + +/// @nodoc +class _$PlaceCopyWithImpl<$Res, $Val extends Place> + implements $PlaceCopyWith<$Res> { + _$PlaceCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = freezed, + Object? address = freezed, + Object? addressComponents = freezed, + Object? businessStatus = freezed, + Object? attributions = freezed, + Object? latLng = freezed, + Object? name = freezed, + Object? nameLanguageCode = freezed, + Object? openingHours = freezed, + Object? phoneNumber = freezed, + Object? photoMetadatas = freezed, + Object? plusCode = freezed, + Object? priceLevel = freezed, + Object? rating = freezed, + Object? types = freezed, + Object? userRatingsTotal = freezed, + Object? utcOffsetMinutes = freezed, + Object? viewport = freezed, + Object? websiteUri = freezed, + Object? reviews = freezed, + }) { + return _then(_value.copyWith( + id: freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + address: freezed == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as String?, + addressComponents: freezed == addressComponents + ? _value.addressComponents + : addressComponents // ignore: cast_nullable_to_non_nullable + as List?, + businessStatus: freezed == businessStatus + ? _value.businessStatus + : businessStatus // ignore: cast_nullable_to_non_nullable + as BusinessStatus?, + attributions: freezed == attributions + ? _value.attributions + : attributions // ignore: cast_nullable_to_non_nullable + as List?, + latLng: freezed == latLng + ? _value.latLng + : latLng // ignore: cast_nullable_to_non_nullable + as LatLng?, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + nameLanguageCode: freezed == nameLanguageCode + ? _value.nameLanguageCode + : nameLanguageCode // ignore: cast_nullable_to_non_nullable + as String?, + openingHours: freezed == openingHours + ? _value.openingHours + : openingHours // ignore: cast_nullable_to_non_nullable + as OpeningHours?, + phoneNumber: freezed == phoneNumber + ? _value.phoneNumber + : phoneNumber // ignore: cast_nullable_to_non_nullable + as String?, + photoMetadatas: freezed == photoMetadatas + ? _value.photoMetadatas + : photoMetadatas // ignore: cast_nullable_to_non_nullable + as List?, + plusCode: freezed == plusCode + ? _value.plusCode + : plusCode // ignore: cast_nullable_to_non_nullable + as PlusCode?, + priceLevel: freezed == priceLevel + ? _value.priceLevel + : priceLevel // ignore: cast_nullable_to_non_nullable + as int?, + rating: freezed == rating + ? _value.rating + : rating // ignore: cast_nullable_to_non_nullable + as double?, + types: freezed == types + ? _value.types + : types // ignore: cast_nullable_to_non_nullable + as List?, + userRatingsTotal: freezed == userRatingsTotal + ? _value.userRatingsTotal + : userRatingsTotal // ignore: cast_nullable_to_non_nullable + as int?, + utcOffsetMinutes: freezed == utcOffsetMinutes + ? _value.utcOffsetMinutes + : utcOffsetMinutes // ignore: cast_nullable_to_non_nullable + as int?, + viewport: freezed == viewport + ? _value.viewport + : viewport // ignore: cast_nullable_to_non_nullable + as LatLngBounds?, + websiteUri: freezed == websiteUri + ? _value.websiteUri + : websiteUri // ignore: cast_nullable_to_non_nullable + as Uri?, + reviews: freezed == reviews + ? _value.reviews + : reviews // ignore: cast_nullable_to_non_nullable + as List?, + ) as $Val); + } + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $LatLngCopyWith<$Res>? get latLng { + if (_value.latLng == null) { + return null; + } + + return $LatLngCopyWith<$Res>(_value.latLng!, (value) { + return _then(_value.copyWith(latLng: value) as $Val); + }); + } + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $OpeningHoursCopyWith<$Res>? get openingHours { + if (_value.openingHours == null) { + return null; + } + + return $OpeningHoursCopyWith<$Res>(_value.openingHours!, (value) { + return _then(_value.copyWith(openingHours: value) as $Val); + }); + } + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $PlusCodeCopyWith<$Res>? get plusCode { + if (_value.plusCode == null) { + return null; + } + + return $PlusCodeCopyWith<$Res>(_value.plusCode!, (value) { + return _then(_value.copyWith(plusCode: value) as $Val); + }); + } + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $LatLngBoundsCopyWith<$Res>? get viewport { + if (_value.viewport == null) { + return null; + } + + return $LatLngBoundsCopyWith<$Res>(_value.viewport!, (value) { + return _then(_value.copyWith(viewport: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$PlaceImplCopyWith<$Res> implements $PlaceCopyWith<$Res> { + factory _$$PlaceImplCopyWith( + _$PlaceImpl value, $Res Function(_$PlaceImpl) then) = + __$$PlaceImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String? id, + String? address, + List? addressComponents, + BusinessStatus? businessStatus, + List? attributions, + LatLng? latLng, + String? name, + String? nameLanguageCode, + OpeningHours? openingHours, + String? phoneNumber, + List? photoMetadatas, + PlusCode? plusCode, + int? priceLevel, + double? rating, + List? types, + int? userRatingsTotal, + int? utcOffsetMinutes, + LatLngBounds? viewport, + Uri? websiteUri, + List? reviews}); + + @override + $LatLngCopyWith<$Res>? get latLng; + @override + $OpeningHoursCopyWith<$Res>? get openingHours; + @override + $PlusCodeCopyWith<$Res>? get plusCode; + @override + $LatLngBoundsCopyWith<$Res>? get viewport; +} + +/// @nodoc +class __$$PlaceImplCopyWithImpl<$Res> + extends _$PlaceCopyWithImpl<$Res, _$PlaceImpl> + implements _$$PlaceImplCopyWith<$Res> { + __$$PlaceImplCopyWithImpl( + _$PlaceImpl _value, $Res Function(_$PlaceImpl) _then) + : super(_value, _then); + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? id = freezed, + Object? address = freezed, + Object? addressComponents = freezed, + Object? businessStatus = freezed, + Object? attributions = freezed, + Object? latLng = freezed, + Object? name = freezed, + Object? nameLanguageCode = freezed, + Object? openingHours = freezed, + Object? phoneNumber = freezed, + Object? photoMetadatas = freezed, + Object? plusCode = freezed, + Object? priceLevel = freezed, + Object? rating = freezed, + Object? types = freezed, + Object? userRatingsTotal = freezed, + Object? utcOffsetMinutes = freezed, + Object? viewport = freezed, + Object? websiteUri = freezed, + Object? reviews = freezed, + }) { + return _then(_$PlaceImpl( + id: freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String?, + address: freezed == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as String?, + addressComponents: freezed == addressComponents + ? _value._addressComponents + : addressComponents // ignore: cast_nullable_to_non_nullable + as List?, + businessStatus: freezed == businessStatus + ? _value.businessStatus + : businessStatus // ignore: cast_nullable_to_non_nullable + as BusinessStatus?, + attributions: freezed == attributions + ? _value._attributions + : attributions // ignore: cast_nullable_to_non_nullable + as List?, + latLng: freezed == latLng + ? _value.latLng + : latLng // ignore: cast_nullable_to_non_nullable + as LatLng?, + name: freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + nameLanguageCode: freezed == nameLanguageCode + ? _value.nameLanguageCode + : nameLanguageCode // ignore: cast_nullable_to_non_nullable + as String?, + openingHours: freezed == openingHours + ? _value.openingHours + : openingHours // ignore: cast_nullable_to_non_nullable + as OpeningHours?, + phoneNumber: freezed == phoneNumber + ? _value.phoneNumber + : phoneNumber // ignore: cast_nullable_to_non_nullable + as String?, + photoMetadatas: freezed == photoMetadatas + ? _value._photoMetadatas + : photoMetadatas // ignore: cast_nullable_to_non_nullable + as List?, + plusCode: freezed == plusCode + ? _value.plusCode + : plusCode // ignore: cast_nullable_to_non_nullable + as PlusCode?, + priceLevel: freezed == priceLevel + ? _value.priceLevel + : priceLevel // ignore: cast_nullable_to_non_nullable + as int?, + rating: freezed == rating + ? _value.rating + : rating // ignore: cast_nullable_to_non_nullable + as double?, + types: freezed == types + ? _value._types + : types // ignore: cast_nullable_to_non_nullable + as List?, + userRatingsTotal: freezed == userRatingsTotal + ? _value.userRatingsTotal + : userRatingsTotal // ignore: cast_nullable_to_non_nullable + as int?, + utcOffsetMinutes: freezed == utcOffsetMinutes + ? _value.utcOffsetMinutes + : utcOffsetMinutes // ignore: cast_nullable_to_non_nullable + as int?, + viewport: freezed == viewport + ? _value.viewport + : viewport // ignore: cast_nullable_to_non_nullable + as LatLngBounds?, + websiteUri: freezed == websiteUri + ? _value.websiteUri + : websiteUri // ignore: cast_nullable_to_non_nullable + as Uri?, + reviews: freezed == reviews + ? _value._reviews + : reviews // ignore: cast_nullable_to_non_nullable + as List?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PlaceImpl implements _Place { + const _$PlaceImpl( + {required this.id, + required this.address, + required final List? addressComponents, + required this.businessStatus, + required final List? attributions, + required this.latLng, + required this.name, + required this.nameLanguageCode, + required this.openingHours, + required this.phoneNumber, + required final List? photoMetadatas, + required this.plusCode, + required this.priceLevel, + required this.rating, + required final List? types, + required this.userRatingsTotal, + required this.utcOffsetMinutes, + required this.viewport, + required this.websiteUri, + required final List? reviews}) + : _addressComponents = addressComponents, + _attributions = attributions, + _photoMetadatas = photoMetadatas, + _types = types, + _reviews = reviews; + + factory _$PlaceImpl.fromJson(Map json) => + _$$PlaceImplFromJson(json); + + @override + final String? id; + @override + final String? address; + final List? _addressComponents; + @override + List? get addressComponents { + final value = _addressComponents; + if (value == null) return null; + if (_addressComponents is EqualUnmodifiableListView) + return _addressComponents; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final BusinessStatus? businessStatus; + final List? _attributions; + @override + List? get attributions { + final value = _attributions; + if (value == null) return null; + if (_attributions is EqualUnmodifiableListView) return _attributions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final LatLng? latLng; + @override + final String? name; + @override + final String? nameLanguageCode; + @override + final OpeningHours? openingHours; + @override + final String? phoneNumber; + final List? _photoMetadatas; + @override + List? get photoMetadatas { + final value = _photoMetadatas; + if (value == null) return null; + if (_photoMetadatas is EqualUnmodifiableListView) return _photoMetadatas; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final PlusCode? plusCode; + @override + final int? priceLevel; + @override + final double? rating; + final List? _types; + @override + List? get types { + final value = _types; + if (value == null) return null; + if (_types is EqualUnmodifiableListView) return _types; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + final int? userRatingsTotal; + @override + final int? utcOffsetMinutes; + @override + final LatLngBounds? viewport; + @override + final Uri? websiteUri; + final List? _reviews; + @override + List? get reviews { + final value = _reviews; + if (value == null) return null; + if (_reviews is EqualUnmodifiableListView) return _reviews; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + @override + String toString() { + return 'Place(id: $id, address: $address, addressComponents: $addressComponents, businessStatus: $businessStatus, attributions: $attributions, latLng: $latLng, name: $name, nameLanguageCode: $nameLanguageCode, openingHours: $openingHours, phoneNumber: $phoneNumber, photoMetadatas: $photoMetadatas, plusCode: $plusCode, priceLevel: $priceLevel, rating: $rating, types: $types, userRatingsTotal: $userRatingsTotal, utcOffsetMinutes: $utcOffsetMinutes, viewport: $viewport, websiteUri: $websiteUri, reviews: $reviews)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PlaceImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.address, address) || other.address == address) && + const DeepCollectionEquality() + .equals(other._addressComponents, _addressComponents) && + (identical(other.businessStatus, businessStatus) || + other.businessStatus == businessStatus) && + const DeepCollectionEquality() + .equals(other._attributions, _attributions) && + (identical(other.latLng, latLng) || other.latLng == latLng) && + (identical(other.name, name) || other.name == name) && + (identical(other.nameLanguageCode, nameLanguageCode) || + other.nameLanguageCode == nameLanguageCode) && + (identical(other.openingHours, openingHours) || + other.openingHours == openingHours) && + (identical(other.phoneNumber, phoneNumber) || + other.phoneNumber == phoneNumber) && + const DeepCollectionEquality() + .equals(other._photoMetadatas, _photoMetadatas) && + (identical(other.plusCode, plusCode) || + other.plusCode == plusCode) && + (identical(other.priceLevel, priceLevel) || + other.priceLevel == priceLevel) && + (identical(other.rating, rating) || other.rating == rating) && + const DeepCollectionEquality().equals(other._types, _types) && + (identical(other.userRatingsTotal, userRatingsTotal) || + other.userRatingsTotal == userRatingsTotal) && + (identical(other.utcOffsetMinutes, utcOffsetMinutes) || + other.utcOffsetMinutes == utcOffsetMinutes) && + (identical(other.viewport, viewport) || + other.viewport == viewport) && + (identical(other.websiteUri, websiteUri) || + other.websiteUri == websiteUri) && + const DeepCollectionEquality().equals(other._reviews, _reviews)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hashAll([ + runtimeType, + id, + address, + const DeepCollectionEquality().hash(_addressComponents), + businessStatus, + const DeepCollectionEquality().hash(_attributions), + latLng, + name, + nameLanguageCode, + openingHours, + phoneNumber, + const DeepCollectionEquality().hash(_photoMetadatas), + plusCode, + priceLevel, + rating, + const DeepCollectionEquality().hash(_types), + userRatingsTotal, + utcOffsetMinutes, + viewport, + websiteUri, + const DeepCollectionEquality().hash(_reviews) + ]); + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$PlaceImplCopyWith<_$PlaceImpl> get copyWith => + __$$PlaceImplCopyWithImpl<_$PlaceImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PlaceImplToJson( + this, + ); + } +} + +abstract class _Place implements Place { + const factory _Place( + {required final String? id, + required final String? address, + required final List? addressComponents, + required final BusinessStatus? businessStatus, + required final List? attributions, + required final LatLng? latLng, + required final String? name, + required final String? nameLanguageCode, + required final OpeningHours? openingHours, + required final String? phoneNumber, + required final List? photoMetadatas, + required final PlusCode? plusCode, + required final int? priceLevel, + required final double? rating, + required final List? types, + required final int? userRatingsTotal, + required final int? utcOffsetMinutes, + required final LatLngBounds? viewport, + required final Uri? websiteUri, + required final List? reviews}) = _$PlaceImpl; + + factory _Place.fromJson(Map json) = _$PlaceImpl.fromJson; + + @override + String? get id; + @override + String? get address; + @override + List? get addressComponents; + @override + BusinessStatus? get businessStatus; + @override + List? get attributions; + @override + LatLng? get latLng; + @override + String? get name; + @override + String? get nameLanguageCode; + @override + OpeningHours? get openingHours; + @override + String? get phoneNumber; + @override + List? get photoMetadatas; + @override + PlusCode? get plusCode; + @override + int? get priceLevel; + @override + double? get rating; + @override + List? get types; + @override + int? get userRatingsTotal; + @override + int? get utcOffsetMinutes; + @override + LatLngBounds? get viewport; + @override + Uri? get websiteUri; + @override + List? get reviews; + + /// Create a copy of Place + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$PlaceImplCopyWith<_$PlaceImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place.g.dart new file mode 100644 index 0000000..e83e52f --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place.g.dart @@ -0,0 +1,332 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'place.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$PlaceImpl _$$PlaceImplFromJson(Map json) => _$PlaceImpl( + id: json['id'] as String?, + address: json['address'] as String?, + addressComponents: (json['addressComponents'] as List?) + ?.map((e) => + AddressComponent.fromJson(Map.from(e as Map))) + .toList(), + businessStatus: json['businessStatus'] == null + ? null + : BusinessStatus.fromJson(json['businessStatus'] as String), + attributions: (json['attributions'] as List?) + ?.map((e) => e as String) + .toList(), + latLng: json['latLng'] == null + ? null + : LatLng.fromJson(Map.from(json['latLng'] as Map)), + name: json['name'] as String?, + nameLanguageCode: json['nameLanguageCode'] as String?, + openingHours: json['openingHours'] == null + ? null + : OpeningHours.fromJson( + Map.from(json['openingHours'] as Map)), + phoneNumber: json['phoneNumber'] as String?, + photoMetadatas: (json['photoMetadatas'] as List?) + ?.map((e) => + PhotoMetadata.fromJson(Map.from(e as Map))) + .toList(), + plusCode: json['plusCode'] == null + ? null + : PlusCode.fromJson( + Map.from(json['plusCode'] as Map)), + priceLevel: (json['priceLevel'] as num?)?.toInt(), + rating: (json['rating'] as num?)?.toDouble(), + types: (json['types'] as List?) + ?.map((e) => PlaceType.fromJson(e as String)) + .toList(), + userRatingsTotal: (json['userRatingsTotal'] as num?)?.toInt(), + utcOffsetMinutes: (json['utcOffsetMinutes'] as num?)?.toInt(), + viewport: json['viewport'] == null + ? null + : LatLngBounds.fromJson( + Map.from(json['viewport'] as Map)), + websiteUri: json['websiteUri'] == null + ? null + : Uri.parse(json['websiteUri'] as String), + reviews: (json['reviews'] as List?) + ?.map((e) => Review.fromJson(Map.from(e as Map))) + .toList(), + ); + +Map _$$PlaceImplToJson(_$PlaceImpl instance) => + { + 'id': instance.id, + 'address': instance.address, + 'addressComponents': + instance.addressComponents?.map((e) => e.toJson()).toList(), + 'businessStatus': _$BusinessStatusEnumMap[instance.businessStatus], + 'attributions': instance.attributions, + 'latLng': instance.latLng?.toJson(), + 'name': instance.name, + 'nameLanguageCode': instance.nameLanguageCode, + 'openingHours': instance.openingHours?.toJson(), + 'phoneNumber': instance.phoneNumber, + 'photoMetadatas': + instance.photoMetadatas?.map((e) => e.toJson()).toList(), + 'plusCode': instance.plusCode?.toJson(), + 'priceLevel': instance.priceLevel, + 'rating': instance.rating, + 'types': instance.types?.map((e) => _$PlaceTypeEnumMap[e]!).toList(), + 'userRatingsTotal': instance.userRatingsTotal, + 'utcOffsetMinutes': instance.utcOffsetMinutes, + 'viewport': instance.viewport?.toJson(), + 'websiteUri': instance.websiteUri?.toString(), + 'reviews': instance.reviews?.map((e) => e.toJson()).toList(), + }; + +const _$BusinessStatusEnumMap = { + BusinessStatus.Operational: 'OPERATIONAL', + BusinessStatus.ClosedTemporarily: 'CLOSED_TEMPORARILY', + BusinessStatus.ClosedPermanently: 'CLOSED_PERMANENTLY', +}; + +const _$PlaceTypeEnumMap = { + PlaceType.OTHER: 'OTHER', + PlaceType.ACCOUNTING: 'ACCOUNTING', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_1: 'ADMINISTRATIVE_AREA_LEVEL_1', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_2: 'ADMINISTRATIVE_AREA_LEVEL_2', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_3: 'ADMINISTRATIVE_AREA_LEVEL_3', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_4: 'ADMINISTRATIVE_AREA_LEVEL_4', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_5: 'ADMINISTRATIVE_AREA_LEVEL_5', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_6: 'ADMINISTRATIVE_AREA_LEVEL_6', + PlaceType.ADMINISTRATIVE_AREA_LEVEL_7: 'ADMINISTRATIVE_AREA_LEVEL_7', + PlaceType.AIRPORT: 'AIRPORT', + PlaceType.AMUSEMENT_PARK: 'AMUSEMENT_PARK', + PlaceType.AQUARIUM: 'AQUARIUM', + PlaceType.ARCHIPELAGO: 'ARCHIPELAGO', + PlaceType.ART_GALLERY: 'ART_GALLERY', + PlaceType.ATM: 'ATM', + PlaceType.BAKERY: 'BAKERY', + PlaceType.BANK: 'BANK', + PlaceType.BAR: 'BAR', + PlaceType.BEAUTY_SALON: 'BEAUTY_SALON', + PlaceType.BICYCLE_STORE: 'BICYCLE_STORE', + PlaceType.BOOK_STORE: 'BOOK_STORE', + PlaceType.BOWLING_ALLEY: 'BOWLING_ALLEY', + PlaceType.BUS_STATION: 'BUS_STATION', + PlaceType.CAFE: 'CAFE', + PlaceType.CAMPGROUND: 'CAMPGROUND', + PlaceType.CAR_DEALER: 'CAR_DEALER', + PlaceType.CAR_RENTAL: 'CAR_RENTAL', + PlaceType.CAR_REPAIR: 'CAR_REPAIR', + PlaceType.CAR_WASH: 'CAR_WASH', + PlaceType.CASINO: 'CASINO', + PlaceType.CEMETERY: 'CEMETERY', + PlaceType.CHURCH: 'CHURCH', + PlaceType.CITY_HALL: 'CITY_HALL', + PlaceType.CLOTHING_STORE: 'CLOTHING_STORE', + PlaceType.COLLOQUIAL_AREA: 'COLLOQUIAL_AREA', + PlaceType.CONTINENT: 'CONTINENT', + PlaceType.CONVENIENCE_STORE: 'CONVENIENCE_STORE', + PlaceType.COUNTRY: 'COUNTRY', + PlaceType.COURTHOUSE: 'COURTHOUSE', + PlaceType.DENTIST: 'DENTIST', + PlaceType.DEPARTMENT_STORE: 'DEPARTMENT_STORE', + PlaceType.DOCTOR: 'DOCTOR', + PlaceType.DRUGSTORE: 'DRUGSTORE', + PlaceType.ELECTRICIAN: 'ELECTRICIAN', + PlaceType.ELECTRONICS_STORE: 'ELECTRONICS_STORE', + PlaceType.EMBASSY: 'EMBASSY', + PlaceType.ESTABLISHMENT: 'ESTABLISHMENT', + PlaceType.FINANCE: 'FINANCE', + PlaceType.FIRE_STATION: 'FIRE_STATION', + PlaceType.FLOOR: 'FLOOR', + PlaceType.FLORIST: 'FLORIST', + PlaceType.FOOD: 'FOOD', + PlaceType.FUNERAL_HOME: 'FUNERAL_HOME', + PlaceType.FURNITURE_STORE: 'FURNITURE_STORE', + PlaceType.GAS_STATION: 'GAS_STATION', + PlaceType.GENERAL_CONTRACTOR: 'GENERAL_CONTRACTOR', + PlaceType.GEOCODE: 'GEOCODE', + PlaceType.GROCERY_OR_SUPERMARKET: 'GROCERY_OR_SUPERMARKET', + PlaceType.GYM: 'GYM', + PlaceType.HAIR_CARE: 'HAIR_CARE', + PlaceType.HARDWARE_STORE: 'HARDWARE_STORE', + PlaceType.HEALTH: 'HEALTH', + PlaceType.HINDU_TEMPLE: 'HINDU_TEMPLE', + PlaceType.HOME_GOODS_STORE: 'HOME_GOODS_STORE', + PlaceType.HOSPITAL: 'HOSPITAL', + PlaceType.INSURANCE_AGENCY: 'INSURANCE_AGENCY', + PlaceType.INTERSECTION: 'INTERSECTION', + PlaceType.JEWELRY_STORE: 'JEWELRY_STORE', + PlaceType.LAUNDRY: 'LAUNDRY', + PlaceType.LANDMARK: 'LANDMARK', + PlaceType.LAWYER: 'LAWYER', + PlaceType.LIBRARY: 'LIBRARY', + PlaceType.LIGHT_RAIL_STATION: 'LIGHT_RAIL_STATION', + PlaceType.LIQUOR_STORE: 'LIQUOR_STORE', + PlaceType.LOCAL_GOVERNMENT_OFFICE: 'LOCAL_GOVERNMENT_OFFICE', + PlaceType.LOCALITY: 'LOCALITY', + PlaceType.LOCKSMITH: 'LOCKSMITH', + PlaceType.LODGING: 'LODGING', + PlaceType.MEAL_DELIVERY: 'MEAL_DELIVERY', + PlaceType.MEAL_TAKEAWAY: 'MEAL_TAKEAWAY', + PlaceType.MOSQUE: 'MOSQUE', + PlaceType.MOVIE_RENTAL: 'MOVIE_RENTAL', + PlaceType.MOVIE_THEATER: 'MOVIE_THEATER', + PlaceType.MOVING_COMPANY: 'MOVING_COMPANY', + PlaceType.MUSEUM: 'MUSEUM', + PlaceType.NATURAL_FEATURE: 'NATURAL_FEATURE', + PlaceType.NEIGHBORHOOD: 'NEIGHBORHOOD', + PlaceType.NIGHT_CLUB: 'NIGHT_CLUB', + PlaceType.PAINTER: 'PAINTER', + PlaceType.PARK: 'PARK', + PlaceType.PARKING: 'PARKING', + PlaceType.PET_STORE: 'PET_STORE', + PlaceType.PHARMACY: 'PHARMACY', + PlaceType.PHYSIOTHERAPIST: 'PHYSIOTHERAPIST', + PlaceType.PLACE_OF_WORSHIP: 'PLACE_OF_WORSHIP', + PlaceType.PLUMBER: 'PLUMBER', + PlaceType.PLUS_CODE: 'PLUS_CODE', + PlaceType.POINT_OF_INTEREST: 'POINT_OF_INTEREST', + PlaceType.POLICE: 'POLICE', + PlaceType.POLITICAL: 'POLITICAL', + PlaceType.POST_BOX: 'POST_BOX', + PlaceType.POST_OFFICE: 'POST_OFFICE', + PlaceType.POSTAL_CODE_PREFIX: 'POSTAL_CODE_PREFIX', + PlaceType.POSTAL_CODE_SUFFIX: 'POSTAL_CODE_SUFFIX', + PlaceType.POSTAL_CODE: 'POSTAL_CODE', + PlaceType.POSTAL_TOWN: 'POSTAL_TOWN', + PlaceType.PREMISE: 'PREMISE', + PlaceType.PRIMARY_SCHOOL: 'PRIMARY_SCHOOL', + PlaceType.REAL_ESTATE_AGENCY: 'REAL_ESTATE_AGENCY', + PlaceType.RESTAURANT: 'RESTAURANT', + PlaceType.ROOFING_CONTRACTOR: 'ROOFING_CONTRACTOR', + PlaceType.ROOM: 'ROOM', + PlaceType.ROUTE: 'ROUTE', + PlaceType.RV_PARK: 'RV_PARK', + PlaceType.SCHOOL: 'SCHOOL', + PlaceType.SECONDARY_SCHOOL: 'SECONDARY_SCHOOL', + PlaceType.SHOE_STORE: 'SHOE_STORE', + PlaceType.SHOPPING_MALL: 'SHOPPING_MALL', + PlaceType.SPA: 'SPA', + PlaceType.STADIUM: 'STADIUM', + PlaceType.STORAGE: 'STORAGE', + PlaceType.STORE: 'STORE', + PlaceType.STREET_ADDRESS: 'STREET_ADDRESS', + PlaceType.STREET_NUMBER: 'STREET_NUMBER', + PlaceType.SUBLOCALITY_LEVEL_1: 'SUBLOCALITY_LEVEL_1', + PlaceType.SUBLOCALITY_LEVEL_2: 'SUBLOCALITY_LEVEL_2', + PlaceType.SUBLOCALITY_LEVEL_3: 'SUBLOCALITY_LEVEL_3', + PlaceType.SUBLOCALITY_LEVEL_4: 'SUBLOCALITY_LEVEL_4', + PlaceType.SUBLOCALITY_LEVEL_5: 'SUBLOCALITY_LEVEL_5', + PlaceType.SUBLOCALITY: 'SUBLOCALITY', + PlaceType.SUBPREMISE: 'SUBPREMISE', + PlaceType.SUBWAY_STATION: 'SUBWAY_STATION', + PlaceType.SUPERMARKET: 'SUPERMARKET', + PlaceType.SYNAGOGUE: 'SYNAGOGUE', + PlaceType.TAXI_STAND: 'TAXI_STAND', + PlaceType.TOURIST_ATTRACTION: 'TOURIST_ATTRACTION', + PlaceType.TOWN_SQUARE: 'TOWN_SQUARE', + PlaceType.TRAIN_STATION: 'TRAIN_STATION', + PlaceType.TRANSIT_STATION: 'TRANSIT_STATION', + PlaceType.TRAVEL_AGENCY: 'TRAVEL_AGENCY', + PlaceType.UNIVERSITY: 'UNIVERSITY', + PlaceType.VETERINARY_CARE: 'VETERINARY_CARE', + PlaceType.ZOO: 'ZOO', + PlaceType.AMERICAN_RESTAURANT: 'AMERICAN_RESTAURANT', + PlaceType.DISCOUNT_STORE: 'DISCOUNT_STORE', + PlaceType.ICE_CREAM_SHOP: 'ICE_CREAM_SHOP', + PlaceType.SANDWICH_SHOP: 'SANDWICH_SHOP', + PlaceType.AMUSEMENT_CENTER: 'AMUSEMENT_CENTER', + PlaceType.DOG_PARK: 'DOG_PARK', + PlaceType.INDIAN_RESTAURANT: 'INDIAN_RESTAURANT', + PlaceType.SCHOOL_DISTRICT: 'SCHOOL_DISTRICT', + PlaceType.ATHLETIC_FIELD: 'ATHLETIC_FIELD', + PlaceType.ELECTRIC_VEHICLE_CHARGING_STATION: + 'ELECTRIC_VEHICLE_CHARGING_STATION', + PlaceType.INDONESIAN_RESTAURANT: 'INDONESIAN_RESTAURANT', + PlaceType.SEAFOOD_RESTAURANT: 'SEAFOOD_RESTAURANT', + PlaceType.AUTO_PARTS_STORE: 'AUTO_PARTS_STORE', + PlaceType.EVENT_VENUE: 'EVENT_VENUE', + PlaceType.ITALIAN_RESTAURANT: 'ITALIAN_RESTAURANT', + PlaceType.SKI_RESORT: 'SKI_RESORT', + PlaceType.BANQUET_HALL: 'BANQUET_HALL', + PlaceType.EXTENDED_STAY_HOTEL: 'EXTENDED_STAY_HOTEL', + PlaceType.JAPANESE_RESTAURANT: 'JAPANESE_RESTAURANT', + PlaceType.SPANISH_RESTAURANT: 'SPANISH_RESTAURANT', + PlaceType.BARBECUE_RESTAURANT: 'BARBECUE_RESTAURANT', + PlaceType.FARM: 'FARM', + PlaceType.KOREAN_RESTAURANT: 'KOREAN_RESTAURANT', + PlaceType.SPORTING_GOODS_STORE: 'SPORTING_GOODS_STORE', + PlaceType.BARBER_SHOP: 'BARBER_SHOP', + PlaceType.FARMSTAY: 'FARMSTAY', + PlaceType.LEBANESE_RESTAURANT: 'LEBANESE_RESTAURANT', + PlaceType.SPORTS_CLUB: 'SPORTS_CLUB', + PlaceType.BED_AND_BREAKFAST: 'BED_AND_BREAKFAST', + PlaceType.FAST_FOOD_RESTAURANT: 'FAST_FOOD_RESTAURANT', + PlaceType.MARINA: 'MARINA', + PlaceType.SPORTS_COMPLEX: 'SPORTS_COMPLEX', + PlaceType.BRAZILIAN_RESTAURANT: 'BRAZILIAN_RESTAURANT', + PlaceType.FERRY_TERMINAL: 'FERRY_TERMINAL', + PlaceType.MARKET: 'MARKET', + PlaceType.STEAK_HOUSE: 'STEAK_HOUSE', + PlaceType.BREAKFAST_RESTAURANT: 'BREAKFAST_RESTAURANT', + PlaceType.FITNESS_CENTER: 'FITNESS_CENTER', + PlaceType.MEDICAL_LAB: 'MEDICAL_LAB', + PlaceType.SUSHI_RESTAURANT: 'SUSHI_RESTAURANT', + PlaceType.BRUNCH_RESTAURANT: 'BRUNCH_RESTAURANT', + PlaceType.FRENCH_RESTAURANT: 'FRENCH_RESTAURANT', + PlaceType.MEDITERRANEAN_RESTAURANT: 'MEDITERRANEAN_RESTAURANT', + PlaceType.SWIMMING_POOL: 'SWIMMING_POOL', + PlaceType.BUS_STOP: 'BUS_STOP', + PlaceType.GIFT_SHOP: 'GIFT_SHOP', + PlaceType.MEXICAN_RESTAURANT: 'MEXICAN_RESTAURANT', + PlaceType.TAILOR: 'TAILOR', + PlaceType.CAMPING_CABIN: 'CAMPING_CABIN', + PlaceType.GOLF_COURSE: 'GOLF_COURSE', + PlaceType.MIDDLE_EASTERN_RESTAURANT: 'MIDDLE_EASTERN_RESTAURANT', + PlaceType.TELECOMMUNICATIONS_SERVICE_PROVIDER: + 'TELECOMMUNICATIONS_SERVICE_PROVIDER', + PlaceType.CELL_PHONE_STORE: 'CELL_PHONE_STORE', + PlaceType.GREEK_RESTAURANT: 'GREEK_RESTAURANT', + PlaceType.MOTEL: 'MOTEL', + PlaceType.THAI_RESTAURANT: 'THAI_RESTAURANT', + PlaceType.CHILD_CARE_AGENCY: 'CHILD_CARE_AGENCY', + PlaceType.GROCERY_STORE: 'GROCERY_STORE', + PlaceType.NATIONAL_PARK: 'NATIONAL_PARK', + PlaceType.TRANSIT_DEPOT: 'TRANSIT_DEPOT', + PlaceType.CHINESE_RESTAURANT: 'CHINESE_RESTAURANT', + PlaceType.GUEST_HOUSE: 'GUEST_HOUSE', + PlaceType.PARK_AND_RIDE: 'PARK_AND_RIDE', + PlaceType.TRUCK_STOP: 'TRUCK_STOP', + PlaceType.COFFEE_SHOP: 'COFFEE_SHOP', + PlaceType.HAIR_SALON: 'HAIR_SALON', + PlaceType.PERFORMING_ARTS_THEATER: 'PERFORMING_ARTS_THEATER', + PlaceType.TURKISH_RESTAURANT: 'TURKISH_RESTAURANT', + PlaceType.COMMUNITY_CENTER: 'COMMUNITY_CENTER', + PlaceType.HAMBURGER_RESTAURANT: 'HAMBURGER_RESTAURANT', + PlaceType.PIZZA_RESTAURANT: 'PIZZA_RESTAURANT', + PlaceType.VEGAN_RESTAURANT: 'VEGAN_RESTAURANT', + PlaceType.CONSULTANT: 'CONSULTANT', + PlaceType.HELIPORT: 'HELIPORT', + PlaceType.PLAYGROUND: 'PLAYGROUND', + PlaceType.VEGETARIAN_RESTAURANT: 'VEGETARIAN_RESTAURANT', + PlaceType.CONVENTION_CENTER: 'CONVENTION_CENTER', + PlaceType.HIKING_AREA: 'HIKING_AREA', + PlaceType.PRESCHOOL: 'PRESCHOOL', + PlaceType.VIETNAMESE_RESTAURANT: 'VIETNAMESE_RESTAURANT', + PlaceType.COTTAGE: 'COTTAGE', + PlaceType.HISTORICAL_LANDMARK: 'HISTORICAL_LANDMARK', + PlaceType.PRIVATE_GUEST_ROOM: 'PRIVATE_GUEST_ROOM', + PlaceType.VISITOR_CENTER: 'VISITOR_CENTER', + PlaceType.COURIER_SERVICE: 'COURIER_SERVICE', + PlaceType.HOME_IMPROVEMENT_STORE: 'HOME_IMPROVEMENT_STORE', + PlaceType.RAMEN_RESTAURANT: 'RAMEN_RESTAURANT', + PlaceType.WEDDING_VENUE: 'WEDDING_VENUE', + PlaceType.CULTURAL_CENTER: 'CULTURAL_CENTER', + PlaceType.HOSTEL: 'HOSTEL', + PlaceType.RESORT_HOTEL: 'RESORT_HOTEL', + PlaceType.WHOLESALER: 'WHOLESALER', + PlaceType.DENTAL_CLINIC: 'DENTAL_CLINIC', + PlaceType.HOTEL: 'HOTEL', + PlaceType.REST_STOP: 'REST_STOP', +}; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place_field.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place_field.g.dart new file mode 100644 index 0000000..aedfe8f --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place_field.g.dart @@ -0,0 +1,46 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'place_field.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +const _$PlaceFieldEnumMap = { + PlaceField.Address: 'ADDRESS', + PlaceField.AddressComponents: 'ADDRESS_COMPONENTS', + PlaceField.BusinessStatus: 'BUSINESS_STATUS', + PlaceField.Id: 'ID', + PlaceField.Location: 'LAT_LNG', + PlaceField.Name: 'NAME', + PlaceField.OpeningHours: 'OPENING_HOURS', + PlaceField.PhoneNumber: 'PHONE_NUMBER', + PlaceField.PhotoMetadatas: 'PHOTO_METADATAS', + PlaceField.PlusCode: 'PLUS_CODE', + PlaceField.PriceLevel: 'PRICE_LEVEL', + PlaceField.Rating: 'RATING', + PlaceField.Types: 'TYPES', + PlaceField.UserRatingsTotal: 'USER_RATINGS_TOTAL', + PlaceField.UTCOffset: 'UTC_OFFSET', + PlaceField.Viewport: 'VIEWPORT', + PlaceField.WebsiteUri: 'WEBSITE_URI', + PlaceField.CurbsidePickup: 'CURBSIDE_PICKUP', + PlaceField.CurrentOpeningHours: 'CURRENT_OPENING_HOURS', + PlaceField.Delivery: 'DELIVERY', + PlaceField.DineIn: 'DINE_IN', + PlaceField.EditorialSummary: 'EDITORIAL_SUMMARY', + PlaceField.IconBackgroundColor: 'ICON_BACKGROUND_COLOR', + PlaceField.IconUrl: 'ICON_URL', + PlaceField.Reservable: 'RESERVABLE', + PlaceField.Reviews: 'REVIEWS', + PlaceField.SecondaryOpeningHours: 'SECONDARY_OPENING_HOURS', + PlaceField.ServesBeer: 'SERVES_BEER', + PlaceField.ServesBreakfast: 'SERVES_BREAKFAST', + PlaceField.ServesBrunch: 'SERVES_BRUNCH', + PlaceField.ServesDinner: 'SERVES_DINNER', + PlaceField.ServesLunch: 'SERVES_LUNCH', + PlaceField.ServesVegetarianFood: 'SERVES_VEGETARIAN_FOOD', + PlaceField.ServesWine: 'SERVES_WINE', + PlaceField.Takeout: 'TAKEOUT', + PlaceField.WheelchairAccessibleEntrance: 'WHEELCHAIR_ACCESSIBLE_ENTRANCE', +}; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place_local_time.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place_local_time.freezed.dart new file mode 100644 index 0000000..e8fc50b --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place_local_time.freezed.dart @@ -0,0 +1,192 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'place_local_time.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +PlaceLocalTime _$PlaceLocalTimeFromJson(Map json) { + return _PlaceLocalTime.fromJson(json); +} + +/// @nodoc +mixin _$PlaceLocalTime { + /// The hours in 24 hour format (0 <= return value < 24). + int get hours => throw _privateConstructorUsedError; + + /// The minutes (0 <= return value < 60). + int get minutes => throw _privateConstructorUsedError; + + /// Serializes this PlaceLocalTime to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of PlaceLocalTime + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $PlaceLocalTimeCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PlaceLocalTimeCopyWith<$Res> { + factory $PlaceLocalTimeCopyWith( + PlaceLocalTime value, $Res Function(PlaceLocalTime) then) = + _$PlaceLocalTimeCopyWithImpl<$Res, PlaceLocalTime>; + @useResult + $Res call({int hours, int minutes}); +} + +/// @nodoc +class _$PlaceLocalTimeCopyWithImpl<$Res, $Val extends PlaceLocalTime> + implements $PlaceLocalTimeCopyWith<$Res> { + _$PlaceLocalTimeCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of PlaceLocalTime + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hours = null, + Object? minutes = null, + }) { + return _then(_value.copyWith( + hours: null == hours + ? _value.hours + : hours // ignore: cast_nullable_to_non_nullable + as int, + minutes: null == minutes + ? _value.minutes + : minutes // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PlaceLocalTimeImplCopyWith<$Res> + implements $PlaceLocalTimeCopyWith<$Res> { + factory _$$PlaceLocalTimeImplCopyWith(_$PlaceLocalTimeImpl value, + $Res Function(_$PlaceLocalTimeImpl) then) = + __$$PlaceLocalTimeImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int hours, int minutes}); +} + +/// @nodoc +class __$$PlaceLocalTimeImplCopyWithImpl<$Res> + extends _$PlaceLocalTimeCopyWithImpl<$Res, _$PlaceLocalTimeImpl> + implements _$$PlaceLocalTimeImplCopyWith<$Res> { + __$$PlaceLocalTimeImplCopyWithImpl( + _$PlaceLocalTimeImpl _value, $Res Function(_$PlaceLocalTimeImpl) _then) + : super(_value, _then); + + /// Create a copy of PlaceLocalTime + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hours = null, + Object? minutes = null, + }) { + return _then(_$PlaceLocalTimeImpl( + hours: null == hours + ? _value.hours + : hours // ignore: cast_nullable_to_non_nullable + as int, + minutes: null == minutes + ? _value.minutes + : minutes // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PlaceLocalTimeImpl implements _PlaceLocalTime { + const _$PlaceLocalTimeImpl({required this.hours, required this.minutes}); + + factory _$PlaceLocalTimeImpl.fromJson(Map json) => + _$$PlaceLocalTimeImplFromJson(json); + + /// The hours in 24 hour format (0 <= return value < 24). + @override + final int hours; + + /// The minutes (0 <= return value < 60). + @override + final int minutes; + + @override + String toString() { + return 'PlaceLocalTime(hours: $hours, minutes: $minutes)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PlaceLocalTimeImpl && + (identical(other.hours, hours) || other.hours == hours) && + (identical(other.minutes, minutes) || other.minutes == minutes)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, hours, minutes); + + /// Create a copy of PlaceLocalTime + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$PlaceLocalTimeImplCopyWith<_$PlaceLocalTimeImpl> get copyWith => + __$$PlaceLocalTimeImplCopyWithImpl<_$PlaceLocalTimeImpl>( + this, _$identity); + + @override + Map toJson() { + return _$$PlaceLocalTimeImplToJson( + this, + ); + } +} + +abstract class _PlaceLocalTime implements PlaceLocalTime { + const factory _PlaceLocalTime( + {required final int hours, + required final int minutes}) = _$PlaceLocalTimeImpl; + + factory _PlaceLocalTime.fromJson(Map json) = + _$PlaceLocalTimeImpl.fromJson; + + /// The hours in 24 hour format (0 <= return value < 24). + @override + int get hours; + + /// The minutes (0 <= return value < 60). + @override + int get minutes; + + /// Create a copy of PlaceLocalTime + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$PlaceLocalTimeImplCopyWith<_$PlaceLocalTimeImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/place_local_time.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/place_local_time.g.dart new file mode 100644 index 0000000..daed779 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/place_local_time.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'place_local_time.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$PlaceLocalTimeImpl _$$PlaceLocalTimeImplFromJson(Map json) => + _$PlaceLocalTimeImpl( + hours: (json['hours'] as num).toInt(), + minutes: (json['minutes'] as num).toInt(), + ); + +Map _$$PlaceLocalTimeImplToJson( + _$PlaceLocalTimeImpl instance) => + { + 'hours': instance.hours, + 'minutes': instance.minutes, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/plus_code.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/plus_code.freezed.dart new file mode 100644 index 0000000..024a87d --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/plus_code.freezed.dart @@ -0,0 +1,192 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'plus_code.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +PlusCode _$PlusCodeFromJson(Map json) { + return _PlusCode.fromJson(json); +} + +/// @nodoc +mixin _$PlusCode { + /// The compound plus code, e.g. "9G8F+5W Zurich, Switzerland". + String get compoundCode => throw _privateConstructorUsedError; + + /// The geo plus code, e.g. "8FVC9G8F+5W". + String get globalCode => throw _privateConstructorUsedError; + + /// Serializes this PlusCode to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of PlusCode + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $PlusCodeCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PlusCodeCopyWith<$Res> { + factory $PlusCodeCopyWith(PlusCode value, $Res Function(PlusCode) then) = + _$PlusCodeCopyWithImpl<$Res, PlusCode>; + @useResult + $Res call({String compoundCode, String globalCode}); +} + +/// @nodoc +class _$PlusCodeCopyWithImpl<$Res, $Val extends PlusCode> + implements $PlusCodeCopyWith<$Res> { + _$PlusCodeCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of PlusCode + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? compoundCode = null, + Object? globalCode = null, + }) { + return _then(_value.copyWith( + compoundCode: null == compoundCode + ? _value.compoundCode + : compoundCode // ignore: cast_nullable_to_non_nullable + as String, + globalCode: null == globalCode + ? _value.globalCode + : globalCode // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PlusCodeImplCopyWith<$Res> + implements $PlusCodeCopyWith<$Res> { + factory _$$PlusCodeImplCopyWith( + _$PlusCodeImpl value, $Res Function(_$PlusCodeImpl) then) = + __$$PlusCodeImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String compoundCode, String globalCode}); +} + +/// @nodoc +class __$$PlusCodeImplCopyWithImpl<$Res> + extends _$PlusCodeCopyWithImpl<$Res, _$PlusCodeImpl> + implements _$$PlusCodeImplCopyWith<$Res> { + __$$PlusCodeImplCopyWithImpl( + _$PlusCodeImpl _value, $Res Function(_$PlusCodeImpl) _then) + : super(_value, _then); + + /// Create a copy of PlusCode + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? compoundCode = null, + Object? globalCode = null, + }) { + return _then(_$PlusCodeImpl( + compoundCode: null == compoundCode + ? _value.compoundCode + : compoundCode // ignore: cast_nullable_to_non_nullable + as String, + globalCode: null == globalCode + ? _value.globalCode + : globalCode // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$PlusCodeImpl implements _PlusCode { + const _$PlusCodeImpl({required this.compoundCode, required this.globalCode}); + + factory _$PlusCodeImpl.fromJson(Map json) => + _$$PlusCodeImplFromJson(json); + + /// The compound plus code, e.g. "9G8F+5W Zurich, Switzerland". + @override + final String compoundCode; + + /// The geo plus code, e.g. "8FVC9G8F+5W". + @override + final String globalCode; + + @override + String toString() { + return 'PlusCode(compoundCode: $compoundCode, globalCode: $globalCode)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PlusCodeImpl && + (identical(other.compoundCode, compoundCode) || + other.compoundCode == compoundCode) && + (identical(other.globalCode, globalCode) || + other.globalCode == globalCode)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, compoundCode, globalCode); + + /// Create a copy of PlusCode + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$PlusCodeImplCopyWith<_$PlusCodeImpl> get copyWith => + __$$PlusCodeImplCopyWithImpl<_$PlusCodeImpl>(this, _$identity); + + @override + Map toJson() { + return _$$PlusCodeImplToJson( + this, + ); + } +} + +abstract class _PlusCode implements PlusCode { + const factory _PlusCode( + {required final String compoundCode, + required final String globalCode}) = _$PlusCodeImpl; + + factory _PlusCode.fromJson(Map json) = + _$PlusCodeImpl.fromJson; + + /// The compound plus code, e.g. "9G8F+5W Zurich, Switzerland". + @override + String get compoundCode; + + /// The geo plus code, e.g. "8FVC9G8F+5W". + @override + String get globalCode; + + /// Create a copy of PlusCode + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$PlusCodeImplCopyWith<_$PlusCodeImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/plus_code.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/plus_code.g.dart new file mode 100644 index 0000000..1010f5e --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/plus_code.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'plus_code.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$PlusCodeImpl _$$PlusCodeImplFromJson(Map json) => _$PlusCodeImpl( + compoundCode: json['compoundCode'] as String, + globalCode: json['globalCode'] as String, + ); + +Map _$$PlusCodeImplToJson(_$PlusCodeImpl instance) => + { + 'compoundCode': instance.compoundCode, + 'globalCode': instance.globalCode, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/rank_preference.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/rank_preference.g.dart new file mode 100644 index 0000000..820b20c --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/rank_preference.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'rank_preference.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +const _$TextSearchRankPreferenceEnumMap = { + TextSearchRankPreference.Distance: 'DISTANCE', + TextSearchRankPreference.Relevance: 'RELEVANCE', +}; + +const _$NearbySearchRankPreferenceEnumMap = { + NearbySearchRankPreference.Distance: 'DISTANCE', + NearbySearchRankPreference.Popularity: 'POPULARITY', +}; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/review.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/review.freezed.dart new file mode 100644 index 0000000..697aa9b --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/review.freezed.dart @@ -0,0 +1,411 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'review.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +Review _$ReviewFromJson(Map json) { + return _Review.fromJson(json); +} + +/// @nodoc +mixin _$Review { + /// The attribution that must be shown to the user if this review is displayed. + String get attribution => throw _privateConstructorUsedError; + + /// This review's AuthorAttribution. + AuthorAttribution get authorAttribution => throw _privateConstructorUsedError; + + /// A whole number between 1.0 and 5.0 (inclusive), meaning the number of stars. + double get rating => throw _privateConstructorUsedError; + + /// The publish time for the review, expressed in "yyyy-MM-dd HH:mm:ss" format of UTC timezone. + String get publishTime => throw _privateConstructorUsedError; + + /// A human-readable description of the relative publish time of a review, such as "a month ago", or "in the last week", based on the time elapsed. + String get relativePublishTimeDescription => + throw _privateConstructorUsedError; + + /// The text of the review in its original language. + String? get originalText => throw _privateConstructorUsedError; + + /// The language code of the original text of the review. + String? get originalTextLanguageCode => throw _privateConstructorUsedError; + + /// The text of the review. + String? get text => throw _privateConstructorUsedError; + + /// The language code of the text of the review. + String? get textLanguageCode => throw _privateConstructorUsedError; + + /// Serializes this Review to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of Review + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $ReviewCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ReviewCopyWith<$Res> { + factory $ReviewCopyWith(Review value, $Res Function(Review) then) = + _$ReviewCopyWithImpl<$Res, Review>; + @useResult + $Res call( + {String attribution, + AuthorAttribution authorAttribution, + double rating, + String publishTime, + String relativePublishTimeDescription, + String? originalText, + String? originalTextLanguageCode, + String? text, + String? textLanguageCode}); + + $AuthorAttributionCopyWith<$Res> get authorAttribution; +} + +/// @nodoc +class _$ReviewCopyWithImpl<$Res, $Val extends Review> + implements $ReviewCopyWith<$Res> { + _$ReviewCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of Review + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? attribution = null, + Object? authorAttribution = null, + Object? rating = null, + Object? publishTime = null, + Object? relativePublishTimeDescription = null, + Object? originalText = freezed, + Object? originalTextLanguageCode = freezed, + Object? text = freezed, + Object? textLanguageCode = freezed, + }) { + return _then(_value.copyWith( + attribution: null == attribution + ? _value.attribution + : attribution // ignore: cast_nullable_to_non_nullable + as String, + authorAttribution: null == authorAttribution + ? _value.authorAttribution + : authorAttribution // ignore: cast_nullable_to_non_nullable + as AuthorAttribution, + rating: null == rating + ? _value.rating + : rating // ignore: cast_nullable_to_non_nullable + as double, + publishTime: null == publishTime + ? _value.publishTime + : publishTime // ignore: cast_nullable_to_non_nullable + as String, + relativePublishTimeDescription: null == relativePublishTimeDescription + ? _value.relativePublishTimeDescription + : relativePublishTimeDescription // ignore: cast_nullable_to_non_nullable + as String, + originalText: freezed == originalText + ? _value.originalText + : originalText // ignore: cast_nullable_to_non_nullable + as String?, + originalTextLanguageCode: freezed == originalTextLanguageCode + ? _value.originalTextLanguageCode + : originalTextLanguageCode // ignore: cast_nullable_to_non_nullable + as String?, + text: freezed == text + ? _value.text + : text // ignore: cast_nullable_to_non_nullable + as String?, + textLanguageCode: freezed == textLanguageCode + ? _value.textLanguageCode + : textLanguageCode // ignore: cast_nullable_to_non_nullable + as String?, + ) as $Val); + } + + /// Create a copy of Review + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $AuthorAttributionCopyWith<$Res> get authorAttribution { + return $AuthorAttributionCopyWith<$Res>(_value.authorAttribution, (value) { + return _then(_value.copyWith(authorAttribution: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$ReviewImplCopyWith<$Res> implements $ReviewCopyWith<$Res> { + factory _$$ReviewImplCopyWith( + _$ReviewImpl value, $Res Function(_$ReviewImpl) then) = + __$$ReviewImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {String attribution, + AuthorAttribution authorAttribution, + double rating, + String publishTime, + String relativePublishTimeDescription, + String? originalText, + String? originalTextLanguageCode, + String? text, + String? textLanguageCode}); + + @override + $AuthorAttributionCopyWith<$Res> get authorAttribution; +} + +/// @nodoc +class __$$ReviewImplCopyWithImpl<$Res> + extends _$ReviewCopyWithImpl<$Res, _$ReviewImpl> + implements _$$ReviewImplCopyWith<$Res> { + __$$ReviewImplCopyWithImpl( + _$ReviewImpl _value, $Res Function(_$ReviewImpl) _then) + : super(_value, _then); + + /// Create a copy of Review + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? attribution = null, + Object? authorAttribution = null, + Object? rating = null, + Object? publishTime = null, + Object? relativePublishTimeDescription = null, + Object? originalText = freezed, + Object? originalTextLanguageCode = freezed, + Object? text = freezed, + Object? textLanguageCode = freezed, + }) { + return _then(_$ReviewImpl( + attribution: null == attribution + ? _value.attribution + : attribution // ignore: cast_nullable_to_non_nullable + as String, + authorAttribution: null == authorAttribution + ? _value.authorAttribution + : authorAttribution // ignore: cast_nullable_to_non_nullable + as AuthorAttribution, + rating: null == rating + ? _value.rating + : rating // ignore: cast_nullable_to_non_nullable + as double, + publishTime: null == publishTime + ? _value.publishTime + : publishTime // ignore: cast_nullable_to_non_nullable + as String, + relativePublishTimeDescription: null == relativePublishTimeDescription + ? _value.relativePublishTimeDescription + : relativePublishTimeDescription // ignore: cast_nullable_to_non_nullable + as String, + originalText: freezed == originalText + ? _value.originalText + : originalText // ignore: cast_nullable_to_non_nullable + as String?, + originalTextLanguageCode: freezed == originalTextLanguageCode + ? _value.originalTextLanguageCode + : originalTextLanguageCode // ignore: cast_nullable_to_non_nullable + as String?, + text: freezed == text + ? _value.text + : text // ignore: cast_nullable_to_non_nullable + as String?, + textLanguageCode: freezed == textLanguageCode + ? _value.textLanguageCode + : textLanguageCode // ignore: cast_nullable_to_non_nullable + as String?, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$ReviewImpl implements _Review { + const _$ReviewImpl( + {required this.attribution, + required this.authorAttribution, + required this.rating, + required this.publishTime, + required this.relativePublishTimeDescription, + this.originalText, + this.originalTextLanguageCode, + this.text, + this.textLanguageCode}); + + factory _$ReviewImpl.fromJson(Map json) => + _$$ReviewImplFromJson(json); + + /// The attribution that must be shown to the user if this review is displayed. + @override + final String attribution; + + /// This review's AuthorAttribution. + @override + final AuthorAttribution authorAttribution; + + /// A whole number between 1.0 and 5.0 (inclusive), meaning the number of stars. + @override + final double rating; + + /// The publish time for the review, expressed in "yyyy-MM-dd HH:mm:ss" format of UTC timezone. + @override + final String publishTime; + + /// A human-readable description of the relative publish time of a review, such as "a month ago", or "in the last week", based on the time elapsed. + @override + final String relativePublishTimeDescription; + + /// The text of the review in its original language. + @override + final String? originalText; + + /// The language code of the original text of the review. + @override + final String? originalTextLanguageCode; + + /// The text of the review. + @override + final String? text; + + /// The language code of the text of the review. + @override + final String? textLanguageCode; + + @override + String toString() { + return 'Review(attribution: $attribution, authorAttribution: $authorAttribution, rating: $rating, publishTime: $publishTime, relativePublishTimeDescription: $relativePublishTimeDescription, originalText: $originalText, originalTextLanguageCode: $originalTextLanguageCode, text: $text, textLanguageCode: $textLanguageCode)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ReviewImpl && + (identical(other.attribution, attribution) || + other.attribution == attribution) && + (identical(other.authorAttribution, authorAttribution) || + other.authorAttribution == authorAttribution) && + (identical(other.rating, rating) || other.rating == rating) && + (identical(other.publishTime, publishTime) || + other.publishTime == publishTime) && + (identical(other.relativePublishTimeDescription, + relativePublishTimeDescription) || + other.relativePublishTimeDescription == + relativePublishTimeDescription) && + (identical(other.originalText, originalText) || + other.originalText == originalText) && + (identical( + other.originalTextLanguageCode, originalTextLanguageCode) || + other.originalTextLanguageCode == originalTextLanguageCode) && + (identical(other.text, text) || other.text == text) && + (identical(other.textLanguageCode, textLanguageCode) || + other.textLanguageCode == textLanguageCode)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + attribution, + authorAttribution, + rating, + publishTime, + relativePublishTimeDescription, + originalText, + originalTextLanguageCode, + text, + textLanguageCode); + + /// Create a copy of Review + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$ReviewImplCopyWith<_$ReviewImpl> get copyWith => + __$$ReviewImplCopyWithImpl<_$ReviewImpl>(this, _$identity); + + @override + Map toJson() { + return _$$ReviewImplToJson( + this, + ); + } +} + +abstract class _Review implements Review { + const factory _Review( + {required final String attribution, + required final AuthorAttribution authorAttribution, + required final double rating, + required final String publishTime, + required final String relativePublishTimeDescription, + final String? originalText, + final String? originalTextLanguageCode, + final String? text, + final String? textLanguageCode}) = _$ReviewImpl; + + factory _Review.fromJson(Map json) = _$ReviewImpl.fromJson; + + /// The attribution that must be shown to the user if this review is displayed. + @override + String get attribution; + + /// This review's AuthorAttribution. + @override + AuthorAttribution get authorAttribution; + + /// A whole number between 1.0 and 5.0 (inclusive), meaning the number of stars. + @override + double get rating; + + /// The publish time for the review, expressed in "yyyy-MM-dd HH:mm:ss" format of UTC timezone. + @override + String get publishTime; + + /// A human-readable description of the relative publish time of a review, such as "a month ago", or "in the last week", based on the time elapsed. + @override + String get relativePublishTimeDescription; + + /// The text of the review in its original language. + @override + String? get originalText; + + /// The language code of the original text of the review. + @override + String? get originalTextLanguageCode; + + /// The text of the review. + @override + String? get text; + + /// The language code of the text of the review. + @override + String? get textLanguageCode; + + /// Create a copy of Review + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$ReviewImplCopyWith<_$ReviewImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/review.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/review.g.dart new file mode 100644 index 0000000..fcbade0 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/review.g.dart @@ -0,0 +1,34 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'review.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$ReviewImpl _$$ReviewImplFromJson(Map json) => _$ReviewImpl( + attribution: json['attribution'] as String, + authorAttribution: AuthorAttribution.fromJson( + Map.from(json['authorAttribution'] as Map)), + rating: (json['rating'] as num).toDouble(), + publishTime: json['publishTime'] as String, + relativePublishTimeDescription: + json['relativePublishTimeDescription'] as String, + originalText: json['originalText'] as String?, + originalTextLanguageCode: json['originalTextLanguageCode'] as String?, + text: json['text'] as String?, + textLanguageCode: json['textLanguageCode'] as String?, + ); + +Map _$$ReviewImplToJson(_$ReviewImpl instance) => + { + 'attribution': instance.attribution, + 'authorAttribution': instance.authorAttribution.toJson(), + 'rating': instance.rating, + 'publishTime': instance.publishTime, + 'relativePublishTimeDescription': instance.relativePublishTimeDescription, + 'originalText': instance.originalText, + 'originalTextLanguageCode': instance.originalTextLanguageCode, + 'text': instance.text, + 'textLanguageCode': instance.textLanguageCode, + }; diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/search_by_text_response.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/search_by_text_response.freezed.dart new file mode 100644 index 0000000..60205c9 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/search_by_text_response.freezed.dart @@ -0,0 +1,158 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'search_by_text_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$SearchByTextResponse { + /// the Place list returned by the response. + List get places => throw _privateConstructorUsedError; + + /// Create a copy of SearchByTextResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $SearchByTextResponseCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SearchByTextResponseCopyWith<$Res> { + factory $SearchByTextResponseCopyWith(SearchByTextResponse value, + $Res Function(SearchByTextResponse) then) = + _$SearchByTextResponseCopyWithImpl<$Res, SearchByTextResponse>; + @useResult + $Res call({List places}); +} + +/// @nodoc +class _$SearchByTextResponseCopyWithImpl<$Res, + $Val extends SearchByTextResponse> + implements $SearchByTextResponseCopyWith<$Res> { + _$SearchByTextResponseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of SearchByTextResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? places = null, + }) { + return _then(_value.copyWith( + places: null == places + ? _value.places + : places // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$SearchByTextResponseImplCopyWith<$Res> + implements $SearchByTextResponseCopyWith<$Res> { + factory _$$SearchByTextResponseImplCopyWith(_$SearchByTextResponseImpl value, + $Res Function(_$SearchByTextResponseImpl) then) = + __$$SearchByTextResponseImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({List places}); +} + +/// @nodoc +class __$$SearchByTextResponseImplCopyWithImpl<$Res> + extends _$SearchByTextResponseCopyWithImpl<$Res, _$SearchByTextResponseImpl> + implements _$$SearchByTextResponseImplCopyWith<$Res> { + __$$SearchByTextResponseImplCopyWithImpl(_$SearchByTextResponseImpl _value, + $Res Function(_$SearchByTextResponseImpl) _then) + : super(_value, _then); + + /// Create a copy of SearchByTextResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? places = null, + }) { + return _then(_$SearchByTextResponseImpl( + null == places + ? _value._places + : places // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc + +class _$SearchByTextResponseImpl implements _SearchByTextResponse { + const _$SearchByTextResponseImpl(final List places) : _places = places; + + /// the Place list returned by the response. + final List _places; + + /// the Place list returned by the response. + @override + List get places { + if (_places is EqualUnmodifiableListView) return _places; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_places); + } + + @override + String toString() { + return 'SearchByTextResponse(places: $places)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SearchByTextResponseImpl && + const DeepCollectionEquality().equals(other._places, _places)); + } + + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(_places)); + + /// Create a copy of SearchByTextResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$SearchByTextResponseImplCopyWith<_$SearchByTextResponseImpl> + get copyWith => + __$$SearchByTextResponseImplCopyWithImpl<_$SearchByTextResponseImpl>( + this, _$identity); +} + +abstract class _SearchByTextResponse implements SearchByTextResponse { + const factory _SearchByTextResponse(final List places) = + _$SearchByTextResponseImpl; + + /// the Place list returned by the response. + @override + List get places; + + /// Create a copy of SearchByTextResponse + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$SearchByTextResponseImplCopyWith<_$SearchByTextResponseImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/search_nearby_response.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/search_nearby_response.freezed.dart new file mode 100644 index 0000000..6367a82 --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/search_nearby_response.freezed.dart @@ -0,0 +1,158 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'search_nearby_response.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$SearchNearbyResponse { + /// the Place list returned by the response. + List get places => throw _privateConstructorUsedError; + + /// Create a copy of SearchNearbyResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $SearchNearbyResponseCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SearchNearbyResponseCopyWith<$Res> { + factory $SearchNearbyResponseCopyWith(SearchNearbyResponse value, + $Res Function(SearchNearbyResponse) then) = + _$SearchNearbyResponseCopyWithImpl<$Res, SearchNearbyResponse>; + @useResult + $Res call({List places}); +} + +/// @nodoc +class _$SearchNearbyResponseCopyWithImpl<$Res, + $Val extends SearchNearbyResponse> + implements $SearchNearbyResponseCopyWith<$Res> { + _$SearchNearbyResponseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of SearchNearbyResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? places = null, + }) { + return _then(_value.copyWith( + places: null == places + ? _value.places + : places // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$SearchNearbyResponseImplCopyWith<$Res> + implements $SearchNearbyResponseCopyWith<$Res> { + factory _$$SearchNearbyResponseImplCopyWith(_$SearchNearbyResponseImpl value, + $Res Function(_$SearchNearbyResponseImpl) then) = + __$$SearchNearbyResponseImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({List places}); +} + +/// @nodoc +class __$$SearchNearbyResponseImplCopyWithImpl<$Res> + extends _$SearchNearbyResponseCopyWithImpl<$Res, _$SearchNearbyResponseImpl> + implements _$$SearchNearbyResponseImplCopyWith<$Res> { + __$$SearchNearbyResponseImplCopyWithImpl(_$SearchNearbyResponseImpl _value, + $Res Function(_$SearchNearbyResponseImpl) _then) + : super(_value, _then); + + /// Create a copy of SearchNearbyResponse + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? places = null, + }) { + return _then(_$SearchNearbyResponseImpl( + null == places + ? _value._places + : places // ignore: cast_nullable_to_non_nullable + as List, + )); + } +} + +/// @nodoc + +class _$SearchNearbyResponseImpl implements _SearchNearbyResponse { + const _$SearchNearbyResponseImpl(final List places) : _places = places; + + /// the Place list returned by the response. + final List _places; + + /// the Place list returned by the response. + @override + List get places { + if (_places is EqualUnmodifiableListView) return _places; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_places); + } + + @override + String toString() { + return 'SearchNearbyResponse(places: $places)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SearchNearbyResponseImpl && + const DeepCollectionEquality().equals(other._places, _places)); + } + + @override + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(_places)); + + /// Create a copy of SearchNearbyResponse + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$SearchNearbyResponseImplCopyWith<_$SearchNearbyResponseImpl> + get copyWith => + __$$SearchNearbyResponseImplCopyWithImpl<_$SearchNearbyResponseImpl>( + this, _$identity); +} + +abstract class _SearchNearbyResponse implements SearchNearbyResponse { + const factory _SearchNearbyResponse(final List places) = + _$SearchNearbyResponseImpl; + + /// the Place list returned by the response. + @override + List get places; + + /// Create a copy of SearchNearbyResponse + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$SearchNearbyResponseImplCopyWith<_$SearchNearbyResponseImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/time_of_week.freezed.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/time_of_week.freezed.dart new file mode 100644 index 0000000..a22f3cb --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/time_of_week.freezed.dart @@ -0,0 +1,206 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'time_of_week.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +TimeOfWeek _$TimeOfWeekFromJson(Map json) { + return _TimeOfWeek.fromJson(json); +} + +/// @nodoc +mixin _$TimeOfWeek { + /// The day of the week. + DayOfWeek get day => throw _privateConstructorUsedError; + + /// The time in 24 hour format, for example "1730", or "0000" + PlaceLocalTime get time => throw _privateConstructorUsedError; + + /// Serializes this TimeOfWeek to a JSON map. + Map toJson() => throw _privateConstructorUsedError; + + /// Create a copy of TimeOfWeek + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + $TimeOfWeekCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $TimeOfWeekCopyWith<$Res> { + factory $TimeOfWeekCopyWith( + TimeOfWeek value, $Res Function(TimeOfWeek) then) = + _$TimeOfWeekCopyWithImpl<$Res, TimeOfWeek>; + @useResult + $Res call({DayOfWeek day, PlaceLocalTime time}); + + $PlaceLocalTimeCopyWith<$Res> get time; +} + +/// @nodoc +class _$TimeOfWeekCopyWithImpl<$Res, $Val extends TimeOfWeek> + implements $TimeOfWeekCopyWith<$Res> { + _$TimeOfWeekCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + /// Create a copy of TimeOfWeek + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? day = null, + Object? time = null, + }) { + return _then(_value.copyWith( + day: null == day + ? _value.day + : day // ignore: cast_nullable_to_non_nullable + as DayOfWeek, + time: null == time + ? _value.time + : time // ignore: cast_nullable_to_non_nullable + as PlaceLocalTime, + ) as $Val); + } + + /// Create a copy of TimeOfWeek + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $PlaceLocalTimeCopyWith<$Res> get time { + return $PlaceLocalTimeCopyWith<$Res>(_value.time, (value) { + return _then(_value.copyWith(time: value) as $Val); + }); + } +} + +/// @nodoc +abstract class _$$TimeOfWeekImplCopyWith<$Res> + implements $TimeOfWeekCopyWith<$Res> { + factory _$$TimeOfWeekImplCopyWith( + _$TimeOfWeekImpl value, $Res Function(_$TimeOfWeekImpl) then) = + __$$TimeOfWeekImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({DayOfWeek day, PlaceLocalTime time}); + + @override + $PlaceLocalTimeCopyWith<$Res> get time; +} + +/// @nodoc +class __$$TimeOfWeekImplCopyWithImpl<$Res> + extends _$TimeOfWeekCopyWithImpl<$Res, _$TimeOfWeekImpl> + implements _$$TimeOfWeekImplCopyWith<$Res> { + __$$TimeOfWeekImplCopyWithImpl( + _$TimeOfWeekImpl _value, $Res Function(_$TimeOfWeekImpl) _then) + : super(_value, _then); + + /// Create a copy of TimeOfWeek + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? day = null, + Object? time = null, + }) { + return _then(_$TimeOfWeekImpl( + day: null == day + ? _value.day + : day // ignore: cast_nullable_to_non_nullable + as DayOfWeek, + time: null == time + ? _value.time + : time // ignore: cast_nullable_to_non_nullable + as PlaceLocalTime, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _$TimeOfWeekImpl implements _TimeOfWeek { + const _$TimeOfWeekImpl({required this.day, required this.time}); + + factory _$TimeOfWeekImpl.fromJson(Map json) => + _$$TimeOfWeekImplFromJson(json); + + /// The day of the week. + @override + final DayOfWeek day; + + /// The time in 24 hour format, for example "1730", or "0000" + @override + final PlaceLocalTime time; + + @override + String toString() { + return 'TimeOfWeek(day: $day, time: $time)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$TimeOfWeekImpl && + (identical(other.day, day) || other.day == day) && + (identical(other.time, time) || other.time == time)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash(runtimeType, day, time); + + /// Create a copy of TimeOfWeek + /// with the given fields replaced by the non-null parameter values. + @JsonKey(includeFromJson: false, includeToJson: false) + @override + @pragma('vm:prefer-inline') + _$$TimeOfWeekImplCopyWith<_$TimeOfWeekImpl> get copyWith => + __$$TimeOfWeekImplCopyWithImpl<_$TimeOfWeekImpl>(this, _$identity); + + @override + Map toJson() { + return _$$TimeOfWeekImplToJson( + this, + ); + } +} + +abstract class _TimeOfWeek implements TimeOfWeek { + const factory _TimeOfWeek( + {required final DayOfWeek day, + required final PlaceLocalTime time}) = _$TimeOfWeekImpl; + + factory _TimeOfWeek.fromJson(Map json) = + _$TimeOfWeekImpl.fromJson; + + /// The day of the week. + @override + DayOfWeek get day; + + /// The time in 24 hour format, for example "1730", or "0000" + @override + PlaceLocalTime get time; + + /// Create a copy of TimeOfWeek + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + _$$TimeOfWeekImplCopyWith<_$TimeOfWeekImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/flutter_google_places_sdk_platform_interface/lib/src/types/time_of_week.g.dart b/flutter_google_places_sdk_platform_interface/lib/src/types/time_of_week.g.dart new file mode 100644 index 0000000..7a6444f --- /dev/null +++ b/flutter_google_places_sdk_platform_interface/lib/src/types/time_of_week.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'time_of_week.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_$TimeOfWeekImpl _$$TimeOfWeekImplFromJson(Map json) => _$TimeOfWeekImpl( + day: DayOfWeek.fromJson(json['day'] as String), + time: PlaceLocalTime.fromJson( + Map.from(json['time'] as Map)), + ); + +Map _$$TimeOfWeekImplToJson(_$TimeOfWeekImpl instance) => + { + 'day': instance.day.toJson(), + 'time': instance.time.toJson(), + };