Files
sm-emby-share/lib/core/contracts/server.freezed.dart
T
2026-07-14 11:11:36 +08:00

1113 lines
38 KiB
Dart
Generated

// 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 'server.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$EmbyServer {
String get id; String get name; String get baseUrl; String get createdAt; String get updatedAt;@JsonKey(includeIfNull: false) String? get lastConnectedAt;/// 服务器图标 URL(来自图标库),空字符串表示未配置图标。
/// 序列化时若为空则省略字段,与原手写 toJson 行为一致。
@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String get iconUrl;/// 服务器是否已暂停使用。暂停后不出现在侧栏、首页下拉,也不发起连通性探测。
/// 保留登录态,恢复后可直接使用。默认 false。
bool get paused;
/// Create a copy of EmbyServer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$EmbyServerCopyWith<EmbyServer> get copyWith => _$EmbyServerCopyWithImpl<EmbyServer>(this as EmbyServer, _$identity);
/// Serializes this EmbyServer to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is EmbyServer&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.lastConnectedAt, lastConnectedAt) || other.lastConnectedAt == lastConnectedAt)&&(identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl)&&(identical(other.paused, paused) || other.paused == paused));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name,baseUrl,createdAt,updatedAt,lastConnectedAt,iconUrl,paused);
@override
String toString() {
return 'EmbyServer(id: $id, name: $name, baseUrl: $baseUrl, createdAt: $createdAt, updatedAt: $updatedAt, lastConnectedAt: $lastConnectedAt, iconUrl: $iconUrl, paused: $paused)';
}
}
/// @nodoc
abstract mixin class $EmbyServerCopyWith<$Res> {
factory $EmbyServerCopyWith(EmbyServer value, $Res Function(EmbyServer) _then) = _$EmbyServerCopyWithImpl;
@useResult
$Res call({
String id, String name, String baseUrl, String createdAt, String updatedAt,@JsonKey(includeIfNull: false) String? lastConnectedAt,@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl, bool paused
});
}
/// @nodoc
class _$EmbyServerCopyWithImpl<$Res>
implements $EmbyServerCopyWith<$Res> {
_$EmbyServerCopyWithImpl(this._self, this._then);
final EmbyServer _self;
final $Res Function(EmbyServer) _then;
/// Create a copy of EmbyServer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? baseUrl = null,Object? createdAt = null,Object? updatedAt = null,Object? lastConnectedAt = freezed,Object? iconUrl = null,Object? paused = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as String,lastConnectedAt: freezed == lastConnectedAt ? _self.lastConnectedAt : lastConnectedAt // ignore: cast_nullable_to_non_nullable
as String?,iconUrl: null == iconUrl ? _self.iconUrl : iconUrl // ignore: cast_nullable_to_non_nullable
as String,paused: null == paused ? _self.paused : paused // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// Adds pattern-matching-related methods to [EmbyServer].
extension EmbyServerPatterns on EmbyServer {
/// 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 extends Object?>(TResult Function( _EmbyServer value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _EmbyServer() 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 extends Object?>(TResult Function( _EmbyServer value) $default,){
final _that = this;
switch (_that) {
case _EmbyServer():
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 extends Object?>(TResult? Function( _EmbyServer value)? $default,){
final _that = this;
switch (_that) {
case _EmbyServer() 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 extends Object?>(TResult Function( String id, String name, String baseUrl, String createdAt, String updatedAt, @JsonKey(includeIfNull: false) String? lastConnectedAt, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl, bool paused)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _EmbyServer() when $default != null:
return $default(_that.id,_that.name,_that.baseUrl,_that.createdAt,_that.updatedAt,_that.lastConnectedAt,_that.iconUrl,_that.paused);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 extends Object?>(TResult Function( String id, String name, String baseUrl, String createdAt, String updatedAt, @JsonKey(includeIfNull: false) String? lastConnectedAt, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl, bool paused) $default,) {final _that = this;
switch (_that) {
case _EmbyServer():
return $default(_that.id,_that.name,_that.baseUrl,_that.createdAt,_that.updatedAt,_that.lastConnectedAt,_that.iconUrl,_that.paused);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 extends Object?>(TResult? Function( String id, String name, String baseUrl, String createdAt, String updatedAt, @JsonKey(includeIfNull: false) String? lastConnectedAt, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl, bool paused)? $default,) {final _that = this;
switch (_that) {
case _EmbyServer() when $default != null:
return $default(_that.id,_that.name,_that.baseUrl,_that.createdAt,_that.updatedAt,_that.lastConnectedAt,_that.iconUrl,_that.paused);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _EmbyServer implements EmbyServer {
const _EmbyServer({required this.id, required this.name, required this.baseUrl, required this.createdAt, required this.updatedAt, @JsonKey(includeIfNull: false) this.lastConnectedAt, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) this.iconUrl = '', this.paused = false});
factory _EmbyServer.fromJson(Map<String, dynamic> json) => _$EmbyServerFromJson(json);
@override final String id;
@override final String name;
@override final String baseUrl;
@override final String createdAt;
@override final String updatedAt;
@override@JsonKey(includeIfNull: false) final String? lastConnectedAt;
/// 服务器图标 URL(来自图标库),空字符串表示未配置图标。
/// 序列化时若为空则省略字段,与原手写 toJson 行为一致。
@override@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) final String iconUrl;
/// 服务器是否已暂停使用。暂停后不出现在侧栏、首页下拉,也不发起连通性探测。
/// 保留登录态,恢复后可直接使用。默认 false。
@override@JsonKey() final bool paused;
/// Create a copy of EmbyServer
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$EmbyServerCopyWith<_EmbyServer> get copyWith => __$EmbyServerCopyWithImpl<_EmbyServer>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$EmbyServerToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EmbyServer&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.lastConnectedAt, lastConnectedAt) || other.lastConnectedAt == lastConnectedAt)&&(identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl)&&(identical(other.paused, paused) || other.paused == paused));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name,baseUrl,createdAt,updatedAt,lastConnectedAt,iconUrl,paused);
@override
String toString() {
return 'EmbyServer(id: $id, name: $name, baseUrl: $baseUrl, createdAt: $createdAt, updatedAt: $updatedAt, lastConnectedAt: $lastConnectedAt, iconUrl: $iconUrl, paused: $paused)';
}
}
/// @nodoc
abstract mixin class _$EmbyServerCopyWith<$Res> implements $EmbyServerCopyWith<$Res> {
factory _$EmbyServerCopyWith(_EmbyServer value, $Res Function(_EmbyServer) _then) = __$EmbyServerCopyWithImpl;
@override @useResult
$Res call({
String id, String name, String baseUrl, String createdAt, String updatedAt,@JsonKey(includeIfNull: false) String? lastConnectedAt,@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl, bool paused
});
}
/// @nodoc
class __$EmbyServerCopyWithImpl<$Res>
implements _$EmbyServerCopyWith<$Res> {
__$EmbyServerCopyWithImpl(this._self, this._then);
final _EmbyServer _self;
final $Res Function(_EmbyServer) _then;
/// Create a copy of EmbyServer
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? baseUrl = null,Object? createdAt = null,Object? updatedAt = null,Object? lastConnectedAt = freezed,Object? iconUrl = null,Object? paused = null,}) {
return _then(_EmbyServer(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as String,lastConnectedAt: freezed == lastConnectedAt ? _self.lastConnectedAt : lastConnectedAt // ignore: cast_nullable_to_non_nullable
as String?,iconUrl: null == iconUrl ? _self.iconUrl : iconUrl // ignore: cast_nullable_to_non_nullable
as String,paused: null == paused ? _self.paused : paused // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
mixin _$EmbyServerSaveReq {
@JsonKey(includeIfNull: false) String? get id; String get name; String get baseUrl;/// 期望的服务器图标 URL(空字符串表示清除图标)。
@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String get iconUrl;
/// Create a copy of EmbyServerSaveReq
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$EmbyServerSaveReqCopyWith<EmbyServerSaveReq> get copyWith => _$EmbyServerSaveReqCopyWithImpl<EmbyServerSaveReq>(this as EmbyServerSaveReq, _$identity);
/// Serializes this EmbyServerSaveReq to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is EmbyServerSaveReq&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl)&&(identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name,baseUrl,iconUrl);
@override
String toString() {
return 'EmbyServerSaveReq(id: $id, name: $name, baseUrl: $baseUrl, iconUrl: $iconUrl)';
}
}
/// @nodoc
abstract mixin class $EmbyServerSaveReqCopyWith<$Res> {
factory $EmbyServerSaveReqCopyWith(EmbyServerSaveReq value, $Res Function(EmbyServerSaveReq) _then) = _$EmbyServerSaveReqCopyWithImpl;
@useResult
$Res call({
@JsonKey(includeIfNull: false) String? id, String name, String baseUrl,@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl
});
}
/// @nodoc
class _$EmbyServerSaveReqCopyWithImpl<$Res>
implements $EmbyServerSaveReqCopyWith<$Res> {
_$EmbyServerSaveReqCopyWithImpl(this._self, this._then);
final EmbyServerSaveReq _self;
final $Res Function(EmbyServerSaveReq) _then;
/// Create a copy of EmbyServerSaveReq
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = null,Object? baseUrl = null,Object? iconUrl = null,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable
as String,iconUrl: null == iconUrl ? _self.iconUrl : iconUrl // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [EmbyServerSaveReq].
extension EmbyServerSaveReqPatterns on EmbyServerSaveReq {
/// 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 extends Object?>(TResult Function( _EmbyServerSaveReq value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _EmbyServerSaveReq() 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 extends Object?>(TResult Function( _EmbyServerSaveReq value) $default,){
final _that = this;
switch (_that) {
case _EmbyServerSaveReq():
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 extends Object?>(TResult? Function( _EmbyServerSaveReq value)? $default,){
final _that = this;
switch (_that) {
case _EmbyServerSaveReq() 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 extends Object?>(TResult Function(@JsonKey(includeIfNull: false) String? id, String name, String baseUrl, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _EmbyServerSaveReq() when $default != null:
return $default(_that.id,_that.name,_that.baseUrl,_that.iconUrl);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 extends Object?>(TResult Function(@JsonKey(includeIfNull: false) String? id, String name, String baseUrl, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl) $default,) {final _that = this;
switch (_that) {
case _EmbyServerSaveReq():
return $default(_that.id,_that.name,_that.baseUrl,_that.iconUrl);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 extends Object?>(TResult? Function(@JsonKey(includeIfNull: false) String? id, String name, String baseUrl, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl)? $default,) {final _that = this;
switch (_that) {
case _EmbyServerSaveReq() when $default != null:
return $default(_that.id,_that.name,_that.baseUrl,_that.iconUrl);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _EmbyServerSaveReq implements EmbyServerSaveReq {
const _EmbyServerSaveReq({@JsonKey(includeIfNull: false) this.id, required this.name, required this.baseUrl, @JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) this.iconUrl = ''});
factory _EmbyServerSaveReq.fromJson(Map<String, dynamic> json) => _$EmbyServerSaveReqFromJson(json);
@override@JsonKey(includeIfNull: false) final String? id;
@override final String name;
@override final String baseUrl;
/// 期望的服务器图标 URL(空字符串表示清除图标)。
@override@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) final String iconUrl;
/// Create a copy of EmbyServerSaveReq
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$EmbyServerSaveReqCopyWith<_EmbyServerSaveReq> get copyWith => __$EmbyServerSaveReqCopyWithImpl<_EmbyServerSaveReq>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$EmbyServerSaveReqToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EmbyServerSaveReq&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl)&&(identical(other.iconUrl, iconUrl) || other.iconUrl == iconUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name,baseUrl,iconUrl);
@override
String toString() {
return 'EmbyServerSaveReq(id: $id, name: $name, baseUrl: $baseUrl, iconUrl: $iconUrl)';
}
}
/// @nodoc
abstract mixin class _$EmbyServerSaveReqCopyWith<$Res> implements $EmbyServerSaveReqCopyWith<$Res> {
factory _$EmbyServerSaveReqCopyWith(_EmbyServerSaveReq value, $Res Function(_EmbyServerSaveReq) _then) = __$EmbyServerSaveReqCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(includeIfNull: false) String? id, String name, String baseUrl,@JsonKey(fromJson: _stringOrEmpty, toJson: _emptyStringToNull, includeIfNull: false) String iconUrl
});
}
/// @nodoc
class __$EmbyServerSaveReqCopyWithImpl<$Res>
implements _$EmbyServerSaveReqCopyWith<$Res> {
__$EmbyServerSaveReqCopyWithImpl(this._self, this._then);
final _EmbyServerSaveReq _self;
final $Res Function(_EmbyServerSaveReq) _then;
/// Create a copy of EmbyServerSaveReq
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = null,Object? baseUrl = null,Object? iconUrl = null,}) {
return _then(_EmbyServerSaveReq(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable
as String,iconUrl: null == iconUrl ? _self.iconUrl : iconUrl // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$EmbyServerProbeReq {
String get baseUrl;
/// Create a copy of EmbyServerProbeReq
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$EmbyServerProbeReqCopyWith<EmbyServerProbeReq> get copyWith => _$EmbyServerProbeReqCopyWithImpl<EmbyServerProbeReq>(this as EmbyServerProbeReq, _$identity);
/// Serializes this EmbyServerProbeReq to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is EmbyServerProbeReq&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,baseUrl);
@override
String toString() {
return 'EmbyServerProbeReq(baseUrl: $baseUrl)';
}
}
/// @nodoc
abstract mixin class $EmbyServerProbeReqCopyWith<$Res> {
factory $EmbyServerProbeReqCopyWith(EmbyServerProbeReq value, $Res Function(EmbyServerProbeReq) _then) = _$EmbyServerProbeReqCopyWithImpl;
@useResult
$Res call({
String baseUrl
});
}
/// @nodoc
class _$EmbyServerProbeReqCopyWithImpl<$Res>
implements $EmbyServerProbeReqCopyWith<$Res> {
_$EmbyServerProbeReqCopyWithImpl(this._self, this._then);
final EmbyServerProbeReq _self;
final $Res Function(EmbyServerProbeReq) _then;
/// Create a copy of EmbyServerProbeReq
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? baseUrl = null,}) {
return _then(_self.copyWith(
baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [EmbyServerProbeReq].
extension EmbyServerProbeReqPatterns on EmbyServerProbeReq {
/// 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 extends Object?>(TResult Function( _EmbyServerProbeReq value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _EmbyServerProbeReq() 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 extends Object?>(TResult Function( _EmbyServerProbeReq value) $default,){
final _that = this;
switch (_that) {
case _EmbyServerProbeReq():
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 extends Object?>(TResult? Function( _EmbyServerProbeReq value)? $default,){
final _that = this;
switch (_that) {
case _EmbyServerProbeReq() 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 extends Object?>(TResult Function( String baseUrl)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _EmbyServerProbeReq() when $default != null:
return $default(_that.baseUrl);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 extends Object?>(TResult Function( String baseUrl) $default,) {final _that = this;
switch (_that) {
case _EmbyServerProbeReq():
return $default(_that.baseUrl);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 extends Object?>(TResult? Function( String baseUrl)? $default,) {final _that = this;
switch (_that) {
case _EmbyServerProbeReq() when $default != null:
return $default(_that.baseUrl);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _EmbyServerProbeReq implements EmbyServerProbeReq {
const _EmbyServerProbeReq({required this.baseUrl});
factory _EmbyServerProbeReq.fromJson(Map<String, dynamic> json) => _$EmbyServerProbeReqFromJson(json);
@override final String baseUrl;
/// Create a copy of EmbyServerProbeReq
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$EmbyServerProbeReqCopyWith<_EmbyServerProbeReq> get copyWith => __$EmbyServerProbeReqCopyWithImpl<_EmbyServerProbeReq>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$EmbyServerProbeReqToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EmbyServerProbeReq&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,baseUrl);
@override
String toString() {
return 'EmbyServerProbeReq(baseUrl: $baseUrl)';
}
}
/// @nodoc
abstract mixin class _$EmbyServerProbeReqCopyWith<$Res> implements $EmbyServerProbeReqCopyWith<$Res> {
factory _$EmbyServerProbeReqCopyWith(_EmbyServerProbeReq value, $Res Function(_EmbyServerProbeReq) _then) = __$EmbyServerProbeReqCopyWithImpl;
@override @useResult
$Res call({
String baseUrl
});
}
/// @nodoc
class __$EmbyServerProbeReqCopyWithImpl<$Res>
implements _$EmbyServerProbeReqCopyWith<$Res> {
__$EmbyServerProbeReqCopyWithImpl(this._self, this._then);
final _EmbyServerProbeReq _self;
final $Res Function(_EmbyServerProbeReq) _then;
/// Create a copy of EmbyServerProbeReq
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? baseUrl = null,}) {
return _then(_EmbyServerProbeReq(
baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$ProbePublicInfoRes {
String get serverName; String get version; String get productName;
/// Create a copy of ProbePublicInfoRes
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProbePublicInfoResCopyWith<ProbePublicInfoRes> get copyWith => _$ProbePublicInfoResCopyWithImpl<ProbePublicInfoRes>(this as ProbePublicInfoRes, _$identity);
/// Serializes this ProbePublicInfoRes to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProbePublicInfoRes&&(identical(other.serverName, serverName) || other.serverName == serverName)&&(identical(other.version, version) || other.version == version)&&(identical(other.productName, productName) || other.productName == productName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,serverName,version,productName);
@override
String toString() {
return 'ProbePublicInfoRes(serverName: $serverName, version: $version, productName: $productName)';
}
}
/// @nodoc
abstract mixin class $ProbePublicInfoResCopyWith<$Res> {
factory $ProbePublicInfoResCopyWith(ProbePublicInfoRes value, $Res Function(ProbePublicInfoRes) _then) = _$ProbePublicInfoResCopyWithImpl;
@useResult
$Res call({
String serverName, String version, String productName
});
}
/// @nodoc
class _$ProbePublicInfoResCopyWithImpl<$Res>
implements $ProbePublicInfoResCopyWith<$Res> {
_$ProbePublicInfoResCopyWithImpl(this._self, this._then);
final ProbePublicInfoRes _self;
final $Res Function(ProbePublicInfoRes) _then;
/// Create a copy of ProbePublicInfoRes
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? serverName = null,Object? version = null,Object? productName = null,}) {
return _then(_self.copyWith(
serverName: null == serverName ? _self.serverName : serverName // ignore: cast_nullable_to_non_nullable
as String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as String,productName: null == productName ? _self.productName : productName // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [ProbePublicInfoRes].
extension ProbePublicInfoResPatterns on ProbePublicInfoRes {
/// 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 extends Object?>(TResult Function( _ProbePublicInfoRes value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ProbePublicInfoRes() 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 extends Object?>(TResult Function( _ProbePublicInfoRes value) $default,){
final _that = this;
switch (_that) {
case _ProbePublicInfoRes():
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 extends Object?>(TResult? Function( _ProbePublicInfoRes value)? $default,){
final _that = this;
switch (_that) {
case _ProbePublicInfoRes() 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 extends Object?>(TResult Function( String serverName, String version, String productName)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ProbePublicInfoRes() when $default != null:
return $default(_that.serverName,_that.version,_that.productName);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 extends Object?>(TResult Function( String serverName, String version, String productName) $default,) {final _that = this;
switch (_that) {
case _ProbePublicInfoRes():
return $default(_that.serverName,_that.version,_that.productName);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 extends Object?>(TResult? Function( String serverName, String version, String productName)? $default,) {final _that = this;
switch (_that) {
case _ProbePublicInfoRes() when $default != null:
return $default(_that.serverName,_that.version,_that.productName);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ProbePublicInfoRes implements ProbePublicInfoRes {
const _ProbePublicInfoRes({required this.serverName, required this.version, required this.productName});
factory _ProbePublicInfoRes.fromJson(Map<String, dynamic> json) => _$ProbePublicInfoResFromJson(json);
@override final String serverName;
@override final String version;
@override final String productName;
/// Create a copy of ProbePublicInfoRes
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProbePublicInfoResCopyWith<_ProbePublicInfoRes> get copyWith => __$ProbePublicInfoResCopyWithImpl<_ProbePublicInfoRes>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ProbePublicInfoResToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProbePublicInfoRes&&(identical(other.serverName, serverName) || other.serverName == serverName)&&(identical(other.version, version) || other.version == version)&&(identical(other.productName, productName) || other.productName == productName));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,serverName,version,productName);
@override
String toString() {
return 'ProbePublicInfoRes(serverName: $serverName, version: $version, productName: $productName)';
}
}
/// @nodoc
abstract mixin class _$ProbePublicInfoResCopyWith<$Res> implements $ProbePublicInfoResCopyWith<$Res> {
factory _$ProbePublicInfoResCopyWith(_ProbePublicInfoRes value, $Res Function(_ProbePublicInfoRes) _then) = __$ProbePublicInfoResCopyWithImpl;
@override @useResult
$Res call({
String serverName, String version, String productName
});
}
/// @nodoc
class __$ProbePublicInfoResCopyWithImpl<$Res>
implements _$ProbePublicInfoResCopyWith<$Res> {
__$ProbePublicInfoResCopyWithImpl(this._self, this._then);
final _ProbePublicInfoRes _self;
final $Res Function(_ProbePublicInfoRes) _then;
/// Create a copy of ProbePublicInfoRes
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? serverName = null,Object? version = null,Object? productName = null,}) {
return _then(_ProbePublicInfoRes(
serverName: null == serverName ? _self.serverName : serverName // ignore: cast_nullable_to_non_nullable
as String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as String,productName: null == productName ? _self.productName : productName // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on