rename stuff

This commit is contained in:
mgabor
2024-04-16 18:14:08 +02:00
parent 38bab135af
commit 9677d6108a
34 changed files with 471 additions and 487 deletions
+6 -6
View File
@@ -15,8 +15,8 @@ doc/ActivityStatisticsResponseDto.md
doc/AddUsersDto.md
doc/AlbumApi.md
doc/AlbumCountResponseDto.md
doc/AlbumPermissionResponseDto.md
doc/AlbumResponseDto.md
doc/AlbumUserResponseDto.md
doc/AllJobStatusResponseDto.md
doc/AssetApi.md
doc/AssetBulkDeleteDto.md
@@ -142,7 +142,6 @@ doc/ServerPingResponse.md
doc/ServerStatsResponseDto.md
doc/ServerThemeDto.md
doc/ServerVersionResponseDto.md
doc/SetAlbumPermissionDto.md
doc/SharedLinkApi.md
doc/SharedLinkCreateDto.md
doc/SharedLinkEditDto.md
@@ -184,6 +183,7 @@ doc/TranscodeHWAccel.md
doc/TranscodePolicy.md
doc/TrashApi.md
doc/UpdateAlbumDto.md
doc/UpdateAlbumUserDto.md
doc/UpdateAssetDto.md
doc/UpdateLibraryDto.md
doc/UpdatePartnerDto.md
@@ -238,8 +238,8 @@ lib/model/activity_response_dto.dart
lib/model/activity_statistics_response_dto.dart
lib/model/add_users_dto.dart
lib/model/album_count_response_dto.dart
lib/model/album_permission_response_dto.dart
lib/model/album_response_dto.dart
lib/model/album_user_response_dto.dart
lib/model/all_job_status_response_dto.dart
lib/model/api_key_create_dto.dart
lib/model/api_key_create_response_dto.dart
@@ -356,7 +356,6 @@ lib/model/server_ping_response.dart
lib/model/server_stats_response_dto.dart
lib/model/server_theme_dto.dart
lib/model/server_version_response_dto.dart
lib/model/set_album_permission_dto.dart
lib/model/shared_link_create_dto.dart
lib/model/shared_link_edit_dto.dart
lib/model/shared_link_response_dto.dart
@@ -393,6 +392,7 @@ lib/model/tone_mapping.dart
lib/model/transcode_hw_accel.dart
lib/model/transcode_policy.dart
lib/model/update_album_dto.dart
lib/model/update_album_user_dto.dart
lib/model/update_asset_dto.dart
lib/model/update_library_dto.dart
lib/model/update_partner_dto.dart
@@ -417,8 +417,8 @@ test/activity_statistics_response_dto_test.dart
test/add_users_dto_test.dart
test/album_api_test.dart
test/album_count_response_dto_test.dart
test/album_permission_response_dto_test.dart
test/album_response_dto_test.dart
test/album_user_response_dto_test.dart
test/all_job_status_response_dto_test.dart
test/api_key_api_test.dart
test/api_key_create_dto_test.dart
@@ -549,7 +549,6 @@ test/server_ping_response_test.dart
test/server_stats_response_dto_test.dart
test/server_theme_dto_test.dart
test/server_version_response_dto_test.dart
test/set_album_permission_dto_test.dart
test/shared_link_api_test.dart
test/shared_link_create_dto_test.dart
test/shared_link_edit_dto_test.dart
@@ -591,6 +590,7 @@ test/transcode_hw_accel_test.dart
test/transcode_policy_test.dart
test/trash_api_test.dart
test/update_album_dto_test.dart
test/update_album_user_dto_test.dart
test/update_asset_dto_test.dart
test/update_library_dto_test.dart
test/update_partner_dto_test.dart
+3 -3
View File
@@ -90,8 +90,8 @@ Class | Method | HTTP request | Description
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /album |
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
*AlbumApi* | [**setAlbumPermission**](doc//AlbumApi.md#setalbumpermission) | **PUT** /album/{id}/permission/{userId} |
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
*AlbumApi* | [**updateAlbumUser**](doc//AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/permission/{userId} |
*AssetApi* | [**checkBulkUpload**](doc//AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
@@ -233,8 +233,8 @@ Class | Method | HTTP request | Description
- [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md)
- [AddUsersDto](doc//AddUsersDto.md)
- [AlbumCountResponseDto](doc//AlbumCountResponseDto.md)
- [AlbumPermissionResponseDto](doc//AlbumPermissionResponseDto.md)
- [AlbumResponseDto](doc//AlbumResponseDto.md)
- [AlbumUserResponseDto](doc//AlbumUserResponseDto.md)
- [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md)
- [AssetBulkDeleteDto](doc//AssetBulkDeleteDto.md)
- [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md)
@@ -347,7 +347,6 @@ Class | Method | HTTP request | Description
- [ServerStatsResponseDto](doc//ServerStatsResponseDto.md)
- [ServerThemeDto](doc//ServerThemeDto.md)
- [ServerVersionResponseDto](doc//ServerVersionResponseDto.md)
- [SetAlbumPermissionDto](doc//SetAlbumPermissionDto.md)
- [SharedLinkCreateDto](doc//SharedLinkCreateDto.md)
- [SharedLinkEditDto](doc//SharedLinkEditDto.md)
- [SharedLinkResponseDto](doc//SharedLinkResponseDto.md)
@@ -384,6 +383,7 @@ Class | Method | HTTP request | Description
- [TranscodeHWAccel](doc//TranscodeHWAccel.md)
- [TranscodePolicy](doc//TranscodePolicy.md)
- [UpdateAlbumDto](doc//UpdateAlbumDto.md)
- [UpdateAlbumUserDto](doc//UpdateAlbumUserDto.md)
- [UpdateAssetDto](doc//UpdateAssetDto.md)
- [UpdateLibraryDto](doc//UpdateLibraryDto.md)
- [UpdatePartnerDto](doc//UpdatePartnerDto.md)
+59 -59
View File
@@ -18,8 +18,8 @@ Method | HTTP request | Description
[**getAllAlbums**](AlbumApi.md#getallalbums) | **GET** /album |
[**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
[**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
[**setAlbumPermission**](AlbumApi.md#setalbumpermission) | **PUT** /album/{id}/permission/{userId} |
[**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
[**updateAlbumUser**](AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/permission/{userId} |
# **addAssetsToAlbum**
@@ -527,64 +527,6 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **setAlbumPermission**
> setAlbumPermission(id, userId, setAlbumPermissionDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final userId = userId_example; // String |
final setAlbumPermissionDto = SetAlbumPermissionDto(); // SetAlbumPermissionDto |
try {
api_instance.setAlbumPermission(id, userId, setAlbumPermissionDto);
} catch (e) {
print('Exception when calling AlbumApi->setAlbumPermission: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**userId** | **String**| |
**setAlbumPermissionDto** | [**SetAlbumPermissionDto**](SetAlbumPermissionDto.md)| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateAlbumInfo**
> AlbumResponseDto updateAlbumInfo(id, updateAlbumDto)
@@ -642,3 +584,61 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateAlbumUser**
> updateAlbumUser(id, userId, updateAlbumUserDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final userId = userId_example; // String |
final updateAlbumUserDto = UpdateAlbumUserDto(); // UpdateAlbumUserDto |
try {
api_instance.updateAlbumUser(id, userId, updateAlbumUserDto);
} catch (e) {
print('Exception when calling AlbumApi->updateAlbumUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**userId** | **String**| |
**updateAlbumUserDto** | [**UpdateAlbumUserDto**](UpdateAlbumUserDto.md)| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+2 -2
View File
@@ -9,7 +9,6 @@ import 'package:openapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**albumName** | **String** | |
**albumPermissions** | [**List<AlbumPermissionResponseDto>**](AlbumPermissionResponseDto.md) | | [default to const []]
**albumThumbnailAssetId** | **String** | |
**assetCount** | **int** | |
**assets** | [**List<AssetResponseDto>**](AssetResponseDto.md) | | [default to const []]
@@ -24,7 +23,8 @@ Name | Type | Description | Notes
**owner** | [**UserResponseDto**](UserResponseDto.md) | |
**ownerId** | **String** | |
**shared** | **bool** | |
**sharedUsers** | [**List<UserResponseDto>**](UserResponseDto.md) | Deprecated in favor of albumPermissions | [default to const []]
**sharedUsers** | [**List<UserResponseDto>**](UserResponseDto.md) | Deprecated in favor of users | [default to const []]
**sharedUsersV2** | [**List<AlbumUserResponseDto>**](AlbumUserResponseDto.md) | | [default to const []]
**startDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedAt** | [**DateTime**](DateTime.md) | |
@@ -1,4 +1,4 @@
# openapi.model.AlbumPermissionResponseDto
# openapi.model.AlbumUserResponseDto
## Load the model package
```dart
@@ -1,4 +1,4 @@
# openapi.model.SetAlbumPermissionDto
# openapi.model.UpdateAlbumUserDto
## Load the model package
```dart
+2 -2
View File
@@ -61,8 +61,8 @@ part 'model/activity_response_dto.dart';
part 'model/activity_statistics_response_dto.dart';
part 'model/add_users_dto.dart';
part 'model/album_count_response_dto.dart';
part 'model/album_permission_response_dto.dart';
part 'model/album_response_dto.dart';
part 'model/album_user_response_dto.dart';
part 'model/all_job_status_response_dto.dart';
part 'model/asset_bulk_delete_dto.dart';
part 'model/asset_bulk_update_dto.dart';
@@ -175,7 +175,6 @@ part 'model/server_ping_response.dart';
part 'model/server_stats_response_dto.dart';
part 'model/server_theme_dto.dart';
part 'model/server_version_response_dto.dart';
part 'model/set_album_permission_dto.dart';
part 'model/shared_link_create_dto.dart';
part 'model/shared_link_edit_dto.dart';
part 'model/shared_link_response_dto.dart';
@@ -212,6 +211,7 @@ part 'model/tone_mapping.dart';
part 'model/transcode_hw_accel.dart';
part 'model/transcode_policy.dart';
part 'model/update_album_dto.dart';
part 'model/update_album_user_dto.dart';
part 'model/update_asset_dto.dart';
part 'model/update_library_dto.dart';
part 'model/update_partner_dto.dart';
+49 -49
View File
@@ -485,55 +485,6 @@ class AlbumApi {
}
}
/// Performs an HTTP 'PUT /album/{id}/permission/{userId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] userId (required):
///
/// * [SetAlbumPermissionDto] setAlbumPermissionDto (required):
Future<Response> setAlbumPermissionWithHttpInfo(String id, String userId, SetAlbumPermissionDto setAlbumPermissionDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/permission/{userId}'
.replaceAll('{id}', id)
.replaceAll('{userId}', userId);
// ignore: prefer_final_locals
Object? postBody = setAlbumPermissionDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] userId (required):
///
/// * [SetAlbumPermissionDto] setAlbumPermissionDto (required):
Future<void> setAlbumPermission(String id, String userId, SetAlbumPermissionDto setAlbumPermissionDto,) async {
final response = await setAlbumPermissionWithHttpInfo(id, userId, setAlbumPermissionDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'PATCH /album/{id}' operation and returns the [Response].
/// Parameters:
///
@@ -585,4 +536,53 @@ class AlbumApi {
}
return null;
}
/// Performs an HTTP 'PUT /album/{id}/permission/{userId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] userId (required):
///
/// * [UpdateAlbumUserDto] updateAlbumUserDto (required):
Future<Response> updateAlbumUserWithHttpInfo(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{id}/permission/{userId}'
.replaceAll('{id}', id)
.replaceAll('{userId}', userId);
// ignore: prefer_final_locals
Object? postBody = updateAlbumUserDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
///
/// * [String] userId (required):
///
/// * [UpdateAlbumUserDto] updateAlbumUserDto (required):
Future<void> updateAlbumUser(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto,) async {
final response = await updateAlbumUserWithHttpInfo(id, userId, updateAlbumUserDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}
+4 -4
View File
@@ -200,10 +200,10 @@ class ApiClient {
return AddUsersDto.fromJson(value);
case 'AlbumCountResponseDto':
return AlbumCountResponseDto.fromJson(value);
case 'AlbumPermissionResponseDto':
return AlbumPermissionResponseDto.fromJson(value);
case 'AlbumResponseDto':
return AlbumResponseDto.fromJson(value);
case 'AlbumUserResponseDto':
return AlbumUserResponseDto.fromJson(value);
case 'AllJobStatusResponseDto':
return AllJobStatusResponseDto.fromJson(value);
case 'AssetBulkDeleteDto':
@@ -428,8 +428,6 @@ class ApiClient {
return ServerThemeDto.fromJson(value);
case 'ServerVersionResponseDto':
return ServerVersionResponseDto.fromJson(value);
case 'SetAlbumPermissionDto':
return SetAlbumPermissionDto.fromJson(value);
case 'SharedLinkCreateDto':
return SharedLinkCreateDto.fromJson(value);
case 'SharedLinkEditDto':
@@ -502,6 +500,8 @@ class ApiClient {
return TranscodePolicyTypeTransformer().decode(value);
case 'UpdateAlbumDto':
return UpdateAlbumDto.fromJson(value);
case 'UpdateAlbumUserDto':
return UpdateAlbumUserDto.fromJson(value);
case 'UpdateAssetDto':
return UpdateAssetDto.fromJson(value);
case 'UpdateLibraryDto':
+10 -10
View File
@@ -14,7 +14,6 @@ class AlbumResponseDto {
/// Returns a new [AlbumResponseDto] instance.
AlbumResponseDto({
required this.albumName,
this.albumPermissions = const [],
required this.albumThumbnailAssetId,
required this.assetCount,
this.assets = const [],
@@ -30,14 +29,13 @@ class AlbumResponseDto {
required this.ownerId,
required this.shared,
this.sharedUsers = const [],
this.sharedUsersV2 = const [],
this.startDate,
required this.updatedAt,
});
String albumName;
List<AlbumPermissionResponseDto> albumPermissions;
String? albumThumbnailAssetId;
int assetCount;
@@ -84,9 +82,11 @@ class AlbumResponseDto {
bool shared;
/// Deprecated in favor of albumPermissions
/// Deprecated in favor of users
List<UserResponseDto> sharedUsers;
List<AlbumUserResponseDto> sharedUsersV2;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -100,7 +100,6 @@ class AlbumResponseDto {
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto &&
other.albumName == albumName &&
_deepEquality.equals(other.albumPermissions, albumPermissions) &&
other.albumThumbnailAssetId == albumThumbnailAssetId &&
other.assetCount == assetCount &&
_deepEquality.equals(other.assets, assets) &&
@@ -116,6 +115,7 @@ class AlbumResponseDto {
other.ownerId == ownerId &&
other.shared == shared &&
_deepEquality.equals(other.sharedUsers, sharedUsers) &&
_deepEquality.equals(other.sharedUsersV2, sharedUsersV2) &&
other.startDate == startDate &&
other.updatedAt == updatedAt;
@@ -123,7 +123,6 @@ class AlbumResponseDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(albumName.hashCode) +
(albumPermissions.hashCode) +
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
(assetCount.hashCode) +
(assets.hashCode) +
@@ -139,16 +138,16 @@ class AlbumResponseDto {
(ownerId.hashCode) +
(shared.hashCode) +
(sharedUsers.hashCode) +
(sharedUsersV2.hashCode) +
(startDate == null ? 0 : startDate!.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'AlbumResponseDto[albumName=$albumName, albumPermissions=$albumPermissions, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, startDate=$startDate, updatedAt=$updatedAt]';
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, sharedUsersV2=$sharedUsersV2, startDate=$startDate, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'albumName'] = this.albumName;
json[r'albumPermissions'] = this.albumPermissions;
if (this.albumThumbnailAssetId != null) {
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
} else {
@@ -180,6 +179,7 @@ class AlbumResponseDto {
json[r'ownerId'] = this.ownerId;
json[r'shared'] = this.shared;
json[r'sharedUsers'] = this.sharedUsers;
json[r'sharedUsersV2'] = this.sharedUsersV2;
if (this.startDate != null) {
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
} else {
@@ -198,7 +198,6 @@ class AlbumResponseDto {
return AlbumResponseDto(
albumName: mapValueOfType<String>(json, r'albumName')!,
albumPermissions: AlbumPermissionResponseDto.listFromJson(json[r'albumPermissions']),
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
assetCount: mapValueOfType<int>(json, r'assetCount')!,
assets: AssetResponseDto.listFromJson(json[r'assets']),
@@ -214,6 +213,7 @@ class AlbumResponseDto {
ownerId: mapValueOfType<String>(json, r'ownerId')!,
shared: mapValueOfType<bool>(json, r'shared')!,
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
sharedUsersV2: AlbumUserResponseDto.listFromJson(json[r'sharedUsersV2']),
startDate: mapDateTime(json, r'startDate', r''),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
@@ -264,7 +264,6 @@ class AlbumResponseDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'albumName',
'albumPermissions',
'albumThumbnailAssetId',
'assetCount',
'assets',
@@ -277,6 +276,7 @@ class AlbumResponseDto {
'ownerId',
'shared',
'sharedUsers',
'sharedUsersV2',
'updatedAt',
};
}
@@ -10,9 +10,9 @@
part of openapi.api;
class AlbumPermissionResponseDto {
/// Returns a new [AlbumPermissionResponseDto] instance.
AlbumPermissionResponseDto({
class AlbumUserResponseDto {
/// Returns a new [AlbumUserResponseDto] instance.
AlbumUserResponseDto({
required this.readonly,
required this.user,
});
@@ -22,7 +22,7 @@ class AlbumPermissionResponseDto {
UserResponseDto user;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumPermissionResponseDto &&
bool operator ==(Object other) => identical(this, other) || other is AlbumUserResponseDto &&
other.readonly == readonly &&
other.user == user;
@@ -33,7 +33,7 @@ class AlbumPermissionResponseDto {
(user.hashCode);
@override
String toString() => 'AlbumPermissionResponseDto[readonly=$readonly, user=$user]';
String toString() => 'AlbumUserResponseDto[readonly=$readonly, user=$user]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -42,14 +42,14 @@ class AlbumPermissionResponseDto {
return json;
}
/// Returns a new [AlbumPermissionResponseDto] instance and imports its values from
/// Returns a new [AlbumUserResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumPermissionResponseDto? fromJson(dynamic value) {
static AlbumUserResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumPermissionResponseDto(
return AlbumUserResponseDto(
readonly: mapValueOfType<bool>(json, r'readonly')!,
user: UserResponseDto.fromJson(json[r'user'])!,
);
@@ -57,11 +57,11 @@ class AlbumPermissionResponseDto {
return null;
}
static List<AlbumPermissionResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumPermissionResponseDto>[];
static List<AlbumUserResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumUserResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumPermissionResponseDto.fromJson(row);
final value = AlbumUserResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
@@ -70,12 +70,12 @@ class AlbumPermissionResponseDto {
return result.toList(growable: growable);
}
static Map<String, AlbumPermissionResponseDto> mapFromJson(dynamic json) {
final map = <String, AlbumPermissionResponseDto>{};
static Map<String, AlbumUserResponseDto> mapFromJson(dynamic json) {
final map = <String, AlbumUserResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumPermissionResponseDto.fromJson(entry.value);
final value = AlbumUserResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@@ -84,14 +84,14 @@ class AlbumPermissionResponseDto {
return map;
}
// maps a json object with a list of AlbumPermissionResponseDto-objects as value to a dart map
static Map<String, List<AlbumPermissionResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumPermissionResponseDto>>{};
// maps a json object with a list of AlbumUserResponseDto-objects as value to a dart map
static Map<String, List<AlbumUserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumUserResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumPermissionResponseDto.listFromJson(entry.value, growable: growable,);
map[entry.key] = AlbumUserResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
@@ -10,16 +10,16 @@
part of openapi.api;
class SetAlbumPermissionDto {
/// Returns a new [SetAlbumPermissionDto] instance.
SetAlbumPermissionDto({
class UpdateAlbumUserDto {
/// Returns a new [UpdateAlbumUserDto] instance.
UpdateAlbumUserDto({
required this.readonly,
});
bool readonly;
@override
bool operator ==(Object other) => identical(this, other) || other is SetAlbumPermissionDto &&
bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumUserDto &&
other.readonly == readonly;
@override
@@ -28,7 +28,7 @@ class SetAlbumPermissionDto {
(readonly.hashCode);
@override
String toString() => 'SetAlbumPermissionDto[readonly=$readonly]';
String toString() => 'UpdateAlbumUserDto[readonly=$readonly]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -36,25 +36,25 @@ class SetAlbumPermissionDto {
return json;
}
/// Returns a new [SetAlbumPermissionDto] instance and imports its values from
/// Returns a new [UpdateAlbumUserDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SetAlbumPermissionDto? fromJson(dynamic value) {
static UpdateAlbumUserDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return SetAlbumPermissionDto(
return UpdateAlbumUserDto(
readonly: mapValueOfType<bool>(json, r'readonly')!,
);
}
return null;
}
static List<SetAlbumPermissionDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SetAlbumPermissionDto>[];
static List<UpdateAlbumUserDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateAlbumUserDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SetAlbumPermissionDto.fromJson(row);
final value = UpdateAlbumUserDto.fromJson(row);
if (value != null) {
result.add(value);
}
@@ -63,12 +63,12 @@ class SetAlbumPermissionDto {
return result.toList(growable: growable);
}
static Map<String, SetAlbumPermissionDto> mapFromJson(dynamic json) {
final map = <String, SetAlbumPermissionDto>{};
static Map<String, UpdateAlbumUserDto> mapFromJson(dynamic json) {
final map = <String, UpdateAlbumUserDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SetAlbumPermissionDto.fromJson(entry.value);
final value = UpdateAlbumUserDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@@ -77,14 +77,14 @@ class SetAlbumPermissionDto {
return map;
}
// maps a json object with a list of SetAlbumPermissionDto-objects as value to a dart map
static Map<String, List<SetAlbumPermissionDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SetAlbumPermissionDto>>{};
// maps a json object with a list of UpdateAlbumUserDto-objects as value to a dart map
static Map<String, List<UpdateAlbumUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateAlbumUserDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SetAlbumPermissionDto.listFromJson(entry.value, growable: growable,);
map[entry.key] = UpdateAlbumUserDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
+5 -5
View File
@@ -62,15 +62,15 @@ void main() {
// TODO
});
//Future setAlbumPermission(String id, String userId, SetAlbumPermissionDto setAlbumPermissionDto) async
test('test setAlbumPermission', () async {
// TODO
});
//Future<AlbumResponseDto> updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto) async
test('test updateAlbumInfo', () async {
// TODO
});
//Future updateAlbumUser(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto) async
test('test updateAlbumUser', () async {
// TODO
});
});
}
+6 -6
View File
@@ -21,11 +21,6 @@ void main() {
// TODO
});
// List<AlbumPermissionResponseDto> albumPermissions (default value: const [])
test('to test the property `albumPermissions`', () async {
// TODO
});
// String albumThumbnailAssetId
test('to test the property `albumThumbnailAssetId`', () async {
// TODO
@@ -96,12 +91,17 @@ void main() {
// TODO
});
// Deprecated in favor of albumPermissions
// Deprecated in favor of users
// List<UserResponseDto> sharedUsers (default value: const [])
test('to test the property `sharedUsers`', () async {
// TODO
});
// List<AlbumUserResponseDto> sharedUsersV2 (default value: const [])
test('to test the property `sharedUsersV2`', () async {
// TODO
});
// DateTime startDate
test('to test the property `startDate`', () async {
// TODO
@@ -11,11 +11,11 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for AlbumPermissionResponseDto
// tests for AlbumUserResponseDto
void main() {
// final instance = AlbumPermissionResponseDto();
// final instance = AlbumUserResponseDto();
group('test AlbumPermissionResponseDto', () {
group('test AlbumUserResponseDto', () {
// bool readonly
test('to test the property `readonly`', () async {
// TODO
@@ -11,11 +11,11 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SetAlbumPermissionDto
// tests for UpdateAlbumUserDto
void main() {
// final instance = SetAlbumPermissionDto();
// final instance = UpdateAlbumUserDto();
group('test SetAlbumPermissionDto', () {
group('test UpdateAlbumUserDto', () {
// bool readonly
test('to test the property `readonly`', () async {
// TODO