// 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 'backend_models.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$SignInRequest { SignInMethod get method; String? get email; String? get password; String? get idToken; /// Create a copy of SignInRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SignInRequestCopyWith get copyWith => _$SignInRequestCopyWithImpl(this as SignInRequest, _$identity); /// Serializes this SignInRequest to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SignInRequest&&(identical(other.method, method) || other.method == method)&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.idToken, idToken) || other.idToken == idToken)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,method,email,password,idToken); @override String toString() { return 'SignInRequest(method: $method, email: $email, password: $password, idToken: $idToken)'; } } /// @nodoc abstract mixin class $SignInRequestCopyWith<$Res> { factory $SignInRequestCopyWith(SignInRequest value, $Res Function(SignInRequest) _then) = _$SignInRequestCopyWithImpl; @useResult $Res call({ SignInMethod method, String? email, String? password, String? idToken }); } /// @nodoc class _$SignInRequestCopyWithImpl<$Res> implements $SignInRequestCopyWith<$Res> { _$SignInRequestCopyWithImpl(this._self, this._then); final SignInRequest _self; final $Res Function(SignInRequest) _then; /// Create a copy of SignInRequest /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? method = null,Object? email = freezed,Object? password = freezed,Object? idToken = freezed,}) { return _then(_self.copyWith( method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable as SignInMethod,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable as String?,idToken: freezed == idToken ? _self.idToken : idToken // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [SignInRequest]. extension SignInRequestPatterns on SignInRequest { /// 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( _SignInRequest value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SignInRequest() 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( _SignInRequest value) $default,){ final _that = this; switch (_that) { case _SignInRequest(): 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( _SignInRequest value)? $default,){ final _that = this; switch (_that) { case _SignInRequest() 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( SignInMethod method, String? email, String? password, String? idToken)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SignInRequest() when $default != null: return $default(_that.method,_that.email,_that.password,_that.idToken);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( SignInMethod method, String? email, String? password, String? idToken) $default,) {final _that = this; switch (_that) { case _SignInRequest(): return $default(_that.method,_that.email,_that.password,_that.idToken);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( SignInMethod method, String? email, String? password, String? idToken)? $default,) {final _that = this; switch (_that) { case _SignInRequest() when $default != null: return $default(_that.method,_that.email,_that.password,_that.idToken);case _: return null; } } } /// @nodoc @JsonSerializable() class _SignInRequest implements SignInRequest { const _SignInRequest({required this.method, this.email, this.password, this.idToken}); factory _SignInRequest.fromJson(Map json) => _$SignInRequestFromJson(json); @override final SignInMethod method; @override final String? email; @override final String? password; @override final String? idToken; /// Create a copy of SignInRequest /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SignInRequestCopyWith<_SignInRequest> get copyWith => __$SignInRequestCopyWithImpl<_SignInRequest>(this, _$identity); @override Map toJson() { return _$SignInRequestToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SignInRequest&&(identical(other.method, method) || other.method == method)&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.idToken, idToken) || other.idToken == idToken)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,method,email,password,idToken); @override String toString() { return 'SignInRequest(method: $method, email: $email, password: $password, idToken: $idToken)'; } } /// @nodoc abstract mixin class _$SignInRequestCopyWith<$Res> implements $SignInRequestCopyWith<$Res> { factory _$SignInRequestCopyWith(_SignInRequest value, $Res Function(_SignInRequest) _then) = __$SignInRequestCopyWithImpl; @override @useResult $Res call({ SignInMethod method, String? email, String? password, String? idToken }); } /// @nodoc class __$SignInRequestCopyWithImpl<$Res> implements _$SignInRequestCopyWith<$Res> { __$SignInRequestCopyWithImpl(this._self, this._then); final _SignInRequest _self; final $Res Function(_SignInRequest) _then; /// Create a copy of SignInRequest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? method = null,Object? email = freezed,Object? password = freezed,Object? idToken = freezed,}) { return _then(_SignInRequest( method: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable as SignInMethod,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable as String?,idToken: freezed == idToken ? _self.idToken : idToken // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc mixin _$UserProfile { String get id; String? get email; String? get displayName; String? get avatarFileId; /// Create a copy of UserProfile /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $UserProfileCopyWith get copyWith => _$UserProfileCopyWithImpl(this as UserProfile, _$identity); /// Serializes this UserProfile to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is UserProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.email, email) || other.email == email)&&(identical(other.displayName, displayName) || other.displayName == displayName)&&(identical(other.avatarFileId, avatarFileId) || other.avatarFileId == avatarFileId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,email,displayName,avatarFileId); @override String toString() { return 'UserProfile(id: $id, email: $email, displayName: $displayName, avatarFileId: $avatarFileId)'; } } /// @nodoc abstract mixin class $UserProfileCopyWith<$Res> { factory $UserProfileCopyWith(UserProfile value, $Res Function(UserProfile) _then) = _$UserProfileCopyWithImpl; @useResult $Res call({ String id, String? email, String? displayName, String? avatarFileId }); } /// @nodoc class _$UserProfileCopyWithImpl<$Res> implements $UserProfileCopyWith<$Res> { _$UserProfileCopyWithImpl(this._self, this._then); final UserProfile _self; final $Res Function(UserProfile) _then; /// Create a copy of UserProfile /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? email = freezed,Object? displayName = freezed,Object? avatarFileId = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable as String?,displayName: freezed == displayName ? _self.displayName : displayName // ignore: cast_nullable_to_non_nullable as String?,avatarFileId: freezed == avatarFileId ? _self.avatarFileId : avatarFileId // ignore: cast_nullable_to_non_nullable as String?, )); } } /// Adds pattern-matching-related methods to [UserProfile]. extension UserProfilePatterns on UserProfile { /// 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( _UserProfile value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _UserProfile() 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( _UserProfile value) $default,){ final _that = this; switch (_that) { case _UserProfile(): 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( _UserProfile value)? $default,){ final _that = this; switch (_that) { case _UserProfile() 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? email, String? displayName, String? avatarFileId)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _UserProfile() when $default != null: return $default(_that.id,_that.email,_that.displayName,_that.avatarFileId);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? email, String? displayName, String? avatarFileId) $default,) {final _that = this; switch (_that) { case _UserProfile(): return $default(_that.id,_that.email,_that.displayName,_that.avatarFileId);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? email, String? displayName, String? avatarFileId)? $default,) {final _that = this; switch (_that) { case _UserProfile() when $default != null: return $default(_that.id,_that.email,_that.displayName,_that.avatarFileId);case _: return null; } } } /// @nodoc @JsonSerializable() class _UserProfile implements UserProfile { const _UserProfile({required this.id, this.email, this.displayName, this.avatarFileId}); factory _UserProfile.fromJson(Map json) => _$UserProfileFromJson(json); @override final String id; @override final String? email; @override final String? displayName; @override final String? avatarFileId; /// Create a copy of UserProfile /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$UserProfileCopyWith<_UserProfile> get copyWith => __$UserProfileCopyWithImpl<_UserProfile>(this, _$identity); @override Map toJson() { return _$UserProfileToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.email, email) || other.email == email)&&(identical(other.displayName, displayName) || other.displayName == displayName)&&(identical(other.avatarFileId, avatarFileId) || other.avatarFileId == avatarFileId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,email,displayName,avatarFileId); @override String toString() { return 'UserProfile(id: $id, email: $email, displayName: $displayName, avatarFileId: $avatarFileId)'; } } /// @nodoc abstract mixin class _$UserProfileCopyWith<$Res> implements $UserProfileCopyWith<$Res> { factory _$UserProfileCopyWith(_UserProfile value, $Res Function(_UserProfile) _then) = __$UserProfileCopyWithImpl; @override @useResult $Res call({ String id, String? email, String? displayName, String? avatarFileId }); } /// @nodoc class __$UserProfileCopyWithImpl<$Res> implements _$UserProfileCopyWith<$Res> { __$UserProfileCopyWithImpl(this._self, this._then); final _UserProfile _self; final $Res Function(_UserProfile) _then; /// Create a copy of UserProfile /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? email = freezed,Object? displayName = freezed,Object? avatarFileId = freezed,}) { return _then(_UserProfile( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,email: freezed == email ? _self.email : email // ignore: cast_nullable_to_non_nullable as String?,displayName: freezed == displayName ? _self.displayName : displayName // ignore: cast_nullable_to_non_nullable as String?,avatarFileId: freezed == avatarFileId ? _self.avatarFileId : avatarFileId // ignore: cast_nullable_to_non_nullable as String?, )); } } /// @nodoc mixin _$AuthSession { String get accessToken; String get refreshToken; DateTime get expiresAt; UserProfile get user; /// Create a copy of AuthSession /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AuthSessionCopyWith get copyWith => _$AuthSessionCopyWithImpl(this as AuthSession, _$identity); /// Serializes this AuthSession to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthSession&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)&&(identical(other.user, user) || other.user == user)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,accessToken,refreshToken,expiresAt,user); @override String toString() { return 'AuthSession(accessToken: $accessToken, refreshToken: $refreshToken, expiresAt: $expiresAt, user: $user)'; } } /// @nodoc abstract mixin class $AuthSessionCopyWith<$Res> { factory $AuthSessionCopyWith(AuthSession value, $Res Function(AuthSession) _then) = _$AuthSessionCopyWithImpl; @useResult $Res call({ String accessToken, String refreshToken, DateTime expiresAt, UserProfile user }); $UserProfileCopyWith<$Res> get user; } /// @nodoc class _$AuthSessionCopyWithImpl<$Res> implements $AuthSessionCopyWith<$Res> { _$AuthSessionCopyWithImpl(this._self, this._then); final AuthSession _self; final $Res Function(AuthSession) _then; /// Create a copy of AuthSession /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? accessToken = null,Object? refreshToken = null,Object? expiresAt = null,Object? user = null,}) { return _then(_self.copyWith( accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable as String,refreshToken: null == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable as UserProfile, )); } /// Create a copy of AuthSession /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $UserProfileCopyWith<$Res> get user { return $UserProfileCopyWith<$Res>(_self.user, (value) { return _then(_self.copyWith(user: value)); }); } } /// Adds pattern-matching-related methods to [AuthSession]. extension AuthSessionPatterns on AuthSession { /// 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( _AuthSession value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _AuthSession() 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( _AuthSession value) $default,){ final _that = this; switch (_that) { case _AuthSession(): 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( _AuthSession value)? $default,){ final _that = this; switch (_that) { case _AuthSession() 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 accessToken, String refreshToken, DateTime expiresAt, UserProfile user)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _AuthSession() when $default != null: return $default(_that.accessToken,_that.refreshToken,_that.expiresAt,_that.user);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 accessToken, String refreshToken, DateTime expiresAt, UserProfile user) $default,) {final _that = this; switch (_that) { case _AuthSession(): return $default(_that.accessToken,_that.refreshToken,_that.expiresAt,_that.user);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 accessToken, String refreshToken, DateTime expiresAt, UserProfile user)? $default,) {final _that = this; switch (_that) { case _AuthSession() when $default != null: return $default(_that.accessToken,_that.refreshToken,_that.expiresAt,_that.user);case _: return null; } } } /// @nodoc @JsonSerializable(explicitToJson: true) class _AuthSession implements AuthSession { const _AuthSession({required this.accessToken, required this.refreshToken, required this.expiresAt, required this.user}); factory _AuthSession.fromJson(Map json) => _$AuthSessionFromJson(json); @override final String accessToken; @override final String refreshToken; @override final DateTime expiresAt; @override final UserProfile user; /// Create a copy of AuthSession /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AuthSessionCopyWith<_AuthSession> get copyWith => __$AuthSessionCopyWithImpl<_AuthSession>(this, _$identity); @override Map toJson() { return _$AuthSessionToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthSession&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)&&(identical(other.user, user) || other.user == user)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,accessToken,refreshToken,expiresAt,user); @override String toString() { return 'AuthSession(accessToken: $accessToken, refreshToken: $refreshToken, expiresAt: $expiresAt, user: $user)'; } } /// @nodoc abstract mixin class _$AuthSessionCopyWith<$Res> implements $AuthSessionCopyWith<$Res> { factory _$AuthSessionCopyWith(_AuthSession value, $Res Function(_AuthSession) _then) = __$AuthSessionCopyWithImpl; @override @useResult $Res call({ String accessToken, String refreshToken, DateTime expiresAt, UserProfile user }); @override $UserProfileCopyWith<$Res> get user; } /// @nodoc class __$AuthSessionCopyWithImpl<$Res> implements _$AuthSessionCopyWith<$Res> { __$AuthSessionCopyWithImpl(this._self, this._then); final _AuthSession _self; final $Res Function(_AuthSession) _then; /// Create a copy of AuthSession /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? accessToken = null,Object? refreshToken = null,Object? expiresAt = null,Object? user = null,}) { return _then(_AuthSession( accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable as String,refreshToken: null == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable as UserProfile, )); } /// Create a copy of AuthSession /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $UserProfileCopyWith<$Res> get user { return $UserProfileCopyWith<$Res>(_self.user, (value) { return _then(_self.copyWith(user: value)); }); } } /// @nodoc mixin _$AuthRefreshRequest { String get refreshToken; /// Create a copy of AuthRefreshRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AuthRefreshRequestCopyWith get copyWith => _$AuthRefreshRequestCopyWithImpl(this as AuthRefreshRequest, _$identity); /// Serializes this AuthRefreshRequest to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthRefreshRequest&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,refreshToken); @override String toString() { return 'AuthRefreshRequest(refreshToken: $refreshToken)'; } } /// @nodoc abstract mixin class $AuthRefreshRequestCopyWith<$Res> { factory $AuthRefreshRequestCopyWith(AuthRefreshRequest value, $Res Function(AuthRefreshRequest) _then) = _$AuthRefreshRequestCopyWithImpl; @useResult $Res call({ String refreshToken }); } /// @nodoc class _$AuthRefreshRequestCopyWithImpl<$Res> implements $AuthRefreshRequestCopyWith<$Res> { _$AuthRefreshRequestCopyWithImpl(this._self, this._then); final AuthRefreshRequest _self; final $Res Function(AuthRefreshRequest) _then; /// Create a copy of AuthRefreshRequest /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? refreshToken = null,}) { return _then(_self.copyWith( refreshToken: null == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [AuthRefreshRequest]. extension AuthRefreshRequestPatterns on AuthRefreshRequest { /// 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( _AuthRefreshRequest value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _AuthRefreshRequest() 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( _AuthRefreshRequest value) $default,){ final _that = this; switch (_that) { case _AuthRefreshRequest(): 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( _AuthRefreshRequest value)? $default,){ final _that = this; switch (_that) { case _AuthRefreshRequest() 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 refreshToken)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _AuthRefreshRequest() when $default != null: return $default(_that.refreshToken);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 refreshToken) $default,) {final _that = this; switch (_that) { case _AuthRefreshRequest(): return $default(_that.refreshToken);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 refreshToken)? $default,) {final _that = this; switch (_that) { case _AuthRefreshRequest() when $default != null: return $default(_that.refreshToken);case _: return null; } } } /// @nodoc @JsonSerializable() class _AuthRefreshRequest implements AuthRefreshRequest { const _AuthRefreshRequest({required this.refreshToken}); factory _AuthRefreshRequest.fromJson(Map json) => _$AuthRefreshRequestFromJson(json); @override final String refreshToken; /// Create a copy of AuthRefreshRequest /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AuthRefreshRequestCopyWith<_AuthRefreshRequest> get copyWith => __$AuthRefreshRequestCopyWithImpl<_AuthRefreshRequest>(this, _$identity); @override Map toJson() { return _$AuthRefreshRequestToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthRefreshRequest&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,refreshToken); @override String toString() { return 'AuthRefreshRequest(refreshToken: $refreshToken)'; } } /// @nodoc abstract mixin class _$AuthRefreshRequestCopyWith<$Res> implements $AuthRefreshRequestCopyWith<$Res> { factory _$AuthRefreshRequestCopyWith(_AuthRefreshRequest value, $Res Function(_AuthRefreshRequest) _then) = __$AuthRefreshRequestCopyWithImpl; @override @useResult $Res call({ String refreshToken }); } /// @nodoc class __$AuthRefreshRequestCopyWithImpl<$Res> implements _$AuthRefreshRequestCopyWith<$Res> { __$AuthRefreshRequestCopyWithImpl(this._self, this._then); final _AuthRefreshRequest _self; final $Res Function(_AuthRefreshRequest) _then; /// Create a copy of AuthRefreshRequest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? refreshToken = null,}) { return _then(_AuthRefreshRequest( refreshToken: null == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$AuthRefreshResponse { String get accessToken; String? get refreshToken; DateTime get expiresAt; /// Create a copy of AuthRefreshResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $AuthRefreshResponseCopyWith get copyWith => _$AuthRefreshResponseCopyWithImpl(this as AuthRefreshResponse, _$identity); /// Serializes this AuthRefreshResponse to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthRefreshResponse&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,accessToken,refreshToken,expiresAt); @override String toString() { return 'AuthRefreshResponse(accessToken: $accessToken, refreshToken: $refreshToken, expiresAt: $expiresAt)'; } } /// @nodoc abstract mixin class $AuthRefreshResponseCopyWith<$Res> { factory $AuthRefreshResponseCopyWith(AuthRefreshResponse value, $Res Function(AuthRefreshResponse) _then) = _$AuthRefreshResponseCopyWithImpl; @useResult $Res call({ String accessToken, String? refreshToken, DateTime expiresAt }); } /// @nodoc class _$AuthRefreshResponseCopyWithImpl<$Res> implements $AuthRefreshResponseCopyWith<$Res> { _$AuthRefreshResponseCopyWithImpl(this._self, this._then); final AuthRefreshResponse _self; final $Res Function(AuthRefreshResponse) _then; /// Create a copy of AuthRefreshResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? accessToken = null,Object? refreshToken = freezed,Object? expiresAt = null,}) { return _then(_self.copyWith( accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable as String,refreshToken: freezed == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String?,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// Adds pattern-matching-related methods to [AuthRefreshResponse]. extension AuthRefreshResponsePatterns on AuthRefreshResponse { /// 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( _AuthRefreshResponse value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _AuthRefreshResponse() 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( _AuthRefreshResponse value) $default,){ final _that = this; switch (_that) { case _AuthRefreshResponse(): 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( _AuthRefreshResponse value)? $default,){ final _that = this; switch (_that) { case _AuthRefreshResponse() 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 accessToken, String? refreshToken, DateTime expiresAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _AuthRefreshResponse() when $default != null: return $default(_that.accessToken,_that.refreshToken,_that.expiresAt);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 accessToken, String? refreshToken, DateTime expiresAt) $default,) {final _that = this; switch (_that) { case _AuthRefreshResponse(): return $default(_that.accessToken,_that.refreshToken,_that.expiresAt);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 accessToken, String? refreshToken, DateTime expiresAt)? $default,) {final _that = this; switch (_that) { case _AuthRefreshResponse() when $default != null: return $default(_that.accessToken,_that.refreshToken,_that.expiresAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _AuthRefreshResponse implements AuthRefreshResponse { const _AuthRefreshResponse({required this.accessToken, this.refreshToken, required this.expiresAt}); factory _AuthRefreshResponse.fromJson(Map json) => _$AuthRefreshResponseFromJson(json); @override final String accessToken; @override final String? refreshToken; @override final DateTime expiresAt; /// Create a copy of AuthRefreshResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$AuthRefreshResponseCopyWith<_AuthRefreshResponse> get copyWith => __$AuthRefreshResponseCopyWithImpl<_AuthRefreshResponse>(this, _$identity); @override Map toJson() { return _$AuthRefreshResponseToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthRefreshResponse&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.refreshToken, refreshToken) || other.refreshToken == refreshToken)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,accessToken,refreshToken,expiresAt); @override String toString() { return 'AuthRefreshResponse(accessToken: $accessToken, refreshToken: $refreshToken, expiresAt: $expiresAt)'; } } /// @nodoc abstract mixin class _$AuthRefreshResponseCopyWith<$Res> implements $AuthRefreshResponseCopyWith<$Res> { factory _$AuthRefreshResponseCopyWith(_AuthRefreshResponse value, $Res Function(_AuthRefreshResponse) _then) = __$AuthRefreshResponseCopyWithImpl; @override @useResult $Res call({ String accessToken, String? refreshToken, DateTime expiresAt }); } /// @nodoc class __$AuthRefreshResponseCopyWithImpl<$Res> implements _$AuthRefreshResponseCopyWith<$Res> { __$AuthRefreshResponseCopyWithImpl(this._self, this._then); final _AuthRefreshResponse _self; final $Res Function(_AuthRefreshResponse) _then; /// Create a copy of AuthRefreshResponse /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? accessToken = null,Object? refreshToken = freezed,Object? expiresAt = null,}) { return _then(_AuthRefreshResponse( accessToken: null == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable as String,refreshToken: freezed == refreshToken ? _self.refreshToken : refreshToken // ignore: cast_nullable_to_non_nullable as String?,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// @nodoc mixin _$ChangeEnvelope { int get schemaVersion; String get entityType; String get entityId; ChangeOperation get op; DateTime get modifiedAt; String get clientMutationId; Map? get payload; /// Create a copy of ChangeEnvelope /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ChangeEnvelopeCopyWith get copyWith => _$ChangeEnvelopeCopyWithImpl(this as ChangeEnvelope, _$identity); /// Serializes this ChangeEnvelope to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is ChangeEnvelope&&(identical(other.schemaVersion, schemaVersion) || other.schemaVersion == schemaVersion)&&(identical(other.entityType, entityType) || other.entityType == entityType)&&(identical(other.entityId, entityId) || other.entityId == entityId)&&(identical(other.op, op) || other.op == op)&&(identical(other.modifiedAt, modifiedAt) || other.modifiedAt == modifiedAt)&&(identical(other.clientMutationId, clientMutationId) || other.clientMutationId == clientMutationId)&&const DeepCollectionEquality().equals(other.payload, payload)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,schemaVersion,entityType,entityId,op,modifiedAt,clientMutationId,const DeepCollectionEquality().hash(payload)); @override String toString() { return 'ChangeEnvelope(schemaVersion: $schemaVersion, entityType: $entityType, entityId: $entityId, op: $op, modifiedAt: $modifiedAt, clientMutationId: $clientMutationId, payload: $payload)'; } } /// @nodoc abstract mixin class $ChangeEnvelopeCopyWith<$Res> { factory $ChangeEnvelopeCopyWith(ChangeEnvelope value, $Res Function(ChangeEnvelope) _then) = _$ChangeEnvelopeCopyWithImpl; @useResult $Res call({ int schemaVersion, String entityType, String entityId, ChangeOperation op, DateTime modifiedAt, String clientMutationId, Map? payload }); } /// @nodoc class _$ChangeEnvelopeCopyWithImpl<$Res> implements $ChangeEnvelopeCopyWith<$Res> { _$ChangeEnvelopeCopyWithImpl(this._self, this._then); final ChangeEnvelope _self; final $Res Function(ChangeEnvelope) _then; /// Create a copy of ChangeEnvelope /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? schemaVersion = null,Object? entityType = null,Object? entityId = null,Object? op = null,Object? modifiedAt = null,Object? clientMutationId = null,Object? payload = freezed,}) { return _then(_self.copyWith( schemaVersion: null == schemaVersion ? _self.schemaVersion : schemaVersion // ignore: cast_nullable_to_non_nullable as int,entityType: null == entityType ? _self.entityType : entityType // ignore: cast_nullable_to_non_nullable as String,entityId: null == entityId ? _self.entityId : entityId // ignore: cast_nullable_to_non_nullable as String,op: null == op ? _self.op : op // ignore: cast_nullable_to_non_nullable as ChangeOperation,modifiedAt: null == modifiedAt ? _self.modifiedAt : modifiedAt // ignore: cast_nullable_to_non_nullable as DateTime,clientMutationId: null == clientMutationId ? _self.clientMutationId : clientMutationId // ignore: cast_nullable_to_non_nullable as String,payload: freezed == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable as Map?, )); } } /// Adds pattern-matching-related methods to [ChangeEnvelope]. extension ChangeEnvelopePatterns on ChangeEnvelope { /// 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( _ChangeEnvelope value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _ChangeEnvelope() 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( _ChangeEnvelope value) $default,){ final _that = this; switch (_that) { case _ChangeEnvelope(): 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( _ChangeEnvelope value)? $default,){ final _that = this; switch (_that) { case _ChangeEnvelope() 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( int schemaVersion, String entityType, String entityId, ChangeOperation op, DateTime modifiedAt, String clientMutationId, Map? payload)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _ChangeEnvelope() when $default != null: return $default(_that.schemaVersion,_that.entityType,_that.entityId,_that.op,_that.modifiedAt,_that.clientMutationId,_that.payload);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( int schemaVersion, String entityType, String entityId, ChangeOperation op, DateTime modifiedAt, String clientMutationId, Map? payload) $default,) {final _that = this; switch (_that) { case _ChangeEnvelope(): return $default(_that.schemaVersion,_that.entityType,_that.entityId,_that.op,_that.modifiedAt,_that.clientMutationId,_that.payload);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( int schemaVersion, String entityType, String entityId, ChangeOperation op, DateTime modifiedAt, String clientMutationId, Map? payload)? $default,) {final _that = this; switch (_that) { case _ChangeEnvelope() when $default != null: return $default(_that.schemaVersion,_that.entityType,_that.entityId,_that.op,_that.modifiedAt,_that.clientMutationId,_that.payload);case _: return null; } } } /// @nodoc @JsonSerializable() class _ChangeEnvelope implements ChangeEnvelope { const _ChangeEnvelope({required this.schemaVersion, required this.entityType, required this.entityId, required this.op, required this.modifiedAt, required this.clientMutationId, final Map? payload}): _payload = payload; factory _ChangeEnvelope.fromJson(Map json) => _$ChangeEnvelopeFromJson(json); @override final int schemaVersion; @override final String entityType; @override final String entityId; @override final ChangeOperation op; @override final DateTime modifiedAt; @override final String clientMutationId; final Map? _payload; @override Map? get payload { final value = _payload; if (value == null) return null; if (_payload is EqualUnmodifiableMapView) return _payload; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(value); } /// Create a copy of ChangeEnvelope /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ChangeEnvelopeCopyWith<_ChangeEnvelope> get copyWith => __$ChangeEnvelopeCopyWithImpl<_ChangeEnvelope>(this, _$identity); @override Map toJson() { return _$ChangeEnvelopeToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChangeEnvelope&&(identical(other.schemaVersion, schemaVersion) || other.schemaVersion == schemaVersion)&&(identical(other.entityType, entityType) || other.entityType == entityType)&&(identical(other.entityId, entityId) || other.entityId == entityId)&&(identical(other.op, op) || other.op == op)&&(identical(other.modifiedAt, modifiedAt) || other.modifiedAt == modifiedAt)&&(identical(other.clientMutationId, clientMutationId) || other.clientMutationId == clientMutationId)&&const DeepCollectionEquality().equals(other._payload, _payload)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,schemaVersion,entityType,entityId,op,modifiedAt,clientMutationId,const DeepCollectionEquality().hash(_payload)); @override String toString() { return 'ChangeEnvelope(schemaVersion: $schemaVersion, entityType: $entityType, entityId: $entityId, op: $op, modifiedAt: $modifiedAt, clientMutationId: $clientMutationId, payload: $payload)'; } } /// @nodoc abstract mixin class _$ChangeEnvelopeCopyWith<$Res> implements $ChangeEnvelopeCopyWith<$Res> { factory _$ChangeEnvelopeCopyWith(_ChangeEnvelope value, $Res Function(_ChangeEnvelope) _then) = __$ChangeEnvelopeCopyWithImpl; @override @useResult $Res call({ int schemaVersion, String entityType, String entityId, ChangeOperation op, DateTime modifiedAt, String clientMutationId, Map? payload }); } /// @nodoc class __$ChangeEnvelopeCopyWithImpl<$Res> implements _$ChangeEnvelopeCopyWith<$Res> { __$ChangeEnvelopeCopyWithImpl(this._self, this._then); final _ChangeEnvelope _self; final $Res Function(_ChangeEnvelope) _then; /// Create a copy of ChangeEnvelope /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? schemaVersion = null,Object? entityType = null,Object? entityId = null,Object? op = null,Object? modifiedAt = null,Object? clientMutationId = null,Object? payload = freezed,}) { return _then(_ChangeEnvelope( schemaVersion: null == schemaVersion ? _self.schemaVersion : schemaVersion // ignore: cast_nullable_to_non_nullable as int,entityType: null == entityType ? _self.entityType : entityType // ignore: cast_nullable_to_non_nullable as String,entityId: null == entityId ? _self.entityId : entityId // ignore: cast_nullable_to_non_nullable as String,op: null == op ? _self.op : op // ignore: cast_nullable_to_non_nullable as ChangeOperation,modifiedAt: null == modifiedAt ? _self.modifiedAt : modifiedAt // ignore: cast_nullable_to_non_nullable as DateTime,clientMutationId: null == clientMutationId ? _self.clientMutationId : clientMutationId // ignore: cast_nullable_to_non_nullable as String,payload: freezed == payload ? _self._payload : payload // ignore: cast_nullable_to_non_nullable as Map?, )); } } /// @nodoc mixin _$SyncPushRequest { String get deviceId; String? get cursor; List get changes; String get idempotencyKey; /// Create a copy of SyncPushRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SyncPushRequestCopyWith get copyWith => _$SyncPushRequestCopyWithImpl(this as SyncPushRequest, _$identity); /// Serializes this SyncPushRequest to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SyncPushRequest&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other.changes, changes)&&(identical(other.idempotencyKey, idempotencyKey) || other.idempotencyKey == idempotencyKey)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,deviceId,cursor,const DeepCollectionEquality().hash(changes),idempotencyKey); @override String toString() { return 'SyncPushRequest(deviceId: $deviceId, cursor: $cursor, changes: $changes, idempotencyKey: $idempotencyKey)'; } } /// @nodoc abstract mixin class $SyncPushRequestCopyWith<$Res> { factory $SyncPushRequestCopyWith(SyncPushRequest value, $Res Function(SyncPushRequest) _then) = _$SyncPushRequestCopyWithImpl; @useResult $Res call({ String deviceId, String? cursor, List changes, String idempotencyKey }); } /// @nodoc class _$SyncPushRequestCopyWithImpl<$Res> implements $SyncPushRequestCopyWith<$Res> { _$SyncPushRequestCopyWithImpl(this._self, this._then); final SyncPushRequest _self; final $Res Function(SyncPushRequest) _then; /// Create a copy of SyncPushRequest /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? deviceId = null,Object? cursor = freezed,Object? changes = null,Object? idempotencyKey = null,}) { return _then(_self.copyWith( deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable as String,cursor: freezed == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String?,changes: null == changes ? _self.changes : changes // ignore: cast_nullable_to_non_nullable as List,idempotencyKey: null == idempotencyKey ? _self.idempotencyKey : idempotencyKey // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [SyncPushRequest]. extension SyncPushRequestPatterns on SyncPushRequest { /// 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( _SyncPushRequest value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SyncPushRequest() 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( _SyncPushRequest value) $default,){ final _that = this; switch (_that) { case _SyncPushRequest(): 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( _SyncPushRequest value)? $default,){ final _that = this; switch (_that) { case _SyncPushRequest() 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 deviceId, String? cursor, List changes, String idempotencyKey)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SyncPushRequest() when $default != null: return $default(_that.deviceId,_that.cursor,_that.changes,_that.idempotencyKey);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 deviceId, String? cursor, List changes, String idempotencyKey) $default,) {final _that = this; switch (_that) { case _SyncPushRequest(): return $default(_that.deviceId,_that.cursor,_that.changes,_that.idempotencyKey);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 deviceId, String? cursor, List changes, String idempotencyKey)? $default,) {final _that = this; switch (_that) { case _SyncPushRequest() when $default != null: return $default(_that.deviceId,_that.cursor,_that.changes,_that.idempotencyKey);case _: return null; } } } /// @nodoc @JsonSerializable(explicitToJson: true) class _SyncPushRequest implements SyncPushRequest { const _SyncPushRequest({required this.deviceId, this.cursor, required final List changes, required this.idempotencyKey}): _changes = changes; factory _SyncPushRequest.fromJson(Map json) => _$SyncPushRequestFromJson(json); @override final String deviceId; @override final String? cursor; final List _changes; @override List get changes { if (_changes is EqualUnmodifiableListView) return _changes; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_changes); } @override final String idempotencyKey; /// Create a copy of SyncPushRequest /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SyncPushRequestCopyWith<_SyncPushRequest> get copyWith => __$SyncPushRequestCopyWithImpl<_SyncPushRequest>(this, _$identity); @override Map toJson() { return _$SyncPushRequestToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SyncPushRequest&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other._changes, _changes)&&(identical(other.idempotencyKey, idempotencyKey) || other.idempotencyKey == idempotencyKey)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,deviceId,cursor,const DeepCollectionEquality().hash(_changes),idempotencyKey); @override String toString() { return 'SyncPushRequest(deviceId: $deviceId, cursor: $cursor, changes: $changes, idempotencyKey: $idempotencyKey)'; } } /// @nodoc abstract mixin class _$SyncPushRequestCopyWith<$Res> implements $SyncPushRequestCopyWith<$Res> { factory _$SyncPushRequestCopyWith(_SyncPushRequest value, $Res Function(_SyncPushRequest) _then) = __$SyncPushRequestCopyWithImpl; @override @useResult $Res call({ String deviceId, String? cursor, List changes, String idempotencyKey }); } /// @nodoc class __$SyncPushRequestCopyWithImpl<$Res> implements _$SyncPushRequestCopyWith<$Res> { __$SyncPushRequestCopyWithImpl(this._self, this._then); final _SyncPushRequest _self; final $Res Function(_SyncPushRequest) _then; /// Create a copy of SyncPushRequest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? deviceId = null,Object? cursor = freezed,Object? changes = null,Object? idempotencyKey = null,}) { return _then(_SyncPushRequest( deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable as String,cursor: freezed == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String?,changes: null == changes ? _self._changes : changes // ignore: cast_nullable_to_non_nullable as List,idempotencyKey: null == idempotencyKey ? _self.idempotencyKey : idempotencyKey // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$MutationAck { String get clientMutationId; String? get serverMutationId; DateTime? get acceptedAt; /// Create a copy of MutationAck /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $MutationAckCopyWith get copyWith => _$MutationAckCopyWithImpl(this as MutationAck, _$identity); /// Serializes this MutationAck to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is MutationAck&&(identical(other.clientMutationId, clientMutationId) || other.clientMutationId == clientMutationId)&&(identical(other.serverMutationId, serverMutationId) || other.serverMutationId == serverMutationId)&&(identical(other.acceptedAt, acceptedAt) || other.acceptedAt == acceptedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,clientMutationId,serverMutationId,acceptedAt); @override String toString() { return 'MutationAck(clientMutationId: $clientMutationId, serverMutationId: $serverMutationId, acceptedAt: $acceptedAt)'; } } /// @nodoc abstract mixin class $MutationAckCopyWith<$Res> { factory $MutationAckCopyWith(MutationAck value, $Res Function(MutationAck) _then) = _$MutationAckCopyWithImpl; @useResult $Res call({ String clientMutationId, String? serverMutationId, DateTime? acceptedAt }); } /// @nodoc class _$MutationAckCopyWithImpl<$Res> implements $MutationAckCopyWith<$Res> { _$MutationAckCopyWithImpl(this._self, this._then); final MutationAck _self; final $Res Function(MutationAck) _then; /// Create a copy of MutationAck /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? clientMutationId = null,Object? serverMutationId = freezed,Object? acceptedAt = freezed,}) { return _then(_self.copyWith( clientMutationId: null == clientMutationId ? _self.clientMutationId : clientMutationId // ignore: cast_nullable_to_non_nullable as String,serverMutationId: freezed == serverMutationId ? _self.serverMutationId : serverMutationId // ignore: cast_nullable_to_non_nullable as String?,acceptedAt: freezed == acceptedAt ? _self.acceptedAt : acceptedAt // ignore: cast_nullable_to_non_nullable as DateTime?, )); } } /// Adds pattern-matching-related methods to [MutationAck]. extension MutationAckPatterns on MutationAck { /// 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( _MutationAck value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _MutationAck() 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( _MutationAck value) $default,){ final _that = this; switch (_that) { case _MutationAck(): 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( _MutationAck value)? $default,){ final _that = this; switch (_that) { case _MutationAck() 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 clientMutationId, String? serverMutationId, DateTime? acceptedAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _MutationAck() when $default != null: return $default(_that.clientMutationId,_that.serverMutationId,_that.acceptedAt);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 clientMutationId, String? serverMutationId, DateTime? acceptedAt) $default,) {final _that = this; switch (_that) { case _MutationAck(): return $default(_that.clientMutationId,_that.serverMutationId,_that.acceptedAt);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 clientMutationId, String? serverMutationId, DateTime? acceptedAt)? $default,) {final _that = this; switch (_that) { case _MutationAck() when $default != null: return $default(_that.clientMutationId,_that.serverMutationId,_that.acceptedAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _MutationAck implements MutationAck { const _MutationAck({required this.clientMutationId, this.serverMutationId, this.acceptedAt}); factory _MutationAck.fromJson(Map json) => _$MutationAckFromJson(json); @override final String clientMutationId; @override final String? serverMutationId; @override final DateTime? acceptedAt; /// Create a copy of MutationAck /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$MutationAckCopyWith<_MutationAck> get copyWith => __$MutationAckCopyWithImpl<_MutationAck>(this, _$identity); @override Map toJson() { return _$MutationAckToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _MutationAck&&(identical(other.clientMutationId, clientMutationId) || other.clientMutationId == clientMutationId)&&(identical(other.serverMutationId, serverMutationId) || other.serverMutationId == serverMutationId)&&(identical(other.acceptedAt, acceptedAt) || other.acceptedAt == acceptedAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,clientMutationId,serverMutationId,acceptedAt); @override String toString() { return 'MutationAck(clientMutationId: $clientMutationId, serverMutationId: $serverMutationId, acceptedAt: $acceptedAt)'; } } /// @nodoc abstract mixin class _$MutationAckCopyWith<$Res> implements $MutationAckCopyWith<$Res> { factory _$MutationAckCopyWith(_MutationAck value, $Res Function(_MutationAck) _then) = __$MutationAckCopyWithImpl; @override @useResult $Res call({ String clientMutationId, String? serverMutationId, DateTime? acceptedAt }); } /// @nodoc class __$MutationAckCopyWithImpl<$Res> implements _$MutationAckCopyWith<$Res> { __$MutationAckCopyWithImpl(this._self, this._then); final _MutationAck _self; final $Res Function(_MutationAck) _then; /// Create a copy of MutationAck /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? clientMutationId = null,Object? serverMutationId = freezed,Object? acceptedAt = freezed,}) { return _then(_MutationAck( clientMutationId: null == clientMutationId ? _self.clientMutationId : clientMutationId // ignore: cast_nullable_to_non_nullable as String,serverMutationId: freezed == serverMutationId ? _self.serverMutationId : serverMutationId // ignore: cast_nullable_to_non_nullable as String?,acceptedAt: freezed == acceptedAt ? _self.acceptedAt : acceptedAt // ignore: cast_nullable_to_non_nullable as DateTime?, )); } } /// @nodoc mixin _$MutationRejection { String get clientMutationId; String get code; String get message; /// Create a copy of MutationRejection /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $MutationRejectionCopyWith get copyWith => _$MutationRejectionCopyWithImpl(this as MutationRejection, _$identity); /// Serializes this MutationRejection to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is MutationRejection&&(identical(other.clientMutationId, clientMutationId) || other.clientMutationId == clientMutationId)&&(identical(other.code, code) || other.code == code)&&(identical(other.message, message) || other.message == message)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,clientMutationId,code,message); @override String toString() { return 'MutationRejection(clientMutationId: $clientMutationId, code: $code, message: $message)'; } } /// @nodoc abstract mixin class $MutationRejectionCopyWith<$Res> { factory $MutationRejectionCopyWith(MutationRejection value, $Res Function(MutationRejection) _then) = _$MutationRejectionCopyWithImpl; @useResult $Res call({ String clientMutationId, String code, String message }); } /// @nodoc class _$MutationRejectionCopyWithImpl<$Res> implements $MutationRejectionCopyWith<$Res> { _$MutationRejectionCopyWithImpl(this._self, this._then); final MutationRejection _self; final $Res Function(MutationRejection) _then; /// Create a copy of MutationRejection /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? clientMutationId = null,Object? code = null,Object? message = null,}) { return _then(_self.copyWith( clientMutationId: null == clientMutationId ? _self.clientMutationId : clientMutationId // ignore: cast_nullable_to_non_nullable as String,code: null == code ? _self.code : code // ignore: cast_nullable_to_non_nullable as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [MutationRejection]. extension MutationRejectionPatterns on MutationRejection { /// 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( _MutationRejection value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _MutationRejection() 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( _MutationRejection value) $default,){ final _that = this; switch (_that) { case _MutationRejection(): 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( _MutationRejection value)? $default,){ final _that = this; switch (_that) { case _MutationRejection() 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 clientMutationId, String code, String message)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _MutationRejection() when $default != null: return $default(_that.clientMutationId,_that.code,_that.message);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 clientMutationId, String code, String message) $default,) {final _that = this; switch (_that) { case _MutationRejection(): return $default(_that.clientMutationId,_that.code,_that.message);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 clientMutationId, String code, String message)? $default,) {final _that = this; switch (_that) { case _MutationRejection() when $default != null: return $default(_that.clientMutationId,_that.code,_that.message);case _: return null; } } } /// @nodoc @JsonSerializable() class _MutationRejection implements MutationRejection { const _MutationRejection({required this.clientMutationId, required this.code, required this.message}); factory _MutationRejection.fromJson(Map json) => _$MutationRejectionFromJson(json); @override final String clientMutationId; @override final String code; @override final String message; /// Create a copy of MutationRejection /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$MutationRejectionCopyWith<_MutationRejection> get copyWith => __$MutationRejectionCopyWithImpl<_MutationRejection>(this, _$identity); @override Map toJson() { return _$MutationRejectionToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _MutationRejection&&(identical(other.clientMutationId, clientMutationId) || other.clientMutationId == clientMutationId)&&(identical(other.code, code) || other.code == code)&&(identical(other.message, message) || other.message == message)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,clientMutationId,code,message); @override String toString() { return 'MutationRejection(clientMutationId: $clientMutationId, code: $code, message: $message)'; } } /// @nodoc abstract mixin class _$MutationRejectionCopyWith<$Res> implements $MutationRejectionCopyWith<$Res> { factory _$MutationRejectionCopyWith(_MutationRejection value, $Res Function(_MutationRejection) _then) = __$MutationRejectionCopyWithImpl; @override @useResult $Res call({ String clientMutationId, String code, String message }); } /// @nodoc class __$MutationRejectionCopyWithImpl<$Res> implements _$MutationRejectionCopyWith<$Res> { __$MutationRejectionCopyWithImpl(this._self, this._then); final _MutationRejection _self; final $Res Function(_MutationRejection) _then; /// Create a copy of MutationRejection /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? clientMutationId = null,Object? code = null,Object? message = null,}) { return _then(_MutationRejection( clientMutationId: null == clientMutationId ? _self.clientMutationId : clientMutationId // ignore: cast_nullable_to_non_nullable as String,code: null == code ? _self.code : code // ignore: cast_nullable_to_non_nullable as String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable as String, )); } } /// @nodoc mixin _$SyncPushResult { String get cursor; List get accepted; List get rejected; /// Create a copy of SyncPushResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SyncPushResultCopyWith get copyWith => _$SyncPushResultCopyWithImpl(this as SyncPushResult, _$identity); /// Serializes this SyncPushResult to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SyncPushResult&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other.accepted, accepted)&&const DeepCollectionEquality().equals(other.rejected, rejected)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,cursor,const DeepCollectionEquality().hash(accepted),const DeepCollectionEquality().hash(rejected)); @override String toString() { return 'SyncPushResult(cursor: $cursor, accepted: $accepted, rejected: $rejected)'; } } /// @nodoc abstract mixin class $SyncPushResultCopyWith<$Res> { factory $SyncPushResultCopyWith(SyncPushResult value, $Res Function(SyncPushResult) _then) = _$SyncPushResultCopyWithImpl; @useResult $Res call({ String cursor, List accepted, List rejected }); } /// @nodoc class _$SyncPushResultCopyWithImpl<$Res> implements $SyncPushResultCopyWith<$Res> { _$SyncPushResultCopyWithImpl(this._self, this._then); final SyncPushResult _self; final $Res Function(SyncPushResult) _then; /// Create a copy of SyncPushResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? cursor = null,Object? accepted = null,Object? rejected = null,}) { return _then(_self.copyWith( cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String,accepted: null == accepted ? _self.accepted : accepted // ignore: cast_nullable_to_non_nullable as List,rejected: null == rejected ? _self.rejected : rejected // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [SyncPushResult]. extension SyncPushResultPatterns on SyncPushResult { /// 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( _SyncPushResult value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SyncPushResult() 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( _SyncPushResult value) $default,){ final _that = this; switch (_that) { case _SyncPushResult(): 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( _SyncPushResult value)? $default,){ final _that = this; switch (_that) { case _SyncPushResult() 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 cursor, List accepted, List rejected)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SyncPushResult() when $default != null: return $default(_that.cursor,_that.accepted,_that.rejected);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 cursor, List accepted, List rejected) $default,) {final _that = this; switch (_that) { case _SyncPushResult(): return $default(_that.cursor,_that.accepted,_that.rejected);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 cursor, List accepted, List rejected)? $default,) {final _that = this; switch (_that) { case _SyncPushResult() when $default != null: return $default(_that.cursor,_that.accepted,_that.rejected);case _: return null; } } } /// @nodoc @JsonSerializable(explicitToJson: true) class _SyncPushResult implements SyncPushResult { const _SyncPushResult({required this.cursor, final List accepted = const [], final List rejected = const []}): _accepted = accepted,_rejected = rejected; factory _SyncPushResult.fromJson(Map json) => _$SyncPushResultFromJson(json); @override final String cursor; final List _accepted; @override@JsonKey() List get accepted { if (_accepted is EqualUnmodifiableListView) return _accepted; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_accepted); } final List _rejected; @override@JsonKey() List get rejected { if (_rejected is EqualUnmodifiableListView) return _rejected; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_rejected); } /// Create a copy of SyncPushResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SyncPushResultCopyWith<_SyncPushResult> get copyWith => __$SyncPushResultCopyWithImpl<_SyncPushResult>(this, _$identity); @override Map toJson() { return _$SyncPushResultToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SyncPushResult&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other._accepted, _accepted)&&const DeepCollectionEquality().equals(other._rejected, _rejected)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,cursor,const DeepCollectionEquality().hash(_accepted),const DeepCollectionEquality().hash(_rejected)); @override String toString() { return 'SyncPushResult(cursor: $cursor, accepted: $accepted, rejected: $rejected)'; } } /// @nodoc abstract mixin class _$SyncPushResultCopyWith<$Res> implements $SyncPushResultCopyWith<$Res> { factory _$SyncPushResultCopyWith(_SyncPushResult value, $Res Function(_SyncPushResult) _then) = __$SyncPushResultCopyWithImpl; @override @useResult $Res call({ String cursor, List accepted, List rejected }); } /// @nodoc class __$SyncPushResultCopyWithImpl<$Res> implements _$SyncPushResultCopyWith<$Res> { __$SyncPushResultCopyWithImpl(this._self, this._then); final _SyncPushResult _self; final $Res Function(_SyncPushResult) _then; /// Create a copy of SyncPushResult /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? cursor = null,Object? accepted = null,Object? rejected = null,}) { return _then(_SyncPushResult( cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String,accepted: null == accepted ? _self._accepted : accepted // ignore: cast_nullable_to_non_nullable as List,rejected: null == rejected ? _self._rejected : rejected // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$SyncPullResult { String get cursor; List get changes; /// Create a copy of SyncPullResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SyncPullResultCopyWith get copyWith => _$SyncPullResultCopyWithImpl(this as SyncPullResult, _$identity); /// Serializes this SyncPullResult to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SyncPullResult&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other.changes, changes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,cursor,const DeepCollectionEquality().hash(changes)); @override String toString() { return 'SyncPullResult(cursor: $cursor, changes: $changes)'; } } /// @nodoc abstract mixin class $SyncPullResultCopyWith<$Res> { factory $SyncPullResultCopyWith(SyncPullResult value, $Res Function(SyncPullResult) _then) = _$SyncPullResultCopyWithImpl; @useResult $Res call({ String cursor, List changes }); } /// @nodoc class _$SyncPullResultCopyWithImpl<$Res> implements $SyncPullResultCopyWith<$Res> { _$SyncPullResultCopyWithImpl(this._self, this._then); final SyncPullResult _self; final $Res Function(SyncPullResult) _then; /// Create a copy of SyncPullResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? cursor = null,Object? changes = null,}) { return _then(_self.copyWith( cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String,changes: null == changes ? _self.changes : changes // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [SyncPullResult]. extension SyncPullResultPatterns on SyncPullResult { /// 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( _SyncPullResult value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SyncPullResult() 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( _SyncPullResult value) $default,){ final _that = this; switch (_that) { case _SyncPullResult(): 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( _SyncPullResult value)? $default,){ final _that = this; switch (_that) { case _SyncPullResult() 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 cursor, List changes)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SyncPullResult() when $default != null: return $default(_that.cursor,_that.changes);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 cursor, List changes) $default,) {final _that = this; switch (_that) { case _SyncPullResult(): return $default(_that.cursor,_that.changes);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 cursor, List changes)? $default,) {final _that = this; switch (_that) { case _SyncPullResult() when $default != null: return $default(_that.cursor,_that.changes);case _: return null; } } } /// @nodoc @JsonSerializable(explicitToJson: true) class _SyncPullResult implements SyncPullResult { const _SyncPullResult({required this.cursor, final List changes = const []}): _changes = changes; factory _SyncPullResult.fromJson(Map json) => _$SyncPullResultFromJson(json); @override final String cursor; final List _changes; @override@JsonKey() List get changes { if (_changes is EqualUnmodifiableListView) return _changes; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_changes); } /// Create a copy of SyncPullResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SyncPullResultCopyWith<_SyncPullResult> get copyWith => __$SyncPullResultCopyWithImpl<_SyncPullResult>(this, _$identity); @override Map toJson() { return _$SyncPullResultToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SyncPullResult&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other._changes, _changes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,cursor,const DeepCollectionEquality().hash(_changes)); @override String toString() { return 'SyncPullResult(cursor: $cursor, changes: $changes)'; } } /// @nodoc abstract mixin class _$SyncPullResultCopyWith<$Res> implements $SyncPullResultCopyWith<$Res> { factory _$SyncPullResultCopyWith(_SyncPullResult value, $Res Function(_SyncPullResult) _then) = __$SyncPullResultCopyWithImpl; @override @useResult $Res call({ String cursor, List changes }); } /// @nodoc class __$SyncPullResultCopyWithImpl<$Res> implements _$SyncPullResultCopyWith<$Res> { __$SyncPullResultCopyWithImpl(this._self, this._then); final _SyncPullResult _self; final $Res Function(_SyncPullResult) _then; /// Create a copy of SyncPullResult /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? cursor = null,Object? changes = null,}) { return _then(_SyncPullResult( cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String,changes: null == changes ? _self._changes : changes // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$SignalItem { String get id; String get type; String get title; String? get description; String? get personId; DateTime get createdAt; Map? get metadata; /// Create a copy of SignalItem /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SignalItemCopyWith get copyWith => _$SignalItemCopyWithImpl(this as SignalItem, _$identity); /// Serializes this SignalItem to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SignalItem&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.personId, personId) || other.personId == personId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&const DeepCollectionEquality().equals(other.metadata, metadata)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,type,title,description,personId,createdAt,const DeepCollectionEquality().hash(metadata)); @override String toString() { return 'SignalItem(id: $id, type: $type, title: $title, description: $description, personId: $personId, createdAt: $createdAt, metadata: $metadata)'; } } /// @nodoc abstract mixin class $SignalItemCopyWith<$Res> { factory $SignalItemCopyWith(SignalItem value, $Res Function(SignalItem) _then) = _$SignalItemCopyWithImpl; @useResult $Res call({ String id, String type, String title, String? description, String? personId, DateTime createdAt, Map? metadata }); } /// @nodoc class _$SignalItemCopyWithImpl<$Res> implements $SignalItemCopyWith<$Res> { _$SignalItemCopyWithImpl(this._self, this._then); final SignalItem _self; final $Res Function(SignalItem) _then; /// Create a copy of SignalItem /// 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? description = freezed,Object? personId = freezed,Object? createdAt = null,Object? metadata = freezed,}) { 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,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?,personId: freezed == personId ? _self.personId : personId // ignore: cast_nullable_to_non_nullable as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime,metadata: freezed == metadata ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable as Map?, )); } } /// Adds pattern-matching-related methods to [SignalItem]. extension SignalItemPatterns on SignalItem { /// 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( _SignalItem value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SignalItem() 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( _SignalItem value) $default,){ final _that = this; switch (_that) { case _SignalItem(): 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( _SignalItem value)? $default,){ final _that = this; switch (_that) { case _SignalItem() 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 type, String title, String? description, String? personId, DateTime createdAt, Map? metadata)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SignalItem() when $default != null: return $default(_that.id,_that.type,_that.title,_that.description,_that.personId,_that.createdAt,_that.metadata);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 type, String title, String? description, String? personId, DateTime createdAt, Map? metadata) $default,) {final _that = this; switch (_that) { case _SignalItem(): return $default(_that.id,_that.type,_that.title,_that.description,_that.personId,_that.createdAt,_that.metadata);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 type, String title, String? description, String? personId, DateTime createdAt, Map? metadata)? $default,) {final _that = this; switch (_that) { case _SignalItem() when $default != null: return $default(_that.id,_that.type,_that.title,_that.description,_that.personId,_that.createdAt,_that.metadata);case _: return null; } } } /// @nodoc @JsonSerializable() class _SignalItem implements SignalItem { const _SignalItem({required this.id, required this.type, required this.title, this.description, this.personId, required this.createdAt, final Map? metadata}): _metadata = metadata; factory _SignalItem.fromJson(Map json) => _$SignalItemFromJson(json); @override final String id; @override final String type; @override final String title; @override final String? description; @override final String? personId; @override final DateTime createdAt; final Map? _metadata; @override Map? get metadata { final value = _metadata; if (value == null) return null; if (_metadata is EqualUnmodifiableMapView) return _metadata; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(value); } /// Create a copy of SignalItem /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SignalItemCopyWith<_SignalItem> get copyWith => __$SignalItemCopyWithImpl<_SignalItem>(this, _$identity); @override Map toJson() { return _$SignalItemToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SignalItem&&(identical(other.id, id) || other.id == id)&&(identical(other.type, type) || other.type == type)&&(identical(other.title, title) || other.title == title)&&(identical(other.description, description) || other.description == description)&&(identical(other.personId, personId) || other.personId == personId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&const DeepCollectionEquality().equals(other._metadata, _metadata)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,type,title,description,personId,createdAt,const DeepCollectionEquality().hash(_metadata)); @override String toString() { return 'SignalItem(id: $id, type: $type, title: $title, description: $description, personId: $personId, createdAt: $createdAt, metadata: $metadata)'; } } /// @nodoc abstract mixin class _$SignalItemCopyWith<$Res> implements $SignalItemCopyWith<$Res> { factory _$SignalItemCopyWith(_SignalItem value, $Res Function(_SignalItem) _then) = __$SignalItemCopyWithImpl; @override @useResult $Res call({ String id, String type, String title, String? description, String? personId, DateTime createdAt, Map? metadata }); } /// @nodoc class __$SignalItemCopyWithImpl<$Res> implements _$SignalItemCopyWith<$Res> { __$SignalItemCopyWithImpl(this._self, this._then); final _SignalItem _self; final $Res Function(_SignalItem) _then; /// Create a copy of SignalItem /// 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? description = freezed,Object? personId = freezed,Object? createdAt = null,Object? metadata = freezed,}) { return _then(_SignalItem( 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,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?,personId: freezed == personId ? _self.personId : personId // ignore: cast_nullable_to_non_nullable as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as DateTime,metadata: freezed == metadata ? _self._metadata : metadata // ignore: cast_nullable_to_non_nullable as Map?, )); } } /// @nodoc mixin _$SignalsFeed { String? get cursor; List get items; /// Create a copy of SignalsFeed /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SignalsFeedCopyWith get copyWith => _$SignalsFeedCopyWithImpl(this as SignalsFeed, _$identity); /// Serializes this SignalsFeed to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SignalsFeed&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other.items, items)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,cursor,const DeepCollectionEquality().hash(items)); @override String toString() { return 'SignalsFeed(cursor: $cursor, items: $items)'; } } /// @nodoc abstract mixin class $SignalsFeedCopyWith<$Res> { factory $SignalsFeedCopyWith(SignalsFeed value, $Res Function(SignalsFeed) _then) = _$SignalsFeedCopyWithImpl; @useResult $Res call({ String? cursor, List items }); } /// @nodoc class _$SignalsFeedCopyWithImpl<$Res> implements $SignalsFeedCopyWith<$Res> { _$SignalsFeedCopyWithImpl(this._self, this._then); final SignalsFeed _self; final $Res Function(SignalsFeed) _then; /// Create a copy of SignalsFeed /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? cursor = freezed,Object? items = null,}) { return _then(_self.copyWith( cursor: freezed == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String?,items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable as List, )); } } /// Adds pattern-matching-related methods to [SignalsFeed]. extension SignalsFeedPatterns on SignalsFeed { /// 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( _SignalsFeed value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SignalsFeed() 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( _SignalsFeed value) $default,){ final _that = this; switch (_that) { case _SignalsFeed(): 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( _SignalsFeed value)? $default,){ final _that = this; switch (_that) { case _SignalsFeed() 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? cursor, List items)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SignalsFeed() when $default != null: return $default(_that.cursor,_that.items);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? cursor, List items) $default,) {final _that = this; switch (_that) { case _SignalsFeed(): return $default(_that.cursor,_that.items);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? cursor, List items)? $default,) {final _that = this; switch (_that) { case _SignalsFeed() when $default != null: return $default(_that.cursor,_that.items);case _: return null; } } } /// @nodoc @JsonSerializable(explicitToJson: true) class _SignalsFeed implements SignalsFeed { const _SignalsFeed({this.cursor, final List items = const []}): _items = items; factory _SignalsFeed.fromJson(Map json) => _$SignalsFeedFromJson(json); @override final String? cursor; final List _items; @override@JsonKey() List get items { if (_items is EqualUnmodifiableListView) return _items; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_items); } /// Create a copy of SignalsFeed /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SignalsFeedCopyWith<_SignalsFeed> get copyWith => __$SignalsFeedCopyWithImpl<_SignalsFeed>(this, _$identity); @override Map toJson() { return _$SignalsFeedToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SignalsFeed&&(identical(other.cursor, cursor) || other.cursor == cursor)&&const DeepCollectionEquality().equals(other._items, _items)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,cursor,const DeepCollectionEquality().hash(_items)); @override String toString() { return 'SignalsFeed(cursor: $cursor, items: $items)'; } } /// @nodoc abstract mixin class _$SignalsFeedCopyWith<$Res> implements $SignalsFeedCopyWith<$Res> { factory _$SignalsFeedCopyWith(_SignalsFeed value, $Res Function(_SignalsFeed) _then) = __$SignalsFeedCopyWithImpl; @override @useResult $Res call({ String? cursor, List items }); } /// @nodoc class __$SignalsFeedCopyWithImpl<$Res> implements _$SignalsFeedCopyWith<$Res> { __$SignalsFeedCopyWithImpl(this._self, this._then); final _SignalsFeed _self; final $Res Function(_SignalsFeed) _then; /// Create a copy of SignalsFeed /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? cursor = freezed,Object? items = null,}) { return _then(_SignalsFeed( cursor: freezed == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable as String?,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable as List, )); } } /// @nodoc mixin _$SignalAckRequest { SignalAction get action; DateTime get at; /// Create a copy of SignalAckRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $SignalAckRequestCopyWith get copyWith => _$SignalAckRequestCopyWithImpl(this as SignalAckRequest, _$identity); /// Serializes this SignalAckRequest to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is SignalAckRequest&&(identical(other.action, action) || other.action == action)&&(identical(other.at, at) || other.at == at)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,action,at); @override String toString() { return 'SignalAckRequest(action: $action, at: $at)'; } } /// @nodoc abstract mixin class $SignalAckRequestCopyWith<$Res> { factory $SignalAckRequestCopyWith(SignalAckRequest value, $Res Function(SignalAckRequest) _then) = _$SignalAckRequestCopyWithImpl; @useResult $Res call({ SignalAction action, DateTime at }); } /// @nodoc class _$SignalAckRequestCopyWithImpl<$Res> implements $SignalAckRequestCopyWith<$Res> { _$SignalAckRequestCopyWithImpl(this._self, this._then); final SignalAckRequest _self; final $Res Function(SignalAckRequest) _then; /// Create a copy of SignalAckRequest /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? action = null,Object? at = null,}) { return _then(_self.copyWith( action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable as SignalAction,at: null == at ? _self.at : at // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// Adds pattern-matching-related methods to [SignalAckRequest]. extension SignalAckRequestPatterns on SignalAckRequest { /// 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( _SignalAckRequest value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _SignalAckRequest() 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( _SignalAckRequest value) $default,){ final _that = this; switch (_that) { case _SignalAckRequest(): 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( _SignalAckRequest value)? $default,){ final _that = this; switch (_that) { case _SignalAckRequest() 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( SignalAction action, DateTime at)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _SignalAckRequest() when $default != null: return $default(_that.action,_that.at);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( SignalAction action, DateTime at) $default,) {final _that = this; switch (_that) { case _SignalAckRequest(): return $default(_that.action,_that.at);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( SignalAction action, DateTime at)? $default,) {final _that = this; switch (_that) { case _SignalAckRequest() when $default != null: return $default(_that.action,_that.at);case _: return null; } } } /// @nodoc @JsonSerializable() class _SignalAckRequest implements SignalAckRequest { const _SignalAckRequest({required this.action, required this.at}); factory _SignalAckRequest.fromJson(Map json) => _$SignalAckRequestFromJson(json); @override final SignalAction action; @override final DateTime at; /// Create a copy of SignalAckRequest /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SignalAckRequestCopyWith<_SignalAckRequest> get copyWith => __$SignalAckRequestCopyWithImpl<_SignalAckRequest>(this, _$identity); @override Map toJson() { return _$SignalAckRequestToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _SignalAckRequest&&(identical(other.action, action) || other.action == action)&&(identical(other.at, at) || other.at == at)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,action,at); @override String toString() { return 'SignalAckRequest(action: $action, at: $at)'; } } /// @nodoc abstract mixin class _$SignalAckRequestCopyWith<$Res> implements $SignalAckRequestCopyWith<$Res> { factory _$SignalAckRequestCopyWith(_SignalAckRequest value, $Res Function(_SignalAckRequest) _then) = __$SignalAckRequestCopyWithImpl; @override @useResult $Res call({ SignalAction action, DateTime at }); } /// @nodoc class __$SignalAckRequestCopyWithImpl<$Res> implements _$SignalAckRequestCopyWith<$Res> { __$SignalAckRequestCopyWithImpl(this._self, this._then); final _SignalAckRequest _self; final $Res Function(_SignalAckRequest) _then; /// Create a copy of SignalAckRequest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? action = null,Object? at = null,}) { return _then(_SignalAckRequest( action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable as SignalAction,at: null == at ? _self.at : at // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// @nodoc mixin _$UploadInitRequest { UploadPurpose get purpose; String get contentType; int get sizeBytes; /// Create a copy of UploadInitRequest /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $UploadInitRequestCopyWith get copyWith => _$UploadInitRequestCopyWithImpl(this as UploadInitRequest, _$identity); /// Serializes this UploadInitRequest to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is UploadInitRequest&&(identical(other.purpose, purpose) || other.purpose == purpose)&&(identical(other.contentType, contentType) || other.contentType == contentType)&&(identical(other.sizeBytes, sizeBytes) || other.sizeBytes == sizeBytes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,purpose,contentType,sizeBytes); @override String toString() { return 'UploadInitRequest(purpose: $purpose, contentType: $contentType, sizeBytes: $sizeBytes)'; } } /// @nodoc abstract mixin class $UploadInitRequestCopyWith<$Res> { factory $UploadInitRequestCopyWith(UploadInitRequest value, $Res Function(UploadInitRequest) _then) = _$UploadInitRequestCopyWithImpl; @useResult $Res call({ UploadPurpose purpose, String contentType, int sizeBytes }); } /// @nodoc class _$UploadInitRequestCopyWithImpl<$Res> implements $UploadInitRequestCopyWith<$Res> { _$UploadInitRequestCopyWithImpl(this._self, this._then); final UploadInitRequest _self; final $Res Function(UploadInitRequest) _then; /// Create a copy of UploadInitRequest /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? purpose = null,Object? contentType = null,Object? sizeBytes = null,}) { return _then(_self.copyWith( purpose: null == purpose ? _self.purpose : purpose // ignore: cast_nullable_to_non_nullable as UploadPurpose,contentType: null == contentType ? _self.contentType : contentType // ignore: cast_nullable_to_non_nullable as String,sizeBytes: null == sizeBytes ? _self.sizeBytes : sizeBytes // ignore: cast_nullable_to_non_nullable as int, )); } } /// Adds pattern-matching-related methods to [UploadInitRequest]. extension UploadInitRequestPatterns on UploadInitRequest { /// 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( _UploadInitRequest value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _UploadInitRequest() 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( _UploadInitRequest value) $default,){ final _that = this; switch (_that) { case _UploadInitRequest(): 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( _UploadInitRequest value)? $default,){ final _that = this; switch (_that) { case _UploadInitRequest() 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( UploadPurpose purpose, String contentType, int sizeBytes)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _UploadInitRequest() when $default != null: return $default(_that.purpose,_that.contentType,_that.sizeBytes);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( UploadPurpose purpose, String contentType, int sizeBytes) $default,) {final _that = this; switch (_that) { case _UploadInitRequest(): return $default(_that.purpose,_that.contentType,_that.sizeBytes);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( UploadPurpose purpose, String contentType, int sizeBytes)? $default,) {final _that = this; switch (_that) { case _UploadInitRequest() when $default != null: return $default(_that.purpose,_that.contentType,_that.sizeBytes);case _: return null; } } } /// @nodoc @JsonSerializable() class _UploadInitRequest implements UploadInitRequest { const _UploadInitRequest({required this.purpose, required this.contentType, required this.sizeBytes}); factory _UploadInitRequest.fromJson(Map json) => _$UploadInitRequestFromJson(json); @override final UploadPurpose purpose; @override final String contentType; @override final int sizeBytes; /// Create a copy of UploadInitRequest /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$UploadInitRequestCopyWith<_UploadInitRequest> get copyWith => __$UploadInitRequestCopyWithImpl<_UploadInitRequest>(this, _$identity); @override Map toJson() { return _$UploadInitRequestToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _UploadInitRequest&&(identical(other.purpose, purpose) || other.purpose == purpose)&&(identical(other.contentType, contentType) || other.contentType == contentType)&&(identical(other.sizeBytes, sizeBytes) || other.sizeBytes == sizeBytes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,purpose,contentType,sizeBytes); @override String toString() { return 'UploadInitRequest(purpose: $purpose, contentType: $contentType, sizeBytes: $sizeBytes)'; } } /// @nodoc abstract mixin class _$UploadInitRequestCopyWith<$Res> implements $UploadInitRequestCopyWith<$Res> { factory _$UploadInitRequestCopyWith(_UploadInitRequest value, $Res Function(_UploadInitRequest) _then) = __$UploadInitRequestCopyWithImpl; @override @useResult $Res call({ UploadPurpose purpose, String contentType, int sizeBytes }); } /// @nodoc class __$UploadInitRequestCopyWithImpl<$Res> implements _$UploadInitRequestCopyWith<$Res> { __$UploadInitRequestCopyWithImpl(this._self, this._then); final _UploadInitRequest _self; final $Res Function(_UploadInitRequest) _then; /// Create a copy of UploadInitRequest /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? purpose = null,Object? contentType = null,Object? sizeBytes = null,}) { return _then(_UploadInitRequest( purpose: null == purpose ? _self.purpose : purpose // ignore: cast_nullable_to_non_nullable as UploadPurpose,contentType: null == contentType ? _self.contentType : contentType // ignore: cast_nullable_to_non_nullable as String,sizeBytes: null == sizeBytes ? _self.sizeBytes : sizeBytes // ignore: cast_nullable_to_non_nullable as int, )); } } /// @nodoc mixin _$UploadInitResult { String get uploadUrl; String get fileId; DateTime get expiresAt; /// Create a copy of UploadInitResult /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $UploadInitResultCopyWith get copyWith => _$UploadInitResultCopyWithImpl(this as UploadInitResult, _$identity); /// Serializes this UploadInitResult to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is UploadInitResult&&(identical(other.uploadUrl, uploadUrl) || other.uploadUrl == uploadUrl)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,uploadUrl,fileId,expiresAt); @override String toString() { return 'UploadInitResult(uploadUrl: $uploadUrl, fileId: $fileId, expiresAt: $expiresAt)'; } } /// @nodoc abstract mixin class $UploadInitResultCopyWith<$Res> { factory $UploadInitResultCopyWith(UploadInitResult value, $Res Function(UploadInitResult) _then) = _$UploadInitResultCopyWithImpl; @useResult $Res call({ String uploadUrl, String fileId, DateTime expiresAt }); } /// @nodoc class _$UploadInitResultCopyWithImpl<$Res> implements $UploadInitResultCopyWith<$Res> { _$UploadInitResultCopyWithImpl(this._self, this._then); final UploadInitResult _self; final $Res Function(UploadInitResult) _then; /// Create a copy of UploadInitResult /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? uploadUrl = null,Object? fileId = null,Object? expiresAt = null,}) { return _then(_self.copyWith( uploadUrl: null == uploadUrl ? _self.uploadUrl : uploadUrl // ignore: cast_nullable_to_non_nullable as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable as String,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// Adds pattern-matching-related methods to [UploadInitResult]. extension UploadInitResultPatterns on UploadInitResult { /// 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( _UploadInitResult value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _UploadInitResult() 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( _UploadInitResult value) $default,){ final _that = this; switch (_that) { case _UploadInitResult(): 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( _UploadInitResult value)? $default,){ final _that = this; switch (_that) { case _UploadInitResult() 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 uploadUrl, String fileId, DateTime expiresAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _UploadInitResult() when $default != null: return $default(_that.uploadUrl,_that.fileId,_that.expiresAt);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 uploadUrl, String fileId, DateTime expiresAt) $default,) {final _that = this; switch (_that) { case _UploadInitResult(): return $default(_that.uploadUrl,_that.fileId,_that.expiresAt);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 uploadUrl, String fileId, DateTime expiresAt)? $default,) {final _that = this; switch (_that) { case _UploadInitResult() when $default != null: return $default(_that.uploadUrl,_that.fileId,_that.expiresAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _UploadInitResult implements UploadInitResult { const _UploadInitResult({required this.uploadUrl, required this.fileId, required this.expiresAt}); factory _UploadInitResult.fromJson(Map json) => _$UploadInitResultFromJson(json); @override final String uploadUrl; @override final String fileId; @override final DateTime expiresAt; /// Create a copy of UploadInitResult /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$UploadInitResultCopyWith<_UploadInitResult> get copyWith => __$UploadInitResultCopyWithImpl<_UploadInitResult>(this, _$identity); @override Map toJson() { return _$UploadInitResultToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _UploadInitResult&&(identical(other.uploadUrl, uploadUrl) || other.uploadUrl == uploadUrl)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,uploadUrl,fileId,expiresAt); @override String toString() { return 'UploadInitResult(uploadUrl: $uploadUrl, fileId: $fileId, expiresAt: $expiresAt)'; } } /// @nodoc abstract mixin class _$UploadInitResultCopyWith<$Res> implements $UploadInitResultCopyWith<$Res> { factory _$UploadInitResultCopyWith(_UploadInitResult value, $Res Function(_UploadInitResult) _then) = __$UploadInitResultCopyWithImpl; @override @useResult $Res call({ String uploadUrl, String fileId, DateTime expiresAt }); } /// @nodoc class __$UploadInitResultCopyWithImpl<$Res> implements _$UploadInitResultCopyWith<$Res> { __$UploadInitResultCopyWithImpl(this._self, this._then); final _UploadInitResult _self; final $Res Function(_UploadInitResult) _then; /// Create a copy of UploadInitResult /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? uploadUrl = null,Object? fileId = null,Object? expiresAt = null,}) { return _then(_UploadInitResult( uploadUrl: null == uploadUrl ? _self.uploadUrl : uploadUrl // ignore: cast_nullable_to_non_nullable as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable as String,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// @nodoc mixin _$DownloadUrl { String get downloadUrl; DateTime get expiresAt; /// Create a copy of DownloadUrl /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $DownloadUrlCopyWith get copyWith => _$DownloadUrlCopyWithImpl(this as DownloadUrl, _$identity); /// Serializes this DownloadUrl to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is DownloadUrl&&(identical(other.downloadUrl, downloadUrl) || other.downloadUrl == downloadUrl)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,downloadUrl,expiresAt); @override String toString() { return 'DownloadUrl(downloadUrl: $downloadUrl, expiresAt: $expiresAt)'; } } /// @nodoc abstract mixin class $DownloadUrlCopyWith<$Res> { factory $DownloadUrlCopyWith(DownloadUrl value, $Res Function(DownloadUrl) _then) = _$DownloadUrlCopyWithImpl; @useResult $Res call({ String downloadUrl, DateTime expiresAt }); } /// @nodoc class _$DownloadUrlCopyWithImpl<$Res> implements $DownloadUrlCopyWith<$Res> { _$DownloadUrlCopyWithImpl(this._self, this._then); final DownloadUrl _self; final $Res Function(DownloadUrl) _then; /// Create a copy of DownloadUrl /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? downloadUrl = null,Object? expiresAt = null,}) { return _then(_self.copyWith( downloadUrl: null == downloadUrl ? _self.downloadUrl : downloadUrl // ignore: cast_nullable_to_non_nullable as String,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } } /// Adds pattern-matching-related methods to [DownloadUrl]. extension DownloadUrlPatterns on DownloadUrl { /// 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( _DownloadUrl value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _DownloadUrl() 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( _DownloadUrl value) $default,){ final _that = this; switch (_that) { case _DownloadUrl(): 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( _DownloadUrl value)? $default,){ final _that = this; switch (_that) { case _DownloadUrl() 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 downloadUrl, DateTime expiresAt)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _DownloadUrl() when $default != null: return $default(_that.downloadUrl,_that.expiresAt);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 downloadUrl, DateTime expiresAt) $default,) {final _that = this; switch (_that) { case _DownloadUrl(): return $default(_that.downloadUrl,_that.expiresAt);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 downloadUrl, DateTime expiresAt)? $default,) {final _that = this; switch (_that) { case _DownloadUrl() when $default != null: return $default(_that.downloadUrl,_that.expiresAt);case _: return null; } } } /// @nodoc @JsonSerializable() class _DownloadUrl implements DownloadUrl { const _DownloadUrl({required this.downloadUrl, required this.expiresAt}); factory _DownloadUrl.fromJson(Map json) => _$DownloadUrlFromJson(json); @override final String downloadUrl; @override final DateTime expiresAt; /// Create a copy of DownloadUrl /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$DownloadUrlCopyWith<_DownloadUrl> get copyWith => __$DownloadUrlCopyWithImpl<_DownloadUrl>(this, _$identity); @override Map toJson() { return _$DownloadUrlToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _DownloadUrl&&(identical(other.downloadUrl, downloadUrl) || other.downloadUrl == downloadUrl)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,downloadUrl,expiresAt); @override String toString() { return 'DownloadUrl(downloadUrl: $downloadUrl, expiresAt: $expiresAt)'; } } /// @nodoc abstract mixin class _$DownloadUrlCopyWith<$Res> implements $DownloadUrlCopyWith<$Res> { factory _$DownloadUrlCopyWith(_DownloadUrl value, $Res Function(_DownloadUrl) _then) = __$DownloadUrlCopyWithImpl; @override @useResult $Res call({ String downloadUrl, DateTime expiresAt }); } /// @nodoc class __$DownloadUrlCopyWithImpl<$Res> implements _$DownloadUrlCopyWith<$Res> { __$DownloadUrlCopyWithImpl(this._self, this._then); final _DownloadUrl _self; final $Res Function(_DownloadUrl) _then; /// Create a copy of DownloadUrl /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? downloadUrl = null,Object? expiresAt = null,}) { return _then(_DownloadUrl( downloadUrl: null == downloadUrl ? _self.downloadUrl : downloadUrl // ignore: cast_nullable_to_non_nullable as String,expiresAt: null == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable as DateTime, )); } } // dart format on