mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 10:49:49 +08:00
refactor: move auth models to better_networking package
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import '../../consts.dart';
|
||||
import 'auth_api_key_model.dart';
|
||||
import 'auth_basic_model.dart';
|
||||
import 'auth_bearer_model.dart';
|
||||
import 'auth_jwt_model.dart';
|
||||
|
||||
part 'api_auth_model.g.dart';
|
||||
part 'api_auth_model.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class AuthModel with _$AuthModel {
|
||||
@JsonSerializable(
|
||||
explicitToJson: true,
|
||||
anyMap: true,
|
||||
)
|
||||
const factory AuthModel({
|
||||
required APIAuthType type,
|
||||
AuthApiKeyModel? apikey,
|
||||
AuthBearerModel? bearer,
|
||||
AuthBasicAuthModel? basic,
|
||||
AuthJwtModel? jwt,
|
||||
}) = _AuthModel;
|
||||
|
||||
factory AuthModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthModelFromJson(json);
|
||||
}
|
||||
@@ -1,315 +0,0 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'api_auth_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
AuthModel _$AuthModelFromJson(Map<String, dynamic> json) {
|
||||
return _AuthModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AuthModel {
|
||||
APIAuthType get type => throw _privateConstructorUsedError;
|
||||
AuthApiKeyModel? get apikey => throw _privateConstructorUsedError;
|
||||
AuthBearerModel? get bearer => throw _privateConstructorUsedError;
|
||||
AuthBasicAuthModel? get basic => throw _privateConstructorUsedError;
|
||||
AuthJwtModel? get jwt => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AuthModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AuthModelCopyWith<AuthModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthModelCopyWith<$Res> {
|
||||
factory $AuthModelCopyWith(AuthModel value, $Res Function(AuthModel) then) =
|
||||
_$AuthModelCopyWithImpl<$Res, AuthModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{APIAuthType type,
|
||||
AuthApiKeyModel? apikey,
|
||||
AuthBearerModel? bearer,
|
||||
AuthBasicAuthModel? basic,
|
||||
AuthJwtModel? jwt});
|
||||
|
||||
$AuthApiKeyModelCopyWith<$Res>? get apikey;
|
||||
$AuthBearerModelCopyWith<$Res>? get bearer;
|
||||
$AuthBasicAuthModelCopyWith<$Res>? get basic;
|
||||
$AuthJwtModelCopyWith<$Res>? get jwt;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthModelCopyWithImpl<$Res, $Val extends AuthModel>
|
||||
implements $AuthModelCopyWith<$Res> {
|
||||
_$AuthModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? apikey = freezed,
|
||||
Object? bearer = freezed,
|
||||
Object? basic = freezed,
|
||||
Object? jwt = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as APIAuthType,
|
||||
apikey: freezed == apikey
|
||||
? _value.apikey
|
||||
: apikey // ignore: cast_nullable_to_non_nullable
|
||||
as AuthApiKeyModel?,
|
||||
bearer: freezed == bearer
|
||||
? _value.bearer
|
||||
: bearer // ignore: cast_nullable_to_non_nullable
|
||||
as AuthBearerModel?,
|
||||
basic: freezed == basic
|
||||
? _value.basic
|
||||
: basic // ignore: cast_nullable_to_non_nullable
|
||||
as AuthBasicAuthModel?,
|
||||
jwt: freezed == jwt
|
||||
? _value.jwt
|
||||
: jwt // ignore: cast_nullable_to_non_nullable
|
||||
as AuthJwtModel?,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AuthApiKeyModelCopyWith<$Res>? get apikey {
|
||||
if (_value.apikey == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AuthApiKeyModelCopyWith<$Res>(_value.apikey!, (value) {
|
||||
return _then(_value.copyWith(apikey: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AuthBearerModelCopyWith<$Res>? get bearer {
|
||||
if (_value.bearer == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AuthBearerModelCopyWith<$Res>(_value.bearer!, (value) {
|
||||
return _then(_value.copyWith(bearer: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AuthBasicAuthModelCopyWith<$Res>? get basic {
|
||||
if (_value.basic == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AuthBasicAuthModelCopyWith<$Res>(_value.basic!, (value) {
|
||||
return _then(_value.copyWith(basic: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AuthJwtModelCopyWith<$Res>? get jwt {
|
||||
if (_value.jwt == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AuthJwtModelCopyWith<$Res>(_value.jwt!, (value) {
|
||||
return _then(_value.copyWith(jwt: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthModelImplCopyWith<$Res>
|
||||
implements $AuthModelCopyWith<$Res> {
|
||||
factory _$$AuthModelImplCopyWith(
|
||||
_$AuthModelImpl value, $Res Function(_$AuthModelImpl) then) =
|
||||
__$$AuthModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{APIAuthType type,
|
||||
AuthApiKeyModel? apikey,
|
||||
AuthBearerModel? bearer,
|
||||
AuthBasicAuthModel? basic,
|
||||
AuthJwtModel? jwt});
|
||||
|
||||
@override
|
||||
$AuthApiKeyModelCopyWith<$Res>? get apikey;
|
||||
@override
|
||||
$AuthBearerModelCopyWith<$Res>? get bearer;
|
||||
@override
|
||||
$AuthBasicAuthModelCopyWith<$Res>? get basic;
|
||||
@override
|
||||
$AuthJwtModelCopyWith<$Res>? get jwt;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthModelImplCopyWithImpl<$Res>
|
||||
extends _$AuthModelCopyWithImpl<$Res, _$AuthModelImpl>
|
||||
implements _$$AuthModelImplCopyWith<$Res> {
|
||||
__$$AuthModelImplCopyWithImpl(
|
||||
_$AuthModelImpl _value, $Res Function(_$AuthModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? apikey = freezed,
|
||||
Object? bearer = freezed,
|
||||
Object? basic = freezed,
|
||||
Object? jwt = freezed,
|
||||
}) {
|
||||
return _then(_$AuthModelImpl(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as APIAuthType,
|
||||
apikey: freezed == apikey
|
||||
? _value.apikey
|
||||
: apikey // ignore: cast_nullable_to_non_nullable
|
||||
as AuthApiKeyModel?,
|
||||
bearer: freezed == bearer
|
||||
? _value.bearer
|
||||
: bearer // ignore: cast_nullable_to_non_nullable
|
||||
as AuthBearerModel?,
|
||||
basic: freezed == basic
|
||||
? _value.basic
|
||||
: basic // ignore: cast_nullable_to_non_nullable
|
||||
as AuthBasicAuthModel?,
|
||||
jwt: freezed == jwt
|
||||
? _value.jwt
|
||||
: jwt // ignore: cast_nullable_to_non_nullable
|
||||
as AuthJwtModel?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
@JsonSerializable(explicitToJson: true, anyMap: true)
|
||||
class _$AuthModelImpl implements _AuthModel {
|
||||
const _$AuthModelImpl(
|
||||
{required this.type, this.apikey, this.bearer, this.basic, this.jwt});
|
||||
|
||||
factory _$AuthModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final APIAuthType type;
|
||||
@override
|
||||
final AuthApiKeyModel? apikey;
|
||||
@override
|
||||
final AuthBearerModel? bearer;
|
||||
@override
|
||||
final AuthBasicAuthModel? basic;
|
||||
@override
|
||||
final AuthJwtModel? jwt;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthModel(type: $type, apikey: $apikey, bearer: $bearer, basic: $basic, jwt: $jwt)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthModelImpl &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.apikey, apikey) || other.apikey == apikey) &&
|
||||
(identical(other.bearer, bearer) || other.bearer == bearer) &&
|
||||
(identical(other.basic, basic) || other.basic == basic) &&
|
||||
(identical(other.jwt, jwt) || other.jwt == jwt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, type, apikey, bearer, basic, jwt);
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthModelImplCopyWith<_$AuthModelImpl> get copyWith =>
|
||||
__$$AuthModelImplCopyWithImpl<_$AuthModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$AuthModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _AuthModel implements AuthModel {
|
||||
const factory _AuthModel(
|
||||
{required final APIAuthType type,
|
||||
final AuthApiKeyModel? apikey,
|
||||
final AuthBearerModel? bearer,
|
||||
final AuthBasicAuthModel? basic,
|
||||
final AuthJwtModel? jwt}) = _$AuthModelImpl;
|
||||
|
||||
factory _AuthModel.fromJson(Map<String, dynamic> json) =
|
||||
_$AuthModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
APIAuthType get type;
|
||||
@override
|
||||
AuthApiKeyModel? get apikey;
|
||||
@override
|
||||
AuthBearerModel? get bearer;
|
||||
@override
|
||||
AuthBasicAuthModel? get basic;
|
||||
@override
|
||||
AuthJwtModel? get jwt;
|
||||
|
||||
/// Create a copy of AuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthModelImplCopyWith<_$AuthModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'api_auth_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AuthModelImpl _$$AuthModelImplFromJson(Map json) => _$AuthModelImpl(
|
||||
type: $enumDecode(_$APIAuthTypeEnumMap, json['type']),
|
||||
apikey: json['apikey'] == null
|
||||
? null
|
||||
: AuthApiKeyModel.fromJson(
|
||||
Map<String, dynamic>.from(json['apikey'] as Map)),
|
||||
bearer: json['bearer'] == null
|
||||
? null
|
||||
: AuthBearerModel.fromJson(
|
||||
Map<String, dynamic>.from(json['bearer'] as Map)),
|
||||
basic: json['basic'] == null
|
||||
? null
|
||||
: AuthBasicAuthModel.fromJson(
|
||||
Map<String, dynamic>.from(json['basic'] as Map)),
|
||||
jwt: json['jwt'] == null
|
||||
? null
|
||||
: AuthJwtModel.fromJson(
|
||||
Map<String, dynamic>.from(json['jwt'] as Map)),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthModelImplToJson(_$AuthModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'type': _$APIAuthTypeEnumMap[instance.type]!,
|
||||
'apikey': instance.apikey?.toJson(),
|
||||
'bearer': instance.bearer?.toJson(),
|
||||
'basic': instance.basic?.toJson(),
|
||||
'jwt': instance.jwt?.toJson(),
|
||||
};
|
||||
|
||||
const _$APIAuthTypeEnumMap = {
|
||||
APIAuthType.none: 'none',
|
||||
APIAuthType.basic: 'basic',
|
||||
APIAuthType.apiKey: 'apiKey',
|
||||
APIAuthType.bearer: 'bearer',
|
||||
APIAuthType.jwt: 'jwt',
|
||||
APIAuthType.digest: 'digest',
|
||||
APIAuthType.oauth1: 'oauth1',
|
||||
APIAuthType.oauth2: 'oauth2',
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'auth_api_key_model.g.dart';
|
||||
part 'auth_api_key_model.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class AuthApiKeyModel with _$AuthApiKeyModel {
|
||||
const factory AuthApiKeyModel({
|
||||
required String key,
|
||||
@Default('header') String location, // 'header' or 'query'
|
||||
@Default('x-api-key') String name,
|
||||
}) = _AuthApiKeyModel;
|
||||
|
||||
factory AuthApiKeyModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthApiKeyModelFromJson(json);
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'auth_api_key_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
AuthApiKeyModel _$AuthApiKeyModelFromJson(Map<String, dynamic> json) {
|
||||
return _AuthApiKeyModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AuthApiKeyModel {
|
||||
String get key => throw _privateConstructorUsedError;
|
||||
String get location =>
|
||||
throw _privateConstructorUsedError; // 'header' or 'query'
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AuthApiKeyModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AuthApiKeyModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AuthApiKeyModelCopyWith<AuthApiKeyModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthApiKeyModelCopyWith<$Res> {
|
||||
factory $AuthApiKeyModelCopyWith(
|
||||
AuthApiKeyModel value, $Res Function(AuthApiKeyModel) then) =
|
||||
_$AuthApiKeyModelCopyWithImpl<$Res, AuthApiKeyModel>;
|
||||
@useResult
|
||||
$Res call({String key, String location, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthApiKeyModelCopyWithImpl<$Res, $Val extends AuthApiKeyModel>
|
||||
implements $AuthApiKeyModelCopyWith<$Res> {
|
||||
_$AuthApiKeyModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AuthApiKeyModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? key = null,
|
||||
Object? location = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
key: null == key
|
||||
? _value.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
location: null == location
|
||||
? _value.location
|
||||
: location // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthApiKeyModelImplCopyWith<$Res>
|
||||
implements $AuthApiKeyModelCopyWith<$Res> {
|
||||
factory _$$AuthApiKeyModelImplCopyWith(_$AuthApiKeyModelImpl value,
|
||||
$Res Function(_$AuthApiKeyModelImpl) then) =
|
||||
__$$AuthApiKeyModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String key, String location, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthApiKeyModelImplCopyWithImpl<$Res>
|
||||
extends _$AuthApiKeyModelCopyWithImpl<$Res, _$AuthApiKeyModelImpl>
|
||||
implements _$$AuthApiKeyModelImplCopyWith<$Res> {
|
||||
__$$AuthApiKeyModelImplCopyWithImpl(
|
||||
_$AuthApiKeyModelImpl _value, $Res Function(_$AuthApiKeyModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AuthApiKeyModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? key = null,
|
||||
Object? location = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_$AuthApiKeyModelImpl(
|
||||
key: null == key
|
||||
? _value.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
location: null == location
|
||||
? _value.location
|
||||
: location // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$AuthApiKeyModelImpl implements _AuthApiKeyModel {
|
||||
const _$AuthApiKeyModelImpl(
|
||||
{required this.key, this.location = 'header', this.name = 'x-api-key'});
|
||||
|
||||
factory _$AuthApiKeyModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthApiKeyModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String key;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String location;
|
||||
// 'header' or 'query'
|
||||
@override
|
||||
@JsonKey()
|
||||
final String name;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthApiKeyModel(key: $key, location: $location, name: $name)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthApiKeyModelImpl &&
|
||||
(identical(other.key, key) || other.key == key) &&
|
||||
(identical(other.location, location) ||
|
||||
other.location == location) &&
|
||||
(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, key, location, name);
|
||||
|
||||
/// Create a copy of AuthApiKeyModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthApiKeyModelImplCopyWith<_$AuthApiKeyModelImpl> get copyWith =>
|
||||
__$$AuthApiKeyModelImplCopyWithImpl<_$AuthApiKeyModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$AuthApiKeyModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _AuthApiKeyModel implements AuthApiKeyModel {
|
||||
const factory _AuthApiKeyModel(
|
||||
{required final String key,
|
||||
final String location,
|
||||
final String name}) = _$AuthApiKeyModelImpl;
|
||||
|
||||
factory _AuthApiKeyModel.fromJson(Map<String, dynamic> json) =
|
||||
_$AuthApiKeyModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get key;
|
||||
@override
|
||||
String get location; // 'header' or 'query'
|
||||
@override
|
||||
String get name;
|
||||
|
||||
/// Create a copy of AuthApiKeyModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthApiKeyModelImplCopyWith<_$AuthApiKeyModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'auth_api_key_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AuthApiKeyModelImpl _$$AuthApiKeyModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$AuthApiKeyModelImpl(
|
||||
key: json['key'] as String,
|
||||
location: json['location'] as String? ?? 'header',
|
||||
name: json['name'] as String? ?? 'x-api-key',
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthApiKeyModelImplToJson(
|
||||
_$AuthApiKeyModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'location': instance.location,
|
||||
'name': instance.name,
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'auth_basic_model.g.dart';
|
||||
part 'auth_basic_model.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class AuthBasicAuthModel with _$AuthBasicAuthModel {
|
||||
const factory AuthBasicAuthModel({
|
||||
required String username,
|
||||
required String password,
|
||||
}) = _AuthBasicAuthModel;
|
||||
|
||||
factory AuthBasicAuthModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthBasicAuthModelFromJson(json);
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'auth_basic_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
AuthBasicAuthModel _$AuthBasicAuthModelFromJson(Map<String, dynamic> json) {
|
||||
return _AuthBasicAuthModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AuthBasicAuthModel {
|
||||
String get username => throw _privateConstructorUsedError;
|
||||
String get password => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AuthBasicAuthModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AuthBasicAuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AuthBasicAuthModelCopyWith<AuthBasicAuthModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthBasicAuthModelCopyWith<$Res> {
|
||||
factory $AuthBasicAuthModelCopyWith(
|
||||
AuthBasicAuthModel value, $Res Function(AuthBasicAuthModel) then) =
|
||||
_$AuthBasicAuthModelCopyWithImpl<$Res, AuthBasicAuthModel>;
|
||||
@useResult
|
||||
$Res call({String username, String password});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthBasicAuthModelCopyWithImpl<$Res, $Val extends AuthBasicAuthModel>
|
||||
implements $AuthBasicAuthModelCopyWith<$Res> {
|
||||
_$AuthBasicAuthModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AuthBasicAuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? username = null,
|
||||
Object? password = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
username: null == username
|
||||
? _value.username
|
||||
: username // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
password: null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthBasicAuthModelImplCopyWith<$Res>
|
||||
implements $AuthBasicAuthModelCopyWith<$Res> {
|
||||
factory _$$AuthBasicAuthModelImplCopyWith(_$AuthBasicAuthModelImpl value,
|
||||
$Res Function(_$AuthBasicAuthModelImpl) then) =
|
||||
__$$AuthBasicAuthModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String username, String password});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthBasicAuthModelImplCopyWithImpl<$Res>
|
||||
extends _$AuthBasicAuthModelCopyWithImpl<$Res, _$AuthBasicAuthModelImpl>
|
||||
implements _$$AuthBasicAuthModelImplCopyWith<$Res> {
|
||||
__$$AuthBasicAuthModelImplCopyWithImpl(_$AuthBasicAuthModelImpl _value,
|
||||
$Res Function(_$AuthBasicAuthModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AuthBasicAuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? username = null,
|
||||
Object? password = null,
|
||||
}) {
|
||||
return _then(_$AuthBasicAuthModelImpl(
|
||||
username: null == username
|
||||
? _value.username
|
||||
: username // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
password: null == password
|
||||
? _value.password
|
||||
: password // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$AuthBasicAuthModelImpl implements _AuthBasicAuthModel {
|
||||
const _$AuthBasicAuthModelImpl(
|
||||
{required this.username, required this.password});
|
||||
|
||||
factory _$AuthBasicAuthModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthBasicAuthModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String username;
|
||||
@override
|
||||
final String password;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthBasicAuthModel(username: $username, password: $password)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthBasicAuthModelImpl &&
|
||||
(identical(other.username, username) ||
|
||||
other.username == username) &&
|
||||
(identical(other.password, password) ||
|
||||
other.password == password));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, username, password);
|
||||
|
||||
/// Create a copy of AuthBasicAuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthBasicAuthModelImplCopyWith<_$AuthBasicAuthModelImpl> get copyWith =>
|
||||
__$$AuthBasicAuthModelImplCopyWithImpl<_$AuthBasicAuthModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$AuthBasicAuthModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _AuthBasicAuthModel implements AuthBasicAuthModel {
|
||||
const factory _AuthBasicAuthModel(
|
||||
{required final String username,
|
||||
required final String password}) = _$AuthBasicAuthModelImpl;
|
||||
|
||||
factory _AuthBasicAuthModel.fromJson(Map<String, dynamic> json) =
|
||||
_$AuthBasicAuthModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get username;
|
||||
@override
|
||||
String get password;
|
||||
|
||||
/// Create a copy of AuthBasicAuthModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthBasicAuthModelImplCopyWith<_$AuthBasicAuthModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'auth_basic_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AuthBasicAuthModelImpl _$$AuthBasicAuthModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$AuthBasicAuthModelImpl(
|
||||
username: json['username'] as String,
|
||||
password: json['password'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthBasicAuthModelImplToJson(
|
||||
_$AuthBasicAuthModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'username': instance.username,
|
||||
'password': instance.password,
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'auth_bearer_model.g.dart';
|
||||
part 'auth_bearer_model.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class AuthBearerModel with _$AuthBearerModel {
|
||||
const factory AuthBearerModel({
|
||||
required String token,
|
||||
}) = _AuthBearerModel;
|
||||
|
||||
factory AuthBearerModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthBearerModelFromJson(json);
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'auth_bearer_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
AuthBearerModel _$AuthBearerModelFromJson(Map<String, dynamic> json) {
|
||||
return _AuthBearerModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AuthBearerModel {
|
||||
String get token => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AuthBearerModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AuthBearerModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AuthBearerModelCopyWith<AuthBearerModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthBearerModelCopyWith<$Res> {
|
||||
factory $AuthBearerModelCopyWith(
|
||||
AuthBearerModel value, $Res Function(AuthBearerModel) then) =
|
||||
_$AuthBearerModelCopyWithImpl<$Res, AuthBearerModel>;
|
||||
@useResult
|
||||
$Res call({String token});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthBearerModelCopyWithImpl<$Res, $Val extends AuthBearerModel>
|
||||
implements $AuthBearerModelCopyWith<$Res> {
|
||||
_$AuthBearerModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AuthBearerModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? token = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthBearerModelImplCopyWith<$Res>
|
||||
implements $AuthBearerModelCopyWith<$Res> {
|
||||
factory _$$AuthBearerModelImplCopyWith(_$AuthBearerModelImpl value,
|
||||
$Res Function(_$AuthBearerModelImpl) then) =
|
||||
__$$AuthBearerModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String token});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthBearerModelImplCopyWithImpl<$Res>
|
||||
extends _$AuthBearerModelCopyWithImpl<$Res, _$AuthBearerModelImpl>
|
||||
implements _$$AuthBearerModelImplCopyWith<$Res> {
|
||||
__$$AuthBearerModelImplCopyWithImpl(
|
||||
_$AuthBearerModelImpl _value, $Res Function(_$AuthBearerModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AuthBearerModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? token = null,
|
||||
}) {
|
||||
return _then(_$AuthBearerModelImpl(
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$AuthBearerModelImpl implements _AuthBearerModel {
|
||||
const _$AuthBearerModelImpl({required this.token});
|
||||
|
||||
factory _$AuthBearerModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthBearerModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String token;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthBearerModel(token: $token)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthBearerModelImpl &&
|
||||
(identical(other.token, token) || other.token == token));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, token);
|
||||
|
||||
/// Create a copy of AuthBearerModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthBearerModelImplCopyWith<_$AuthBearerModelImpl> get copyWith =>
|
||||
__$$AuthBearerModelImplCopyWithImpl<_$AuthBearerModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$AuthBearerModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _AuthBearerModel implements AuthBearerModel {
|
||||
const factory _AuthBearerModel({required final String token}) =
|
||||
_$AuthBearerModelImpl;
|
||||
|
||||
factory _AuthBearerModel.fromJson(Map<String, dynamic> json) =
|
||||
_$AuthBearerModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get token;
|
||||
|
||||
/// Create a copy of AuthBearerModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthBearerModelImplCopyWith<_$AuthBearerModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'auth_bearer_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AuthBearerModelImpl _$$AuthBearerModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$AuthBearerModelImpl(
|
||||
token: json['token'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthBearerModelImplToJson(
|
||||
_$AuthBearerModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'token': instance.token,
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'auth_jwt_model.freezed.dart';
|
||||
part 'auth_jwt_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class AuthJwtModel with _$AuthJwtModel {
|
||||
const factory AuthJwtModel({
|
||||
required String secret,
|
||||
required String payload,
|
||||
required String addTokenTo,
|
||||
required String algorithm,
|
||||
required bool isSecretBase64Encoded,
|
||||
required String headerPrefix,
|
||||
required String queryParamKey,
|
||||
required String header,
|
||||
}) = _AuthJwtModel;
|
||||
|
||||
factory AuthJwtModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthJwtModelFromJson(json);
|
||||
}
|
||||
@@ -1,314 +0,0 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'auth_jwt_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
AuthJwtModel _$AuthJwtModelFromJson(Map<String, dynamic> json) {
|
||||
return _AuthJwtModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$AuthJwtModel {
|
||||
String get secret => throw _privateConstructorUsedError;
|
||||
String get payload => throw _privateConstructorUsedError;
|
||||
String get addTokenTo => throw _privateConstructorUsedError;
|
||||
String get algorithm => throw _privateConstructorUsedError;
|
||||
bool get isSecretBase64Encoded => throw _privateConstructorUsedError;
|
||||
String get headerPrefix => throw _privateConstructorUsedError;
|
||||
String get queryParamKey => throw _privateConstructorUsedError;
|
||||
String get header => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this AuthJwtModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AuthJwtModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AuthJwtModelCopyWith<AuthJwtModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthJwtModelCopyWith<$Res> {
|
||||
factory $AuthJwtModelCopyWith(
|
||||
AuthJwtModel value, $Res Function(AuthJwtModel) then) =
|
||||
_$AuthJwtModelCopyWithImpl<$Res, AuthJwtModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String secret,
|
||||
String payload,
|
||||
String addTokenTo,
|
||||
String algorithm,
|
||||
bool isSecretBase64Encoded,
|
||||
String headerPrefix,
|
||||
String queryParamKey,
|
||||
String header});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthJwtModelCopyWithImpl<$Res, $Val extends AuthJwtModel>
|
||||
implements $AuthJwtModelCopyWith<$Res> {
|
||||
_$AuthJwtModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AuthJwtModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? secret = null,
|
||||
Object? payload = null,
|
||||
Object? addTokenTo = null,
|
||||
Object? algorithm = null,
|
||||
Object? isSecretBase64Encoded = null,
|
||||
Object? headerPrefix = null,
|
||||
Object? queryParamKey = null,
|
||||
Object? header = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
secret: null == secret
|
||||
? _value.secret
|
||||
: secret // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
payload: null == payload
|
||||
? _value.payload
|
||||
: payload // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
addTokenTo: null == addTokenTo
|
||||
? _value.addTokenTo
|
||||
: addTokenTo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
algorithm: null == algorithm
|
||||
? _value.algorithm
|
||||
: algorithm // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isSecretBase64Encoded: null == isSecretBase64Encoded
|
||||
? _value.isSecretBase64Encoded
|
||||
: isSecretBase64Encoded // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
headerPrefix: null == headerPrefix
|
||||
? _value.headerPrefix
|
||||
: headerPrefix // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
queryParamKey: null == queryParamKey
|
||||
? _value.queryParamKey
|
||||
: queryParamKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
header: null == header
|
||||
? _value.header
|
||||
: header // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthJwtModelImplCopyWith<$Res>
|
||||
implements $AuthJwtModelCopyWith<$Res> {
|
||||
factory _$$AuthJwtModelImplCopyWith(
|
||||
_$AuthJwtModelImpl value, $Res Function(_$AuthJwtModelImpl) then) =
|
||||
__$$AuthJwtModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String secret,
|
||||
String payload,
|
||||
String addTokenTo,
|
||||
String algorithm,
|
||||
bool isSecretBase64Encoded,
|
||||
String headerPrefix,
|
||||
String queryParamKey,
|
||||
String header});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthJwtModelImplCopyWithImpl<$Res>
|
||||
extends _$AuthJwtModelCopyWithImpl<$Res, _$AuthJwtModelImpl>
|
||||
implements _$$AuthJwtModelImplCopyWith<$Res> {
|
||||
__$$AuthJwtModelImplCopyWithImpl(
|
||||
_$AuthJwtModelImpl _value, $Res Function(_$AuthJwtModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AuthJwtModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? secret = null,
|
||||
Object? payload = null,
|
||||
Object? addTokenTo = null,
|
||||
Object? algorithm = null,
|
||||
Object? isSecretBase64Encoded = null,
|
||||
Object? headerPrefix = null,
|
||||
Object? queryParamKey = null,
|
||||
Object? header = null,
|
||||
}) {
|
||||
return _then(_$AuthJwtModelImpl(
|
||||
secret: null == secret
|
||||
? _value.secret
|
||||
: secret // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
payload: null == payload
|
||||
? _value.payload
|
||||
: payload // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
addTokenTo: null == addTokenTo
|
||||
? _value.addTokenTo
|
||||
: addTokenTo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
algorithm: null == algorithm
|
||||
? _value.algorithm
|
||||
: algorithm // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isSecretBase64Encoded: null == isSecretBase64Encoded
|
||||
? _value.isSecretBase64Encoded
|
||||
: isSecretBase64Encoded // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
headerPrefix: null == headerPrefix
|
||||
? _value.headerPrefix
|
||||
: headerPrefix // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
queryParamKey: null == queryParamKey
|
||||
? _value.queryParamKey
|
||||
: queryParamKey // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
header: null == header
|
||||
? _value.header
|
||||
: header // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$AuthJwtModelImpl implements _AuthJwtModel {
|
||||
const _$AuthJwtModelImpl(
|
||||
{required this.secret,
|
||||
required this.payload,
|
||||
required this.addTokenTo,
|
||||
required this.algorithm,
|
||||
required this.isSecretBase64Encoded,
|
||||
required this.headerPrefix,
|
||||
required this.queryParamKey,
|
||||
required this.header});
|
||||
|
||||
factory _$AuthJwtModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthJwtModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String secret;
|
||||
@override
|
||||
final String payload;
|
||||
@override
|
||||
final String addTokenTo;
|
||||
@override
|
||||
final String algorithm;
|
||||
@override
|
||||
final bool isSecretBase64Encoded;
|
||||
@override
|
||||
final String headerPrefix;
|
||||
@override
|
||||
final String queryParamKey;
|
||||
@override
|
||||
final String header;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AuthJwtModel(secret: $secret, payload: $payload, addTokenTo: $addTokenTo, algorithm: $algorithm, isSecretBase64Encoded: $isSecretBase64Encoded, headerPrefix: $headerPrefix, queryParamKey: $queryParamKey, header: $header)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthJwtModelImpl &&
|
||||
(identical(other.secret, secret) || other.secret == secret) &&
|
||||
(identical(other.payload, payload) || other.payload == payload) &&
|
||||
(identical(other.addTokenTo, addTokenTo) ||
|
||||
other.addTokenTo == addTokenTo) &&
|
||||
(identical(other.algorithm, algorithm) ||
|
||||
other.algorithm == algorithm) &&
|
||||
(identical(other.isSecretBase64Encoded, isSecretBase64Encoded) ||
|
||||
other.isSecretBase64Encoded == isSecretBase64Encoded) &&
|
||||
(identical(other.headerPrefix, headerPrefix) ||
|
||||
other.headerPrefix == headerPrefix) &&
|
||||
(identical(other.queryParamKey, queryParamKey) ||
|
||||
other.queryParamKey == queryParamKey) &&
|
||||
(identical(other.header, header) || other.header == header));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, secret, payload, addTokenTo,
|
||||
algorithm, isSecretBase64Encoded, headerPrefix, queryParamKey, header);
|
||||
|
||||
/// Create a copy of AuthJwtModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthJwtModelImplCopyWith<_$AuthJwtModelImpl> get copyWith =>
|
||||
__$$AuthJwtModelImplCopyWithImpl<_$AuthJwtModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$AuthJwtModelImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _AuthJwtModel implements AuthJwtModel {
|
||||
const factory _AuthJwtModel(
|
||||
{required final String secret,
|
||||
required final String payload,
|
||||
required final String addTokenTo,
|
||||
required final String algorithm,
|
||||
required final bool isSecretBase64Encoded,
|
||||
required final String headerPrefix,
|
||||
required final String queryParamKey,
|
||||
required final String header}) = _$AuthJwtModelImpl;
|
||||
|
||||
factory _AuthJwtModel.fromJson(Map<String, dynamic> json) =
|
||||
_$AuthJwtModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get secret;
|
||||
@override
|
||||
String get payload;
|
||||
@override
|
||||
String get addTokenTo;
|
||||
@override
|
||||
String get algorithm;
|
||||
@override
|
||||
bool get isSecretBase64Encoded;
|
||||
@override
|
||||
String get headerPrefix;
|
||||
@override
|
||||
String get queryParamKey;
|
||||
@override
|
||||
String get header;
|
||||
|
||||
/// Create a copy of AuthJwtModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthJwtModelImplCopyWith<_$AuthJwtModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'auth_jwt_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AuthJwtModelImpl _$$AuthJwtModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$AuthJwtModelImpl(
|
||||
secret: json['secret'] as String,
|
||||
payload: json['payload'] as String,
|
||||
addTokenTo: json['addTokenTo'] as String,
|
||||
algorithm: json['algorithm'] as String,
|
||||
isSecretBase64Encoded: json['isSecretBase64Encoded'] as bool,
|
||||
headerPrefix: json['headerPrefix'] as String,
|
||||
queryParamKey: json['queryParamKey'] as String,
|
||||
header: json['header'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthJwtModelImplToJson(_$AuthJwtModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'secret': instance.secret,
|
||||
'payload': instance.payload,
|
||||
'addTokenTo': instance.addTokenTo,
|
||||
'algorithm': instance.algorithm,
|
||||
'isSecretBase64Encoded': instance.isSecretBase64Encoded,
|
||||
'headerPrefix': instance.headerPrefix,
|
||||
'queryParamKey': instance.queryParamKey,
|
||||
'header': instance.header,
|
||||
};
|
||||
@@ -1,6 +1 @@
|
||||
export 'environment_model.dart';
|
||||
export 'auth/api_auth_model.dart';
|
||||
export 'auth/auth_api_key_model.dart';
|
||||
export 'auth/auth_basic_model.dart';
|
||||
export 'auth/auth_bearer_model.dart';
|
||||
export 'auth/auth_jwt_model.dart';
|
||||
export 'environment_model.dart';
|
||||
Reference in New Issue
Block a user