feat: preload textual model
This commit is contained in:
Generated
+6
-1
@@ -449,7 +449,10 @@ class AssetsApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /assets/random' operation and returns the [Response].
|
||||
/// This property was deprecated in v1.116.0
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] count:
|
||||
@@ -482,6 +485,8 @@ class AssetsApi {
|
||||
);
|
||||
}
|
||||
|
||||
/// This property was deprecated in v1.116.0
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] count:
|
||||
|
||||
+59
@@ -71,4 +71,63 @@ class DeprecatedApi {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// This property was deprecated in v1.116.0
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] count:
|
||||
Future<Response> getRandomWithHttpInfo({ num? count, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/assets/random';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (count != null) {
|
||||
queryParams.addAll(_queryParams('', 'count', count));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// This property was deprecated in v1.116.0
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] count:
|
||||
Future<List<AssetResponseDto>?> getRandom({ num? count, }) async {
|
||||
final response = await getRandomWithHttpInfo( count: count, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
final responseBody = await _decodeBodyBytes(response);
|
||||
return (await apiClient.deserializeAsync(responseBody, 'List<AssetResponseDto>') as List)
|
||||
.cast<AssetResponseDto>()
|
||||
.toList(growable: false);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+39
@@ -16,6 +16,45 @@ class JobsApi {
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /jobs' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [JobCreateDto] jobCreateDto (required):
|
||||
Future<Response> createJobWithHttpInfo(JobCreateDto jobCreateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/jobs';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = jobCreateDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [JobCreateDto] jobCreateDto (required):
|
||||
Future<void> createJob(JobCreateDto jobCreateDto,) async {
|
||||
final response = await createJobWithHttpInfo(jobCreateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /jobs' operation and returns the [Response].
|
||||
Future<Response> getAllJobsStatusWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
|
||||
Generated
-56
@@ -105,62 +105,6 @@ class MapApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /map/style.json' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MapTheme] theme (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<Response> getMapStyleWithHttpInfo(MapTheme theme, { String? key, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/map/style.json';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (key != null) {
|
||||
queryParams.addAll(_queryParams('', 'key', key));
|
||||
}
|
||||
queryParams.addAll(_queryParams('', 'theme', theme));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [MapTheme] theme (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<Object?> getMapStyle(MapTheme theme, { String? key, }) async {
|
||||
final response = await getMapStyleWithHttpInfo(theme, key: key, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /map/reverse-geocode' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
|
||||
Generated
+47
@@ -351,6 +351,53 @@ class SearchApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /search/random' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RandomSearchDto] randomSearchDto (required):
|
||||
Future<Response> searchRandomWithHttpInfo(RandomSearchDto randomSearchDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/search/random';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = randomSearchDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RandomSearchDto] randomSearchDto (required):
|
||||
Future<SearchResponseDto?> searchRandom(RandomSearchDto randomSearchDto,) async {
|
||||
final response = await searchRandomWithHttpInfo(randomSearchDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchResponseDto',) as SearchResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /search/smart' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
|
||||
Generated
+27
-3
@@ -42,11 +42,19 @@ class TrashApi {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> emptyTrash() async {
|
||||
Future<TrashResponseDto?> emptyTrash() async {
|
||||
final response = await emptyTrashWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /trash/restore/assets' operation and returns the [Response].
|
||||
@@ -81,11 +89,19 @@ class TrashApi {
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [BulkIdsDto] bulkIdsDto (required):
|
||||
Future<void> restoreAssets(BulkIdsDto bulkIdsDto,) async {
|
||||
Future<TrashResponseDto?> restoreAssets(BulkIdsDto bulkIdsDto,) async {
|
||||
final response = await restoreAssetsWithHttpInfo(bulkIdsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /trash/restore' operation and returns the [Response].
|
||||
@@ -114,10 +130,18 @@ class TrashApi {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> restoreTrash() async {
|
||||
Future<TrashResponseDto?> restoreTrash() async {
|
||||
final response = await restoreTrashWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
// When a remote server returns no body with a status of 204, we shall not decode it.
|
||||
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
|
||||
// FormatException when trying to decode an empty string.
|
||||
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
|
||||
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+2
-2
@@ -97,8 +97,8 @@ String parameterToString(dynamic value) {
|
||||
if (value is LogLevel) {
|
||||
return LogLevelTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MapTheme) {
|
||||
return MapThemeTypeTransformer().encode(value).toString();
|
||||
if (value is ManualJobName) {
|
||||
return ManualJobNameTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MemoryType) {
|
||||
return MemoryTypeTypeTransformer().encode(value).toString();
|
||||
|
||||
@@ -78,6 +78,7 @@ class ActivityCreateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActivityCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActivityCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ class ActivityResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActivityResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActivityResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class ActivityStatisticsResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActivityStatisticsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActivityStatisticsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class AddUsersDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AddUsersDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AddUsersDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class AdminOnboardingUpdateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AdminOnboardingUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AdminOnboardingUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -186,6 +186,7 @@ class AlbumResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class AlbumStatisticsResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumStatisticsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumStatisticsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class AlbumUserAddDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumUserAddDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumUserAddDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class AlbumUserCreateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumUserCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumUserCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class AlbumUserResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumUserResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AlbumUserResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ class AllJobStatusResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AllJobStatusResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AllJobStatusResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class APIKeyCreateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static APIKeyCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "APIKeyCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class APIKeyCreateResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static APIKeyCreateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "APIKeyCreateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ class APIKeyResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static APIKeyResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "APIKeyResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class APIKeyUpdateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static APIKeyUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "APIKeyUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class AssetBulkDeleteDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetBulkDeleteDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetBulkDeleteDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ class AssetBulkUpdateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetBulkUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetBulkUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class AssetBulkUploadCheckDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetBulkUploadCheckDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetBulkUploadCheckDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ class AssetBulkUploadCheckItem {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetBulkUploadCheckItem? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetBulkUploadCheckItem");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class AssetBulkUploadCheckResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetBulkUploadCheckResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ class AssetBulkUploadCheckResult {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetBulkUploadCheckResult? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetBulkUploadCheckResult");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class AssetDeltaSyncDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetDeltaSyncDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetDeltaSyncDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class AssetDeltaSyncResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetDeltaSyncResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetDeltaSyncResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ class AssetFaceResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetFaceResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetFaceResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class AssetFaceUpdateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetFaceUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetFaceUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class AssetFaceUpdateItem {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetFaceUpdateItem? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetFaceUpdateItem");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ class AssetFaceWithoutPersonResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetFaceWithoutPersonResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetFaceWithoutPersonResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ class AssetFullSyncDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetFullSyncDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetFullSyncDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class AssetIdsDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetIdsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetIdsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class AssetIdsResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetIdsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetIdsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class AssetJobsDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetJobsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetJobsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class AssetMediaResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetMediaResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetMediaResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -293,6 +293,7 @@ class AssetResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class AssetStackResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetStackResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetStackResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class AssetStatsResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AssetStatsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AssetStatsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class AuditDeletesResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AuditDeletesResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AuditDeletesResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class AvatarResponse {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AvatarResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AvatarResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -50,6 +50,7 @@ class AvatarUpdate {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AvatarUpdate? fromJson(dynamic value) {
|
||||
upgradeDto(value, "AvatarUpdate");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class BulkIdResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static BulkIdResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "BulkIdResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class BulkIdsDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static BulkIdsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "BulkIdsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class ChangePasswordDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ChangePasswordDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ChangePasswordDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class CheckExistingAssetsDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CheckExistingAssetsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CheckExistingAssetsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class CheckExistingAssetsResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CheckExistingAssetsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CheckExistingAssetsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -68,6 +68,7 @@ class CreateAlbumDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CreateAlbumDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CreateAlbumDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ class CreateLibraryDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CreateLibraryDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CreateLibraryDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+10
-1
@@ -13,30 +13,36 @@ part of openapi.api;
|
||||
class CreateProfileImageResponseDto {
|
||||
/// Returns a new [CreateProfileImageResponseDto] instance.
|
||||
CreateProfileImageResponseDto({
|
||||
required this.profileChangedAt,
|
||||
required this.profileImagePath,
|
||||
required this.userId,
|
||||
});
|
||||
|
||||
DateTime profileChangedAt;
|
||||
|
||||
String profileImagePath;
|
||||
|
||||
String userId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CreateProfileImageResponseDto &&
|
||||
other.profileChangedAt == profileChangedAt &&
|
||||
other.profileImagePath == profileImagePath &&
|
||||
other.userId == userId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(profileChangedAt.hashCode) +
|
||||
(profileImagePath.hashCode) +
|
||||
(userId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CreateProfileImageResponseDto[profileImagePath=$profileImagePath, userId=$userId]';
|
||||
String toString() => 'CreateProfileImageResponseDto[profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, userId=$userId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String();
|
||||
json[r'profileImagePath'] = this.profileImagePath;
|
||||
json[r'userId'] = this.userId;
|
||||
return json;
|
||||
@@ -46,10 +52,12 @@ class CreateProfileImageResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CreateProfileImageResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CreateProfileImageResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return CreateProfileImageResponseDto(
|
||||
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
|
||||
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
||||
userId: mapValueOfType<String>(json, r'userId')!,
|
||||
);
|
||||
@@ -99,6 +107,7 @@ class CreateProfileImageResponseDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'profileChangedAt',
|
||||
'profileImagePath',
|
||||
'userId',
|
||||
};
|
||||
|
||||
@@ -46,6 +46,7 @@ class DownloadArchiveInfo {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DownloadArchiveInfo? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DownloadArchiveInfo");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -89,6 +89,7 @@ class DownloadInfoDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DownloadInfoDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DownloadInfoDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class DownloadResponse {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DownloadResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DownloadResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class DownloadResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DownloadResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DownloadResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -67,6 +67,7 @@ class DownloadUpdate {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DownloadUpdate? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DownloadUpdate");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ class DuplicateDetectionConfig {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DuplicateDetectionConfig? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DuplicateDetectionConfig");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class DuplicateResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static DuplicateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "DuplicateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class EmailNotificationsResponse {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static EmailNotificationsResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "EmailNotificationsResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ class EmailNotificationsUpdate {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static EmailNotificationsUpdate? fromJson(dynamic value) {
|
||||
upgradeDto(value, "EmailNotificationsUpdate");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -254,6 +254,7 @@ class ExifResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ExifResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ExifResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
Generated
+1
@@ -40,6 +40,7 @@ class FaceDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FaceDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FaceDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+3
-2
@@ -22,14 +22,14 @@ class FacialRecognitionConfig {
|
||||
|
||||
bool enabled;
|
||||
|
||||
/// Minimum value: 0
|
||||
/// Minimum value: 0.1
|
||||
/// Maximum value: 2
|
||||
double maxDistance;
|
||||
|
||||
/// Minimum value: 1
|
||||
int minFaces;
|
||||
|
||||
/// Minimum value: 0
|
||||
/// Minimum value: 0.1
|
||||
/// Maximum value: 1
|
||||
double minScore;
|
||||
|
||||
@@ -69,6 +69,7 @@ class FacialRecognitionConfig {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FacialRecognitionConfig? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FacialRecognitionConfig");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class FileChecksumDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FileChecksumDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FileChecksumDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class FileChecksumResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FileChecksumResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FileChecksumResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class FileReportDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FileReportDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FileReportDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class FileReportFixDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FileReportFixDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FileReportFixDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ class FileReportItemDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FileReportItemDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FileReportItemDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class FoldersResponse {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FoldersResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FoldersResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -66,6 +66,7 @@ class FoldersUpdate {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FoldersUpdate? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FoldersUpdate");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class JobCommandDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static JobCommandDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "JobCommandDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -70,6 +70,7 @@ class JobCountsDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static JobCountsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "JobCountsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class JobCreateDto {
|
||||
/// Returns a new [JobCreateDto] instance.
|
||||
JobCreateDto({
|
||||
required this.name,
|
||||
});
|
||||
|
||||
ManualJobName name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobCreateDto &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(name.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'JobCreateDto[name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'name'] = this.name;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [JobCreateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static JobCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "JobCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return JobCreateDto(
|
||||
name: ManualJobName.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<JobCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <JobCreateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = JobCreateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, JobCreateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, JobCreateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = JobCreateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of JobCreateDto-objects as value to a dart map
|
||||
static Map<String, List<JobCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<JobCreateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = JobCreateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'name',
|
||||
};
|
||||
}
|
||||
|
||||
+1
@@ -41,6 +41,7 @@ class JobSettingsDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static JobSettingsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "JobSettingsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class JobStatusDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static JobStatusDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "JobStatusDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ class LibraryResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LibraryResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LibraryResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ class LibraryStatsResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LibraryStatsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LibraryStatsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ class LicenseKeyDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LicenseKeyDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LicenseKeyDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class LicenseResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LicenseResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LicenseResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class LoginCredentialDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LoginCredentialDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LoginCredentialDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ class LoginResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LoginResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LoginResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class LogoutResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LogoutResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LogoutResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class ManualJobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ManualJobName._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const personCleanup = ManualJobName._(r'person-cleanup');
|
||||
static const tagCleanup = ManualJobName._(r'tag-cleanup');
|
||||
static const userCleanup = ManualJobName._(r'user-cleanup');
|
||||
|
||||
/// List of all possible values in this [enum][ManualJobName].
|
||||
static const values = <ManualJobName>[
|
||||
personCleanup,
|
||||
tagCleanup,
|
||||
userCleanup,
|
||||
];
|
||||
|
||||
static ManualJobName? fromJson(dynamic value) => ManualJobNameTypeTransformer().decode(value);
|
||||
|
||||
static List<ManualJobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ManualJobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ManualJobName.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [ManualJobName] to String,
|
||||
/// and [decode] dynamic data back to [ManualJobName].
|
||||
class ManualJobNameTypeTransformer {
|
||||
factory ManualJobNameTypeTransformer() => _instance ??= const ManualJobNameTypeTransformer._();
|
||||
|
||||
const ManualJobNameTypeTransformer._();
|
||||
|
||||
String encode(ManualJobName data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ManualJobName.
|
||||
///
|
||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
||||
///
|
||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
||||
/// and users are still using an old app with the old code.
|
||||
ManualJobName? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'person-cleanup': return ManualJobName.personCleanup;
|
||||
case r'tag-cleanup': return ManualJobName.tagCleanup;
|
||||
case r'user-cleanup': return ManualJobName.userCleanup;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ManualJobNameTypeTransformer] instance.
|
||||
static ManualJobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ class MapMarkerResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MapMarkerResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MapMarkerResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ class MapReverseGeocodeResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MapReverseGeocodeResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MapReverseGeocodeResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
Generated
-85
@@ -1,85 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class MapTheme {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MapTheme._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const light = MapTheme._(r'light');
|
||||
static const dark = MapTheme._(r'dark');
|
||||
|
||||
/// List of all possible values in this [enum][MapTheme].
|
||||
static const values = <MapTheme>[
|
||||
light,
|
||||
dark,
|
||||
];
|
||||
|
||||
static MapTheme? fromJson(dynamic value) => MapThemeTypeTransformer().decode(value);
|
||||
|
||||
static List<MapTheme> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MapTheme>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = MapTheme.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [MapTheme] to String,
|
||||
/// and [decode] dynamic data back to [MapTheme].
|
||||
class MapThemeTypeTransformer {
|
||||
factory MapThemeTypeTransformer() => _instance ??= const MapThemeTypeTransformer._();
|
||||
|
||||
const MapThemeTypeTransformer._();
|
||||
|
||||
String encode(MapTheme data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MapTheme.
|
||||
///
|
||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
||||
///
|
||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
||||
/// and users are still using an old app with the old code.
|
||||
MapTheme? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'light': return MapTheme.light;
|
||||
case r'dark': return MapTheme.dark;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MapThemeTypeTransformer] instance.
|
||||
static MapThemeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class MemoriesResponse {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MemoriesResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MemoriesResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -50,6 +50,7 @@ class MemoriesUpdate {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MemoriesUpdate? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MemoriesUpdate");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -90,6 +90,7 @@ class MemoryCreateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MemoryCreateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MemoryCreateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ class MemoryLaneResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MemoryLaneResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MemoryLaneResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ class MemoryResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MemoryResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MemoryResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -82,6 +82,7 @@ class MemoryUpdateDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MemoryUpdateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MemoryUpdateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class MergePersonDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MergePersonDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MergePersonDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -637,6 +637,7 @@ class MetadataSearchDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static MetadataSearchDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "MetadataSearchDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class OAuthAuthorizeResponseDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static OAuthAuthorizeResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "OAuthAuthorizeResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ class OAuthCallbackDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static OAuthCallbackDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "OAuthCallbackDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ class OAuthConfigDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static OAuthConfigDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "OAuthConfigDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
+1
@@ -41,6 +41,7 @@ class OnThisDayDto {
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static OnThisDayDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "OnThisDayDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user