// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // 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 'script_widget.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$ScriptWidgetOption { String get title;@JsonKey(fromJson: _stringFromAny) String get value; /// Create a copy of ScriptWidgetOption /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetOptionCopyWith get copyWith => _$ScriptWidgetOptionCopyWithImpl(this as ScriptWidgetOption, _$identity); /// Serializes this ScriptWidgetOption to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetOption&&(identical(other.title, title) || other.title == title)&&(identical(other.value, value) || other.value == value)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,title,value); @override String toString() { return 'ScriptWidgetOption(title: $title, value: $value)'; } } /// @nodoc abstract mixin class $ScriptWidgetOptionCopyWith<$Res> { factory $ScriptWidgetOptionCopyWith(ScriptWidgetOption value, $Res Function(ScriptWidgetOption) _then) = _$ScriptWidgetOptionCopyWithImpl; @useResult $Res call({ String title,@JsonKey(fromJson: _stringFromAny) String value }); } /// @nodoc class _$ScriptWidgetOptionCopyWithImpl<$Res> implements $ScriptWidgetOptionCopyWith<$Res> { _$ScriptWidgetOptionCopyWithImpl(this._self, this._then); final ScriptWidgetOption _self; final $Res Function(ScriptWidgetOption) _then; /// Create a copy of ScriptWidgetOption /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? title = null,Object? value = null,}) { return _then(_self.copyWith( title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [ScriptWidgetOption]. extension ScriptWidgetOptionPatterns on ScriptWidgetOption { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetOption value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetOption() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetOption value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetOption(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetOption value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetOption() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String title, @JsonKey(fromJson: _stringFromAny) String value)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetOption() when $default != null: return $default(_that.title,_that.value);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String title, @JsonKey(fromJson: _stringFromAny) String value) $default,) {final _that = this; switch (_that) { case _ScriptWidgetOption(): return $default(_that.title,_that.value);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String title, @JsonKey(fromJson: _stringFromAny) String value)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetOption() when $default != null: return $default(_that.title,_that.value);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetOption implements ScriptWidgetOption { const _ScriptWidgetOption({this.title = '', @JsonKey(fromJson: _stringFromAny) this.value = ''}); factory _ScriptWidgetOption.fromJson(Map json) => _$ScriptWidgetOptionFromJson(json); @override@JsonKey() final String title; @override@JsonKey(fromJson: _stringFromAny) final String value; /// Create a copy of ScriptWidgetOption /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetOptionCopyWith<_ScriptWidgetOption> get copyWith => __$ScriptWidgetOptionCopyWithImpl<_ScriptWidgetOption>(this, _$identity); @override Map toJson() { return _$ScriptWidgetOptionToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetOption&&(identical(other.title, title) || other.title == title)&&(identical(other.value, value) || other.value == value)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,title,value); @override String toString() { return 'ScriptWidgetOption(title: $title, value: $value)'; } } /// @nodoc abstract mixin class _$ScriptWidgetOptionCopyWith<$Res> implements $ScriptWidgetOptionCopyWith<$Res> { factory _$ScriptWidgetOptionCopyWith(_ScriptWidgetOption value, $Res Function(_ScriptWidgetOption) _then) = __$ScriptWidgetOptionCopyWithImpl; @override @useResult $Res call({ String title,@JsonKey(fromJson: _stringFromAny) String value }); } /// @nodoc class __$ScriptWidgetOptionCopyWithImpl<$Res> implements _$ScriptWidgetOptionCopyWith<$Res> { __$ScriptWidgetOptionCopyWithImpl(this._self, this._then); final _ScriptWidgetOption _self; final $Res Function(_ScriptWidgetOption) _then; /// Create a copy of ScriptWidgetOption /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? title = null,Object? value = null,}) { return _then(_ScriptWidgetOption( title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$ScriptWidgetBelongTo { String get paramName;@JsonKey(fromJson: _stringListFromAny) List get value; /// Create a copy of ScriptWidgetBelongTo /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetBelongToCopyWith get copyWith => _$ScriptWidgetBelongToCopyWithImpl(this as ScriptWidgetBelongTo, _$identity); /// Serializes this ScriptWidgetBelongTo to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetBelongTo&&(identical(other.paramName, paramName) || other.paramName == paramName)&&const DeepCollectionEquality().equals(other.value, value)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,paramName,const DeepCollectionEquality().hash(value)); @override String toString() { return 'ScriptWidgetBelongTo(paramName: $paramName, value: $value)'; } } /// @nodoc abstract mixin class $ScriptWidgetBelongToCopyWith<$Res> { factory $ScriptWidgetBelongToCopyWith(ScriptWidgetBelongTo value, $Res Function(ScriptWidgetBelongTo) _then) = _$ScriptWidgetBelongToCopyWithImpl; @useResult $Res call({ String paramName,@JsonKey(fromJson: _stringListFromAny) List value }); } /// @nodoc class _$ScriptWidgetBelongToCopyWithImpl<$Res> implements $ScriptWidgetBelongToCopyWith<$Res> { _$ScriptWidgetBelongToCopyWithImpl(this._self, this._then); final ScriptWidgetBelongTo _self; final $Res Function(ScriptWidgetBelongTo) _then; /// Create a copy of ScriptWidgetBelongTo /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? paramName = null,Object? value = null,}) { return _then(_self.copyWith( paramName: null == paramName ? _self.paramName : paramName // ignore: cast_nullable_to_non_nullable as String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [ScriptWidgetBelongTo]. extension ScriptWidgetBelongToPatterns on ScriptWidgetBelongTo { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetBelongTo value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetBelongTo() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetBelongTo value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetBelongTo(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetBelongTo value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetBelongTo() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String paramName, @JsonKey(fromJson: _stringListFromAny) List value)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetBelongTo() when $default != null: return $default(_that.paramName,_that.value);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String paramName, @JsonKey(fromJson: _stringListFromAny) List value) $default,) {final _that = this; switch (_that) { case _ScriptWidgetBelongTo(): return $default(_that.paramName,_that.value);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String paramName, @JsonKey(fromJson: _stringListFromAny) List value)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetBelongTo() when $default != null: return $default(_that.paramName,_that.value);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetBelongTo implements ScriptWidgetBelongTo { const _ScriptWidgetBelongTo({this.paramName = '', @JsonKey(fromJson: _stringListFromAny) final List value = const []}): _value = value; factory _ScriptWidgetBelongTo.fromJson(Map json) => _$ScriptWidgetBelongToFromJson(json); @override@JsonKey() final String paramName; final List _value; @override@JsonKey(fromJson: _stringListFromAny) List get value { if (_value is EqualUnmodifiableListView) return _value; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_value); } /// Create a copy of ScriptWidgetBelongTo /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetBelongToCopyWith<_ScriptWidgetBelongTo> get copyWith => __$ScriptWidgetBelongToCopyWithImpl<_ScriptWidgetBelongTo>(this, _$identity); @override Map toJson() { return _$ScriptWidgetBelongToToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetBelongTo&&(identical(other.paramName, paramName) || other.paramName == paramName)&&const DeepCollectionEquality().equals(other._value, _value)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,paramName,const DeepCollectionEquality().hash(_value)); @override String toString() { return 'ScriptWidgetBelongTo(paramName: $paramName, value: $value)'; } } /// @nodoc abstract mixin class _$ScriptWidgetBelongToCopyWith<$Res> implements $ScriptWidgetBelongToCopyWith<$Res> { factory _$ScriptWidgetBelongToCopyWith(_ScriptWidgetBelongTo value, $Res Function(_ScriptWidgetBelongTo) _then) = __$ScriptWidgetBelongToCopyWithImpl; @override @useResult $Res call({ String paramName,@JsonKey(fromJson: _stringListFromAny) List value }); } /// @nodoc class __$ScriptWidgetBelongToCopyWithImpl<$Res> implements _$ScriptWidgetBelongToCopyWith<$Res> { __$ScriptWidgetBelongToCopyWithImpl(this._self, this._then); final _ScriptWidgetBelongTo _self; final $Res Function(_ScriptWidgetBelongTo) _then; /// Create a copy of ScriptWidgetBelongTo /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? paramName = null,Object? value = null,}) { return _then(_ScriptWidgetBelongTo( paramName: null == paramName ? _self.paramName : paramName // ignore: cast_nullable_to_non_nullable as String,value: null == value ? _self._value : value // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$ScriptWidgetParam { String get name; String get title; String get type; String get description; Object? get value; ScriptWidgetBelongTo? get belongTo; List get placeholders; List get enumOptions; /// Create a copy of ScriptWidgetParam /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetParamCopyWith get copyWith => _$ScriptWidgetParamCopyWithImpl(this as ScriptWidgetParam, _$identity); /// Serializes this ScriptWidgetParam to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetParam&&(identical(other.name, name) || other.name == name)&&(identical(other.title, title) || other.title == title)&&(identical(other.type, type) || other.type == type)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.value, value)&&(identical(other.belongTo, belongTo) || other.belongTo == belongTo)&&const DeepCollectionEquality().equals(other.placeholders, placeholders)&&const DeepCollectionEquality().equals(other.enumOptions, enumOptions)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,name,title,type,description,const DeepCollectionEquality().hash(value),belongTo,const DeepCollectionEquality().hash(placeholders),const DeepCollectionEquality().hash(enumOptions)); @override String toString() { return 'ScriptWidgetParam(name: $name, title: $title, type: $type, description: $description, value: $value, belongTo: $belongTo, placeholders: $placeholders, enumOptions: $enumOptions)'; } } /// @nodoc abstract mixin class $ScriptWidgetParamCopyWith<$Res> { factory $ScriptWidgetParamCopyWith(ScriptWidgetParam value, $Res Function(ScriptWidgetParam) _then) = _$ScriptWidgetParamCopyWithImpl; @useResult $Res call({ String name, String title, String type, String description, Object? value, ScriptWidgetBelongTo? belongTo, List placeholders, List enumOptions }); $ScriptWidgetBelongToCopyWith<$Res>? get belongTo; } /// @nodoc class _$ScriptWidgetParamCopyWithImpl<$Res> implements $ScriptWidgetParamCopyWith<$Res> { _$ScriptWidgetParamCopyWithImpl(this._self, this._then); final ScriptWidgetParam _self; final $Res Function(ScriptWidgetParam) _then; /// Create a copy of ScriptWidgetParam /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? title = null,Object? type = null,Object? description = null,Object? value = freezed,Object? belongTo = freezed,Object? placeholders = null,Object? enumOptions = null,}) { return _then(_self.copyWith( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,value: freezed == value ? _self.value : value ,belongTo: freezed == belongTo ? _self.belongTo : belongTo // ignore: cast_nullable_to_non_nullable as ScriptWidgetBelongTo?,placeholders: null == placeholders ? _self.placeholders : placeholders // ignore: cast_nullable_to_non_nullable as List,enumOptions: null == enumOptions ? _self.enumOptions : enumOptions // ignore: cast_nullable_to_non_nullable as List, )); } /// Create a copy of ScriptWidgetParam /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetBelongToCopyWith<$Res>? get belongTo { if (_self.belongTo == null) { return null; } return $ScriptWidgetBelongToCopyWith<$Res>(_self.belongTo!, (value) { return _then(_self.copyWith(belongTo: value)); }); } } /// Adds pattern-matching-related methods to [ScriptWidgetParam]. extension ScriptWidgetParamPatterns on ScriptWidgetParam { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetParam value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetParam() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetParam value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetParam(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetParam value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetParam() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String name, String title, String type, String description, Object? value, ScriptWidgetBelongTo? belongTo, List placeholders, List enumOptions)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetParam() when $default != null: return $default(_that.name,_that.title,_that.type,_that.description,_that.value,_that.belongTo,_that.placeholders,_that.enumOptions);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String name, String title, String type, String description, Object? value, ScriptWidgetBelongTo? belongTo, List placeholders, List enumOptions) $default,) {final _that = this; switch (_that) { case _ScriptWidgetParam(): return $default(_that.name,_that.title,_that.type,_that.description,_that.value,_that.belongTo,_that.placeholders,_that.enumOptions);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, String title, String type, String description, Object? value, ScriptWidgetBelongTo? belongTo, List placeholders, List enumOptions)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetParam() when $default != null: return $default(_that.name,_that.title,_that.type,_that.description,_that.value,_that.belongTo,_that.placeholders,_that.enumOptions);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetParam implements ScriptWidgetParam { const _ScriptWidgetParam({required this.name, this.title = '', this.type = 'input', this.description = '', this.value, this.belongTo, final List placeholders = const [], final List enumOptions = const []}): _placeholders = placeholders,_enumOptions = enumOptions; factory _ScriptWidgetParam.fromJson(Map json) => _$ScriptWidgetParamFromJson(json); @override final String name; @override@JsonKey() final String title; @override@JsonKey() final String type; @override@JsonKey() final String description; @override final Object? value; @override final ScriptWidgetBelongTo? belongTo; final List _placeholders; @override@JsonKey() List get placeholders { if (_placeholders is EqualUnmodifiableListView) return _placeholders; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_placeholders); } final List _enumOptions; @override@JsonKey() List get enumOptions { if (_enumOptions is EqualUnmodifiableListView) return _enumOptions; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_enumOptions); } /// Create a copy of ScriptWidgetParam /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetParamCopyWith<_ScriptWidgetParam> get copyWith => __$ScriptWidgetParamCopyWithImpl<_ScriptWidgetParam>(this, _$identity); @override Map toJson() { return _$ScriptWidgetParamToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetParam&&(identical(other.name, name) || other.name == name)&&(identical(other.title, title) || other.title == title)&&(identical(other.type, type) || other.type == type)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.value, value)&&(identical(other.belongTo, belongTo) || other.belongTo == belongTo)&&const DeepCollectionEquality().equals(other._placeholders, _placeholders)&&const DeepCollectionEquality().equals(other._enumOptions, _enumOptions)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,name,title,type,description,const DeepCollectionEquality().hash(value),belongTo,const DeepCollectionEquality().hash(_placeholders),const DeepCollectionEquality().hash(_enumOptions)); @override String toString() { return 'ScriptWidgetParam(name: $name, title: $title, type: $type, description: $description, value: $value, belongTo: $belongTo, placeholders: $placeholders, enumOptions: $enumOptions)'; } } /// @nodoc abstract mixin class _$ScriptWidgetParamCopyWith<$Res> implements $ScriptWidgetParamCopyWith<$Res> { factory _$ScriptWidgetParamCopyWith(_ScriptWidgetParam value, $Res Function(_ScriptWidgetParam) _then) = __$ScriptWidgetParamCopyWithImpl; @override @useResult $Res call({ String name, String title, String type, String description, Object? value, ScriptWidgetBelongTo? belongTo, List placeholders, List enumOptions }); @override $ScriptWidgetBelongToCopyWith<$Res>? get belongTo; } /// @nodoc class __$ScriptWidgetParamCopyWithImpl<$Res> implements _$ScriptWidgetParamCopyWith<$Res> { __$ScriptWidgetParamCopyWithImpl(this._self, this._then); final _ScriptWidgetParam _self; final $Res Function(_ScriptWidgetParam) _then; /// Create a copy of ScriptWidgetParam /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? title = null,Object? type = null,Object? description = null,Object? value = freezed,Object? belongTo = freezed,Object? placeholders = null,Object? enumOptions = null,}) { return _then(_ScriptWidgetParam( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,value: freezed == value ? _self.value : value ,belongTo: freezed == belongTo ? _self.belongTo : belongTo // ignore: cast_nullable_to_non_nullable as ScriptWidgetBelongTo?,placeholders: null == placeholders ? _self._placeholders : placeholders // ignore: cast_nullable_to_non_nullable as List,enumOptions: null == enumOptions ? _self._enumOptions : enumOptions // ignore: cast_nullable_to_non_nullable as List, )); } /// Create a copy of ScriptWidgetParam /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetBelongToCopyWith<$Res>? get belongTo { if (_self.belongTo == null) { return null; } return $ScriptWidgetBelongToCopyWith<$Res>(_self.belongTo!, (value) { return _then(_self.copyWith(belongTo: value)); }); } } /// @nodoc mixin _$ScriptWidgetModule { String get id; String get title; String get description; bool get requiresWebView; String get functionName; bool get sectionMode; int get cacheDuration; String get type; List get params; /// Create a copy of ScriptWidgetModule /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetModuleCopyWith get copyWith => _$ScriptWidgetModuleCopyWithImpl(this as ScriptWidgetModule, _$identity); /// Serializes this ScriptWidgetModule to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetModule&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.requiresWebView, requiresWebView) || other.requiresWebView == requiresWebView)&&(identical(other.functionName, functionName) || other.functionName == functionName)&&(identical(other.sectionMode, sectionMode) || other.sectionMode == sectionMode)&&(identical(other.cacheDuration, cacheDuration) || other.cacheDuration == cacheDuration)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.params, params)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,description,requiresWebView,functionName,sectionMode,cacheDuration,type,const DeepCollectionEquality().hash(params)); @override String toString() { return 'ScriptWidgetModule(id: $id, title: $title, description: $description, requiresWebView: $requiresWebView, functionName: $functionName, sectionMode: $sectionMode, cacheDuration: $cacheDuration, type: $type, params: $params)'; } } /// @nodoc abstract mixin class $ScriptWidgetModuleCopyWith<$Res> { factory $ScriptWidgetModuleCopyWith(ScriptWidgetModule value, $Res Function(ScriptWidgetModule) _then) = _$ScriptWidgetModuleCopyWithImpl; @useResult $Res call({ String id, String title, String description, bool requiresWebView, String functionName, bool sectionMode, int cacheDuration, String type, List params }); } /// @nodoc class _$ScriptWidgetModuleCopyWithImpl<$Res> implements $ScriptWidgetModuleCopyWith<$Res> { _$ScriptWidgetModuleCopyWithImpl(this._self, this._then); final ScriptWidgetModule _self; final $Res Function(ScriptWidgetModule) _then; /// Create a copy of ScriptWidgetModule /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? description = null,Object? requiresWebView = null,Object? functionName = null,Object? sectionMode = null,Object? cacheDuration = null,Object? type = null,Object? params = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,requiresWebView: null == requiresWebView ? _self.requiresWebView : requiresWebView // ignore: cast_nullable_to_non_nullable as bool,functionName: null == functionName ? _self.functionName : functionName // ignore: cast_nullable_to_non_nullable as String,sectionMode: null == sectionMode ? _self.sectionMode : sectionMode // ignore: cast_nullable_to_non_nullable as bool,cacheDuration: null == cacheDuration ? _self.cacheDuration : cacheDuration // ignore: cast_nullable_to_non_nullable as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,params: null == params ? _self.params : params // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [ScriptWidgetModule]. extension ScriptWidgetModulePatterns on ScriptWidgetModule { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetModule value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetModule() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetModule value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetModule(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetModule value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetModule() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String title, String description, bool requiresWebView, String functionName, bool sectionMode, int cacheDuration, String type, List params)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetModule() when $default != null: return $default(_that.id,_that.title,_that.description,_that.requiresWebView,_that.functionName,_that.sectionMode,_that.cacheDuration,_that.type,_that.params);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String title, String description, bool requiresWebView, String functionName, bool sectionMode, int cacheDuration, String type, List params) $default,) {final _that = this; switch (_that) { case _ScriptWidgetModule(): return $default(_that.id,_that.title,_that.description,_that.requiresWebView,_that.functionName,_that.sectionMode,_that.cacheDuration,_that.type,_that.params);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String title, String description, bool requiresWebView, String functionName, bool sectionMode, int cacheDuration, String type, List params)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetModule() when $default != null: return $default(_that.id,_that.title,_that.description,_that.requiresWebView,_that.functionName,_that.sectionMode,_that.cacheDuration,_that.type,_that.params);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetModule implements ScriptWidgetModule { const _ScriptWidgetModule({this.id = '', required this.title, this.description = '', this.requiresWebView = false, required this.functionName, this.sectionMode = false, this.cacheDuration = 3600, this.type = 'list', final List params = const []}): _params = params; factory _ScriptWidgetModule.fromJson(Map json) => _$ScriptWidgetModuleFromJson(json); @override@JsonKey() final String id; @override final String title; @override@JsonKey() final String description; @override@JsonKey() final bool requiresWebView; @override final String functionName; @override@JsonKey() final bool sectionMode; @override@JsonKey() final int cacheDuration; @override@JsonKey() final String type; final List _params; @override@JsonKey() List get params { if (_params is EqualUnmodifiableListView) return _params; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_params); } /// Create a copy of ScriptWidgetModule /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetModuleCopyWith<_ScriptWidgetModule> get copyWith => __$ScriptWidgetModuleCopyWithImpl<_ScriptWidgetModule>(this, _$identity); @override Map toJson() { return _$ScriptWidgetModuleToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetModule&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.requiresWebView, requiresWebView) || other.requiresWebView == requiresWebView)&&(identical(other.functionName, functionName) || other.functionName == functionName)&&(identical(other.sectionMode, sectionMode) || other.sectionMode == sectionMode)&&(identical(other.cacheDuration, cacheDuration) || other.cacheDuration == cacheDuration)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._params, _params)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,description,requiresWebView,functionName,sectionMode,cacheDuration,type,const DeepCollectionEquality().hash(_params)); @override String toString() { return 'ScriptWidgetModule(id: $id, title: $title, description: $description, requiresWebView: $requiresWebView, functionName: $functionName, sectionMode: $sectionMode, cacheDuration: $cacheDuration, type: $type, params: $params)'; } } /// @nodoc abstract mixin class _$ScriptWidgetModuleCopyWith<$Res> implements $ScriptWidgetModuleCopyWith<$Res> { factory _$ScriptWidgetModuleCopyWith(_ScriptWidgetModule value, $Res Function(_ScriptWidgetModule) _then) = __$ScriptWidgetModuleCopyWithImpl; @override @useResult $Res call({ String id, String title, String description, bool requiresWebView, String functionName, bool sectionMode, int cacheDuration, String type, List params }); } /// @nodoc class __$ScriptWidgetModuleCopyWithImpl<$Res> implements _$ScriptWidgetModuleCopyWith<$Res> { __$ScriptWidgetModuleCopyWithImpl(this._self, this._then); final _ScriptWidgetModule _self; final $Res Function(_ScriptWidgetModule) _then; /// Create a copy of ScriptWidgetModule /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? description = null,Object? requiresWebView = null,Object? functionName = null,Object? sectionMode = null,Object? cacheDuration = null,Object? type = null,Object? params = null,}) { return _then(_ScriptWidgetModule( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,requiresWebView: null == requiresWebView ? _self.requiresWebView : requiresWebView // ignore: cast_nullable_to_non_nullable as bool,functionName: null == functionName ? _self.functionName : functionName // ignore: cast_nullable_to_non_nullable as String,sectionMode: null == sectionMode ? _self.sectionMode : sectionMode // ignore: cast_nullable_to_non_nullable as bool,cacheDuration: null == cacheDuration ? _self.cacheDuration : cacheDuration // ignore: cast_nullable_to_non_nullable as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,params: null == params ? _self._params : params // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$ScriptWidgetManifest { String get id; String get title; String get description; String get author; String get site; String get version; String get requiredVersion; int get detailCacheDuration; List get globalParams; List get modules; ScriptWidgetModule? get search; /// Create a copy of ScriptWidgetManifest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetManifestCopyWith get copyWith => _$ScriptWidgetManifestCopyWithImpl(this as ScriptWidgetManifest, _$identity); /// Serializes this ScriptWidgetManifest to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetManifest&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.author, author) || other.author == author)&&(identical(other.site, site) || other.site == site)&&(identical(other.version, version) || other.version == version)&&(identical(other.requiredVersion, requiredVersion) || other.requiredVersion == requiredVersion)&&(identical(other.detailCacheDuration, detailCacheDuration) || other.detailCacheDuration == detailCacheDuration)&&const DeepCollectionEquality().equals(other.globalParams, globalParams)&&const DeepCollectionEquality().equals(other.modules, modules)&&(identical(other.search, search) || other.search == search)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,description,author,site,version,requiredVersion,detailCacheDuration,const DeepCollectionEquality().hash(globalParams),const DeepCollectionEquality().hash(modules),search); @override String toString() { return 'ScriptWidgetManifest(id: $id, title: $title, description: $description, author: $author, site: $site, version: $version, requiredVersion: $requiredVersion, detailCacheDuration: $detailCacheDuration, globalParams: $globalParams, modules: $modules, search: $search)'; } } /// @nodoc abstract mixin class $ScriptWidgetManifestCopyWith<$Res> { factory $ScriptWidgetManifestCopyWith(ScriptWidgetManifest value, $Res Function(ScriptWidgetManifest) _then) = _$ScriptWidgetManifestCopyWithImpl; @useResult $Res call({ String id, String title, String description, String author, String site, String version, String requiredVersion, int detailCacheDuration, List globalParams, List modules, ScriptWidgetModule? search }); $ScriptWidgetModuleCopyWith<$Res>? get search; } /// @nodoc class _$ScriptWidgetManifestCopyWithImpl<$Res> implements $ScriptWidgetManifestCopyWith<$Res> { _$ScriptWidgetManifestCopyWithImpl(this._self, this._then); final ScriptWidgetManifest _self; final $Res Function(ScriptWidgetManifest) _then; /// Create a copy of ScriptWidgetManifest /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? description = null,Object? author = null,Object? site = null,Object? version = null,Object? requiredVersion = null,Object? detailCacheDuration = null,Object? globalParams = null,Object? modules = null,Object? search = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,author: null == author ? _self.author : author // ignore: cast_nullable_to_non_nullable as String,site: null == site ? _self.site : site // ignore: cast_nullable_to_non_nullable as String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable as String,requiredVersion: null == requiredVersion ? _self.requiredVersion : requiredVersion // ignore: cast_nullable_to_non_nullable as String,detailCacheDuration: null == detailCacheDuration ? _self.detailCacheDuration : detailCacheDuration // ignore: cast_nullable_to_non_nullable as int,globalParams: null == globalParams ? _self.globalParams : globalParams // ignore: cast_nullable_to_non_nullable as List,modules: null == modules ? _self.modules : modules // ignore: cast_nullable_to_non_nullable as List,search: freezed == search ? _self.search : search // ignore: cast_nullable_to_non_nullable as ScriptWidgetModule?, )); } /// Create a copy of ScriptWidgetManifest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetModuleCopyWith<$Res>? get search { if (_self.search == null) { return null; } return $ScriptWidgetModuleCopyWith<$Res>(_self.search!, (value) { return _then(_self.copyWith(search: value)); }); } } /// Adds pattern-matching-related methods to [ScriptWidgetManifest]. extension ScriptWidgetManifestPatterns on ScriptWidgetManifest { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetManifest value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetManifest() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetManifest value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetManifest(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetManifest value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetManifest() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String title, String description, String author, String site, String version, String requiredVersion, int detailCacheDuration, List globalParams, List modules, ScriptWidgetModule? search)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetManifest() when $default != null: return $default(_that.id,_that.title,_that.description,_that.author,_that.site,_that.version,_that.requiredVersion,_that.detailCacheDuration,_that.globalParams,_that.modules,_that.search);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String title, String description, String author, String site, String version, String requiredVersion, int detailCacheDuration, List globalParams, List modules, ScriptWidgetModule? search) $default,) {final _that = this; switch (_that) { case _ScriptWidgetManifest(): return $default(_that.id,_that.title,_that.description,_that.author,_that.site,_that.version,_that.requiredVersion,_that.detailCacheDuration,_that.globalParams,_that.modules,_that.search);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String title, String description, String author, String site, String version, String requiredVersion, int detailCacheDuration, List globalParams, List modules, ScriptWidgetModule? search)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetManifest() when $default != null: return $default(_that.id,_that.title,_that.description,_that.author,_that.site,_that.version,_that.requiredVersion,_that.detailCacheDuration,_that.globalParams,_that.modules,_that.search);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetManifest implements ScriptWidgetManifest { const _ScriptWidgetManifest({required this.id, required this.title, this.description = '', this.author = '', this.site = '', this.version = '0.0.0', this.requiredVersion = '0.0.1', this.detailCacheDuration = 60, final List globalParams = const [], final List modules = const [], this.search}): _globalParams = globalParams,_modules = modules; factory _ScriptWidgetManifest.fromJson(Map json) => _$ScriptWidgetManifestFromJson(json); @override final String id; @override final String title; @override@JsonKey() final String description; @override@JsonKey() final String author; @override@JsonKey() final String site; @override@JsonKey() final String version; @override@JsonKey() final String requiredVersion; @override@JsonKey() final int detailCacheDuration; final List _globalParams; @override@JsonKey() List get globalParams { if (_globalParams is EqualUnmodifiableListView) return _globalParams; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_globalParams); } final List _modules; @override@JsonKey() List get modules { if (_modules is EqualUnmodifiableListView) return _modules; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_modules); } @override final ScriptWidgetModule? search; /// Create a copy of ScriptWidgetManifest /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetManifestCopyWith<_ScriptWidgetManifest> get copyWith => __$ScriptWidgetManifestCopyWithImpl<_ScriptWidgetManifest>(this, _$identity); @override Map toJson() { return _$ScriptWidgetManifestToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetManifest&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.author, author) || other.author == author)&&(identical(other.site, site) || other.site == site)&&(identical(other.version, version) || other.version == version)&&(identical(other.requiredVersion, requiredVersion) || other.requiredVersion == requiredVersion)&&(identical(other.detailCacheDuration, detailCacheDuration) || other.detailCacheDuration == detailCacheDuration)&&const DeepCollectionEquality().equals(other._globalParams, _globalParams)&&const DeepCollectionEquality().equals(other._modules, _modules)&&(identical(other.search, search) || other.search == search)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,description,author,site,version,requiredVersion,detailCacheDuration,const DeepCollectionEquality().hash(_globalParams),const DeepCollectionEquality().hash(_modules),search); @override String toString() { return 'ScriptWidgetManifest(id: $id, title: $title, description: $description, author: $author, site: $site, version: $version, requiredVersion: $requiredVersion, detailCacheDuration: $detailCacheDuration, globalParams: $globalParams, modules: $modules, search: $search)'; } } /// @nodoc abstract mixin class _$ScriptWidgetManifestCopyWith<$Res> implements $ScriptWidgetManifestCopyWith<$Res> { factory _$ScriptWidgetManifestCopyWith(_ScriptWidgetManifest value, $Res Function(_ScriptWidgetManifest) _then) = __$ScriptWidgetManifestCopyWithImpl; @override @useResult $Res call({ String id, String title, String description, String author, String site, String version, String requiredVersion, int detailCacheDuration, List globalParams, List modules, ScriptWidgetModule? search }); @override $ScriptWidgetModuleCopyWith<$Res>? get search; } /// @nodoc class __$ScriptWidgetManifestCopyWithImpl<$Res> implements _$ScriptWidgetManifestCopyWith<$Res> { __$ScriptWidgetManifestCopyWithImpl(this._self, this._then); final _ScriptWidgetManifest _self; final $Res Function(_ScriptWidgetManifest) _then; /// Create a copy of ScriptWidgetManifest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? description = null,Object? author = null,Object? site = null,Object? version = null,Object? requiredVersion = null,Object? detailCacheDuration = null,Object? globalParams = null,Object? modules = null,Object? search = freezed,}) { return _then(_ScriptWidgetManifest( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,author: null == author ? _self.author : author // ignore: cast_nullable_to_non_nullable as String,site: null == site ? _self.site : site // ignore: cast_nullable_to_non_nullable as String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable as String,requiredVersion: null == requiredVersion ? _self.requiredVersion : requiredVersion // ignore: cast_nullable_to_non_nullable as String,detailCacheDuration: null == detailCacheDuration ? _self.detailCacheDuration : detailCacheDuration // ignore: cast_nullable_to_non_nullable as int,globalParams: null == globalParams ? _self._globalParams : globalParams // ignore: cast_nullable_to_non_nullable as List,modules: null == modules ? _self._modules : modules // ignore: cast_nullable_to_non_nullable as List,search: freezed == search ? _self.search : search // ignore: cast_nullable_to_non_nullable as ScriptWidgetModule?, )); } /// Create a copy of ScriptWidgetManifest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetModuleCopyWith<$Res>? get search { if (_self.search == null) { return null; } return $ScriptWidgetModuleCopyWith<$Res>(_self.search!, (value) { return _then(_self.copyWith(search: value)); }); } } /// @nodoc mixin _$ScriptVideoPerson { @JsonKey(fromJson: _stringFromAny) String get id; String get title; String get avatar; String get role; /// Create a copy of ScriptVideoPerson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptVideoPersonCopyWith get copyWith => _$ScriptVideoPersonCopyWithImpl(this as ScriptVideoPerson, _$identity); /// Serializes this ScriptVideoPerson to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptVideoPerson&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.avatar, avatar) || other.avatar == avatar)&&(identical(other.role, role) || other.role == role)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,avatar,role); @override String toString() { return 'ScriptVideoPerson(id: $id, title: $title, avatar: $avatar, role: $role)'; } } /// @nodoc abstract mixin class $ScriptVideoPersonCopyWith<$Res> { factory $ScriptVideoPersonCopyWith(ScriptVideoPerson value, $Res Function(ScriptVideoPerson) _then) = _$ScriptVideoPersonCopyWithImpl; @useResult $Res call({ @JsonKey(fromJson: _stringFromAny) String id, String title, String avatar, String role }); } /// @nodoc class _$ScriptVideoPersonCopyWithImpl<$Res> implements $ScriptVideoPersonCopyWith<$Res> { _$ScriptVideoPersonCopyWithImpl(this._self, this._then); final ScriptVideoPerson _self; final $Res Function(ScriptVideoPerson) _then; /// Create a copy of ScriptVideoPerson /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? avatar = null,Object? role = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,avatar: null == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [ScriptVideoPerson]. extension ScriptVideoPersonPatterns on ScriptVideoPerson { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptVideoPerson value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptVideoPerson() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptVideoPerson value) $default,){ final _that = this; switch (_that) { case _ScriptVideoPerson(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptVideoPerson value)? $default,){ final _that = this; switch (_that) { case _ScriptVideoPerson() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function(@JsonKey(fromJson: _stringFromAny) String id, String title, String avatar, String role)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptVideoPerson() when $default != null: return $default(_that.id,_that.title,_that.avatar,_that.role);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function(@JsonKey(fromJson: _stringFromAny) String id, String title, String avatar, String role) $default,) {final _that = this; switch (_that) { case _ScriptVideoPerson(): return $default(_that.id,_that.title,_that.avatar,_that.role);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function(@JsonKey(fromJson: _stringFromAny) String id, String title, String avatar, String role)? $default,) {final _that = this; switch (_that) { case _ScriptVideoPerson() when $default != null: return $default(_that.id,_that.title,_that.avatar,_that.role);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptVideoPerson implements ScriptVideoPerson { const _ScriptVideoPerson({@JsonKey(fromJson: _stringFromAny) this.id = '', this.title = '', this.avatar = '', this.role = ''}); factory _ScriptVideoPerson.fromJson(Map json) => _$ScriptVideoPersonFromJson(json); @override@JsonKey(fromJson: _stringFromAny) final String id; @override@JsonKey() final String title; @override@JsonKey() final String avatar; @override@JsonKey() final String role; /// Create a copy of ScriptVideoPerson /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptVideoPersonCopyWith<_ScriptVideoPerson> get copyWith => __$ScriptVideoPersonCopyWithImpl<_ScriptVideoPerson>(this, _$identity); @override Map toJson() { return _$ScriptVideoPersonToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptVideoPerson&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.avatar, avatar) || other.avatar == avatar)&&(identical(other.role, role) || other.role == role)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,avatar,role); @override String toString() { return 'ScriptVideoPerson(id: $id, title: $title, avatar: $avatar, role: $role)'; } } /// @nodoc abstract mixin class _$ScriptVideoPersonCopyWith<$Res> implements $ScriptVideoPersonCopyWith<$Res> { factory _$ScriptVideoPersonCopyWith(_ScriptVideoPerson value, $Res Function(_ScriptVideoPerson) _then) = __$ScriptVideoPersonCopyWithImpl; @override @useResult $Res call({ @JsonKey(fromJson: _stringFromAny) String id, String title, String avatar, String role }); } /// @nodoc class __$ScriptVideoPersonCopyWithImpl<$Res> implements _$ScriptVideoPersonCopyWith<$Res> { __$ScriptVideoPersonCopyWithImpl(this._self, this._then); final _ScriptVideoPerson _self; final $Res Function(_ScriptVideoPerson) _then; /// Create a copy of ScriptVideoPerson /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? avatar = null,Object? role = null,}) { return _then(_ScriptVideoPerson( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,avatar: null == avatar ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$ScriptVideoGenre { @JsonKey(fromJson: _stringFromAny) String get id; String get title; /// Create a copy of ScriptVideoGenre /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptVideoGenreCopyWith get copyWith => _$ScriptVideoGenreCopyWithImpl(this as ScriptVideoGenre, _$identity); /// Serializes this ScriptVideoGenre to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptVideoGenre&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title); @override String toString() { return 'ScriptVideoGenre(id: $id, title: $title)'; } } /// @nodoc abstract mixin class $ScriptVideoGenreCopyWith<$Res> { factory $ScriptVideoGenreCopyWith(ScriptVideoGenre value, $Res Function(ScriptVideoGenre) _then) = _$ScriptVideoGenreCopyWithImpl; @useResult $Res call({ @JsonKey(fromJson: _stringFromAny) String id, String title }); } /// @nodoc class _$ScriptVideoGenreCopyWithImpl<$Res> implements $ScriptVideoGenreCopyWith<$Res> { _$ScriptVideoGenreCopyWithImpl(this._self, this._then); final ScriptVideoGenre _self; final $Res Function(ScriptVideoGenre) _then; /// Create a copy of ScriptVideoGenre /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [ScriptVideoGenre]. extension ScriptVideoGenrePatterns on ScriptVideoGenre { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptVideoGenre value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptVideoGenre() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptVideoGenre value) $default,){ final _that = this; switch (_that) { case _ScriptVideoGenre(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptVideoGenre value)? $default,){ final _that = this; switch (_that) { case _ScriptVideoGenre() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function(@JsonKey(fromJson: _stringFromAny) String id, String title)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptVideoGenre() when $default != null: return $default(_that.id,_that.title);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function(@JsonKey(fromJson: _stringFromAny) String id, String title) $default,) {final _that = this; switch (_that) { case _ScriptVideoGenre(): return $default(_that.id,_that.title);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function(@JsonKey(fromJson: _stringFromAny) String id, String title)? $default,) {final _that = this; switch (_that) { case _ScriptVideoGenre() when $default != null: return $default(_that.id,_that.title);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptVideoGenre implements ScriptVideoGenre { const _ScriptVideoGenre({@JsonKey(fromJson: _stringFromAny) this.id = '', this.title = ''}); factory _ScriptVideoGenre.fromJson(Map json) => _$ScriptVideoGenreFromJson(json); @override@JsonKey(fromJson: _stringFromAny) final String id; @override@JsonKey() final String title; /// Create a copy of ScriptVideoGenre /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptVideoGenreCopyWith<_ScriptVideoGenre> get copyWith => __$ScriptVideoGenreCopyWithImpl<_ScriptVideoGenre>(this, _$identity); @override Map toJson() { return _$ScriptVideoGenreToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptVideoGenre&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title); @override String toString() { return 'ScriptVideoGenre(id: $id, title: $title)'; } } /// @nodoc abstract mixin class _$ScriptVideoGenreCopyWith<$Res> implements $ScriptVideoGenreCopyWith<$Res> { factory _$ScriptVideoGenreCopyWith(_ScriptVideoGenre value, $Res Function(_ScriptVideoGenre) _then) = __$ScriptVideoGenreCopyWithImpl; @override @useResult $Res call({ @JsonKey(fromJson: _stringFromAny) String id, String title }); } /// @nodoc class __$ScriptVideoGenreCopyWithImpl<$Res> implements _$ScriptVideoGenreCopyWith<$Res> { __$ScriptVideoGenreCopyWithImpl(this._self, this._then); final _ScriptVideoGenre _self; final $Res Function(_ScriptVideoGenre) _then; /// Create a copy of ScriptVideoGenre /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,}) { return _then(_ScriptVideoGenre( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$ScriptVideoTrailer { String get coverUrl; String get url; /// Create a copy of ScriptVideoTrailer /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptVideoTrailerCopyWith get copyWith => _$ScriptVideoTrailerCopyWithImpl(this as ScriptVideoTrailer, _$identity); /// Serializes this ScriptVideoTrailer to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptVideoTrailer&&(identical(other.coverUrl, coverUrl) || other.coverUrl == coverUrl)&&(identical(other.url, url) || other.url == url)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,coverUrl,url); @override String toString() { return 'ScriptVideoTrailer(coverUrl: $coverUrl, url: $url)'; } } /// @nodoc abstract mixin class $ScriptVideoTrailerCopyWith<$Res> { factory $ScriptVideoTrailerCopyWith(ScriptVideoTrailer value, $Res Function(ScriptVideoTrailer) _then) = _$ScriptVideoTrailerCopyWithImpl; @useResult $Res call({ String coverUrl, String url }); } /// @nodoc class _$ScriptVideoTrailerCopyWithImpl<$Res> implements $ScriptVideoTrailerCopyWith<$Res> { _$ScriptVideoTrailerCopyWithImpl(this._self, this._then); final ScriptVideoTrailer _self; final $Res Function(ScriptVideoTrailer) _then; /// Create a copy of ScriptVideoTrailer /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? coverUrl = null,Object? url = null,}) { return _then(_self.copyWith( coverUrl: null == coverUrl ? _self.coverUrl : coverUrl // ignore: cast_nullable_to_non_nullable as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [ScriptVideoTrailer]. extension ScriptVideoTrailerPatterns on ScriptVideoTrailer { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptVideoTrailer value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptVideoTrailer() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptVideoTrailer value) $default,){ final _that = this; switch (_that) { case _ScriptVideoTrailer(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptVideoTrailer value)? $default,){ final _that = this; switch (_that) { case _ScriptVideoTrailer() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String coverUrl, String url)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptVideoTrailer() when $default != null: return $default(_that.coverUrl,_that.url);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String coverUrl, String url) $default,) {final _that = this; switch (_that) { case _ScriptVideoTrailer(): return $default(_that.coverUrl,_that.url);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String coverUrl, String url)? $default,) {final _that = this; switch (_that) { case _ScriptVideoTrailer() when $default != null: return $default(_that.coverUrl,_that.url);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptVideoTrailer implements ScriptVideoTrailer { const _ScriptVideoTrailer({this.coverUrl = '', this.url = ''}); factory _ScriptVideoTrailer.fromJson(Map json) => _$ScriptVideoTrailerFromJson(json); @override@JsonKey() final String coverUrl; @override@JsonKey() final String url; /// Create a copy of ScriptVideoTrailer /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptVideoTrailerCopyWith<_ScriptVideoTrailer> get copyWith => __$ScriptVideoTrailerCopyWithImpl<_ScriptVideoTrailer>(this, _$identity); @override Map toJson() { return _$ScriptVideoTrailerToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptVideoTrailer&&(identical(other.coverUrl, coverUrl) || other.coverUrl == coverUrl)&&(identical(other.url, url) || other.url == url)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,coverUrl,url); @override String toString() { return 'ScriptVideoTrailer(coverUrl: $coverUrl, url: $url)'; } } /// @nodoc abstract mixin class _$ScriptVideoTrailerCopyWith<$Res> implements $ScriptVideoTrailerCopyWith<$Res> { factory _$ScriptVideoTrailerCopyWith(_ScriptVideoTrailer value, $Res Function(_ScriptVideoTrailer) _then) = __$ScriptVideoTrailerCopyWithImpl; @override @useResult $Res call({ String coverUrl, String url }); } /// @nodoc class __$ScriptVideoTrailerCopyWithImpl<$Res> implements _$ScriptVideoTrailerCopyWith<$Res> { __$ScriptVideoTrailerCopyWithImpl(this._self, this._then); final _ScriptVideoTrailer _self; final $Res Function(_ScriptVideoTrailer) _then; /// Create a copy of ScriptVideoTrailer /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? coverUrl = null,Object? url = null,}) { return _then(_ScriptVideoTrailer( coverUrl: null == coverUrl ? _self.coverUrl : coverUrl // ignore: cast_nullable_to_non_nullable as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$ScriptVideoItem { @JsonKey(fromJson: _stringFromAny) String get id; String get type; String get title; String get coverUrl;@JsonKey(readValue: _readPosterPath) String get posterPath; String get detailPoster; String get backdropPath; List get backdropPaths; String get releaseDate; String get mediaType;@JsonKey(fromJson: _doubleFromAny) double? get rating; String get genreTitle; List get genreItems; List get peoples;@JsonKey(fromJson: _intFromAny) int? get duration; String get durationText; String get previewUrl; List get trailers; String get videoUrl; String get link;@JsonKey(fromJson: _intFromAny) int? get episode; String get description; String get playerType; List get childItems; List get episodeItems; List get relatedItems; /// Create a copy of ScriptVideoItem /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptVideoItemCopyWith get copyWith => _$ScriptVideoItemCopyWithImpl(this as ScriptVideoItem, _$identity); /// Serializes this ScriptVideoItem to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptVideoItem&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.coverUrl, coverUrl) || other.coverUrl == coverUrl)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.detailPoster, detailPoster) || other.detailPoster == detailPoster)&&(identical(other.backdropPath, backdropPath) || other.backdropPath == backdropPath)&&const DeepCollectionEquality().equals(other.backdropPaths, backdropPaths)&&(identical(other.releaseDate, releaseDate) || other.releaseDate == releaseDate)&&(identical(other.mediaType, mediaType) || other.mediaType == mediaType)&&(identical(other.rating, rating) || other.rating == rating)&&(identical(other.genreTitle, genreTitle) || other.genreTitle == genreTitle)&&const DeepCollectionEquality().equals(other.genreItems, genreItems)&&const DeepCollectionEquality().equals(other.peoples, peoples)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.durationText, durationText) || other.durationText == durationText)&&(identical(other.previewUrl, previewUrl) || other.previewUrl == previewUrl)&&const DeepCollectionEquality().equals(other.trailers, trailers)&&(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl)&&(identical(other.link, link) || other.link == link)&&(identical(other.episode, episode) || other.episode == episode)&&(identical(other.description, description) || other.description == description)&&(identical(other.playerType, playerType) || other.playerType == playerType)&&const DeepCollectionEquality().equals(other.childItems, childItems)&&const DeepCollectionEquality().equals(other.episodeItems, episodeItems)&&const DeepCollectionEquality().equals(other.relatedItems, relatedItems)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([runtimeType,id,type,title,coverUrl,posterPath,detailPoster,backdropPath,const DeepCollectionEquality().hash(backdropPaths),releaseDate,mediaType,rating,genreTitle,const DeepCollectionEquality().hash(genreItems),const DeepCollectionEquality().hash(peoples),duration,durationText,previewUrl,const DeepCollectionEquality().hash(trailers),videoUrl,link,episode,description,playerType,const DeepCollectionEquality().hash(childItems),const DeepCollectionEquality().hash(episodeItems),const DeepCollectionEquality().hash(relatedItems)]); @override String toString() { return 'ScriptVideoItem(id: $id, type: $type, title: $title, coverUrl: $coverUrl, posterPath: $posterPath, detailPoster: $detailPoster, backdropPath: $backdropPath, backdropPaths: $backdropPaths, releaseDate: $releaseDate, mediaType: $mediaType, rating: $rating, genreTitle: $genreTitle, genreItems: $genreItems, peoples: $peoples, duration: $duration, durationText: $durationText, previewUrl: $previewUrl, trailers: $trailers, videoUrl: $videoUrl, link: $link, episode: $episode, description: $description, playerType: $playerType, childItems: $childItems, episodeItems: $episodeItems, relatedItems: $relatedItems)'; } } /// @nodoc abstract mixin class $ScriptVideoItemCopyWith<$Res> { factory $ScriptVideoItemCopyWith(ScriptVideoItem value, $Res Function(ScriptVideoItem) _then) = _$ScriptVideoItemCopyWithImpl; @useResult $Res call({ @JsonKey(fromJson: _stringFromAny) String id, String type, String title, String coverUrl,@JsonKey(readValue: _readPosterPath) String posterPath, String detailPoster, String backdropPath, List backdropPaths, String releaseDate, String mediaType,@JsonKey(fromJson: _doubleFromAny) double? rating, String genreTitle, List genreItems, List peoples,@JsonKey(fromJson: _intFromAny) int? duration, String durationText, String previewUrl, List trailers, String videoUrl, String link,@JsonKey(fromJson: _intFromAny) int? episode, String description, String playerType, List childItems, List episodeItems, List relatedItems }); } /// @nodoc class _$ScriptVideoItemCopyWithImpl<$Res> implements $ScriptVideoItemCopyWith<$Res> { _$ScriptVideoItemCopyWithImpl(this._self, this._then); final ScriptVideoItem _self; final $Res Function(ScriptVideoItem) _then; /// Create a copy of ScriptVideoItem /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? type = null,Object? title = null,Object? coverUrl = null,Object? posterPath = null,Object? detailPoster = null,Object? backdropPath = null,Object? backdropPaths = null,Object? releaseDate = null,Object? mediaType = null,Object? rating = freezed,Object? genreTitle = null,Object? genreItems = null,Object? peoples = null,Object? duration = freezed,Object? durationText = null,Object? previewUrl = null,Object? trailers = null,Object? videoUrl = null,Object? link = null,Object? episode = freezed,Object? description = null,Object? playerType = null,Object? childItems = null,Object? episodeItems = null,Object? relatedItems = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,coverUrl: null == coverUrl ? _self.coverUrl : coverUrl // ignore: cast_nullable_to_non_nullable as String,posterPath: null == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable as String,detailPoster: null == detailPoster ? _self.detailPoster : detailPoster // ignore: cast_nullable_to_non_nullable as String,backdropPath: null == backdropPath ? _self.backdropPath : backdropPath // ignore: cast_nullable_to_non_nullable as String,backdropPaths: null == backdropPaths ? _self.backdropPaths : backdropPaths // ignore: cast_nullable_to_non_nullable as List,releaseDate: null == releaseDate ? _self.releaseDate : releaseDate // ignore: cast_nullable_to_non_nullable as String,mediaType: null == mediaType ? _self.mediaType : mediaType // ignore: cast_nullable_to_non_nullable as String,rating: freezed == rating ? _self.rating : rating // ignore: cast_nullable_to_non_nullable as double?,genreTitle: null == genreTitle ? _self.genreTitle : genreTitle // ignore: cast_nullable_to_non_nullable as String,genreItems: null == genreItems ? _self.genreItems : genreItems // ignore: cast_nullable_to_non_nullable as List,peoples: null == peoples ? _self.peoples : peoples // ignore: cast_nullable_to_non_nullable as List,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as int?,durationText: null == durationText ? _self.durationText : durationText // ignore: cast_nullable_to_non_nullable as String,previewUrl: null == previewUrl ? _self.previewUrl : previewUrl // ignore: cast_nullable_to_non_nullable as String,trailers: null == trailers ? _self.trailers : trailers // ignore: cast_nullable_to_non_nullable as List,videoUrl: null == videoUrl ? _self.videoUrl : videoUrl // ignore: cast_nullable_to_non_nullable as String,link: null == link ? _self.link : link // ignore: cast_nullable_to_non_nullable as String,episode: freezed == episode ? _self.episode : episode // ignore: cast_nullable_to_non_nullable as int?,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,playerType: null == playerType ? _self.playerType : playerType // ignore: cast_nullable_to_non_nullable as String,childItems: null == childItems ? _self.childItems : childItems // ignore: cast_nullable_to_non_nullable as List,episodeItems: null == episodeItems ? _self.episodeItems : episodeItems // ignore: cast_nullable_to_non_nullable as List,relatedItems: null == relatedItems ? _self.relatedItems : relatedItems // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [ScriptVideoItem]. extension ScriptVideoItemPatterns on ScriptVideoItem { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptVideoItem value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptVideoItem() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptVideoItem value) $default,){ final _that = this; switch (_that) { case _ScriptVideoItem(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptVideoItem value)? $default,){ final _that = this; switch (_that) { case _ScriptVideoItem() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function(@JsonKey(fromJson: _stringFromAny) String id, String type, String title, String coverUrl, @JsonKey(readValue: _readPosterPath) String posterPath, String detailPoster, String backdropPath, List backdropPaths, String releaseDate, String mediaType, @JsonKey(fromJson: _doubleFromAny) double? rating, String genreTitle, List genreItems, List peoples, @JsonKey(fromJson: _intFromAny) int? duration, String durationText, String previewUrl, List trailers, String videoUrl, String link, @JsonKey(fromJson: _intFromAny) int? episode, String description, String playerType, List childItems, List episodeItems, List relatedItems)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptVideoItem() when $default != null: return $default(_that.id,_that.type,_that.title,_that.coverUrl,_that.posterPath,_that.detailPoster,_that.backdropPath,_that.backdropPaths,_that.releaseDate,_that.mediaType,_that.rating,_that.genreTitle,_that.genreItems,_that.peoples,_that.duration,_that.durationText,_that.previewUrl,_that.trailers,_that.videoUrl,_that.link,_that.episode,_that.description,_that.playerType,_that.childItems,_that.episodeItems,_that.relatedItems);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function(@JsonKey(fromJson: _stringFromAny) String id, String type, String title, String coverUrl, @JsonKey(readValue: _readPosterPath) String posterPath, String detailPoster, String backdropPath, List backdropPaths, String releaseDate, String mediaType, @JsonKey(fromJson: _doubleFromAny) double? rating, String genreTitle, List genreItems, List peoples, @JsonKey(fromJson: _intFromAny) int? duration, String durationText, String previewUrl, List trailers, String videoUrl, String link, @JsonKey(fromJson: _intFromAny) int? episode, String description, String playerType, List childItems, List episodeItems, List relatedItems) $default,) {final _that = this; switch (_that) { case _ScriptVideoItem(): return $default(_that.id,_that.type,_that.title,_that.coverUrl,_that.posterPath,_that.detailPoster,_that.backdropPath,_that.backdropPaths,_that.releaseDate,_that.mediaType,_that.rating,_that.genreTitle,_that.genreItems,_that.peoples,_that.duration,_that.durationText,_that.previewUrl,_that.trailers,_that.videoUrl,_that.link,_that.episode,_that.description,_that.playerType,_that.childItems,_that.episodeItems,_that.relatedItems);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function(@JsonKey(fromJson: _stringFromAny) String id, String type, String title, String coverUrl, @JsonKey(readValue: _readPosterPath) String posterPath, String detailPoster, String backdropPath, List backdropPaths, String releaseDate, String mediaType, @JsonKey(fromJson: _doubleFromAny) double? rating, String genreTitle, List genreItems, List peoples, @JsonKey(fromJson: _intFromAny) int? duration, String durationText, String previewUrl, List trailers, String videoUrl, String link, @JsonKey(fromJson: _intFromAny) int? episode, String description, String playerType, List childItems, List episodeItems, List relatedItems)? $default,) {final _that = this; switch (_that) { case _ScriptVideoItem() when $default != null: return $default(_that.id,_that.type,_that.title,_that.coverUrl,_that.posterPath,_that.detailPoster,_that.backdropPath,_that.backdropPaths,_that.releaseDate,_that.mediaType,_that.rating,_that.genreTitle,_that.genreItems,_that.peoples,_that.duration,_that.durationText,_that.previewUrl,_that.trailers,_that.videoUrl,_that.link,_that.episode,_that.description,_that.playerType,_that.childItems,_that.episodeItems,_that.relatedItems);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptVideoItem implements ScriptVideoItem { const _ScriptVideoItem({@JsonKey(fromJson: _stringFromAny) required this.id, this.type = 'link', this.title = '', this.coverUrl = '', @JsonKey(readValue: _readPosterPath) this.posterPath = '', this.detailPoster = '', this.backdropPath = '', final List backdropPaths = const [], this.releaseDate = '', this.mediaType = '', @JsonKey(fromJson: _doubleFromAny) this.rating, this.genreTitle = '', final List genreItems = const [], final List peoples = const [], @JsonKey(fromJson: _intFromAny) this.duration, this.durationText = '', this.previewUrl = '', final List trailers = const [], this.videoUrl = '', this.link = '', @JsonKey(fromJson: _intFromAny) this.episode, this.description = '', this.playerType = 'app', final List childItems = const [], final List episodeItems = const [], final List relatedItems = const []}): _backdropPaths = backdropPaths,_genreItems = genreItems,_peoples = peoples,_trailers = trailers,_childItems = childItems,_episodeItems = episodeItems,_relatedItems = relatedItems; factory _ScriptVideoItem.fromJson(Map json) => _$ScriptVideoItemFromJson(json); @override@JsonKey(fromJson: _stringFromAny) final String id; @override@JsonKey() final String type; @override@JsonKey() final String title; @override@JsonKey() final String coverUrl; @override@JsonKey(readValue: _readPosterPath) final String posterPath; @override@JsonKey() final String detailPoster; @override@JsonKey() final String backdropPath; final List _backdropPaths; @override@JsonKey() List get backdropPaths { if (_backdropPaths is EqualUnmodifiableListView) return _backdropPaths; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_backdropPaths); } @override@JsonKey() final String releaseDate; @override@JsonKey() final String mediaType; @override@JsonKey(fromJson: _doubleFromAny) final double? rating; @override@JsonKey() final String genreTitle; final List _genreItems; @override@JsonKey() List get genreItems { if (_genreItems is EqualUnmodifiableListView) return _genreItems; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_genreItems); } final List _peoples; @override@JsonKey() List get peoples { if (_peoples is EqualUnmodifiableListView) return _peoples; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_peoples); } @override@JsonKey(fromJson: _intFromAny) final int? duration; @override@JsonKey() final String durationText; @override@JsonKey() final String previewUrl; final List _trailers; @override@JsonKey() List get trailers { if (_trailers is EqualUnmodifiableListView) return _trailers; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_trailers); } @override@JsonKey() final String videoUrl; @override@JsonKey() final String link; @override@JsonKey(fromJson: _intFromAny) final int? episode; @override@JsonKey() final String description; @override@JsonKey() final String playerType; final List _childItems; @override@JsonKey() List get childItems { if (_childItems is EqualUnmodifiableListView) return _childItems; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_childItems); } final List _episodeItems; @override@JsonKey() List get episodeItems { if (_episodeItems is EqualUnmodifiableListView) return _episodeItems; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_episodeItems); } final List _relatedItems; @override@JsonKey() List get relatedItems { if (_relatedItems is EqualUnmodifiableListView) return _relatedItems; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_relatedItems); } /// Create a copy of ScriptVideoItem /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptVideoItemCopyWith<_ScriptVideoItem> get copyWith => __$ScriptVideoItemCopyWithImpl<_ScriptVideoItem>(this, _$identity); @override Map toJson() { return _$ScriptVideoItemToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptVideoItem&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.coverUrl, coverUrl) || other.coverUrl == coverUrl)&&(identical(other.posterPath, posterPath) || other.posterPath == posterPath)&&(identical(other.detailPoster, detailPoster) || other.detailPoster == detailPoster)&&(identical(other.backdropPath, backdropPath) || other.backdropPath == backdropPath)&&const DeepCollectionEquality().equals(other._backdropPaths, _backdropPaths)&&(identical(other.releaseDate, releaseDate) || other.releaseDate == releaseDate)&&(identical(other.mediaType, mediaType) || other.mediaType == mediaType)&&(identical(other.rating, rating) || other.rating == rating)&&(identical(other.genreTitle, genreTitle) || other.genreTitle == genreTitle)&&const DeepCollectionEquality().equals(other._genreItems, _genreItems)&&const DeepCollectionEquality().equals(other._peoples, _peoples)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.durationText, durationText) || other.durationText == durationText)&&(identical(other.previewUrl, previewUrl) || other.previewUrl == previewUrl)&&const DeepCollectionEquality().equals(other._trailers, _trailers)&&(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl)&&(identical(other.link, link) || other.link == link)&&(identical(other.episode, episode) || other.episode == episode)&&(identical(other.description, description) || other.description == description)&&(identical(other.playerType, playerType) || other.playerType == playerType)&&const DeepCollectionEquality().equals(other._childItems, _childItems)&&const DeepCollectionEquality().equals(other._episodeItems, _episodeItems)&&const DeepCollectionEquality().equals(other._relatedItems, _relatedItems)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([runtimeType,id,type,title,coverUrl,posterPath,detailPoster,backdropPath,const DeepCollectionEquality().hash(_backdropPaths),releaseDate,mediaType,rating,genreTitle,const DeepCollectionEquality().hash(_genreItems),const DeepCollectionEquality().hash(_peoples),duration,durationText,previewUrl,const DeepCollectionEquality().hash(_trailers),videoUrl,link,episode,description,playerType,const DeepCollectionEquality().hash(_childItems),const DeepCollectionEquality().hash(_episodeItems),const DeepCollectionEquality().hash(_relatedItems)]); @override String toString() { return 'ScriptVideoItem(id: $id, type: $type, title: $title, coverUrl: $coverUrl, posterPath: $posterPath, detailPoster: $detailPoster, backdropPath: $backdropPath, backdropPaths: $backdropPaths, releaseDate: $releaseDate, mediaType: $mediaType, rating: $rating, genreTitle: $genreTitle, genreItems: $genreItems, peoples: $peoples, duration: $duration, durationText: $durationText, previewUrl: $previewUrl, trailers: $trailers, videoUrl: $videoUrl, link: $link, episode: $episode, description: $description, playerType: $playerType, childItems: $childItems, episodeItems: $episodeItems, relatedItems: $relatedItems)'; } } /// @nodoc abstract mixin class _$ScriptVideoItemCopyWith<$Res> implements $ScriptVideoItemCopyWith<$Res> { factory _$ScriptVideoItemCopyWith(_ScriptVideoItem value, $Res Function(_ScriptVideoItem) _then) = __$ScriptVideoItemCopyWithImpl; @override @useResult $Res call({ @JsonKey(fromJson: _stringFromAny) String id, String type, String title, String coverUrl,@JsonKey(readValue: _readPosterPath) String posterPath, String detailPoster, String backdropPath, List backdropPaths, String releaseDate, String mediaType,@JsonKey(fromJson: _doubleFromAny) double? rating, String genreTitle, List genreItems, List peoples,@JsonKey(fromJson: _intFromAny) int? duration, String durationText, String previewUrl, List trailers, String videoUrl, String link,@JsonKey(fromJson: _intFromAny) int? episode, String description, String playerType, List childItems, List episodeItems, List relatedItems }); } /// @nodoc class __$ScriptVideoItemCopyWithImpl<$Res> implements _$ScriptVideoItemCopyWith<$Res> { __$ScriptVideoItemCopyWithImpl(this._self, this._then); final _ScriptVideoItem _self; final $Res Function(_ScriptVideoItem) _then; /// Create a copy of ScriptVideoItem /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? type = null,Object? title = null,Object? coverUrl = null,Object? posterPath = null,Object? detailPoster = null,Object? backdropPath = null,Object? backdropPaths = null,Object? releaseDate = null,Object? mediaType = null,Object? rating = freezed,Object? genreTitle = null,Object? genreItems = null,Object? peoples = null,Object? duration = freezed,Object? durationText = null,Object? previewUrl = null,Object? trailers = null,Object? videoUrl = null,Object? link = null,Object? episode = freezed,Object? description = null,Object? playerType = null,Object? childItems = null,Object? episodeItems = null,Object? relatedItems = null,}) { return _then(_ScriptVideoItem( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,coverUrl: null == coverUrl ? _self.coverUrl : coverUrl // ignore: cast_nullable_to_non_nullable as String,posterPath: null == posterPath ? _self.posterPath : posterPath // ignore: cast_nullable_to_non_nullable as String,detailPoster: null == detailPoster ? _self.detailPoster : detailPoster // ignore: cast_nullable_to_non_nullable as String,backdropPath: null == backdropPath ? _self.backdropPath : backdropPath // ignore: cast_nullable_to_non_nullable as String,backdropPaths: null == backdropPaths ? _self._backdropPaths : backdropPaths // ignore: cast_nullable_to_non_nullable as List,releaseDate: null == releaseDate ? _self.releaseDate : releaseDate // ignore: cast_nullable_to_non_nullable as String,mediaType: null == mediaType ? _self.mediaType : mediaType // ignore: cast_nullable_to_non_nullable as String,rating: freezed == rating ? _self.rating : rating // ignore: cast_nullable_to_non_nullable as double?,genreTitle: null == genreTitle ? _self.genreTitle : genreTitle // ignore: cast_nullable_to_non_nullable as String,genreItems: null == genreItems ? _self._genreItems : genreItems // ignore: cast_nullable_to_non_nullable as List,peoples: null == peoples ? _self._peoples : peoples // ignore: cast_nullable_to_non_nullable as List,duration: freezed == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable as int?,durationText: null == durationText ? _self.durationText : durationText // ignore: cast_nullable_to_non_nullable as String,previewUrl: null == previewUrl ? _self.previewUrl : previewUrl // ignore: cast_nullable_to_non_nullable as String,trailers: null == trailers ? _self._trailers : trailers // ignore: cast_nullable_to_non_nullable as List,videoUrl: null == videoUrl ? _self.videoUrl : videoUrl // ignore: cast_nullable_to_non_nullable as String,link: null == link ? _self.link : link // ignore: cast_nullable_to_non_nullable as String,episode: freezed == episode ? _self.episode : episode // ignore: cast_nullable_to_non_nullable as int?,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,playerType: null == playerType ? _self.playerType : playerType // ignore: cast_nullable_to_non_nullable as String,childItems: null == childItems ? _self._childItems : childItems // ignore: cast_nullable_to_non_nullable as List,episodeItems: null == episodeItems ? _self._episodeItems : episodeItems // ignore: cast_nullable_to_non_nullable as List,relatedItems: null == relatedItems ? _self._relatedItems : relatedItems // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$ScriptVideoResource { String get name; String get description; String get url;@JsonKey(readValue: _readResourceHeaders) Map get customHeaders; String get playerType; /// Create a copy of ScriptVideoResource /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptVideoResourceCopyWith get copyWith => _$ScriptVideoResourceCopyWithImpl(this as ScriptVideoResource, _$identity); /// Serializes this ScriptVideoResource to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptVideoResource&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url)&&const DeepCollectionEquality().equals(other.customHeaders, customHeaders)&&(identical(other.playerType, playerType) || other.playerType == playerType)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,name,description,url,const DeepCollectionEquality().hash(customHeaders),playerType); @override String toString() { return 'ScriptVideoResource(name: $name, description: $description, url: $url, customHeaders: $customHeaders, playerType: $playerType)'; } } /// @nodoc abstract mixin class $ScriptVideoResourceCopyWith<$Res> { factory $ScriptVideoResourceCopyWith(ScriptVideoResource value, $Res Function(ScriptVideoResource) _then) = _$ScriptVideoResourceCopyWithImpl; @useResult $Res call({ String name, String description, String url,@JsonKey(readValue: _readResourceHeaders) Map customHeaders, String playerType }); } /// @nodoc class _$ScriptVideoResourceCopyWithImpl<$Res> implements $ScriptVideoResourceCopyWith<$Res> { _$ScriptVideoResourceCopyWithImpl(this._self, this._then); final ScriptVideoResource _self; final $Res Function(ScriptVideoResource) _then; /// Create a copy of ScriptVideoResource /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? description = null,Object? url = null,Object? customHeaders = null,Object? playerType = null,}) { return _then(_self.copyWith( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String,customHeaders: null == customHeaders ? _self.customHeaders : customHeaders // ignore: cast_nullable_to_non_nullable as Map,playerType: null == playerType ? _self.playerType : playerType // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [ScriptVideoResource]. extension ScriptVideoResourcePatterns on ScriptVideoResource { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptVideoResource value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptVideoResource() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptVideoResource value) $default,){ final _that = this; switch (_that) { case _ScriptVideoResource(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptVideoResource value)? $default,){ final _that = this; switch (_that) { case _ScriptVideoResource() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String name, String description, String url, @JsonKey(readValue: _readResourceHeaders) Map customHeaders, String playerType)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptVideoResource() when $default != null: return $default(_that.name,_that.description,_that.url,_that.customHeaders,_that.playerType);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String name, String description, String url, @JsonKey(readValue: _readResourceHeaders) Map customHeaders, String playerType) $default,) {final _that = this; switch (_that) { case _ScriptVideoResource(): return $default(_that.name,_that.description,_that.url,_that.customHeaders,_that.playerType);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String name, String description, String url, @JsonKey(readValue: _readResourceHeaders) Map customHeaders, String playerType)? $default,) {final _that = this; switch (_that) { case _ScriptVideoResource() when $default != null: return $default(_that.name,_that.description,_that.url,_that.customHeaders,_that.playerType);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptVideoResource implements ScriptVideoResource { const _ScriptVideoResource({this.name = '', this.description = '', required this.url, @JsonKey(readValue: _readResourceHeaders) final Map customHeaders = const {}, this.playerType = 'app'}): _customHeaders = customHeaders; factory _ScriptVideoResource.fromJson(Map json) => _$ScriptVideoResourceFromJson(json); @override@JsonKey() final String name; @override@JsonKey() final String description; @override final String url; final Map _customHeaders; @override@JsonKey(readValue: _readResourceHeaders) Map get customHeaders { if (_customHeaders is EqualUnmodifiableMapView) return _customHeaders; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(_customHeaders); } @override@JsonKey() final String playerType; /// Create a copy of ScriptVideoResource /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptVideoResourceCopyWith<_ScriptVideoResource> get copyWith => __$ScriptVideoResourceCopyWithImpl<_ScriptVideoResource>(this, _$identity); @override Map toJson() { return _$ScriptVideoResourceToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptVideoResource&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.url, url) || other.url == url)&&const DeepCollectionEquality().equals(other._customHeaders, _customHeaders)&&(identical(other.playerType, playerType) || other.playerType == playerType)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,name,description,url,const DeepCollectionEquality().hash(_customHeaders),playerType); @override String toString() { return 'ScriptVideoResource(name: $name, description: $description, url: $url, customHeaders: $customHeaders, playerType: $playerType)'; } } /// @nodoc abstract mixin class _$ScriptVideoResourceCopyWith<$Res> implements $ScriptVideoResourceCopyWith<$Res> { factory _$ScriptVideoResourceCopyWith(_ScriptVideoResource value, $Res Function(_ScriptVideoResource) _then) = __$ScriptVideoResourceCopyWithImpl; @override @useResult $Res call({ String name, String description, String url,@JsonKey(readValue: _readResourceHeaders) Map customHeaders, String playerType }); } /// @nodoc class __$ScriptVideoResourceCopyWithImpl<$Res> implements _$ScriptVideoResourceCopyWith<$Res> { __$ScriptVideoResourceCopyWithImpl(this._self, this._then); final _ScriptVideoResource _self; final $Res Function(_ScriptVideoResource) _then; /// Create a copy of ScriptVideoResource /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? description = null,Object? url = null,Object? customHeaders = null,Object? playerType = null,}) { return _then(_ScriptVideoResource( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String,customHeaders: null == customHeaders ? _self._customHeaders : customHeaders // ignore: cast_nullable_to_non_nullable as Map,playerType: null == playerType ? _self.playerType : playerType // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$InstalledScriptWidget { ScriptWidgetManifest get manifest; String get scriptSource; String get sourceUrl; bool get enabled; Map get globalParams; DateTime get installedAt; DateTime get updatedAt; /// Create a copy of InstalledScriptWidget /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $InstalledScriptWidgetCopyWith get copyWith => _$InstalledScriptWidgetCopyWithImpl(this as InstalledScriptWidget, _$identity); /// Serializes this InstalledScriptWidget to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is InstalledScriptWidget&&(identical(other.manifest, manifest) || other.manifest == manifest)&&(identical(other.scriptSource, scriptSource) || other.scriptSource == scriptSource)&&(identical(other.sourceUrl, sourceUrl) || other.sourceUrl == sourceUrl)&&(identical(other.enabled, enabled) || other.enabled == enabled)&&const DeepCollectionEquality().equals(other.globalParams, globalParams)&&(identical(other.installedAt, installedAt) || other.installedAt == installedAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,manifest,scriptSource,sourceUrl,enabled,const DeepCollectionEquality().hash(globalParams),installedAt,updatedAt); @override String toString() { return 'InstalledScriptWidget(manifest: $manifest, scriptSource: $scriptSource, sourceUrl: $sourceUrl, enabled: $enabled, globalParams: $globalParams, installedAt: $installedAt, updatedAt: $updatedAt)'; } } /// @nodoc abstract mixin class $InstalledScriptWidgetCopyWith<$Res> { factory $InstalledScriptWidgetCopyWith(InstalledScriptWidget value, $Res Function(InstalledScriptWidget) _then) = _$InstalledScriptWidgetCopyWithImpl; @useResult $Res call({ ScriptWidgetManifest manifest, String scriptSource, String sourceUrl, bool enabled, Map globalParams, DateTime installedAt, DateTime updatedAt }); $ScriptWidgetManifestCopyWith<$Res> get manifest; } /// @nodoc class _$InstalledScriptWidgetCopyWithImpl<$Res> implements $InstalledScriptWidgetCopyWith<$Res> { _$InstalledScriptWidgetCopyWithImpl(this._self, this._then); final InstalledScriptWidget _self; final $Res Function(InstalledScriptWidget) _then; /// Create a copy of InstalledScriptWidget /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? manifest = null,Object? scriptSource = null,Object? sourceUrl = null,Object? enabled = null,Object? globalParams = null,Object? installedAt = null,Object? updatedAt = null,}) { return _then(_self.copyWith( manifest: null == manifest ? _self.manifest : manifest // ignore: cast_nullable_to_non_nullable as ScriptWidgetManifest,scriptSource: null == scriptSource ? _self.scriptSource : scriptSource // ignore: cast_nullable_to_non_nullable as String,sourceUrl: null == sourceUrl ? _self.sourceUrl : sourceUrl // ignore: cast_nullable_to_non_nullable as String,enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool,globalParams: null == globalParams ? _self.globalParams : globalParams // ignore: cast_nullable_to_non_nullable as Map,installedAt: null == installedAt ? _self.installedAt : installedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } /// Create a copy of InstalledScriptWidget /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetManifestCopyWith<$Res> get manifest { return $ScriptWidgetManifestCopyWith<$Res>(_self.manifest, (value) { return _then(_self.copyWith(manifest: value)); }); } } /// Adds pattern-matching-related methods to [InstalledScriptWidget]. extension InstalledScriptWidgetPatterns on InstalledScriptWidget { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _InstalledScriptWidget value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _InstalledScriptWidget() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _InstalledScriptWidget value) $default,){ final _that = this; switch (_that) { case _InstalledScriptWidget(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _InstalledScriptWidget value)? $default,){ final _that = this; switch (_that) { case _InstalledScriptWidget() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( ScriptWidgetManifest manifest, String scriptSource, String sourceUrl, bool enabled, Map globalParams, DateTime installedAt, DateTime updatedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _InstalledScriptWidget() when $default != null: return $default(_that.manifest,_that.scriptSource,_that.sourceUrl,_that.enabled,_that.globalParams,_that.installedAt,_that.updatedAt);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( ScriptWidgetManifest manifest, String scriptSource, String sourceUrl, bool enabled, Map globalParams, DateTime installedAt, DateTime updatedAt) $default,) {final _that = this; switch (_that) { case _InstalledScriptWidget(): return $default(_that.manifest,_that.scriptSource,_that.sourceUrl,_that.enabled,_that.globalParams,_that.installedAt,_that.updatedAt);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( ScriptWidgetManifest manifest, String scriptSource, String sourceUrl, bool enabled, Map globalParams, DateTime installedAt, DateTime updatedAt)? $default,) {final _that = this; switch (_that) { case _InstalledScriptWidget() when $default != null: return $default(_that.manifest,_that.scriptSource,_that.sourceUrl,_that.enabled,_that.globalParams,_that.installedAt,_that.updatedAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _InstalledScriptWidget implements InstalledScriptWidget { const _InstalledScriptWidget({required this.manifest, required this.scriptSource, this.sourceUrl = '', this.enabled = true, final Map globalParams = const {}, required this.installedAt, required this.updatedAt}): _globalParams = globalParams; factory _InstalledScriptWidget.fromJson(Map json) => _$InstalledScriptWidgetFromJson(json); @override final ScriptWidgetManifest manifest; @override final String scriptSource; @override@JsonKey() final String sourceUrl; @override@JsonKey() final bool enabled; final Map _globalParams; @override@JsonKey() Map get globalParams { if (_globalParams is EqualUnmodifiableMapView) return _globalParams; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(_globalParams); } @override final DateTime installedAt; @override final DateTime updatedAt; /// Create a copy of InstalledScriptWidget /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$InstalledScriptWidgetCopyWith<_InstalledScriptWidget> get copyWith => __$InstalledScriptWidgetCopyWithImpl<_InstalledScriptWidget>(this, _$identity); @override Map toJson() { return _$InstalledScriptWidgetToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _InstalledScriptWidget&&(identical(other.manifest, manifest) || other.manifest == manifest)&&(identical(other.scriptSource, scriptSource) || other.scriptSource == scriptSource)&&(identical(other.sourceUrl, sourceUrl) || other.sourceUrl == sourceUrl)&&(identical(other.enabled, enabled) || other.enabled == enabled)&&const DeepCollectionEquality().equals(other._globalParams, _globalParams)&&(identical(other.installedAt, installedAt) || other.installedAt == installedAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,manifest,scriptSource,sourceUrl,enabled,const DeepCollectionEquality().hash(_globalParams),installedAt,updatedAt); @override String toString() { return 'InstalledScriptWidget(manifest: $manifest, scriptSource: $scriptSource, sourceUrl: $sourceUrl, enabled: $enabled, globalParams: $globalParams, installedAt: $installedAt, updatedAt: $updatedAt)'; } } /// @nodoc abstract mixin class _$InstalledScriptWidgetCopyWith<$Res> implements $InstalledScriptWidgetCopyWith<$Res> { factory _$InstalledScriptWidgetCopyWith(_InstalledScriptWidget value, $Res Function(_InstalledScriptWidget) _then) = __$InstalledScriptWidgetCopyWithImpl; @override @useResult $Res call({ ScriptWidgetManifest manifest, String scriptSource, String sourceUrl, bool enabled, Map globalParams, DateTime installedAt, DateTime updatedAt }); @override $ScriptWidgetManifestCopyWith<$Res> get manifest; } /// @nodoc class __$InstalledScriptWidgetCopyWithImpl<$Res> implements _$InstalledScriptWidgetCopyWith<$Res> { __$InstalledScriptWidgetCopyWithImpl(this._self, this._then); final _InstalledScriptWidget _self; final $Res Function(_InstalledScriptWidget) _then; /// Create a copy of InstalledScriptWidget /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? manifest = null,Object? scriptSource = null,Object? sourceUrl = null,Object? enabled = null,Object? globalParams = null,Object? installedAt = null,Object? updatedAt = null,}) { return _then(_InstalledScriptWidget( manifest: null == manifest ? _self.manifest : manifest // ignore: cast_nullable_to_non_nullable as ScriptWidgetManifest,scriptSource: null == scriptSource ? _self.scriptSource : scriptSource // ignore: cast_nullable_to_non_nullable as String,sourceUrl: null == sourceUrl ? _self.sourceUrl : sourceUrl // ignore: cast_nullable_to_non_nullable as String,enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable as bool,globalParams: null == globalParams ? _self._globalParams : globalParams // ignore: cast_nullable_to_non_nullable as Map,installedAt: null == installedAt ? _self.installedAt : installedAt // ignore: cast_nullable_to_non_nullable as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } /// Create a copy of InstalledScriptWidget /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetManifestCopyWith<$Res> get manifest { return $ScriptWidgetManifestCopyWith<$Res>(_self.manifest, (value) { return _then(_self.copyWith(manifest: value)); }); } } /// @nodoc mixin _$ScriptWidgetCatalogEntry { String get id; String get title; String get description; String get requiredVersion; String get version; String get author; String get url; /// Create a copy of ScriptWidgetCatalogEntry /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetCatalogEntryCopyWith get copyWith => _$ScriptWidgetCatalogEntryCopyWithImpl(this as ScriptWidgetCatalogEntry, _$identity); /// Serializes this ScriptWidgetCatalogEntry to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetCatalogEntry&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.requiredVersion, requiredVersion) || other.requiredVersion == requiredVersion)&&(identical(other.version, version) || other.version == version)&&(identical(other.author, author) || other.author == author)&&(identical(other.url, url) || other.url == url)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,description,requiredVersion,version,author,url); @override String toString() { return 'ScriptWidgetCatalogEntry(id: $id, title: $title, description: $description, requiredVersion: $requiredVersion, version: $version, author: $author, url: $url)'; } } /// @nodoc abstract mixin class $ScriptWidgetCatalogEntryCopyWith<$Res> { factory $ScriptWidgetCatalogEntryCopyWith(ScriptWidgetCatalogEntry value, $Res Function(ScriptWidgetCatalogEntry) _then) = _$ScriptWidgetCatalogEntryCopyWithImpl; @useResult $Res call({ String id, String title, String description, String requiredVersion, String version, String author, String url }); } /// @nodoc class _$ScriptWidgetCatalogEntryCopyWithImpl<$Res> implements $ScriptWidgetCatalogEntryCopyWith<$Res> { _$ScriptWidgetCatalogEntryCopyWithImpl(this._self, this._then); final ScriptWidgetCatalogEntry _self; final $Res Function(ScriptWidgetCatalogEntry) _then; /// Create a copy of ScriptWidgetCatalogEntry /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? title = null,Object? description = null,Object? requiredVersion = null,Object? version = null,Object? author = null,Object? url = null,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,requiredVersion: null == requiredVersion ? _self.requiredVersion : requiredVersion // ignore: cast_nullable_to_non_nullable as String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable as String,author: null == author ? _self.author : author // ignore: cast_nullable_to_non_nullable as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [ScriptWidgetCatalogEntry]. extension ScriptWidgetCatalogEntryPatterns on ScriptWidgetCatalogEntry { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetCatalogEntry value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetCatalogEntry() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetCatalogEntry value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetCatalogEntry(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetCatalogEntry value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetCatalogEntry() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String id, String title, String description, String requiredVersion, String version, String author, String url)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetCatalogEntry() when $default != null: return $default(_that.id,_that.title,_that.description,_that.requiredVersion,_that.version,_that.author,_that.url);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String id, String title, String description, String requiredVersion, String version, String author, String url) $default,) {final _that = this; switch (_that) { case _ScriptWidgetCatalogEntry(): return $default(_that.id,_that.title,_that.description,_that.requiredVersion,_that.version,_that.author,_that.url);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String id, String title, String description, String requiredVersion, String version, String author, String url)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetCatalogEntry() when $default != null: return $default(_that.id,_that.title,_that.description,_that.requiredVersion,_that.version,_that.author,_that.url);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetCatalogEntry implements ScriptWidgetCatalogEntry { const _ScriptWidgetCatalogEntry({required this.id, required this.title, this.description = '', this.requiredVersion = '', this.version = '', this.author = '', required this.url}); factory _ScriptWidgetCatalogEntry.fromJson(Map json) => _$ScriptWidgetCatalogEntryFromJson(json); @override final String id; @override final String title; @override@JsonKey() final String description; @override@JsonKey() final String requiredVersion; @override@JsonKey() final String version; @override@JsonKey() final String author; @override final String url; /// Create a copy of ScriptWidgetCatalogEntry /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetCatalogEntryCopyWith<_ScriptWidgetCatalogEntry> get copyWith => __$ScriptWidgetCatalogEntryCopyWithImpl<_ScriptWidgetCatalogEntry>(this, _$identity); @override Map toJson() { return _$ScriptWidgetCatalogEntryToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetCatalogEntry&&(identical(other.id, id) || other.id == id)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.requiredVersion, requiredVersion) || other.requiredVersion == requiredVersion)&&(identical(other.version, version) || other.version == version)&&(identical(other.author, author) || other.author == author)&&(identical(other.url, url) || other.url == url)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,title,description,requiredVersion,version,author,url); @override String toString() { return 'ScriptWidgetCatalogEntry(id: $id, title: $title, description: $description, requiredVersion: $requiredVersion, version: $version, author: $author, url: $url)'; } } /// @nodoc abstract mixin class _$ScriptWidgetCatalogEntryCopyWith<$Res> implements $ScriptWidgetCatalogEntryCopyWith<$Res> { factory _$ScriptWidgetCatalogEntryCopyWith(_ScriptWidgetCatalogEntry value, $Res Function(_ScriptWidgetCatalogEntry) _then) = __$ScriptWidgetCatalogEntryCopyWithImpl; @override @useResult $Res call({ String id, String title, String description, String requiredVersion, String version, String author, String url }); } /// @nodoc class __$ScriptWidgetCatalogEntryCopyWithImpl<$Res> implements _$ScriptWidgetCatalogEntryCopyWith<$Res> { __$ScriptWidgetCatalogEntryCopyWithImpl(this._self, this._then); final _ScriptWidgetCatalogEntry _self; final $Res Function(_ScriptWidgetCatalogEntry) _then; /// Create a copy of ScriptWidgetCatalogEntry /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? title = null,Object? description = null,Object? requiredVersion = null,Object? version = null,Object? author = null,Object? url = null,}) { return _then(_ScriptWidgetCatalogEntry( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,requiredVersion: null == requiredVersion ? _self.requiredVersion : requiredVersion // ignore: cast_nullable_to_non_nullable as String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable as String,author: null == author ? _self.author : author // ignore: cast_nullable_to_non_nullable as String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$ScriptWidgetCatalog { String get title; String get description; String get icon; List get widgets; /// Create a copy of ScriptWidgetCatalog /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetCatalogCopyWith get copyWith => _$ScriptWidgetCatalogCopyWithImpl(this as ScriptWidgetCatalog, _$identity); /// Serializes this ScriptWidgetCatalog to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetCatalog&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.icon, icon) || other.icon == icon)&&const DeepCollectionEquality().equals(other.widgets, widgets)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,title,description,icon,const DeepCollectionEquality().hash(widgets)); @override String toString() { return 'ScriptWidgetCatalog(title: $title, description: $description, icon: $icon, widgets: $widgets)'; } } /// @nodoc abstract mixin class $ScriptWidgetCatalogCopyWith<$Res> { factory $ScriptWidgetCatalogCopyWith(ScriptWidgetCatalog value, $Res Function(ScriptWidgetCatalog) _then) = _$ScriptWidgetCatalogCopyWithImpl; @useResult $Res call({ String title, String description, String icon, List widgets }); } /// @nodoc class _$ScriptWidgetCatalogCopyWithImpl<$Res> implements $ScriptWidgetCatalogCopyWith<$Res> { _$ScriptWidgetCatalogCopyWithImpl(this._self, this._then); final ScriptWidgetCatalog _self; final $Res Function(ScriptWidgetCatalog) _then; /// Create a copy of ScriptWidgetCatalog /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? title = null,Object? description = null,Object? icon = null,Object? widgets = null,}) { return _then(_self.copyWith( title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as String,widgets: null == widgets ? _self.widgets : widgets // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [ScriptWidgetCatalog]. extension ScriptWidgetCatalogPatterns on ScriptWidgetCatalog { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetCatalog value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetCatalog() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetCatalog value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetCatalog(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetCatalog value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetCatalog() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String title, String description, String icon, List widgets)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetCatalog() when $default != null: return $default(_that.title,_that.description,_that.icon,_that.widgets);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String title, String description, String icon, List widgets) $default,) {final _that = this; switch (_that) { case _ScriptWidgetCatalog(): return $default(_that.title,_that.description,_that.icon,_that.widgets);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String title, String description, String icon, List widgets)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetCatalog() when $default != null: return $default(_that.title,_that.description,_that.icon,_that.widgets);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetCatalog implements ScriptWidgetCatalog { const _ScriptWidgetCatalog({required this.title, this.description = '', this.icon = '', final List widgets = const []}): _widgets = widgets; factory _ScriptWidgetCatalog.fromJson(Map json) => _$ScriptWidgetCatalogFromJson(json); @override final String title; @override@JsonKey() final String description; @override@JsonKey() final String icon; final List _widgets; @override@JsonKey() List get widgets { if (_widgets is EqualUnmodifiableListView) return _widgets; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_widgets); } /// Create a copy of ScriptWidgetCatalog /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetCatalogCopyWith<_ScriptWidgetCatalog> get copyWith => __$ScriptWidgetCatalogCopyWithImpl<_ScriptWidgetCatalog>(this, _$identity); @override Map toJson() { return _$ScriptWidgetCatalogToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetCatalog&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.icon, icon) || other.icon == icon)&&const DeepCollectionEquality().equals(other._widgets, _widgets)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,title,description,icon,const DeepCollectionEquality().hash(_widgets)); @override String toString() { return 'ScriptWidgetCatalog(title: $title, description: $description, icon: $icon, widgets: $widgets)'; } } /// @nodoc abstract mixin class _$ScriptWidgetCatalogCopyWith<$Res> implements $ScriptWidgetCatalogCopyWith<$Res> { factory _$ScriptWidgetCatalogCopyWith(_ScriptWidgetCatalog value, $Res Function(_ScriptWidgetCatalog) _then) = __$ScriptWidgetCatalogCopyWithImpl; @override @useResult $Res call({ String title, String description, String icon, List widgets }); } /// @nodoc class __$ScriptWidgetCatalogCopyWithImpl<$Res> implements _$ScriptWidgetCatalogCopyWith<$Res> { __$ScriptWidgetCatalogCopyWithImpl(this._self, this._then); final _ScriptWidgetCatalog _self; final $Res Function(_ScriptWidgetCatalog) _then; /// Create a copy of ScriptWidgetCatalog /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? title = null,Object? description = null,Object? icon = null,Object? widgets = null,}) { return _then(_ScriptWidgetCatalog( title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable as String,widgets: null == widgets ? _self._widgets : widgets // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$ScriptWidgetSubscription { String get url; ScriptWidgetCatalog get catalog; DateTime get refreshedAt; /// Create a copy of ScriptWidgetSubscription /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ScriptWidgetSubscriptionCopyWith get copyWith => _$ScriptWidgetSubscriptionCopyWithImpl(this as ScriptWidgetSubscription, _$identity); /// Serializes this ScriptWidgetSubscription to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptWidgetSubscription&&(identical(other.url, url) || other.url == url)&&(identical(other.catalog, catalog) || other.catalog == catalog)&&(identical(other.refreshedAt, refreshedAt) || other.refreshedAt == refreshedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,url,catalog,refreshedAt); @override String toString() { return 'ScriptWidgetSubscription(url: $url, catalog: $catalog, refreshedAt: $refreshedAt)'; } } /// @nodoc abstract mixin class $ScriptWidgetSubscriptionCopyWith<$Res> { factory $ScriptWidgetSubscriptionCopyWith(ScriptWidgetSubscription value, $Res Function(ScriptWidgetSubscription) _then) = _$ScriptWidgetSubscriptionCopyWithImpl; @useResult $Res call({ String url, ScriptWidgetCatalog catalog, DateTime refreshedAt }); $ScriptWidgetCatalogCopyWith<$Res> get catalog; } /// @nodoc class _$ScriptWidgetSubscriptionCopyWithImpl<$Res> implements $ScriptWidgetSubscriptionCopyWith<$Res> { _$ScriptWidgetSubscriptionCopyWithImpl(this._self, this._then); final ScriptWidgetSubscription _self; final $Res Function(ScriptWidgetSubscription) _then; /// Create a copy of ScriptWidgetSubscription /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? url = null,Object? catalog = null,Object? refreshedAt = null,}) { return _then(_self.copyWith( url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String,catalog: null == catalog ? _self.catalog : catalog // ignore: cast_nullable_to_non_nullable as ScriptWidgetCatalog,refreshedAt: null == refreshedAt ? _self.refreshedAt : refreshedAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } /// Create a copy of ScriptWidgetSubscription /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetCatalogCopyWith<$Res> get catalog { return $ScriptWidgetCatalogCopyWith<$Res>(_self.catalog, (value) { return _then(_self.copyWith(catalog: value)); }); } } /// Adds pattern-matching-related methods to [ScriptWidgetSubscription]. extension ScriptWidgetSubscriptionPatterns on ScriptWidgetSubscription { /// A variant of `map` that fallback to returning `orElse`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeMap(TResult Function( _ScriptWidgetSubscription value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ScriptWidgetSubscription() when $default != null: return $default(_that);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// Callbacks receives the raw object, upcasted. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case final Subclass2 value: /// return ...; /// } /// ``` @optionalTypeArgs TResult map(TResult Function( _ScriptWidgetSubscription value) $default,){ final _that = this; switch (_that) { case _ScriptWidgetSubscription(): return $default(_that);case _: throw StateError('Unexpected subclass'); } } /// A variant of `map` that fallback to returning `null`. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case final Subclass value: /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? mapOrNull(TResult? Function( _ScriptWidgetSubscription value)? $default,){ final _that = this; switch (_that) { case _ScriptWidgetSubscription() when $default != null: return $default(_that);case _: return null; } } /// A variant of `when` that fallback to an `orElse` callback. /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return orElse(); /// } /// ``` @optionalTypeArgs TResult maybeWhen(TResult Function( String url, ScriptWidgetCatalog catalog, DateTime refreshedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ScriptWidgetSubscription() when $default != null: return $default(_that.url,_that.catalog,_that.refreshedAt);case _: return orElse(); } } /// A `switch`-like method, using callbacks. /// /// As opposed to `map`, this offers destructuring. /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case Subclass2(:final field2): /// return ...; /// } /// ``` @optionalTypeArgs TResult when(TResult Function( String url, ScriptWidgetCatalog catalog, DateTime refreshedAt) $default,) {final _that = this; switch (_that) { case _ScriptWidgetSubscription(): return $default(_that.url,_that.catalog,_that.refreshedAt);case _: throw StateError('Unexpected subclass'); } } /// A variant of `when` that fallback to returning `null` /// /// It is equivalent to doing: /// ```dart /// switch (sealedClass) { /// case Subclass(:final field): /// return ...; /// case _: /// return null; /// } /// ``` @optionalTypeArgs TResult? whenOrNull(TResult? Function( String url, ScriptWidgetCatalog catalog, DateTime refreshedAt)? $default,) {final _that = this; switch (_that) { case _ScriptWidgetSubscription() when $default != null: return $default(_that.url,_that.catalog,_that.refreshedAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _ScriptWidgetSubscription implements ScriptWidgetSubscription { const _ScriptWidgetSubscription({required this.url, required this.catalog, required this.refreshedAt}); factory _ScriptWidgetSubscription.fromJson(Map json) => _$ScriptWidgetSubscriptionFromJson(json); @override final String url; @override final ScriptWidgetCatalog catalog; @override final DateTime refreshedAt; /// Create a copy of ScriptWidgetSubscription /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ScriptWidgetSubscriptionCopyWith<_ScriptWidgetSubscription> get copyWith => __$ScriptWidgetSubscriptionCopyWithImpl<_ScriptWidgetSubscription>(this, _$identity); @override Map toJson() { return _$ScriptWidgetSubscriptionToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptWidgetSubscription&&(identical(other.url, url) || other.url == url)&&(identical(other.catalog, catalog) || other.catalog == catalog)&&(identical(other.refreshedAt, refreshedAt) || other.refreshedAt == refreshedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,url,catalog,refreshedAt); @override String toString() { return 'ScriptWidgetSubscription(url: $url, catalog: $catalog, refreshedAt: $refreshedAt)'; } } /// @nodoc abstract mixin class _$ScriptWidgetSubscriptionCopyWith<$Res> implements $ScriptWidgetSubscriptionCopyWith<$Res> { factory _$ScriptWidgetSubscriptionCopyWith(_ScriptWidgetSubscription value, $Res Function(_ScriptWidgetSubscription) _then) = __$ScriptWidgetSubscriptionCopyWithImpl; @override @useResult $Res call({ String url, ScriptWidgetCatalog catalog, DateTime refreshedAt }); @override $ScriptWidgetCatalogCopyWith<$Res> get catalog; } /// @nodoc class __$ScriptWidgetSubscriptionCopyWithImpl<$Res> implements _$ScriptWidgetSubscriptionCopyWith<$Res> { __$ScriptWidgetSubscriptionCopyWithImpl(this._self, this._then); final _ScriptWidgetSubscription _self; final $Res Function(_ScriptWidgetSubscription) _then; /// Create a copy of ScriptWidgetSubscription /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? url = null,Object? catalog = null,Object? refreshedAt = null,}) { return _then(_ScriptWidgetSubscription( url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable as String,catalog: null == catalog ? _self.catalog : catalog // ignore: cast_nullable_to_non_nullable as ScriptWidgetCatalog,refreshedAt: null == refreshedAt ? _self.refreshedAt : refreshedAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } /// Create a copy of ScriptWidgetSubscription /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ScriptWidgetCatalogCopyWith<$Res> get catalog { return $ScriptWidgetCatalogCopyWith<$Res>(_self.catalog, (value) { return _then(_self.copyWith(catalog: value)); }); } } // dart format on