LCOV - code coverage report
Current view: top level - types/linkeable - linkeable.freezed.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 18 230 7.8 %
Date: 2021-05-31 17:15:31 Functions: 0 0 -

          Line data    Source code
       1             : // GENERATED CODE - DO NOT MODIFY BY HAND
       2             : // 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
       3             : 
       4             : part of 'linkeable.dart';
       5             : 
       6             : // **************************************************************************
       7             : // FreezedGenerator
       8             : // **************************************************************************
       9             : 
      10           0 : T _$identity<T>(T value) => value;
      11             : 
      12           0 : final _privateConstructorUsedError = UnsupportedError(
      13             :     '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 informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
      14             : 
      15           1 : Linkeable _$LinkeableFromJson(Map<String, dynamic> json) {
      16           1 :   switch (json['link_type'] as String) {
      17           1 :     case 'Document':
      18           1 :       return DocumentLinkeable.fromJson(json);
      19           1 :     case 'Media':
      20           1 :       return MediaLinkeable.fromJson(json);
      21           1 :     case 'Web':
      22           1 :       return WebLinkeable.fromJson(json);
      23             : 
      24             :     default:
      25           0 :       throw FallThroughError();
      26             :   }
      27             : }
      28             : 
      29             : /// @nodoc
      30             : class _$LinkeableTearOff {
      31           7 :   const _$LinkeableTearOff();
      32             : 
      33           0 :   DocumentLinkeable document(
      34             :       {@JsonKey(name: 'link_type') required String linkType,
      35             :       required List<String> tags,
      36             :       required String id,
      37             :       required String lang,
      38             :       required String slug,
      39             :       required String type,
      40             :       required bool isBroken}) {
      41           0 :     return DocumentLinkeable(
      42             :       linkType: linkType,
      43             :       tags: tags,
      44             :       id: id,
      45             :       lang: lang,
      46             :       slug: slug,
      47             :       type: type,
      48             :       isBroken: isBroken,
      49             :     );
      50             :   }
      51             : 
      52           0 :   MediaLinkeable media(
      53             :       {@JsonKey(name: 'link_type') required String linkType,
      54             :       String? height,
      55             :       String? width,
      56             :       required String kind,
      57             :       required String name,
      58             :       required String size,
      59             :       required String url}) {
      60           0 :     return MediaLinkeable(
      61             :       linkType: linkType,
      62             :       height: height,
      63             :       width: width,
      64             :       kind: kind,
      65             :       name: name,
      66             :       size: size,
      67             :       url: url,
      68             :     );
      69             :   }
      70             : 
      71           0 :   WebLinkeable web(
      72             :       {@JsonKey(name: 'link_type') required String linkType,
      73             :       required String url}) {
      74           0 :     return WebLinkeable(
      75             :       linkType: linkType,
      76             :       url: url,
      77             :     );
      78             :   }
      79             : 
      80           0 :   Linkeable fromJson(Map<String, Object> json) {
      81           0 :     return Linkeable.fromJson(json);
      82             :   }
      83             : }
      84             : 
      85             : /// @nodoc
      86             : const $Linkeable = _$LinkeableTearOff();
      87             : 
      88             : /// @nodoc
      89             : mixin _$Linkeable {
      90           0 :   @JsonKey(name: 'link_type')
      91           0 :   String get linkType => throw _privateConstructorUsedError;
      92             : 
      93           0 :   @optionalTypeArgs
      94             :   TResult when<TResult extends Object?>({
      95             :     required TResult Function(
      96             :             @JsonKey(name: 'link_type') String linkType,
      97             :             List<String> tags,
      98             :             String id,
      99             :             String lang,
     100             :             String slug,
     101             :             String type,
     102             :             bool isBroken)
     103             :         document,
     104             :     required TResult Function(
     105             :             @JsonKey(name: 'link_type') String linkType,
     106             :             String? height,
     107             :             String? width,
     108             :             String kind,
     109             :             String name,
     110             :             String size,
     111             :             String url)
     112             :         media,
     113             :     required TResult Function(
     114             :             @JsonKey(name: 'link_type') String linkType, String url)
     115             :         web,
     116             :   }) =>
     117           0 :       throw _privateConstructorUsedError;
     118           0 :   @optionalTypeArgs
     119             :   TResult maybeWhen<TResult extends Object?>({
     120             :     TResult Function(
     121             :             @JsonKey(name: 'link_type') String linkType,
     122             :             List<String> tags,
     123             :             String id,
     124             :             String lang,
     125             :             String slug,
     126             :             String type,
     127             :             bool isBroken)?
     128             :         document,
     129             :     TResult Function(
     130             :             @JsonKey(name: 'link_type') String linkType,
     131             :             String? height,
     132             :             String? width,
     133             :             String kind,
     134             :             String name,
     135             :             String size,
     136             :             String url)?
     137             :         media,
     138             :     TResult Function(@JsonKey(name: 'link_type') String linkType, String url)?
     139             :         web,
     140             :     required TResult orElse(),
     141             :   }) =>
     142           0 :       throw _privateConstructorUsedError;
     143           0 :   @optionalTypeArgs
     144             :   TResult map<TResult extends Object?>({
     145             :     required TResult Function(DocumentLinkeable value) document,
     146             :     required TResult Function(MediaLinkeable value) media,
     147             :     required TResult Function(WebLinkeable value) web,
     148             :   }) =>
     149           0 :       throw _privateConstructorUsedError;
     150           0 :   @optionalTypeArgs
     151             :   TResult maybeMap<TResult extends Object?>({
     152             :     TResult Function(DocumentLinkeable value)? document,
     153             :     TResult Function(MediaLinkeable value)? media,
     154             :     TResult Function(WebLinkeable value)? web,
     155             :     required TResult orElse(),
     156             :   }) =>
     157           0 :       throw _privateConstructorUsedError;
     158           0 :   Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
     159           0 :   @JsonKey(ignore: true)
     160             :   $LinkeableCopyWith<Linkeable> get copyWith =>
     161           0 :       throw _privateConstructorUsedError;
     162             : }
     163             : 
     164             : /// @nodoc
     165             : abstract class $LinkeableCopyWith<$Res> {
     166             :   factory $LinkeableCopyWith(Linkeable value, $Res Function(Linkeable) then) =
     167             :       _$LinkeableCopyWithImpl<$Res>;
     168             :   $Res call({@JsonKey(name: 'link_type') String linkType});
     169             : }
     170             : 
     171             : /// @nodoc
     172             : class _$LinkeableCopyWithImpl<$Res> implements $LinkeableCopyWith<$Res> {
     173           0 :   _$LinkeableCopyWithImpl(this._value, this._then);
     174             : 
     175             :   final Linkeable _value;
     176             :   // ignore: unused_field
     177             :   final $Res Function(Linkeable) _then;
     178             : 
     179           0 :   @override
     180             :   $Res call({
     181             :     Object? linkType = freezed,
     182             :   }) {
     183           0 :     return _then(_value.copyWith(
     184           0 :       linkType: linkType == freezed
     185           0 :           ? _value.linkType
     186             :           : linkType // ignore: cast_nullable_to_non_nullable
     187             :               as String,
     188             :     ));
     189             :   }
     190             : }
     191             : 
     192             : /// @nodoc
     193             : abstract class $DocumentLinkeableCopyWith<$Res>
     194             :     implements $LinkeableCopyWith<$Res> {
     195             :   factory $DocumentLinkeableCopyWith(
     196             :           DocumentLinkeable value, $Res Function(DocumentLinkeable) then) =
     197             :       _$DocumentLinkeableCopyWithImpl<$Res>;
     198             :   @override
     199             :   $Res call(
     200             :       {@JsonKey(name: 'link_type') String linkType,
     201             :       List<String> tags,
     202             :       String id,
     203             :       String lang,
     204             :       String slug,
     205             :       String type,
     206             :       bool isBroken});
     207             : }
     208             : 
     209             : /// @nodoc
     210             : class _$DocumentLinkeableCopyWithImpl<$Res>
     211             :     extends _$LinkeableCopyWithImpl<$Res>
     212             :     implements $DocumentLinkeableCopyWith<$Res> {
     213           0 :   _$DocumentLinkeableCopyWithImpl(
     214             :       DocumentLinkeable _value, $Res Function(DocumentLinkeable) _then)
     215           0 :       : super(_value, (v) => _then(v as DocumentLinkeable));
     216             : 
     217           0 :   @override
     218           0 :   DocumentLinkeable get _value => super._value as DocumentLinkeable;
     219             : 
     220           0 :   @override
     221             :   $Res call({
     222             :     Object? linkType = freezed,
     223             :     Object? tags = freezed,
     224             :     Object? id = freezed,
     225             :     Object? lang = freezed,
     226             :     Object? slug = freezed,
     227             :     Object? type = freezed,
     228             :     Object? isBroken = freezed,
     229             :   }) {
     230           0 :     return _then(DocumentLinkeable(
     231           0 :       linkType: linkType == freezed
     232           0 :           ? _value.linkType
     233             :           : linkType // ignore: cast_nullable_to_non_nullable
     234             :               as String,
     235           0 :       tags: tags == freezed
     236           0 :           ? _value.tags
     237             :           : tags // ignore: cast_nullable_to_non_nullable
     238             :               as List<String>,
     239           0 :       id: id == freezed
     240           0 :           ? _value.id
     241             :           : id // ignore: cast_nullable_to_non_nullable
     242             :               as String,
     243           0 :       lang: lang == freezed
     244           0 :           ? _value.lang
     245             :           : lang // ignore: cast_nullable_to_non_nullable
     246             :               as String,
     247           0 :       slug: slug == freezed
     248           0 :           ? _value.slug
     249             :           : slug // ignore: cast_nullable_to_non_nullable
     250             :               as String,
     251           0 :       type: type == freezed
     252           0 :           ? _value.type
     253             :           : type // ignore: cast_nullable_to_non_nullable
     254             :               as String,
     255           0 :       isBroken: isBroken == freezed
     256           0 :           ? _value.isBroken
     257             :           : isBroken // ignore: cast_nullable_to_non_nullable
     258             :               as bool,
     259             :     ));
     260             :   }
     261             : }
     262             : 
     263             : /// @nodoc
     264             : @JsonSerializable()
     265             : @FreezedUnionValue('Document')
     266             : class _$DocumentLinkeable implements DocumentLinkeable {
     267           1 :   const _$DocumentLinkeable(
     268             :       {@JsonKey(name: 'link_type') required this.linkType,
     269             :       required this.tags,
     270             :       required this.id,
     271             :       required this.lang,
     272             :       required this.slug,
     273             :       required this.type,
     274             :       required this.isBroken});
     275             : 
     276           1 :   factory _$DocumentLinkeable.fromJson(Map<String, dynamic> json) =>
     277           1 :       _$_$DocumentLinkeableFromJson(json);
     278             : 
     279             :   @override
     280             :   @JsonKey(name: 'link_type')
     281             :   final String linkType;
     282             :   @override
     283             :   final List<String> tags;
     284             :   @override
     285             :   final String id;
     286             :   @override
     287             :   final String lang;
     288             :   @override
     289             :   final String slug;
     290             :   @override
     291             :   final String type;
     292             :   @override
     293             :   final bool isBroken;
     294             : 
     295           0 :   @override
     296             :   String toString() {
     297           0 :     return 'Linkeable.document(linkType: $linkType, tags: $tags, id: $id, lang: $lang, slug: $slug, type: $type, isBroken: $isBroken)';
     298             :   }
     299             : 
     300           0 :   @override
     301             :   bool operator ==(dynamic other) {
     302             :     return identical(this, other) ||
     303           0 :         (other is DocumentLinkeable &&
     304           0 :             (identical(other.linkType, linkType) ||
     305             :                 const DeepCollectionEquality()
     306           0 :                     .equals(other.linkType, linkType)) &&
     307           0 :             (identical(other.tags, tags) ||
     308           0 :                 const DeepCollectionEquality().equals(other.tags, tags)) &&
     309           0 :             (identical(other.id, id) ||
     310           0 :                 const DeepCollectionEquality().equals(other.id, id)) &&
     311           0 :             (identical(other.lang, lang) ||
     312           0 :                 const DeepCollectionEquality().equals(other.lang, lang)) &&
     313           0 :             (identical(other.slug, slug) ||
     314           0 :                 const DeepCollectionEquality().equals(other.slug, slug)) &&
     315           0 :             (identical(other.type, type) ||
     316           0 :                 const DeepCollectionEquality().equals(other.type, type)) &&
     317           0 :             (identical(other.isBroken, isBroken) ||
     318             :                 const DeepCollectionEquality()
     319           0 :                     .equals(other.isBroken, isBroken)));
     320             :   }
     321             : 
     322           0 :   @override
     323             :   int get hashCode =>
     324           0 :       runtimeType.hashCode ^
     325           0 :       const DeepCollectionEquality().hash(linkType) ^
     326           0 :       const DeepCollectionEquality().hash(tags) ^
     327           0 :       const DeepCollectionEquality().hash(id) ^
     328           0 :       const DeepCollectionEquality().hash(lang) ^
     329           0 :       const DeepCollectionEquality().hash(slug) ^
     330           0 :       const DeepCollectionEquality().hash(type) ^
     331           0 :       const DeepCollectionEquality().hash(isBroken);
     332             : 
     333           0 :   @JsonKey(ignore: true)
     334             :   @override
     335             :   $DocumentLinkeableCopyWith<DocumentLinkeable> get copyWith =>
     336           0 :       _$DocumentLinkeableCopyWithImpl<DocumentLinkeable>(this, _$identity);
     337             : 
     338           0 :   @override
     339             :   @optionalTypeArgs
     340             :   TResult when<TResult extends Object?>({
     341             :     required TResult Function(
     342             :             @JsonKey(name: 'link_type') String linkType,
     343             :             List<String> tags,
     344             :             String id,
     345             :             String lang,
     346             :             String slug,
     347             :             String type,
     348             :             bool isBroken)
     349             :         document,
     350             :     required TResult Function(
     351             :             @JsonKey(name: 'link_type') String linkType,
     352             :             String? height,
     353             :             String? width,
     354             :             String kind,
     355             :             String name,
     356             :             String size,
     357             :             String url)
     358             :         media,
     359             :     required TResult Function(
     360             :             @JsonKey(name: 'link_type') String linkType, String url)
     361             :         web,
     362             :   }) {
     363           0 :     return document(linkType, tags, id, lang, slug, type, isBroken);
     364             :   }
     365             : 
     366           0 :   @override
     367             :   @optionalTypeArgs
     368             :   TResult maybeWhen<TResult extends Object?>({
     369             :     TResult Function(
     370             :             @JsonKey(name: 'link_type') String linkType,
     371             :             List<String> tags,
     372             :             String id,
     373             :             String lang,
     374             :             String slug,
     375             :             String type,
     376             :             bool isBroken)?
     377             :         document,
     378             :     TResult Function(
     379             :             @JsonKey(name: 'link_type') String linkType,
     380             :             String? height,
     381             :             String? width,
     382             :             String kind,
     383             :             String name,
     384             :             String size,
     385             :             String url)?
     386             :         media,
     387             :     TResult Function(@JsonKey(name: 'link_type') String linkType, String url)?
     388             :         web,
     389             :     required TResult orElse(),
     390             :   }) {
     391             :     if (document != null) {
     392           0 :       return document(linkType, tags, id, lang, slug, type, isBroken);
     393             :     }
     394           0 :     return orElse();
     395             :   }
     396             : 
     397           0 :   @override
     398             :   @optionalTypeArgs
     399             :   TResult map<TResult extends Object?>({
     400             :     required TResult Function(DocumentLinkeable value) document,
     401             :     required TResult Function(MediaLinkeable value) media,
     402             :     required TResult Function(WebLinkeable value) web,
     403             :   }) {
     404           0 :     return document(this);
     405             :   }
     406             : 
     407           0 :   @override
     408             :   @optionalTypeArgs
     409             :   TResult maybeMap<TResult extends Object?>({
     410             :     TResult Function(DocumentLinkeable value)? document,
     411             :     TResult Function(MediaLinkeable value)? media,
     412             :     TResult Function(WebLinkeable value)? web,
     413             :     required TResult orElse(),
     414             :   }) {
     415             :     if (document != null) {
     416           0 :       return document(this);
     417             :     }
     418           0 :     return orElse();
     419             :   }
     420             : 
     421           0 :   @override
     422             :   Map<String, dynamic> toJson() {
     423           0 :     return _$_$DocumentLinkeableToJson(this)..['link_type'] = 'Document';
     424             :   }
     425             : }
     426             : 
     427             : abstract class DocumentLinkeable implements Linkeable {
     428             :   const factory DocumentLinkeable(
     429             :       {@JsonKey(name: 'link_type') required String linkType,
     430             :       required List<String> tags,
     431             :       required String id,
     432             :       required String lang,
     433             :       required String slug,
     434             :       required String type,
     435             :       required bool isBroken}) = _$DocumentLinkeable;
     436             : 
     437             :   factory DocumentLinkeable.fromJson(Map<String, dynamic> json) =
     438             :       _$DocumentLinkeable.fromJson;
     439             : 
     440           0 :   @override
     441             :   @JsonKey(name: 'link_type')
     442           0 :   String get linkType => throw _privateConstructorUsedError;
     443           0 :   List<String> get tags => throw _privateConstructorUsedError;
     444           0 :   String get id => throw _privateConstructorUsedError;
     445           0 :   String get lang => throw _privateConstructorUsedError;
     446           0 :   String get slug => throw _privateConstructorUsedError;
     447           0 :   String get type => throw _privateConstructorUsedError;
     448           0 :   bool get isBroken => throw _privateConstructorUsedError;
     449           0 :   @override
     450             :   @JsonKey(ignore: true)
     451             :   $DocumentLinkeableCopyWith<DocumentLinkeable> get copyWith =>
     452           0 :       throw _privateConstructorUsedError;
     453             : }
     454             : 
     455             : /// @nodoc
     456             : abstract class $MediaLinkeableCopyWith<$Res>
     457             :     implements $LinkeableCopyWith<$Res> {
     458             :   factory $MediaLinkeableCopyWith(
     459             :           MediaLinkeable value, $Res Function(MediaLinkeable) then) =
     460             :       _$MediaLinkeableCopyWithImpl<$Res>;
     461             :   @override
     462             :   $Res call(
     463             :       {@JsonKey(name: 'link_type') String linkType,
     464             :       String? height,
     465             :       String? width,
     466             :       String kind,
     467             :       String name,
     468             :       String size,
     469             :       String url});
     470             : }
     471             : 
     472             : /// @nodoc
     473             : class _$MediaLinkeableCopyWithImpl<$Res> extends _$LinkeableCopyWithImpl<$Res>
     474             :     implements $MediaLinkeableCopyWith<$Res> {
     475           0 :   _$MediaLinkeableCopyWithImpl(
     476             :       MediaLinkeable _value, $Res Function(MediaLinkeable) _then)
     477           0 :       : super(_value, (v) => _then(v as MediaLinkeable));
     478             : 
     479           0 :   @override
     480           0 :   MediaLinkeable get _value => super._value as MediaLinkeable;
     481             : 
     482           0 :   @override
     483             :   $Res call({
     484             :     Object? linkType = freezed,
     485             :     Object? height = freezed,
     486             :     Object? width = freezed,
     487             :     Object? kind = freezed,
     488             :     Object? name = freezed,
     489             :     Object? size = freezed,
     490             :     Object? url = freezed,
     491             :   }) {
     492           0 :     return _then(MediaLinkeable(
     493           0 :       linkType: linkType == freezed
     494           0 :           ? _value.linkType
     495             :           : linkType // ignore: cast_nullable_to_non_nullable
     496             :               as String,
     497           0 :       height: height == freezed
     498           0 :           ? _value.height
     499             :           : height // ignore: cast_nullable_to_non_nullable
     500             :               as String?,
     501           0 :       width: width == freezed
     502           0 :           ? _value.width
     503             :           : width // ignore: cast_nullable_to_non_nullable
     504             :               as String?,
     505           0 :       kind: kind == freezed
     506           0 :           ? _value.kind
     507             :           : kind // ignore: cast_nullable_to_non_nullable
     508             :               as String,
     509           0 :       name: name == freezed
     510           0 :           ? _value.name
     511             :           : name // ignore: cast_nullable_to_non_nullable
     512             :               as String,
     513           0 :       size: size == freezed
     514           0 :           ? _value.size
     515             :           : size // ignore: cast_nullable_to_non_nullable
     516             :               as String,
     517           0 :       url: url == freezed
     518           0 :           ? _value.url
     519             :           : url // ignore: cast_nullable_to_non_nullable
     520             :               as String,
     521             :     ));
     522             :   }
     523             : }
     524             : 
     525             : /// @nodoc
     526             : @JsonSerializable()
     527             : @FreezedUnionValue('Media')
     528             : class _$MediaLinkeable implements MediaLinkeable {
     529           1 :   const _$MediaLinkeable(
     530             :       {@JsonKey(name: 'link_type') required this.linkType,
     531             :       this.height,
     532             :       this.width,
     533             :       required this.kind,
     534             :       required this.name,
     535             :       required this.size,
     536             :       required this.url});
     537             : 
     538           1 :   factory _$MediaLinkeable.fromJson(Map<String, dynamic> json) =>
     539           1 :       _$_$MediaLinkeableFromJson(json);
     540             : 
     541             :   @override
     542             :   @JsonKey(name: 'link_type')
     543             :   final String linkType;
     544             :   @override
     545             :   final String? height;
     546             :   @override
     547             :   final String? width;
     548             :   @override
     549             :   final String kind;
     550             :   @override
     551             :   final String name;
     552             :   @override
     553             :   final String size;
     554             :   @override
     555             :   final String url;
     556             : 
     557           0 :   @override
     558             :   String toString() {
     559           0 :     return 'Linkeable.media(linkType: $linkType, height: $height, width: $width, kind: $kind, name: $name, size: $size, url: $url)';
     560             :   }
     561             : 
     562           0 :   @override
     563             :   bool operator ==(dynamic other) {
     564             :     return identical(this, other) ||
     565           0 :         (other is MediaLinkeable &&
     566           0 :             (identical(other.linkType, linkType) ||
     567             :                 const DeepCollectionEquality()
     568           0 :                     .equals(other.linkType, linkType)) &&
     569           0 :             (identical(other.height, height) ||
     570           0 :                 const DeepCollectionEquality().equals(other.height, height)) &&
     571           0 :             (identical(other.width, width) ||
     572           0 :                 const DeepCollectionEquality().equals(other.width, width)) &&
     573           0 :             (identical(other.kind, kind) ||
     574           0 :                 const DeepCollectionEquality().equals(other.kind, kind)) &&
     575           0 :             (identical(other.name, name) ||
     576           0 :                 const DeepCollectionEquality().equals(other.name, name)) &&
     577           0 :             (identical(other.size, size) ||
     578           0 :                 const DeepCollectionEquality().equals(other.size, size)) &&
     579           0 :             (identical(other.url, url) ||
     580           0 :                 const DeepCollectionEquality().equals(other.url, url)));
     581             :   }
     582             : 
     583           0 :   @override
     584             :   int get hashCode =>
     585           0 :       runtimeType.hashCode ^
     586           0 :       const DeepCollectionEquality().hash(linkType) ^
     587           0 :       const DeepCollectionEquality().hash(height) ^
     588           0 :       const DeepCollectionEquality().hash(width) ^
     589           0 :       const DeepCollectionEquality().hash(kind) ^
     590           0 :       const DeepCollectionEquality().hash(name) ^
     591           0 :       const DeepCollectionEquality().hash(size) ^
     592           0 :       const DeepCollectionEquality().hash(url);
     593             : 
     594           0 :   @JsonKey(ignore: true)
     595             :   @override
     596             :   $MediaLinkeableCopyWith<MediaLinkeable> get copyWith =>
     597           0 :       _$MediaLinkeableCopyWithImpl<MediaLinkeable>(this, _$identity);
     598             : 
     599           0 :   @override
     600             :   @optionalTypeArgs
     601             :   TResult when<TResult extends Object?>({
     602             :     required TResult Function(
     603             :             @JsonKey(name: 'link_type') String linkType,
     604             :             List<String> tags,
     605             :             String id,
     606             :             String lang,
     607             :             String slug,
     608             :             String type,
     609             :             bool isBroken)
     610             :         document,
     611             :     required TResult Function(
     612             :             @JsonKey(name: 'link_type') String linkType,
     613             :             String? height,
     614             :             String? width,
     615             :             String kind,
     616             :             String name,
     617             :             String size,
     618             :             String url)
     619             :         media,
     620             :     required TResult Function(
     621             :             @JsonKey(name: 'link_type') String linkType, String url)
     622             :         web,
     623             :   }) {
     624           0 :     return media(linkType, height, width, kind, name, size, url);
     625             :   }
     626             : 
     627           0 :   @override
     628             :   @optionalTypeArgs
     629             :   TResult maybeWhen<TResult extends Object?>({
     630             :     TResult Function(
     631             :             @JsonKey(name: 'link_type') String linkType,
     632             :             List<String> tags,
     633             :             String id,
     634             :             String lang,
     635             :             String slug,
     636             :             String type,
     637             :             bool isBroken)?
     638             :         document,
     639             :     TResult Function(
     640             :             @JsonKey(name: 'link_type') String linkType,
     641             :             String? height,
     642             :             String? width,
     643             :             String kind,
     644             :             String name,
     645             :             String size,
     646             :             String url)?
     647             :         media,
     648             :     TResult Function(@JsonKey(name: 'link_type') String linkType, String url)?
     649             :         web,
     650             :     required TResult orElse(),
     651             :   }) {
     652             :     if (media != null) {
     653           0 :       return media(linkType, height, width, kind, name, size, url);
     654             :     }
     655           0 :     return orElse();
     656             :   }
     657             : 
     658           0 :   @override
     659             :   @optionalTypeArgs
     660             :   TResult map<TResult extends Object?>({
     661             :     required TResult Function(DocumentLinkeable value) document,
     662             :     required TResult Function(MediaLinkeable value) media,
     663             :     required TResult Function(WebLinkeable value) web,
     664             :   }) {
     665           0 :     return media(this);
     666             :   }
     667             : 
     668           0 :   @override
     669             :   @optionalTypeArgs
     670             :   TResult maybeMap<TResult extends Object?>({
     671             :     TResult Function(DocumentLinkeable value)? document,
     672             :     TResult Function(MediaLinkeable value)? media,
     673             :     TResult Function(WebLinkeable value)? web,
     674             :     required TResult orElse(),
     675             :   }) {
     676             :     if (media != null) {
     677           0 :       return media(this);
     678             :     }
     679           0 :     return orElse();
     680             :   }
     681             : 
     682           0 :   @override
     683             :   Map<String, dynamic> toJson() {
     684           0 :     return _$_$MediaLinkeableToJson(this)..['link_type'] = 'Media';
     685             :   }
     686             : }
     687             : 
     688             : abstract class MediaLinkeable implements Linkeable {
     689             :   const factory MediaLinkeable(
     690             :       {@JsonKey(name: 'link_type') required String linkType,
     691             :       String? height,
     692             :       String? width,
     693             :       required String kind,
     694             :       required String name,
     695             :       required String size,
     696             :       required String url}) = _$MediaLinkeable;
     697             : 
     698             :   factory MediaLinkeable.fromJson(Map<String, dynamic> json) =
     699             :       _$MediaLinkeable.fromJson;
     700             : 
     701           0 :   @override
     702             :   @JsonKey(name: 'link_type')
     703           0 :   String get linkType => throw _privateConstructorUsedError;
     704           0 :   String? get height => throw _privateConstructorUsedError;
     705           0 :   String? get width => throw _privateConstructorUsedError;
     706           0 :   String get kind => throw _privateConstructorUsedError;
     707           0 :   String get name => throw _privateConstructorUsedError;
     708           0 :   String get size => throw _privateConstructorUsedError;
     709           0 :   String get url => throw _privateConstructorUsedError;
     710           0 :   @override
     711             :   @JsonKey(ignore: true)
     712             :   $MediaLinkeableCopyWith<MediaLinkeable> get copyWith =>
     713           0 :       throw _privateConstructorUsedError;
     714             : }
     715             : 
     716             : /// @nodoc
     717             : abstract class $WebLinkeableCopyWith<$Res> implements $LinkeableCopyWith<$Res> {
     718             :   factory $WebLinkeableCopyWith(
     719             :           WebLinkeable value, $Res Function(WebLinkeable) then) =
     720             :       _$WebLinkeableCopyWithImpl<$Res>;
     721             :   @override
     722             :   $Res call({@JsonKey(name: 'link_type') String linkType, String url});
     723             : }
     724             : 
     725             : /// @nodoc
     726             : class _$WebLinkeableCopyWithImpl<$Res> extends _$LinkeableCopyWithImpl<$Res>
     727             :     implements $WebLinkeableCopyWith<$Res> {
     728           0 :   _$WebLinkeableCopyWithImpl(
     729             :       WebLinkeable _value, $Res Function(WebLinkeable) _then)
     730           0 :       : super(_value, (v) => _then(v as WebLinkeable));
     731             : 
     732           0 :   @override
     733           0 :   WebLinkeable get _value => super._value as WebLinkeable;
     734             : 
     735           0 :   @override
     736             :   $Res call({
     737             :     Object? linkType = freezed,
     738             :     Object? url = freezed,
     739             :   }) {
     740           0 :     return _then(WebLinkeable(
     741           0 :       linkType: linkType == freezed
     742           0 :           ? _value.linkType
     743             :           : linkType // ignore: cast_nullable_to_non_nullable
     744             :               as String,
     745           0 :       url: url == freezed
     746           0 :           ? _value.url
     747             :           : url // ignore: cast_nullable_to_non_nullable
     748             :               as String,
     749             :     ));
     750             :   }
     751             : }
     752             : 
     753             : /// @nodoc
     754             : @JsonSerializable()
     755             : @FreezedUnionValue('Web')
     756             : class _$WebLinkeable implements WebLinkeable {
     757           1 :   const _$WebLinkeable(
     758             :       {@JsonKey(name: 'link_type') required this.linkType, required this.url});
     759             : 
     760           1 :   factory _$WebLinkeable.fromJson(Map<String, dynamic> json) =>
     761           1 :       _$_$WebLinkeableFromJson(json);
     762             : 
     763             :   @override
     764             :   @JsonKey(name: 'link_type')
     765             :   final String linkType;
     766             :   @override
     767             :   final String url;
     768             : 
     769           0 :   @override
     770             :   String toString() {
     771           0 :     return 'Linkeable.web(linkType: $linkType, url: $url)';
     772             :   }
     773             : 
     774           0 :   @override
     775             :   bool operator ==(dynamic other) {
     776             :     return identical(this, other) ||
     777           0 :         (other is WebLinkeable &&
     778           0 :             (identical(other.linkType, linkType) ||
     779             :                 const DeepCollectionEquality()
     780           0 :                     .equals(other.linkType, linkType)) &&
     781           0 :             (identical(other.url, url) ||
     782           0 :                 const DeepCollectionEquality().equals(other.url, url)));
     783             :   }
     784             : 
     785           0 :   @override
     786             :   int get hashCode =>
     787           0 :       runtimeType.hashCode ^
     788           0 :       const DeepCollectionEquality().hash(linkType) ^
     789           0 :       const DeepCollectionEquality().hash(url);
     790             : 
     791           0 :   @JsonKey(ignore: true)
     792             :   @override
     793             :   $WebLinkeableCopyWith<WebLinkeable> get copyWith =>
     794           0 :       _$WebLinkeableCopyWithImpl<WebLinkeable>(this, _$identity);
     795             : 
     796           0 :   @override
     797             :   @optionalTypeArgs
     798             :   TResult when<TResult extends Object?>({
     799             :     required TResult Function(
     800             :             @JsonKey(name: 'link_type') String linkType,
     801             :             List<String> tags,
     802             :             String id,
     803             :             String lang,
     804             :             String slug,
     805             :             String type,
     806             :             bool isBroken)
     807             :         document,
     808             :     required TResult Function(
     809             :             @JsonKey(name: 'link_type') String linkType,
     810             :             String? height,
     811             :             String? width,
     812             :             String kind,
     813             :             String name,
     814             :             String size,
     815             :             String url)
     816             :         media,
     817             :     required TResult Function(
     818             :             @JsonKey(name: 'link_type') String linkType, String url)
     819             :         web,
     820             :   }) {
     821           0 :     return web(linkType, url);
     822             :   }
     823             : 
     824           0 :   @override
     825             :   @optionalTypeArgs
     826             :   TResult maybeWhen<TResult extends Object?>({
     827             :     TResult Function(
     828             :             @JsonKey(name: 'link_type') String linkType,
     829             :             List<String> tags,
     830             :             String id,
     831             :             String lang,
     832             :             String slug,
     833             :             String type,
     834             :             bool isBroken)?
     835             :         document,
     836             :     TResult Function(
     837             :             @JsonKey(name: 'link_type') String linkType,
     838             :             String? height,
     839             :             String? width,
     840             :             String kind,
     841             :             String name,
     842             :             String size,
     843             :             String url)?
     844             :         media,
     845             :     TResult Function(@JsonKey(name: 'link_type') String linkType, String url)?
     846             :         web,
     847             :     required TResult orElse(),
     848             :   }) {
     849             :     if (web != null) {
     850           0 :       return web(linkType, url);
     851             :     }
     852           0 :     return orElse();
     853             :   }
     854             : 
     855           0 :   @override
     856             :   @optionalTypeArgs
     857             :   TResult map<TResult extends Object?>({
     858             :     required TResult Function(DocumentLinkeable value) document,
     859             :     required TResult Function(MediaLinkeable value) media,
     860             :     required TResult Function(WebLinkeable value) web,
     861             :   }) {
     862           0 :     return web(this);
     863             :   }
     864             : 
     865           0 :   @override
     866             :   @optionalTypeArgs
     867             :   TResult maybeMap<TResult extends Object?>({
     868             :     TResult Function(DocumentLinkeable value)? document,
     869             :     TResult Function(MediaLinkeable value)? media,
     870             :     TResult Function(WebLinkeable value)? web,
     871             :     required TResult orElse(),
     872             :   }) {
     873             :     if (web != null) {
     874           0 :       return web(this);
     875             :     }
     876           0 :     return orElse();
     877             :   }
     878             : 
     879           0 :   @override
     880             :   Map<String, dynamic> toJson() {
     881           0 :     return _$_$WebLinkeableToJson(this)..['link_type'] = 'Web';
     882             :   }
     883             : }
     884             : 
     885             : abstract class WebLinkeable implements Linkeable {
     886             :   const factory WebLinkeable(
     887             :       {@JsonKey(name: 'link_type') required String linkType,
     888             :       required String url}) = _$WebLinkeable;
     889             : 
     890             :   factory WebLinkeable.fromJson(Map<String, dynamic> json) =
     891             :       _$WebLinkeable.fromJson;
     892             : 
     893           0 :   @override
     894             :   @JsonKey(name: 'link_type')
     895           0 :   String get linkType => throw _privateConstructorUsedError;
     896           0 :   String get url => throw _privateConstructorUsedError;
     897           0 :   @override
     898             :   @JsonKey(ignore: true)
     899             :   $WebLinkeableCopyWith<WebLinkeable> get copyWith =>
     900           0 :       throw _privateConstructorUsedError;
     901             : }

Generated by: LCOV version 1.15