merge main
This commit is contained in:
Generated
-1
@@ -83,7 +83,6 @@ part 'model/cq_mode.dart';
|
||||
part 'model/change_password_dto.dart';
|
||||
part 'model/check_existing_assets_dto.dart';
|
||||
part 'model/check_existing_assets_response_dto.dart';
|
||||
part 'model/cities_file.dart';
|
||||
part 'model/classification_config.dart';
|
||||
part 'model/colorspace.dart';
|
||||
part 'model/create_album_dto.dart';
|
||||
|
||||
Generated
+58
-2
@@ -414,6 +414,62 @@ class AssetApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get all asset of a device that are in the database, ID only.
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
Future<Response> getAllUserAssetsByDeviceIdWithHttpInfo(String deviceId,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/asset/device/{deviceId}'
|
||||
.replaceAll('{deviceId}', deviceId);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all asset of a device that are in the database, ID only.
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
Future<List<String>?> getAllUserAssetsByDeviceId(String deviceId,) async {
|
||||
final response = await getAllUserAssetsByDeviceIdWithHttpInfo(deviceId,);
|
||||
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<String>') as List)
|
||||
.cast<String>()
|
||||
.toList();
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get a single asset's information
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
@@ -1211,7 +1267,7 @@ class AssetApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Get all asset of a device that are in the database, ID only.
|
||||
/// Use /asset/device/:deviceId instead - Remove in 1.92 release
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
///
|
||||
@@ -1244,7 +1300,7 @@ class AssetApi {
|
||||
);
|
||||
}
|
||||
|
||||
/// Get all asset of a device that are in the database, ID only.
|
||||
/// Use /asset/device/:deviceId instead - Remove in 1.92 release
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
|
||||
Generated
-2
@@ -255,8 +255,6 @@ class ApiClient {
|
||||
return CheckExistingAssetsDto.fromJson(value);
|
||||
case 'CheckExistingAssetsResponseDto':
|
||||
return CheckExistingAssetsResponseDto.fromJson(value);
|
||||
case 'CitiesFile':
|
||||
return CitiesFileTypeTransformer().decode(value);
|
||||
case 'ClassificationConfig':
|
||||
return ClassificationConfig.fromJson(value);
|
||||
case 'Colorspace':
|
||||
|
||||
Generated
-3
@@ -73,9 +73,6 @@ String parameterToString(dynamic value) {
|
||||
if (value is CQMode) {
|
||||
return CQModeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is CitiesFile) {
|
||||
return CitiesFileTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is Colorspace) {
|
||||
return ColorspaceTypeTransformer().encode(value).toString();
|
||||
}
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// 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 CitiesFile {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const CitiesFile._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const cities15000 = CitiesFile._(r'cities15000');
|
||||
static const cities5000 = CitiesFile._(r'cities5000');
|
||||
static const cities1000 = CitiesFile._(r'cities1000');
|
||||
static const cities500 = CitiesFile._(r'cities500');
|
||||
|
||||
/// List of all possible values in this [enum][CitiesFile].
|
||||
static const values = <CitiesFile>[
|
||||
cities15000,
|
||||
cities5000,
|
||||
cities1000,
|
||||
cities500,
|
||||
];
|
||||
|
||||
static CitiesFile? fromJson(dynamic value) => CitiesFileTypeTransformer().decode(value);
|
||||
|
||||
static List<CitiesFile>? listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CitiesFile>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = CitiesFile.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [CitiesFile] to String,
|
||||
/// and [decode] dynamic data back to [CitiesFile].
|
||||
class CitiesFileTypeTransformer {
|
||||
factory CitiesFileTypeTransformer() => _instance ??= const CitiesFileTypeTransformer._();
|
||||
|
||||
const CitiesFileTypeTransformer._();
|
||||
|
||||
String encode(CitiesFile data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a CitiesFile.
|
||||
///
|
||||
/// 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.
|
||||
CitiesFile? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'cities15000': return CitiesFile.cities15000;
|
||||
case r'cities5000': return CitiesFile.cities5000;
|
||||
case r'cities1000': return CitiesFile.cities1000;
|
||||
case r'cities500': return CitiesFile.cities500;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [CitiesFileTypeTransformer] instance.
|
||||
static CitiesFileTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
@@ -13,31 +13,25 @@ part of openapi.api;
|
||||
class SystemConfigReverseGeocodingDto {
|
||||
/// Returns a new [SystemConfigReverseGeocodingDto] instance.
|
||||
SystemConfigReverseGeocodingDto({
|
||||
required this.citiesFileOverride,
|
||||
required this.enabled,
|
||||
});
|
||||
|
||||
CitiesFile citiesFileOverride;
|
||||
|
||||
bool enabled;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigReverseGeocodingDto &&
|
||||
other.citiesFileOverride == citiesFileOverride &&
|
||||
other.enabled == enabled;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(citiesFileOverride.hashCode) +
|
||||
(enabled.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigReverseGeocodingDto[citiesFileOverride=$citiesFileOverride, enabled=$enabled]';
|
||||
String toString() => 'SystemConfigReverseGeocodingDto[enabled=$enabled]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'citiesFileOverride'] = this.citiesFileOverride;
|
||||
json[r'enabled'] = this.enabled;
|
||||
return json;
|
||||
}
|
||||
@@ -50,7 +44,6 @@ class SystemConfigReverseGeocodingDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SystemConfigReverseGeocodingDto(
|
||||
citiesFileOverride: CitiesFile.fromJson(json[r'citiesFileOverride'])!,
|
||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||
);
|
||||
}
|
||||
@@ -99,7 +92,6 @@ class SystemConfigReverseGeocodingDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'citiesFileOverride',
|
||||
'enabled',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user