feat: Add optional agentTypeId field to RegisterRequest model.
This commit is contained in:
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$RegisterRequest {
|
||||
|
||||
String get email; String get password; String get role; String? get firstName; String? get lastName;
|
||||
String get email; String get password; String get role; String? get firstName; String? get lastName; String? get agentTypeId;
|
||||
/// Create a copy of RegisterRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $RegisterRequestCopyWith<RegisterRequest> get copyWith => _$RegisterRequestCopyW
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is RegisterRequest&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.role, role) || other.role == role)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is RegisterRequest&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.role, role) || other.role == role)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.agentTypeId, agentTypeId) || other.agentTypeId == agentTypeId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,email,password,role,firstName,lastName);
|
||||
int get hashCode => Object.hash(runtimeType,email,password,role,firstName,lastName,agentTypeId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RegisterRequest(email: $email, password: $password, role: $role, firstName: $firstName, lastName: $lastName)';
|
||||
return 'RegisterRequest(email: $email, password: $password, role: $role, firstName: $firstName, lastName: $lastName, agentTypeId: $agentTypeId)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $RegisterRequestCopyWith<$Res> {
|
||||
factory $RegisterRequestCopyWith(RegisterRequest value, $Res Function(RegisterRequest) _then) = _$RegisterRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String email, String password, String role, String? firstName, String? lastName
|
||||
String email, String password, String role, String? firstName, String? lastName, String? agentTypeId
|
||||
});
|
||||
|
||||
|
||||
@@ -65,13 +65,14 @@ class _$RegisterRequestCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of RegisterRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? email = null,Object? password = null,Object? role = null,Object? firstName = freezed,Object? lastName = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? email = null,Object? password = null,Object? role = null,Object? firstName = freezed,Object? lastName = freezed,Object? agentTypeId = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as String,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,agentTypeId: freezed == agentTypeId ? _self.agentTypeId : agentTypeId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -157,10 +158,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String email, String password, String role, String? firstName, String? lastName)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String email, String password, String role, String? firstName, String? lastName, String? agentTypeId)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _RegisterRequest() when $default != null:
|
||||
return $default(_that.email,_that.password,_that.role,_that.firstName,_that.lastName);case _:
|
||||
return $default(_that.email,_that.password,_that.role,_that.firstName,_that.lastName,_that.agentTypeId);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -178,10 +179,10 @@ return $default(_that.email,_that.password,_that.role,_that.firstName,_that.last
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String email, String password, String role, String? firstName, String? lastName) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String email, String password, String role, String? firstName, String? lastName, String? agentTypeId) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _RegisterRequest():
|
||||
return $default(_that.email,_that.password,_that.role,_that.firstName,_that.lastName);case _:
|
||||
return $default(_that.email,_that.password,_that.role,_that.firstName,_that.lastName,_that.agentTypeId);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -198,10 +199,10 @@ return $default(_that.email,_that.password,_that.role,_that.firstName,_that.last
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String email, String password, String role, String? firstName, String? lastName)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String email, String password, String role, String? firstName, String? lastName, String? agentTypeId)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _RegisterRequest() when $default != null:
|
||||
return $default(_that.email,_that.password,_that.role,_that.firstName,_that.lastName);case _:
|
||||
return $default(_that.email,_that.password,_that.role,_that.firstName,_that.lastName,_that.agentTypeId);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -213,7 +214,7 @@ return $default(_that.email,_that.password,_that.role,_that.firstName,_that.last
|
||||
@JsonSerializable()
|
||||
|
||||
class _RegisterRequest implements RegisterRequest {
|
||||
const _RegisterRequest({required this.email, required this.password, required this.role, this.firstName, this.lastName});
|
||||
const _RegisterRequest({required this.email, required this.password, required this.role, this.firstName, this.lastName, this.agentTypeId});
|
||||
factory _RegisterRequest.fromJson(Map<String, dynamic> json) => _$RegisterRequestFromJson(json);
|
||||
|
||||
@override final String email;
|
||||
@@ -221,6 +222,7 @@ class _RegisterRequest implements RegisterRequest {
|
||||
@override final String role;
|
||||
@override final String? firstName;
|
||||
@override final String? lastName;
|
||||
@override final String? agentTypeId;
|
||||
|
||||
/// Create a copy of RegisterRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -235,16 +237,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RegisterRequest&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.role, role) || other.role == role)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RegisterRequest&&(identical(other.email, email) || other.email == email)&&(identical(other.password, password) || other.password == password)&&(identical(other.role, role) || other.role == role)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.agentTypeId, agentTypeId) || other.agentTypeId == agentTypeId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,email,password,role,firstName,lastName);
|
||||
int get hashCode => Object.hash(runtimeType,email,password,role,firstName,lastName,agentTypeId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RegisterRequest(email: $email, password: $password, role: $role, firstName: $firstName, lastName: $lastName)';
|
||||
return 'RegisterRequest(email: $email, password: $password, role: $role, firstName: $firstName, lastName: $lastName, agentTypeId: $agentTypeId)';
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +257,7 @@ abstract mixin class _$RegisterRequestCopyWith<$Res> implements $RegisterRequest
|
||||
factory _$RegisterRequestCopyWith(_RegisterRequest value, $Res Function(_RegisterRequest) _then) = __$RegisterRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String email, String password, String role, String? firstName, String? lastName
|
||||
String email, String password, String role, String? firstName, String? lastName, String? agentTypeId
|
||||
});
|
||||
|
||||
|
||||
@@ -272,13 +274,14 @@ class __$RegisterRequestCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of RegisterRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? email = null,Object? password = null,Object? role = null,Object? firstName = freezed,Object? lastName = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? email = null,Object? password = null,Object? role = null,Object? firstName = freezed,Object? lastName = freezed,Object? agentTypeId = freezed,}) {
|
||||
return _then(_RegisterRequest(
|
||||
email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
|
||||
as String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as String,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,agentTypeId: freezed == agentTypeId ? _self.agentTypeId : agentTypeId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user