Update request model

This commit is contained in:
Ankit Mahato
2025-06-29 01:21:52 +05:30
parent adf843e8bb
commit 7096c2f301
4 changed files with 34 additions and 40 deletions

View File

@@ -35,8 +35,8 @@ mixin _$RequestModel {
bool get isWorking => throw _privateConstructorUsedError;
@JsonKey(includeToJson: false)
DateTime? get sendingTime => throw _privateConstructorUsedError;
String get preRequestScript => throw _privateConstructorUsedError;
String get postRequestScript => throw _privateConstructorUsedError;
String? get preRequestScript => throw _privateConstructorUsedError;
String? get postRequestScript => throw _privateConstructorUsedError;
/// Serializes this RequestModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -66,8 +66,8 @@ abstract class $RequestModelCopyWith<$Res> {
HttpResponseModel? httpResponseModel,
@JsonKey(includeToJson: false) bool isWorking,
@JsonKey(includeToJson: false) DateTime? sendingTime,
String preRequestScript,
String postRequestScript});
String? preRequestScript,
String? postRequestScript});
$HttpRequestModelCopyWith<$Res>? get httpRequestModel;
$HttpResponseModelCopyWith<$Res>? get httpResponseModel;
@@ -99,8 +99,8 @@ class _$RequestModelCopyWithImpl<$Res, $Val extends RequestModel>
Object? httpResponseModel = freezed,
Object? isWorking = null,
Object? sendingTime = freezed,
Object? preRequestScript = null,
Object? postRequestScript = null,
Object? preRequestScript = freezed,
Object? postRequestScript = freezed,
}) {
return _then(_value.copyWith(
id: null == id
@@ -147,14 +147,14 @@ class _$RequestModelCopyWithImpl<$Res, $Val extends RequestModel>
? _value.sendingTime
: sendingTime // ignore: cast_nullable_to_non_nullable
as DateTime?,
preRequestScript: null == preRequestScript
preRequestScript: freezed == preRequestScript
? _value.preRequestScript
: preRequestScript // ignore: cast_nullable_to_non_nullable
as String,
postRequestScript: null == postRequestScript
as String?,
postRequestScript: freezed == postRequestScript
? _value.postRequestScript
: postRequestScript // ignore: cast_nullable_to_non_nullable
as String,
as String?,
) as $Val);
}
@@ -207,8 +207,8 @@ abstract class _$$RequestModelImplCopyWith<$Res>
HttpResponseModel? httpResponseModel,
@JsonKey(includeToJson: false) bool isWorking,
@JsonKey(includeToJson: false) DateTime? sendingTime,
String preRequestScript,
String postRequestScript});
String? preRequestScript,
String? postRequestScript});
@override
$HttpRequestModelCopyWith<$Res>? get httpRequestModel;
@@ -240,8 +240,8 @@ class __$$RequestModelImplCopyWithImpl<$Res>
Object? httpResponseModel = freezed,
Object? isWorking = null,
Object? sendingTime = freezed,
Object? preRequestScript = null,
Object? postRequestScript = null,
Object? preRequestScript = freezed,
Object? postRequestScript = freezed,
}) {
return _then(_$RequestModelImpl(
id: null == id
@@ -287,14 +287,14 @@ class __$$RequestModelImplCopyWithImpl<$Res>
? _value.sendingTime
: sendingTime // ignore: cast_nullable_to_non_nullable
as DateTime?,
preRequestScript: null == preRequestScript
preRequestScript: freezed == preRequestScript
? _value.preRequestScript
: preRequestScript // ignore: cast_nullable_to_non_nullable
as String,
postRequestScript: null == postRequestScript
as String?,
postRequestScript: freezed == postRequestScript
? _value.postRequestScript
: postRequestScript // ignore: cast_nullable_to_non_nullable
as String,
as String?,
));
}
}
@@ -315,10 +315,8 @@ class _$RequestModelImpl implements _RequestModel {
this.httpResponseModel,
@JsonKey(includeToJson: false) this.isWorking = false,
@JsonKey(includeToJson: false) this.sendingTime,
this.preRequestScript =
"// Use Javacript to modify this request dynamically",
this.postRequestScript =
"// Use Javacript to modify this request dynamically"});
this.preRequestScript,
this.postRequestScript});
factory _$RequestModelImpl.fromJson(Map<String, dynamic> json) =>
_$$RequestModelImplFromJson(json);
@@ -352,11 +350,9 @@ class _$RequestModelImpl implements _RequestModel {
@JsonKey(includeToJson: false)
final DateTime? sendingTime;
@override
@JsonKey()
final String preRequestScript;
final String? preRequestScript;
@override
@JsonKey()
final String postRequestScript;
final String? postRequestScript;
@override
String toString() {
@@ -439,8 +435,8 @@ abstract class _RequestModel implements RequestModel {
final HttpResponseModel? httpResponseModel,
@JsonKey(includeToJson: false) final bool isWorking,
@JsonKey(includeToJson: false) final DateTime? sendingTime,
final String preRequestScript,
final String postRequestScript}) = _$RequestModelImpl;
final String? preRequestScript,
final String? postRequestScript}) = _$RequestModelImpl;
factory _RequestModel.fromJson(Map<String, dynamic> json) =
_$RequestModelImpl.fromJson;
@@ -471,9 +467,9 @@ abstract class _RequestModel implements RequestModel {
@JsonKey(includeToJson: false)
DateTime? get sendingTime;
@override
String get preRequestScript;
String? get preRequestScript;
@override
String get postRequestScript;
String? get postRequestScript;
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.