mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: yucca integration
This commit is contained in:
Generated
+83
@@ -119,6 +119,8 @@ Class | Method | HTTP request | Description
|
||||
*AssetsApi* | [**updateBulkAssetMetadata**](doc//AssetsApi.md#updatebulkassetmetadata) | **PUT** /assets/metadata | Upsert asset metadata
|
||||
*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | Upload asset
|
||||
*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | View asset thumbnail
|
||||
*AuthApi* | [**oidcAuthorize**](doc//AuthApi.md#oidcauthorize) | **GET** /yucca/auth/oidc/login |
|
||||
*AuthApi* | [**oidcCallback**](doc//AuthApi.md#oidccallback) | **GET** /yucca/auth/oidc/callback |
|
||||
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password
|
||||
*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | Change pin code
|
||||
*AuthenticationApi* | [**finishOAuth**](doc//AuthenticationApi.md#finishoauth) | **POST** /oauth/callback | Finish OAuth
|
||||
@@ -136,6 +138,8 @@ Class | Method | HTTP request | Description
|
||||
*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | Unlock auth session
|
||||
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token
|
||||
*AuthenticationAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthenticationAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | Unlink all OAuth accounts
|
||||
*BackendApi* | [**createLocalBackend**](doc//BackendApi.md#createlocalbackend) | **POST** /yucca/backend/local |
|
||||
*BackendApi* | [**getBackends**](doc//BackendApi.md#getbackends) | **GET** /yucca/backend |
|
||||
*DatabaseBackupsAdminApi* | [**deleteDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#deletedatabasebackup) | **DELETE** /admin/database-backups | Delete database backup
|
||||
*DatabaseBackupsAdminApi* | [**downloadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#downloaddatabasebackup) | **GET** /admin/database-backups/{filename} | Download database backup
|
||||
*DatabaseBackupsAdminApi* | [**listDatabaseBackups**](doc//DatabaseBackupsAdminApi.md#listdatabasebackups) | **GET** /admin/database-backups | List database backups
|
||||
@@ -147,6 +151,7 @@ Class | Method | HTTP request | Description
|
||||
*DeprecatedApi* | [**getFullSyncForUser**](doc//DeprecatedApi.md#getfullsyncforuser) | **POST** /sync/full-sync | Get full sync for user
|
||||
*DeprecatedApi* | [**getQueuesLegacy**](doc//DeprecatedApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status
|
||||
*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs
|
||||
*DevelopmentApi* | [**resetOrchestrator**](doc//DevelopmentApi.md#resetorchestrator) | **POST** /yucca/debug/reset |
|
||||
*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive
|
||||
*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information
|
||||
*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Delete a duplicate
|
||||
@@ -157,6 +162,9 @@ Class | Method | HTTP request | Description
|
||||
*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | Delete a face
|
||||
*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | Retrieve faces for asset
|
||||
*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | Re-assign a face to another person
|
||||
*FilesystemApi* | [**getFileListing**](doc//FilesystemApi.md#getfilelisting) | **GET** /yucca/fs |
|
||||
*IntegrationsApi* | [**configureImmichIntegration**](doc//IntegrationsApi.md#configureimmichintegration) | **POST** /yucca/integrations/immich |
|
||||
*IntegrationsApi* | [**getIntegrations**](doc//IntegrationsApi.md#getintegrations) | **GET** /yucca/integrations |
|
||||
*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | Create a manual job
|
||||
*JobsApi* | [**getQueuesLegacy**](doc//JobsApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status
|
||||
*JobsApi* | [**runQueueCommandLegacy**](doc//JobsApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs
|
||||
@@ -191,6 +199,11 @@ Class | Method | HTTP request | Description
|
||||
*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | Create a notification
|
||||
*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | Render email template
|
||||
*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | Send test email
|
||||
*OnboardingApi* | [**confirmRecoveryKey**](doc//OnboardingApi.md#confirmrecoverykey) | **POST** /yucca/onboarding/recovery-key |
|
||||
*OnboardingApi* | [**currentRecoveryKey**](doc//OnboardingApi.md#currentrecoverykey) | **GET** /yucca/onboarding/recovery-key |
|
||||
*OnboardingApi* | [**importRecoveryKey**](doc//OnboardingApi.md#importrecoverykey) | **PUT** /yucca/onboarding/recovery-key |
|
||||
*OnboardingApi* | [**onboardingStatus**](doc//OnboardingApi.md#onboardingstatus) | **GET** /yucca/onboarding |
|
||||
*OnboardingApi* | [**skipOnboardingExtraConfig**](doc//OnboardingApi.md#skiponboardingextraconfig) | **POST** /yucca/onboarding/skip |
|
||||
*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | Create a partner
|
||||
*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner
|
||||
*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | Retrieve partners
|
||||
@@ -215,6 +228,27 @@ Class | Method | HTTP request | Description
|
||||
*QueuesApi* | [**getQueueJobs**](doc//QueuesApi.md#getqueuejobs) | **GET** /queues/{name}/jobs | Retrieve queue jobs
|
||||
*QueuesApi* | [**getQueues**](doc//QueuesApi.md#getqueues) | **GET** /queues | List all queues
|
||||
*QueuesApi* | [**updateQueue**](doc//QueuesApi.md#updatequeue) | **PUT** /queues/{name} | Update a queue
|
||||
*RepositoryApi* | [**checkImportRepository**](doc//RepositoryApi.md#checkimportrepository) | **GET** /yucca/repository/{id}/import |
|
||||
*RepositoryApi* | [**createBackup**](doc//RepositoryApi.md#createbackup) | **POST** /yucca/repository/{id} |
|
||||
*RepositoryApi* | [**createRepository**](doc//RepositoryApi.md#createrepository) | **POST** /yucca/repository |
|
||||
*RepositoryApi* | [**forgetSnapshot**](doc//RepositoryApi.md#forgetsnapshot) | **DELETE** /yucca/repository/{id}/snapshots/{snapshot} |
|
||||
*RepositoryApi* | [**getRepositories**](doc//RepositoryApi.md#getrepositories) | **GET** /yucca/repository |
|
||||
*RepositoryApi* | [**getRunHistory**](doc//RepositoryApi.md#getrunhistory) | **GET** /yucca/repository/{id}/runs |
|
||||
*RepositoryApi* | [**getSnapshotListing**](doc//RepositoryApi.md#getsnapshotlisting) | **GET** /yucca/repository/{id}/snapshots/{snapshot}/listing |
|
||||
*RepositoryApi* | [**getSnapshots**](doc//RepositoryApi.md#getsnapshots) | **GET** /yucca/repository/{id}/snapshots |
|
||||
*RepositoryApi* | [**importRepository**](doc//RepositoryApi.md#importrepository) | **POST** /yucca/repository/{id}/import |
|
||||
*RepositoryApi* | [**inspectRepositories**](doc//RepositoryApi.md#inspectrepositories) | **GET** /yucca/repository/inspect |
|
||||
*RepositoryApi* | [**restoreFromPoint**](doc//RepositoryApi.md#restorefrompoint) | **POST** /yucca/repository/{id}/snapshots/{snapshot}/restore-from-point |
|
||||
*RepositoryApi* | [**restoreSnapshot**](doc//RepositoryApi.md#restoresnapshot) | **POST** /yucca/repository/{id}/snapshots/{snapshot} |
|
||||
*RepositoryApi* | [**updateRepository**](doc//RepositoryApi.md#updaterepository) | **PATCH** /yucca/repository/{id} |
|
||||
*RunHistoryApi* | [**logStreamSse**](doc//RunHistoryApi.md#logstreamsse) | **GET** /yucca/logs/{id} |
|
||||
*RunningTasksApi* | [**getRunningTasks**](doc//RunningTasksApi.md#getrunningtasks) | **GET** /yucca/tasks |
|
||||
*ScheduleApi* | [**addRepositoryToSchedule**](doc//ScheduleApi.md#addrepositorytoschedule) | **PUT** /yucca/schedule/{id}/{repositoryId} |
|
||||
*ScheduleApi* | [**createSchedule**](doc//ScheduleApi.md#createschedule) | **POST** /yucca/schedule |
|
||||
*ScheduleApi* | [**getSchedules**](doc//ScheduleApi.md#getschedules) | **GET** /yucca/schedule |
|
||||
*ScheduleApi* | [**removeRepositoryFromSchedule**](doc//ScheduleApi.md#removerepositoryfromschedule) | **DELETE** /yucca/schedule/{id}/{repositoryId} |
|
||||
*ScheduleApi* | [**removeSchedule**](doc//ScheduleApi.md#removeschedule) | **DELETE** /yucca/schedule/{id} |
|
||||
*ScheduleApi* | [**updateSchedule**](doc//ScheduleApi.md#updateschedule) | **PATCH** /yucca/schedule/{id} |
|
||||
*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | Retrieve assets by city
|
||||
*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | Retrieve explore data
|
||||
*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | Retrieve search suggestions
|
||||
@@ -330,6 +364,7 @@ Class | Method | HTTP request | Description
|
||||
- [APIKeyCreateResponseDto](doc//APIKeyCreateResponseDto.md)
|
||||
- [APIKeyResponseDto](doc//APIKeyResponseDto.md)
|
||||
- [APIKeyUpdateDto](doc//APIKeyUpdateDto.md)
|
||||
- [ActiveScheduleItemDto](doc//ActiveScheduleItemDto.md)
|
||||
- [ActivityCreateDto](doc//ActivityCreateDto.md)
|
||||
- [ActivityResponseDto](doc//ActivityResponseDto.md)
|
||||
- [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md)
|
||||
@@ -395,6 +430,10 @@ Class | Method | HTTP request | Description
|
||||
- [AudioCodec](doc//AudioCodec.md)
|
||||
- [AuthStatusResponseDto](doc//AuthStatusResponseDto.md)
|
||||
- [AvatarUpdate](doc//AvatarUpdate.md)
|
||||
- [BackendDto](doc//BackendDto.md)
|
||||
- [BackendResponseDto](doc//BackendResponseDto.md)
|
||||
- [BackendType](doc//BackendType.md)
|
||||
- [BackendsResponseDto](doc//BackendsResponseDto.md)
|
||||
- [BulkIdErrorReason](doc//BulkIdErrorReason.md)
|
||||
- [BulkIdResponseDto](doc//BulkIdResponseDto.md)
|
||||
- [BulkIdsDto](doc//BulkIdsDto.md)
|
||||
@@ -406,11 +445,15 @@ Class | Method | HTTP request | Description
|
||||
- [CheckExistingAssetsDto](doc//CheckExistingAssetsDto.md)
|
||||
- [CheckExistingAssetsResponseDto](doc//CheckExistingAssetsResponseDto.md)
|
||||
- [Colorspace](doc//Colorspace.md)
|
||||
- [ConfigureImmichIntegrationRequestDto](doc//ConfigureImmichIntegrationRequestDto.md)
|
||||
- [ConfigureImmichIntegrationRequestDtoLibraries](doc//ConfigureImmichIntegrationRequestDtoLibraries.md)
|
||||
- [ContributorCountResponseDto](doc//ContributorCountResponseDto.md)
|
||||
- [CreateAlbumDto](doc//CreateAlbumDto.md)
|
||||
- [CreateLibraryDto](doc//CreateLibraryDto.md)
|
||||
- [CreateLocalBackendRequestDto](doc//CreateLocalBackendRequestDto.md)
|
||||
- [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md)
|
||||
- [CropParameters](doc//CropParameters.md)
|
||||
- [CurrentRecoveryKeyResponse](doc//CurrentRecoveryKeyResponse.md)
|
||||
- [DatabaseBackupConfig](doc//DatabaseBackupConfig.md)
|
||||
- [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md)
|
||||
- [DatabaseBackupDto](doc//DatabaseBackupDto.md)
|
||||
@@ -430,16 +473,28 @@ Class | Method | HTTP request | Description
|
||||
- [ExifResponseDto](doc//ExifResponseDto.md)
|
||||
- [FaceDto](doc//FaceDto.md)
|
||||
- [FacialRecognitionConfig](doc//FacialRecognitionConfig.md)
|
||||
- [FilesystemListingItemDto](doc//FilesystemListingItemDto.md)
|
||||
- [FilesystemListingResponseDto](doc//FilesystemListingResponseDto.md)
|
||||
- [FoldersResponse](doc//FoldersResponse.md)
|
||||
- [FoldersUpdate](doc//FoldersUpdate.md)
|
||||
- [ImageFormat](doc//ImageFormat.md)
|
||||
- [ImmichIntegrationConfigurationDto](doc//ImmichIntegrationConfigurationDto.md)
|
||||
- [ImmichIntegrationDto](doc//ImmichIntegrationDto.md)
|
||||
- [ImmichLibraryDto](doc//ImmichLibraryDto.md)
|
||||
- [ImmichStateDto](doc//ImmichStateDto.md)
|
||||
- [ImportRecoveryKeyRequest](doc//ImportRecoveryKeyRequest.md)
|
||||
- [InspectedLocalRepositoryDto](doc//InspectedLocalRepositoryDto.md)
|
||||
- [IntegrationsResponseDto](doc//IntegrationsResponseDto.md)
|
||||
- [JobCreateDto](doc//JobCreateDto.md)
|
||||
- [JobName](doc//JobName.md)
|
||||
- [JobSettingsDto](doc//JobSettingsDto.md)
|
||||
- [LibraryResponseDto](doc//LibraryResponseDto.md)
|
||||
- [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md)
|
||||
- [LicenseKeyDto](doc//LicenseKeyDto.md)
|
||||
- [ListSnapshotsResponseDto](doc//ListSnapshotsResponseDto.md)
|
||||
- [LocalRepositoryDto](doc//LocalRepositoryDto.md)
|
||||
- [LogLevel](doc//LogLevel.md)
|
||||
- [LogResponseDto](doc//LogResponseDto.md)
|
||||
- [LoginCredentialDto](doc//LoginCredentialDto.md)
|
||||
- [LoginResponseDto](doc//LoginResponseDto.md)
|
||||
- [LogoutResponseDto](doc//LogoutResponseDto.md)
|
||||
@@ -480,6 +535,7 @@ Class | Method | HTTP request | Description
|
||||
- [OnThisDayDto](doc//OnThisDayDto.md)
|
||||
- [OnboardingDto](doc//OnboardingDto.md)
|
||||
- [OnboardingResponseDto](doc//OnboardingResponseDto.md)
|
||||
- [OnboardingStatusResponseDto](doc//OnboardingStatusResponseDto.md)
|
||||
- [PartnerCreateDto](doc//PartnerCreateDto.md)
|
||||
- [PartnerDirection](doc//PartnerDirection.md)
|
||||
- [PartnerResponseDto](doc//PartnerResponseDto.md)
|
||||
@@ -528,8 +584,32 @@ Class | Method | HTTP request | Description
|
||||
- [RatingsUpdate](doc//RatingsUpdate.md)
|
||||
- [ReactionLevel](doc//ReactionLevel.md)
|
||||
- [ReactionType](doc//ReactionType.md)
|
||||
- [RepositoryBackendDto](doc//RepositoryBackendDto.md)
|
||||
- [RepositoryBackendsDto](doc//RepositoryBackendsDto.md)
|
||||
- [RepositoryCheckImportResponseDto](doc//RepositoryCheckImportResponseDto.md)
|
||||
- [RepositoryConfigurationDto](doc//RepositoryConfigurationDto.md)
|
||||
- [RepositoryCreateRequestDto](doc//RepositoryCreateRequestDto.md)
|
||||
- [RepositoryCreateResponseDto](doc//RepositoryCreateResponseDto.md)
|
||||
- [RepositoryInspectResponseDto](doc//RepositoryInspectResponseDto.md)
|
||||
- [RepositoryListResponseDto](doc//RepositoryListResponseDto.md)
|
||||
- [RepositoryMetricsDto](doc//RepositoryMetricsDto.md)
|
||||
- [RepositorySnapshotRestoreFromPointRequestDto](doc//RepositorySnapshotRestoreFromPointRequestDto.md)
|
||||
- [RepositorySnapshotRestoreRequestDto](doc//RepositorySnapshotRestoreRequestDto.md)
|
||||
- [RepositoryUpdateRequestDto](doc//RepositoryUpdateRequestDto.md)
|
||||
- [RepositoryUpdateResponseDto](doc//RepositoryUpdateResponseDto.md)
|
||||
- [ReverseGeocodingStateResponseDto](doc//ReverseGeocodingStateResponseDto.md)
|
||||
- [RotateParameters](doc//RotateParameters.md)
|
||||
- [RunDto](doc//RunDto.md)
|
||||
- [RunHistoryResponseDto](doc//RunHistoryResponseDto.md)
|
||||
- [RunStatus](doc//RunStatus.md)
|
||||
- [RunningTaskDto](doc//RunningTaskDto.md)
|
||||
- [RunningTaskListResponse](doc//RunningTaskListResponse.md)
|
||||
- [ScheduleCreateRequestDto](doc//ScheduleCreateRequestDto.md)
|
||||
- [ScheduleCreateResponseDto](doc//ScheduleCreateResponseDto.md)
|
||||
- [ScheduleDto](doc//ScheduleDto.md)
|
||||
- [ScheduleListResponseDto](doc//ScheduleListResponseDto.md)
|
||||
- [ScheduleUpdateRequestDto](doc//ScheduleUpdateRequestDto.md)
|
||||
- [ScheduleUpdateResponseDto](doc//ScheduleUpdateResponseDto.md)
|
||||
- [SearchAlbumResponseDto](doc//SearchAlbumResponseDto.md)
|
||||
- [SearchAssetResponseDto](doc//SearchAssetResponseDto.md)
|
||||
- [SearchExploreItem](doc//SearchExploreItem.md)
|
||||
@@ -565,6 +645,7 @@ Class | Method | HTTP request | Description
|
||||
- [SharedLinksUpdate](doc//SharedLinksUpdate.md)
|
||||
- [SignUpDto](doc//SignUpDto.md)
|
||||
- [SmartSearchDto](doc//SmartSearchDto.md)
|
||||
- [SnapshotDto](doc//SnapshotDto.md)
|
||||
- [SourceType](doc//SourceType.md)
|
||||
- [StackCreateDto](doc//StackCreateDto.md)
|
||||
- [StackResponseDto](doc//StackResponseDto.md)
|
||||
@@ -647,6 +728,8 @@ Class | Method | HTTP request | Description
|
||||
- [TagUpsertDto](doc//TagUpsertDto.md)
|
||||
- [TagsResponse](doc//TagsResponse.md)
|
||||
- [TagsUpdate](doc//TagsUpdate.md)
|
||||
- [TaskStatus](doc//TaskStatus.md)
|
||||
- [TaskType](doc//TaskType.md)
|
||||
- [TemplateDto](doc//TemplateDto.md)
|
||||
- [TemplateResponseDto](doc//TemplateResponseDto.md)
|
||||
- [TestEmailResponseDto](doc//TestEmailResponseDto.md)
|
||||
|
||||
Generated
+59
@@ -34,13 +34,18 @@ part 'api/api_keys_api.dart';
|
||||
part 'api/activities_api.dart';
|
||||
part 'api/albums_api.dart';
|
||||
part 'api/assets_api.dart';
|
||||
part 'api/auth_api.dart';
|
||||
part 'api/authentication_api.dart';
|
||||
part 'api/authentication_admin_api.dart';
|
||||
part 'api/backend_api.dart';
|
||||
part 'api/database_backups_admin_api.dart';
|
||||
part 'api/deprecated_api.dart';
|
||||
part 'api/development_api.dart';
|
||||
part 'api/download_api.dart';
|
||||
part 'api/duplicates_api.dart';
|
||||
part 'api/faces_api.dart';
|
||||
part 'api/filesystem_api.dart';
|
||||
part 'api/integrations_api.dart';
|
||||
part 'api/jobs_api.dart';
|
||||
part 'api/libraries_api.dart';
|
||||
part 'api/maintenance_admin_api.dart';
|
||||
@@ -48,10 +53,15 @@ part 'api/map_api.dart';
|
||||
part 'api/memories_api.dart';
|
||||
part 'api/notifications_api.dart';
|
||||
part 'api/notifications_admin_api.dart';
|
||||
part 'api/onboarding_api.dart';
|
||||
part 'api/partners_api.dart';
|
||||
part 'api/people_api.dart';
|
||||
part 'api/plugins_api.dart';
|
||||
part 'api/queues_api.dart';
|
||||
part 'api/repository_api.dart';
|
||||
part 'api/run_history_api.dart';
|
||||
part 'api/running_tasks_api.dart';
|
||||
part 'api/schedule_api.dart';
|
||||
part 'api/search_api.dart';
|
||||
part 'api/server_api.dart';
|
||||
part 'api/sessions_api.dart';
|
||||
@@ -72,6 +82,7 @@ part 'model/api_key_create_dto.dart';
|
||||
part 'model/api_key_create_response_dto.dart';
|
||||
part 'model/api_key_response_dto.dart';
|
||||
part 'model/api_key_update_dto.dart';
|
||||
part 'model/active_schedule_item_dto.dart';
|
||||
part 'model/activity_create_dto.dart';
|
||||
part 'model/activity_response_dto.dart';
|
||||
part 'model/activity_statistics_response_dto.dart';
|
||||
@@ -137,6 +148,10 @@ part 'model/asset_visibility.dart';
|
||||
part 'model/audio_codec.dart';
|
||||
part 'model/auth_status_response_dto.dart';
|
||||
part 'model/avatar_update.dart';
|
||||
part 'model/backend_dto.dart';
|
||||
part 'model/backend_response_dto.dart';
|
||||
part 'model/backend_type.dart';
|
||||
part 'model/backends_response_dto.dart';
|
||||
part 'model/bulk_id_error_reason.dart';
|
||||
part 'model/bulk_id_response_dto.dart';
|
||||
part 'model/bulk_ids_dto.dart';
|
||||
@@ -148,11 +163,15 @@ part 'model/change_password_dto.dart';
|
||||
part 'model/check_existing_assets_dto.dart';
|
||||
part 'model/check_existing_assets_response_dto.dart';
|
||||
part 'model/colorspace.dart';
|
||||
part 'model/configure_immich_integration_request_dto.dart';
|
||||
part 'model/configure_immich_integration_request_dto_libraries.dart';
|
||||
part 'model/contributor_count_response_dto.dart';
|
||||
part 'model/create_album_dto.dart';
|
||||
part 'model/create_library_dto.dart';
|
||||
part 'model/create_local_backend_request_dto.dart';
|
||||
part 'model/create_profile_image_response_dto.dart';
|
||||
part 'model/crop_parameters.dart';
|
||||
part 'model/current_recovery_key_response.dart';
|
||||
part 'model/database_backup_config.dart';
|
||||
part 'model/database_backup_delete_dto.dart';
|
||||
part 'model/database_backup_dto.dart';
|
||||
@@ -172,16 +191,28 @@ part 'model/email_notifications_update.dart';
|
||||
part 'model/exif_response_dto.dart';
|
||||
part 'model/face_dto.dart';
|
||||
part 'model/facial_recognition_config.dart';
|
||||
part 'model/filesystem_listing_item_dto.dart';
|
||||
part 'model/filesystem_listing_response_dto.dart';
|
||||
part 'model/folders_response.dart';
|
||||
part 'model/folders_update.dart';
|
||||
part 'model/image_format.dart';
|
||||
part 'model/immich_integration_configuration_dto.dart';
|
||||
part 'model/immich_integration_dto.dart';
|
||||
part 'model/immich_library_dto.dart';
|
||||
part 'model/immich_state_dto.dart';
|
||||
part 'model/import_recovery_key_request.dart';
|
||||
part 'model/inspected_local_repository_dto.dart';
|
||||
part 'model/integrations_response_dto.dart';
|
||||
part 'model/job_create_dto.dart';
|
||||
part 'model/job_name.dart';
|
||||
part 'model/job_settings_dto.dart';
|
||||
part 'model/library_response_dto.dart';
|
||||
part 'model/library_stats_response_dto.dart';
|
||||
part 'model/license_key_dto.dart';
|
||||
part 'model/list_snapshots_response_dto.dart';
|
||||
part 'model/local_repository_dto.dart';
|
||||
part 'model/log_level.dart';
|
||||
part 'model/log_response_dto.dart';
|
||||
part 'model/login_credential_dto.dart';
|
||||
part 'model/login_response_dto.dart';
|
||||
part 'model/logout_response_dto.dart';
|
||||
@@ -222,6 +253,7 @@ part 'model/ocr_config.dart';
|
||||
part 'model/on_this_day_dto.dart';
|
||||
part 'model/onboarding_dto.dart';
|
||||
part 'model/onboarding_response_dto.dart';
|
||||
part 'model/onboarding_status_response_dto.dart';
|
||||
part 'model/partner_create_dto.dart';
|
||||
part 'model/partner_direction.dart';
|
||||
part 'model/partner_response_dto.dart';
|
||||
@@ -270,8 +302,32 @@ part 'model/ratings_response.dart';
|
||||
part 'model/ratings_update.dart';
|
||||
part 'model/reaction_level.dart';
|
||||
part 'model/reaction_type.dart';
|
||||
part 'model/repository_backend_dto.dart';
|
||||
part 'model/repository_backends_dto.dart';
|
||||
part 'model/repository_check_import_response_dto.dart';
|
||||
part 'model/repository_configuration_dto.dart';
|
||||
part 'model/repository_create_request_dto.dart';
|
||||
part 'model/repository_create_response_dto.dart';
|
||||
part 'model/repository_inspect_response_dto.dart';
|
||||
part 'model/repository_list_response_dto.dart';
|
||||
part 'model/repository_metrics_dto.dart';
|
||||
part 'model/repository_snapshot_restore_from_point_request_dto.dart';
|
||||
part 'model/repository_snapshot_restore_request_dto.dart';
|
||||
part 'model/repository_update_request_dto.dart';
|
||||
part 'model/repository_update_response_dto.dart';
|
||||
part 'model/reverse_geocoding_state_response_dto.dart';
|
||||
part 'model/rotate_parameters.dart';
|
||||
part 'model/run_dto.dart';
|
||||
part 'model/run_history_response_dto.dart';
|
||||
part 'model/run_status.dart';
|
||||
part 'model/running_task_dto.dart';
|
||||
part 'model/running_task_list_response.dart';
|
||||
part 'model/schedule_create_request_dto.dart';
|
||||
part 'model/schedule_create_response_dto.dart';
|
||||
part 'model/schedule_dto.dart';
|
||||
part 'model/schedule_list_response_dto.dart';
|
||||
part 'model/schedule_update_request_dto.dart';
|
||||
part 'model/schedule_update_response_dto.dart';
|
||||
part 'model/search_album_response_dto.dart';
|
||||
part 'model/search_asset_response_dto.dart';
|
||||
part 'model/search_explore_item.dart';
|
||||
@@ -307,6 +363,7 @@ part 'model/shared_links_response.dart';
|
||||
part 'model/shared_links_update.dart';
|
||||
part 'model/sign_up_dto.dart';
|
||||
part 'model/smart_search_dto.dart';
|
||||
part 'model/snapshot_dto.dart';
|
||||
part 'model/source_type.dart';
|
||||
part 'model/stack_create_dto.dart';
|
||||
part 'model/stack_response_dto.dart';
|
||||
@@ -389,6 +446,8 @@ part 'model/tag_update_dto.dart';
|
||||
part 'model/tag_upsert_dto.dart';
|
||||
part 'model/tags_response.dart';
|
||||
part 'model/tags_update.dart';
|
||||
part 'model/task_status.dart';
|
||||
part 'model/task_type.dart';
|
||||
part 'model/template_dto.dart';
|
||||
part 'model/template_response_dto.dart';
|
||||
part 'model/test_email_response_dto.dart';
|
||||
|
||||
Generated
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// 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 AuthApi {
|
||||
AuthApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/auth/oidc/login' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] next (required):
|
||||
Future<Response> oidcAuthorizeWithHttpInfo(String next,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/auth/oidc/login';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'next', next));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] next (required):
|
||||
Future<void> oidcAuthorize(String next,) async {
|
||||
final response = await oidcAuthorizeWithHttpInfo(next,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/auth/oidc/callback' operation and returns the [Response].
|
||||
Future<Response> oidcCallbackWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/auth/oidc/callback';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> oidcCallback() async {
|
||||
final response = await oidcCallbackWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+106
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// 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 BackendApi {
|
||||
BackendApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/backend/local' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [CreateLocalBackendRequestDto] createLocalBackendRequestDto (required):
|
||||
Future<Response> createLocalBackendWithHttpInfo(CreateLocalBackendRequestDto createLocalBackendRequestDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/backend/local';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = createLocalBackendRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [CreateLocalBackendRequestDto] createLocalBackendRequestDto (required):
|
||||
Future<BackendResponseDto?> createLocalBackend(CreateLocalBackendRequestDto createLocalBackendRequestDto,) async {
|
||||
final response = await createLocalBackendWithHttpInfo(createLocalBackendRequestDto,);
|
||||
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), 'BackendResponseDto',) as BackendResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/backend' operation and returns the [Response].
|
||||
Future<Response> getBackendsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/backend';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<BackendsResponseDto?> getBackends() async {
|
||||
final response = await getBackendsWithHttpInfo();
|
||||
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), 'BackendsResponseDto',) as BackendsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// 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 DevelopmentApi {
|
||||
DevelopmentApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/debug/reset' operation and returns the [Response].
|
||||
Future<Response> resetOrchestratorWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/debug/reset';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> resetOrchestrator() async {
|
||||
final response = await resetOrchestratorWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// 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 FilesystemApi {
|
||||
FilesystemApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/fs' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] path:
|
||||
Future<Response> getFileListingWithHttpInfo({ String? path, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/fs';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (path != null) {
|
||||
queryParams.addAll(_queryParams('', 'path', path));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] path:
|
||||
Future<FilesystemListingResponseDto?> getFileListing({ String? path, }) async {
|
||||
final response = await getFileListingWithHttpInfo( path: path, );
|
||||
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), 'FilesystemListingResponseDto',) as FilesystemListingResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// 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 IntegrationsApi {
|
||||
IntegrationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/integrations/immich' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ConfigureImmichIntegrationRequestDto] configureImmichIntegrationRequestDto (required):
|
||||
Future<Response> configureImmichIntegrationWithHttpInfo(ConfigureImmichIntegrationRequestDto configureImmichIntegrationRequestDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/integrations/immich';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = configureImmichIntegrationRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ConfigureImmichIntegrationRequestDto] configureImmichIntegrationRequestDto (required):
|
||||
Future<void> configureImmichIntegration(ConfigureImmichIntegrationRequestDto configureImmichIntegrationRequestDto,) async {
|
||||
final response = await configureImmichIntegrationWithHttpInfo(configureImmichIntegrationRequestDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/integrations' operation and returns the [Response].
|
||||
Future<Response> getIntegrationsWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/integrations';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<IntegrationsResponseDto?> getIntegrations() async {
|
||||
final response = await getIntegrationsWithHttpInfo();
|
||||
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), 'IntegrationsResponseDto',) as IntegrationsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+205
@@ -0,0 +1,205 @@
|
||||
//
|
||||
// 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 OnboardingApi {
|
||||
OnboardingApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/onboarding/recovery-key' operation and returns the [Response].
|
||||
Future<Response> confirmRecoveryKeyWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/onboarding/recovery-key';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> confirmRecoveryKey() async {
|
||||
final response = await confirmRecoveryKeyWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/onboarding/recovery-key' operation and returns the [Response].
|
||||
Future<Response> currentRecoveryKeyWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/onboarding/recovery-key';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<CurrentRecoveryKeyResponse?> currentRecoveryKey() async {
|
||||
final response = await currentRecoveryKeyWithHttpInfo();
|
||||
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), 'CurrentRecoveryKeyResponse',) as CurrentRecoveryKeyResponse;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /yucca/onboarding/recovery-key' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ImportRecoveryKeyRequest] importRecoveryKeyRequest (required):
|
||||
Future<Response> importRecoveryKeyWithHttpInfo(ImportRecoveryKeyRequest importRecoveryKeyRequest,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/onboarding/recovery-key';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = importRecoveryKeyRequest;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ImportRecoveryKeyRequest] importRecoveryKeyRequest (required):
|
||||
Future<void> importRecoveryKey(ImportRecoveryKeyRequest importRecoveryKeyRequest,) async {
|
||||
final response = await importRecoveryKeyWithHttpInfo(importRecoveryKeyRequest,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/onboarding' operation and returns the [Response].
|
||||
Future<Response> onboardingStatusWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/onboarding';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<OnboardingStatusResponseDto?> onboardingStatus() async {
|
||||
final response = await onboardingStatusWithHttpInfo();
|
||||
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), 'OnboardingStatusResponseDto',) as OnboardingStatusResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/onboarding/skip' operation and returns the [Response].
|
||||
Future<Response> skipOnboardingExtraConfigWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/onboarding/skip';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> skipOnboardingExtraConfig() async {
|
||||
final response = await skipOnboardingExtraConfigWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
+701
@@ -0,0 +1,701 @@
|
||||
//
|
||||
// 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 RepositoryApi {
|
||||
RepositoryApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/repository/{id}/import' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] backend (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> checkImportRepositoryWithHttpInfo(String backend, String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/import'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'backend', backend));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] backend (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<RepositoryCheckImportResponseDto?> checkImportRepository(String backend, String id,) async {
|
||||
final response = await checkImportRepositoryWithHttpInfo(backend, id,);
|
||||
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), 'RepositoryCheckImportResponseDto',) as RepositoryCheckImportResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/repository/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> createBackupWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<LogResponseDto?> createBackup(String id,) async {
|
||||
final response = await createBackupWithHttpInfo(id,);
|
||||
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), 'LogResponseDto',) as LogResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/repository' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RepositoryCreateRequestDto] repositoryCreateRequestDto (required):
|
||||
///
|
||||
/// * [String] backend:
|
||||
Future<Response> createRepositoryWithHttpInfo(RepositoryCreateRequestDto repositoryCreateRequestDto, { String? backend, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = repositoryCreateRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (backend != null) {
|
||||
queryParams.addAll(_queryParams('', 'backend', backend));
|
||||
}
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [RepositoryCreateRequestDto] repositoryCreateRequestDto (required):
|
||||
///
|
||||
/// * [String] backend:
|
||||
Future<RepositoryCreateResponseDto?> createRepository(RepositoryCreateRequestDto repositoryCreateRequestDto, { String? backend, }) async {
|
||||
final response = await createRepositoryWithHttpInfo(repositoryCreateRequestDto, backend: backend, );
|
||||
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), 'RepositoryCreateResponseDto',) as RepositoryCreateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /yucca/repository/{id}/snapshots/{snapshot}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
Future<Response> forgetSnapshotWithHttpInfo(String id, String snapshot,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{snapshot}', snapshot);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
Future<ListSnapshotsResponseDto?> forgetSnapshot(String id, String snapshot,) async {
|
||||
final response = await forgetSnapshotWithHttpInfo(id, snapshot,);
|
||||
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), 'ListSnapshotsResponseDto',) as ListSnapshotsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/repository' operation and returns the [Response].
|
||||
Future<Response> getRepositoriesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<RepositoryListResponseDto?> getRepositories() async {
|
||||
final response = await getRepositoriesWithHttpInfo();
|
||||
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), 'RepositoryListResponseDto',) as RepositoryListResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/repository/{id}/runs' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getRunHistoryWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/runs'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<RunHistoryResponseDto?> getRunHistory(String id,) async {
|
||||
final response = await getRunHistoryWithHttpInfo(id,);
|
||||
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), 'RunHistoryResponseDto',) as RunHistoryResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/repository/{id}/snapshots/{snapshot}/listing' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
///
|
||||
/// * [String] path:
|
||||
Future<Response> getSnapshotListingWithHttpInfo(String id, String snapshot, { String? path, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}/listing'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{snapshot}', snapshot);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (path != null) {
|
||||
queryParams.addAll(_queryParams('', 'path', path));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
///
|
||||
/// * [String] path:
|
||||
Future<FilesystemListingResponseDto?> getSnapshotListing(String id, String snapshot, { String? path, }) async {
|
||||
final response = await getSnapshotListingWithHttpInfo(id, snapshot, path: path, );
|
||||
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), 'FilesystemListingResponseDto',) as FilesystemListingResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/repository/{id}/snapshots' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> getSnapshotsWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/snapshots'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<ListSnapshotsResponseDto?> getSnapshots(String id,) async {
|
||||
final response = await getSnapshotsWithHttpInfo(id,);
|
||||
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), 'ListSnapshotsResponseDto',) as ListSnapshotsResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/repository/{id}/import' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] backend (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> importRepositoryWithHttpInfo(String backend, String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/import'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'backend', backend));
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] backend (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<RepositoryCreateResponseDto?> importRepository(String backend, String id,) async {
|
||||
final response = await importRepositoryWithHttpInfo(backend, id,);
|
||||
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), 'RepositoryCreateResponseDto',) as RepositoryCreateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/repository/inspect' operation and returns the [Response].
|
||||
Future<Response> inspectRepositoriesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/inspect';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<RepositoryInspectResponseDto?> inspectRepositories() async {
|
||||
final response = await inspectRepositoriesWithHttpInfo();
|
||||
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), 'RepositoryInspectResponseDto',) as RepositoryInspectResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/repository/{id}/snapshots/{snapshot}/restore-from-point' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] backend (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
///
|
||||
/// * [RepositorySnapshotRestoreFromPointRequestDto] repositorySnapshotRestoreFromPointRequestDto (required):
|
||||
Future<Response> restoreFromPointWithHttpInfo(String backend, String id, String snapshot, RepositorySnapshotRestoreFromPointRequestDto repositorySnapshotRestoreFromPointRequestDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}/restore-from-point'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{snapshot}', snapshot);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = repositorySnapshotRestoreFromPointRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
queryParams.addAll(_queryParams('', 'backend', backend));
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] backend (required):
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
///
|
||||
/// * [RepositorySnapshotRestoreFromPointRequestDto] repositorySnapshotRestoreFromPointRequestDto (required):
|
||||
Future<LogResponseDto?> restoreFromPoint(String backend, String id, String snapshot, RepositorySnapshotRestoreFromPointRequestDto repositorySnapshotRestoreFromPointRequestDto,) async {
|
||||
final response = await restoreFromPointWithHttpInfo(backend, id, snapshot, repositorySnapshotRestoreFromPointRequestDto,);
|
||||
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), 'LogResponseDto',) as LogResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/repository/{id}/snapshots/{snapshot}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
///
|
||||
/// * [RepositorySnapshotRestoreRequestDto] repositorySnapshotRestoreRequestDto (required):
|
||||
Future<Response> restoreSnapshotWithHttpInfo(String id, String snapshot, RepositorySnapshotRestoreRequestDto repositorySnapshotRestoreRequestDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}/snapshots/{snapshot}'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{snapshot}', snapshot);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = repositorySnapshotRestoreRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] snapshot (required):
|
||||
///
|
||||
/// * [RepositorySnapshotRestoreRequestDto] repositorySnapshotRestoreRequestDto (required):
|
||||
Future<LogResponseDto?> restoreSnapshot(String id, String snapshot, RepositorySnapshotRestoreRequestDto repositorySnapshotRestoreRequestDto,) async {
|
||||
final response = await restoreSnapshotWithHttpInfo(id, snapshot, repositorySnapshotRestoreRequestDto,);
|
||||
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), 'LogResponseDto',) as LogResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PATCH /yucca/repository/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [RepositoryUpdateRequestDto] repositoryUpdateRequestDto (required):
|
||||
///
|
||||
/// * [String] backend:
|
||||
Future<Response> updateRepositoryWithHttpInfo(String id, RepositoryUpdateRequestDto repositoryUpdateRequestDto, { String? backend, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/repository/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = repositoryUpdateRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
if (backend != null) {
|
||||
queryParams.addAll(_queryParams('', 'backend', backend));
|
||||
}
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PATCH',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [RepositoryUpdateRequestDto] repositoryUpdateRequestDto (required):
|
||||
///
|
||||
/// * [String] backend:
|
||||
Future<RepositoryUpdateResponseDto?> updateRepository(String id, RepositoryUpdateRequestDto repositoryUpdateRequestDto, { String? backend, }) async {
|
||||
final response = await updateRepositoryWithHttpInfo(id, repositoryUpdateRequestDto, backend: backend, );
|
||||
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), 'RepositoryUpdateResponseDto',) as RepositoryUpdateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// 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 RunHistoryApi {
|
||||
RunHistoryApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/logs/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> logStreamSseWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/logs/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> logStreamSse(String id,) async {
|
||||
final response = await logStreamSseWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// 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 RunningTasksApi {
|
||||
RunningTasksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/tasks' operation and returns the [Response].
|
||||
Future<Response> getRunningTasksWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/tasks';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<RunningTaskListResponse?> getRunningTasks() async {
|
||||
final response = await getRunningTasksWithHttpInfo();
|
||||
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), 'RunningTaskListResponse',) as RunningTaskListResponse;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Generated
+288
@@ -0,0 +1,288 @@
|
||||
//
|
||||
// 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 ScheduleApi {
|
||||
ScheduleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'PUT /yucca/schedule/{id}/{repositoryId}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] repositoryId (required):
|
||||
Future<Response> addRepositoryToScheduleWithHttpInfo(String id, String repositoryId,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/schedule/{id}/{repositoryId}'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{repositoryId}', repositoryId);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PUT',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] repositoryId (required):
|
||||
Future<void> addRepositoryToSchedule(String id, String repositoryId,) async {
|
||||
final response = await addRepositoryToScheduleWithHttpInfo(id, repositoryId,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /yucca/schedule' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ScheduleCreateRequestDto] scheduleCreateRequestDto (required):
|
||||
Future<Response> createScheduleWithHttpInfo(ScheduleCreateRequestDto scheduleCreateRequestDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/schedule';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = scheduleCreateRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'POST',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [ScheduleCreateRequestDto] scheduleCreateRequestDto (required):
|
||||
Future<ScheduleCreateResponseDto?> createSchedule(ScheduleCreateRequestDto scheduleCreateRequestDto,) async {
|
||||
final response = await createScheduleWithHttpInfo(scheduleCreateRequestDto,);
|
||||
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), 'ScheduleCreateResponseDto',) as ScheduleCreateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /yucca/schedule' operation and returns the [Response].
|
||||
Future<Response> getSchedulesWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/schedule';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<ScheduleListResponseDto?> getSchedules() async {
|
||||
final response = await getSchedulesWithHttpInfo();
|
||||
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), 'ScheduleListResponseDto',) as ScheduleListResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /yucca/schedule/{id}/{repositoryId}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] repositoryId (required):
|
||||
Future<Response> removeRepositoryFromScheduleWithHttpInfo(String id, String repositoryId,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/schedule/{id}/{repositoryId}'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{repositoryId}', repositoryId);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] repositoryId (required):
|
||||
Future<void> removeRepositoryFromSchedule(String id, String repositoryId,) async {
|
||||
final response = await removeRepositoryFromScheduleWithHttpInfo(id, repositoryId,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /yucca/schedule/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<Response> removeScheduleWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/schedule/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'DELETE',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
Future<void> removeSchedule(String id,) async {
|
||||
final response = await removeScheduleWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PATCH /yucca/schedule/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [ScheduleUpdateRequestDto] scheduleUpdateRequestDto (required):
|
||||
Future<Response> updateScheduleWithHttpInfo(String id, ScheduleUpdateRequestDto scheduleUpdateRequestDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final apiPath = r'/yucca/schedule/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = scheduleUpdateRequestDto;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>['application/json'];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
apiPath,
|
||||
'PATCH',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [ScheduleUpdateRequestDto] scheduleUpdateRequestDto (required):
|
||||
Future<ScheduleUpdateResponseDto?> updateSchedule(String id, ScheduleUpdateRequestDto scheduleUpdateRequestDto,) async {
|
||||
final response = await updateScheduleWithHttpInfo(id, scheduleUpdateRequestDto,);
|
||||
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), 'ScheduleUpdateResponseDto',) as ScheduleUpdateResponseDto;
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Generated
+98
@@ -190,6 +190,8 @@ class ApiClient {
|
||||
return APIKeyResponseDto.fromJson(value);
|
||||
case 'APIKeyUpdateDto':
|
||||
return APIKeyUpdateDto.fromJson(value);
|
||||
case 'ActiveScheduleItemDto':
|
||||
return ActiveScheduleItemDto.fromJson(value);
|
||||
case 'ActivityCreateDto':
|
||||
return ActivityCreateDto.fromJson(value);
|
||||
case 'ActivityResponseDto':
|
||||
@@ -320,6 +322,14 @@ class ApiClient {
|
||||
return AuthStatusResponseDto.fromJson(value);
|
||||
case 'AvatarUpdate':
|
||||
return AvatarUpdate.fromJson(value);
|
||||
case 'BackendDto':
|
||||
return BackendDto.fromJson(value);
|
||||
case 'BackendResponseDto':
|
||||
return BackendResponseDto.fromJson(value);
|
||||
case 'BackendType':
|
||||
return BackendTypeTypeTransformer().decode(value);
|
||||
case 'BackendsResponseDto':
|
||||
return BackendsResponseDto.fromJson(value);
|
||||
case 'BulkIdErrorReason':
|
||||
return BulkIdErrorReasonTypeTransformer().decode(value);
|
||||
case 'BulkIdResponseDto':
|
||||
@@ -342,16 +352,24 @@ class ApiClient {
|
||||
return CheckExistingAssetsResponseDto.fromJson(value);
|
||||
case 'Colorspace':
|
||||
return ColorspaceTypeTransformer().decode(value);
|
||||
case 'ConfigureImmichIntegrationRequestDto':
|
||||
return ConfigureImmichIntegrationRequestDto.fromJson(value);
|
||||
case 'ConfigureImmichIntegrationRequestDtoLibraries':
|
||||
return ConfigureImmichIntegrationRequestDtoLibraries.fromJson(value);
|
||||
case 'ContributorCountResponseDto':
|
||||
return ContributorCountResponseDto.fromJson(value);
|
||||
case 'CreateAlbumDto':
|
||||
return CreateAlbumDto.fromJson(value);
|
||||
case 'CreateLibraryDto':
|
||||
return CreateLibraryDto.fromJson(value);
|
||||
case 'CreateLocalBackendRequestDto':
|
||||
return CreateLocalBackendRequestDto.fromJson(value);
|
||||
case 'CreateProfileImageResponseDto':
|
||||
return CreateProfileImageResponseDto.fromJson(value);
|
||||
case 'CropParameters':
|
||||
return CropParameters.fromJson(value);
|
||||
case 'CurrentRecoveryKeyResponse':
|
||||
return CurrentRecoveryKeyResponse.fromJson(value);
|
||||
case 'DatabaseBackupConfig':
|
||||
return DatabaseBackupConfig.fromJson(value);
|
||||
case 'DatabaseBackupDeleteDto':
|
||||
@@ -390,12 +408,30 @@ class ApiClient {
|
||||
return FaceDto.fromJson(value);
|
||||
case 'FacialRecognitionConfig':
|
||||
return FacialRecognitionConfig.fromJson(value);
|
||||
case 'FilesystemListingItemDto':
|
||||
return FilesystemListingItemDto.fromJson(value);
|
||||
case 'FilesystemListingResponseDto':
|
||||
return FilesystemListingResponseDto.fromJson(value);
|
||||
case 'FoldersResponse':
|
||||
return FoldersResponse.fromJson(value);
|
||||
case 'FoldersUpdate':
|
||||
return FoldersUpdate.fromJson(value);
|
||||
case 'ImageFormat':
|
||||
return ImageFormatTypeTransformer().decode(value);
|
||||
case 'ImmichIntegrationConfigurationDto':
|
||||
return ImmichIntegrationConfigurationDto.fromJson(value);
|
||||
case 'ImmichIntegrationDto':
|
||||
return ImmichIntegrationDto.fromJson(value);
|
||||
case 'ImmichLibraryDto':
|
||||
return ImmichLibraryDto.fromJson(value);
|
||||
case 'ImmichStateDto':
|
||||
return ImmichStateDto.fromJson(value);
|
||||
case 'ImportRecoveryKeyRequest':
|
||||
return ImportRecoveryKeyRequest.fromJson(value);
|
||||
case 'InspectedLocalRepositoryDto':
|
||||
return InspectedLocalRepositoryDto.fromJson(value);
|
||||
case 'IntegrationsResponseDto':
|
||||
return IntegrationsResponseDto.fromJson(value);
|
||||
case 'JobCreateDto':
|
||||
return JobCreateDto.fromJson(value);
|
||||
case 'JobName':
|
||||
@@ -408,8 +444,14 @@ class ApiClient {
|
||||
return LibraryStatsResponseDto.fromJson(value);
|
||||
case 'LicenseKeyDto':
|
||||
return LicenseKeyDto.fromJson(value);
|
||||
case 'ListSnapshotsResponseDto':
|
||||
return ListSnapshotsResponseDto.fromJson(value);
|
||||
case 'LocalRepositoryDto':
|
||||
return LocalRepositoryDto.fromJson(value);
|
||||
case 'LogLevel':
|
||||
return LogLevelTypeTransformer().decode(value);
|
||||
case 'LogResponseDto':
|
||||
return LogResponseDto.fromJson(value);
|
||||
case 'LoginCredentialDto':
|
||||
return LoginCredentialDto.fromJson(value);
|
||||
case 'LoginResponseDto':
|
||||
@@ -490,6 +532,8 @@ class ApiClient {
|
||||
return OnboardingDto.fromJson(value);
|
||||
case 'OnboardingResponseDto':
|
||||
return OnboardingResponseDto.fromJson(value);
|
||||
case 'OnboardingStatusResponseDto':
|
||||
return OnboardingStatusResponseDto.fromJson(value);
|
||||
case 'PartnerCreateDto':
|
||||
return PartnerCreateDto.fromJson(value);
|
||||
case 'PartnerDirection':
|
||||
@@ -586,10 +630,58 @@ class ApiClient {
|
||||
return ReactionLevelTypeTransformer().decode(value);
|
||||
case 'ReactionType':
|
||||
return ReactionTypeTypeTransformer().decode(value);
|
||||
case 'RepositoryBackendDto':
|
||||
return RepositoryBackendDto.fromJson(value);
|
||||
case 'RepositoryBackendsDto':
|
||||
return RepositoryBackendsDto.fromJson(value);
|
||||
case 'RepositoryCheckImportResponseDto':
|
||||
return RepositoryCheckImportResponseDto.fromJson(value);
|
||||
case 'RepositoryConfigurationDto':
|
||||
return RepositoryConfigurationDto.fromJson(value);
|
||||
case 'RepositoryCreateRequestDto':
|
||||
return RepositoryCreateRequestDto.fromJson(value);
|
||||
case 'RepositoryCreateResponseDto':
|
||||
return RepositoryCreateResponseDto.fromJson(value);
|
||||
case 'RepositoryInspectResponseDto':
|
||||
return RepositoryInspectResponseDto.fromJson(value);
|
||||
case 'RepositoryListResponseDto':
|
||||
return RepositoryListResponseDto.fromJson(value);
|
||||
case 'RepositoryMetricsDto':
|
||||
return RepositoryMetricsDto.fromJson(value);
|
||||
case 'RepositorySnapshotRestoreFromPointRequestDto':
|
||||
return RepositorySnapshotRestoreFromPointRequestDto.fromJson(value);
|
||||
case 'RepositorySnapshotRestoreRequestDto':
|
||||
return RepositorySnapshotRestoreRequestDto.fromJson(value);
|
||||
case 'RepositoryUpdateRequestDto':
|
||||
return RepositoryUpdateRequestDto.fromJson(value);
|
||||
case 'RepositoryUpdateResponseDto':
|
||||
return RepositoryUpdateResponseDto.fromJson(value);
|
||||
case 'ReverseGeocodingStateResponseDto':
|
||||
return ReverseGeocodingStateResponseDto.fromJson(value);
|
||||
case 'RotateParameters':
|
||||
return RotateParameters.fromJson(value);
|
||||
case 'RunDto':
|
||||
return RunDto.fromJson(value);
|
||||
case 'RunHistoryResponseDto':
|
||||
return RunHistoryResponseDto.fromJson(value);
|
||||
case 'RunStatus':
|
||||
return RunStatusTypeTransformer().decode(value);
|
||||
case 'RunningTaskDto':
|
||||
return RunningTaskDto.fromJson(value);
|
||||
case 'RunningTaskListResponse':
|
||||
return RunningTaskListResponse.fromJson(value);
|
||||
case 'ScheduleCreateRequestDto':
|
||||
return ScheduleCreateRequestDto.fromJson(value);
|
||||
case 'ScheduleCreateResponseDto':
|
||||
return ScheduleCreateResponseDto.fromJson(value);
|
||||
case 'ScheduleDto':
|
||||
return ScheduleDto.fromJson(value);
|
||||
case 'ScheduleListResponseDto':
|
||||
return ScheduleListResponseDto.fromJson(value);
|
||||
case 'ScheduleUpdateRequestDto':
|
||||
return ScheduleUpdateRequestDto.fromJson(value);
|
||||
case 'ScheduleUpdateResponseDto':
|
||||
return ScheduleUpdateResponseDto.fromJson(value);
|
||||
case 'SearchAlbumResponseDto':
|
||||
return SearchAlbumResponseDto.fromJson(value);
|
||||
case 'SearchAssetResponseDto':
|
||||
@@ -660,6 +752,8 @@ class ApiClient {
|
||||
return SignUpDto.fromJson(value);
|
||||
case 'SmartSearchDto':
|
||||
return SmartSearchDto.fromJson(value);
|
||||
case 'SnapshotDto':
|
||||
return SnapshotDto.fromJson(value);
|
||||
case 'SourceType':
|
||||
return SourceTypeTypeTransformer().decode(value);
|
||||
case 'StackCreateDto':
|
||||
@@ -824,6 +918,10 @@ class ApiClient {
|
||||
return TagsResponse.fromJson(value);
|
||||
case 'TagsUpdate':
|
||||
return TagsUpdate.fromJson(value);
|
||||
case 'TaskStatus':
|
||||
return TaskStatusTypeTransformer().decode(value);
|
||||
case 'TaskType':
|
||||
return TaskTypeTypeTransformer().decode(value);
|
||||
case 'TemplateDto':
|
||||
return TemplateDto.fromJson(value);
|
||||
case 'TemplateResponseDto':
|
||||
|
||||
Generated
+12
@@ -91,6 +91,9 @@ String parameterToString(dynamic value) {
|
||||
if (value is AudioCodec) {
|
||||
return AudioCodecTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is BackendType) {
|
||||
return BackendTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is BulkIdErrorReason) {
|
||||
return BulkIdErrorReasonTypeTransformer().encode(value).toString();
|
||||
}
|
||||
@@ -163,6 +166,9 @@ String parameterToString(dynamic value) {
|
||||
if (value is ReactionType) {
|
||||
return ReactionTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is RunStatus) {
|
||||
return RunStatusTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is SearchSuggestionType) {
|
||||
return SearchSuggestionTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
@@ -181,6 +187,12 @@ String parameterToString(dynamic value) {
|
||||
if (value is SyncRequestType) {
|
||||
return SyncRequestTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is TaskStatus) {
|
||||
return TaskStatusTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is TaskType) {
|
||||
return TaskTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ToneMapping) {
|
||||
return ToneMappingTypeTransformer().encode(value).toString();
|
||||
}
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 ActiveScheduleItemDto {
|
||||
/// Returns a new [ActiveScheduleItemDto] instance.
|
||||
ActiveScheduleItemDto({
|
||||
required this.repositoryId,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
String repositoryId;
|
||||
|
||||
TaskStatus status;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ActiveScheduleItemDto &&
|
||||
other.repositoryId == repositoryId &&
|
||||
other.status == status;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(repositoryId.hashCode) +
|
||||
(status.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ActiveScheduleItemDto[repositoryId=$repositoryId, status=$status]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'repositoryId'] = this.repositoryId;
|
||||
json[r'status'] = this.status;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ActiveScheduleItemDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ActiveScheduleItemDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ActiveScheduleItemDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ActiveScheduleItemDto(
|
||||
repositoryId: mapValueOfType<String>(json, r'repositoryId')!,
|
||||
status: TaskStatus.fromJson(json[r'status'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ActiveScheduleItemDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ActiveScheduleItemDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ActiveScheduleItemDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ActiveScheduleItemDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ActiveScheduleItemDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ActiveScheduleItemDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ActiveScheduleItemDto-objects as value to a dart map
|
||||
static Map<String, List<ActiveScheduleItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ActiveScheduleItemDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ActiveScheduleItemDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'repositoryId',
|
||||
'status',
|
||||
};
|
||||
}
|
||||
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// 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 BackendDto {
|
||||
/// Returns a new [BackendDto] instance.
|
||||
BackendDto({
|
||||
this.error,
|
||||
required this.id,
|
||||
required this.isOnline,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? error;
|
||||
|
||||
String id;
|
||||
|
||||
bool isOnline;
|
||||
|
||||
BackendType type;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is BackendDto &&
|
||||
other.error == error &&
|
||||
other.id == id &&
|
||||
other.isOnline == isOnline &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(error == null ? 0 : error!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(isOnline.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'BackendDto[error=$error, id=$id, isOnline=$isOnline, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.error != null) {
|
||||
json[r'error'] = this.error;
|
||||
} else {
|
||||
// json[r'error'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'isOnline'] = this.isOnline;
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [BackendDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static BackendDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "BackendDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return BackendDto(
|
||||
error: mapValueOfType<String>(json, r'error'),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
isOnline: mapValueOfType<bool>(json, r'isOnline')!,
|
||||
type: BackendType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<BackendDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <BackendDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = BackendDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, BackendDto> mapFromJson(dynamic json) {
|
||||
final map = <String, BackendDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = BackendDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of BackendDto-objects as value to a dart map
|
||||
static Map<String, List<BackendDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<BackendDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = BackendDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'id',
|
||||
'isOnline',
|
||||
'type',
|
||||
};
|
||||
}
|
||||
|
||||
+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 BackendResponseDto {
|
||||
/// Returns a new [BackendResponseDto] instance.
|
||||
BackendResponseDto({
|
||||
required this.backend,
|
||||
});
|
||||
|
||||
BackendDto backend;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is BackendResponseDto &&
|
||||
other.backend == backend;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(backend.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'BackendResponseDto[backend=$backend]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'backend'] = this.backend;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [BackendResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static BackendResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "BackendResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return BackendResponseDto(
|
||||
backend: BackendDto.fromJson(json[r'backend'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<BackendResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <BackendResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = BackendResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, BackendResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, BackendResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = BackendResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of BackendResponseDto-objects as value to a dart map
|
||||
static Map<String, List<BackendResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<BackendResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = BackendResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'backend',
|
||||
};
|
||||
}
|
||||
|
||||
+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 BackendType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const BackendType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const yucca = BackendType._(r'yucca');
|
||||
static const local = BackendType._(r'local');
|
||||
static const s3 = BackendType._(r's3');
|
||||
|
||||
/// List of all possible values in this [enum][BackendType].
|
||||
static const values = <BackendType>[
|
||||
yucca,
|
||||
local,
|
||||
s3,
|
||||
];
|
||||
|
||||
static BackendType? fromJson(dynamic value) => BackendTypeTypeTransformer().decode(value);
|
||||
|
||||
static List<BackendType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <BackendType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = BackendType.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [BackendType] to String,
|
||||
/// and [decode] dynamic data back to [BackendType].
|
||||
class BackendTypeTypeTransformer {
|
||||
factory BackendTypeTypeTransformer() => _instance ??= const BackendTypeTypeTransformer._();
|
||||
|
||||
const BackendTypeTypeTransformer._();
|
||||
|
||||
String encode(BackendType data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a BackendType.
|
||||
///
|
||||
/// 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.
|
||||
BackendType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'yucca': return BackendType.yucca;
|
||||
case r'local': return BackendType.local;
|
||||
case r's3': return BackendType.s3;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [BackendTypeTypeTransformer] instance.
|
||||
static BackendTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+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 BackendsResponseDto {
|
||||
/// Returns a new [BackendsResponseDto] instance.
|
||||
BackendsResponseDto({
|
||||
this.backends = const [],
|
||||
});
|
||||
|
||||
List<BackendDto> backends;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is BackendsResponseDto &&
|
||||
_deepEquality.equals(other.backends, backends);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(backends.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'BackendsResponseDto[backends=$backends]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'backends'] = this.backends;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [BackendsResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static BackendsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "BackendsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return BackendsResponseDto(
|
||||
backends: BackendDto.listFromJson(json[r'backends']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<BackendsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <BackendsResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = BackendsResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, BackendsResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, BackendsResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = BackendsResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of BackendsResponseDto-objects as value to a dart map
|
||||
static Map<String, List<BackendsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<BackendsResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = BackendsResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'backends',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
//
|
||||
// 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 ConfigureImmichIntegrationRequestDto {
|
||||
/// Returns a new [ConfigureImmichIntegrationRequestDto] instance.
|
||||
ConfigureImmichIntegrationRequestDto({
|
||||
required this.backupConfiguration,
|
||||
required this.cron,
|
||||
this.dataFolders = const [],
|
||||
required this.libraries,
|
||||
required this.name,
|
||||
required this.worm,
|
||||
});
|
||||
|
||||
bool backupConfiguration;
|
||||
|
||||
String cron;
|
||||
|
||||
List<String> dataFolders;
|
||||
|
||||
ConfigureImmichIntegrationRequestDtoLibraries libraries;
|
||||
|
||||
String name;
|
||||
|
||||
bool worm;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ConfigureImmichIntegrationRequestDto &&
|
||||
other.backupConfiguration == backupConfiguration &&
|
||||
other.cron == cron &&
|
||||
_deepEquality.equals(other.dataFolders, dataFolders) &&
|
||||
other.libraries == libraries &&
|
||||
other.name == name &&
|
||||
other.worm == worm;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(backupConfiguration.hashCode) +
|
||||
(cron.hashCode) +
|
||||
(dataFolders.hashCode) +
|
||||
(libraries.hashCode) +
|
||||
(name.hashCode) +
|
||||
(worm.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ConfigureImmichIntegrationRequestDto[backupConfiguration=$backupConfiguration, cron=$cron, dataFolders=$dataFolders, libraries=$libraries, name=$name, worm=$worm]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'backupConfiguration'] = this.backupConfiguration;
|
||||
json[r'cron'] = this.cron;
|
||||
json[r'dataFolders'] = this.dataFolders;
|
||||
json[r'libraries'] = this.libraries;
|
||||
json[r'name'] = this.name;
|
||||
json[r'worm'] = this.worm;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ConfigureImmichIntegrationRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ConfigureImmichIntegrationRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ConfigureImmichIntegrationRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ConfigureImmichIntegrationRequestDto(
|
||||
backupConfiguration: mapValueOfType<bool>(json, r'backupConfiguration')!,
|
||||
cron: mapValueOfType<String>(json, r'cron')!,
|
||||
dataFolders: json[r'dataFolders'] is Iterable
|
||||
? (json[r'dataFolders'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
libraries: ConfigureImmichIntegrationRequestDtoLibraries.fromJson(json[r'libraries'])!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
worm: mapValueOfType<bool>(json, r'worm')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ConfigureImmichIntegrationRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ConfigureImmichIntegrationRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ConfigureImmichIntegrationRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ConfigureImmichIntegrationRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ConfigureImmichIntegrationRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ConfigureImmichIntegrationRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ConfigureImmichIntegrationRequestDto-objects as value to a dart map
|
||||
static Map<String, List<ConfigureImmichIntegrationRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ConfigureImmichIntegrationRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ConfigureImmichIntegrationRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'backupConfiguration',
|
||||
'cron',
|
||||
'dataFolders',
|
||||
'libraries',
|
||||
'name',
|
||||
'worm',
|
||||
};
|
||||
}
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// 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 ConfigureImmichIntegrationRequestDtoLibraries {
|
||||
/// Returns a new [ConfigureImmichIntegrationRequestDtoLibraries] instance.
|
||||
ConfigureImmichIntegrationRequestDtoLibraries({
|
||||
});
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ConfigureImmichIntegrationRequestDtoLibraries &&
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
|
||||
@override
|
||||
String toString() => 'ConfigureImmichIntegrationRequestDtoLibraries[]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ConfigureImmichIntegrationRequestDtoLibraries] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ConfigureImmichIntegrationRequestDtoLibraries? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ConfigureImmichIntegrationRequestDtoLibraries");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ConfigureImmichIntegrationRequestDtoLibraries(
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ConfigureImmichIntegrationRequestDtoLibraries> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ConfigureImmichIntegrationRequestDtoLibraries>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ConfigureImmichIntegrationRequestDtoLibraries.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ConfigureImmichIntegrationRequestDtoLibraries> mapFromJson(dynamic json) {
|
||||
final map = <String, ConfigureImmichIntegrationRequestDtoLibraries>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ConfigureImmichIntegrationRequestDtoLibraries.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ConfigureImmichIntegrationRequestDtoLibraries-objects as value to a dart map
|
||||
static Map<String, List<ConfigureImmichIntegrationRequestDtoLibraries>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ConfigureImmichIntegrationRequestDtoLibraries>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ConfigureImmichIntegrationRequestDtoLibraries.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 CreateLocalBackendRequestDto {
|
||||
/// Returns a new [CreateLocalBackendRequestDto] instance.
|
||||
CreateLocalBackendRequestDto({
|
||||
required this.path,
|
||||
});
|
||||
|
||||
String path;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CreateLocalBackendRequestDto &&
|
||||
other.path == path;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(path.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CreateLocalBackendRequestDto[path=$path]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'path'] = this.path;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [CreateLocalBackendRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CreateLocalBackendRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CreateLocalBackendRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return CreateLocalBackendRequestDto(
|
||||
path: mapValueOfType<String>(json, r'path')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<CreateLocalBackendRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CreateLocalBackendRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = CreateLocalBackendRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, CreateLocalBackendRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, CreateLocalBackendRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = CreateLocalBackendRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of CreateLocalBackendRequestDto-objects as value to a dart map
|
||||
static Map<String, List<CreateLocalBackendRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<CreateLocalBackendRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = CreateLocalBackendRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'path',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 CurrentRecoveryKeyResponse {
|
||||
/// Returns a new [CurrentRecoveryKeyResponse] instance.
|
||||
CurrentRecoveryKeyResponse({
|
||||
required this.recoveryKey,
|
||||
});
|
||||
|
||||
String recoveryKey;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CurrentRecoveryKeyResponse &&
|
||||
other.recoveryKey == recoveryKey;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(recoveryKey.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CurrentRecoveryKeyResponse[recoveryKey=$recoveryKey]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'recoveryKey'] = this.recoveryKey;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [CurrentRecoveryKeyResponse] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CurrentRecoveryKeyResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "CurrentRecoveryKeyResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return CurrentRecoveryKeyResponse(
|
||||
recoveryKey: mapValueOfType<String>(json, r'recoveryKey')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<CurrentRecoveryKeyResponse> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CurrentRecoveryKeyResponse>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = CurrentRecoveryKeyResponse.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, CurrentRecoveryKeyResponse> mapFromJson(dynamic json) {
|
||||
final map = <String, CurrentRecoveryKeyResponse>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = CurrentRecoveryKeyResponse.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of CurrentRecoveryKeyResponse-objects as value to a dart map
|
||||
static Map<String, List<CurrentRecoveryKeyResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<CurrentRecoveryKeyResponse>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = CurrentRecoveryKeyResponse.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'recoveryKey',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 FilesystemListingItemDto {
|
||||
/// Returns a new [FilesystemListingItemDto] instance.
|
||||
FilesystemListingItemDto({
|
||||
required this.isDirectory,
|
||||
required this.path,
|
||||
});
|
||||
|
||||
bool isDirectory;
|
||||
|
||||
String path;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is FilesystemListingItemDto &&
|
||||
other.isDirectory == isDirectory &&
|
||||
other.path == path;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(isDirectory.hashCode) +
|
||||
(path.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'FilesystemListingItemDto[isDirectory=$isDirectory, path=$path]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'isDirectory'] = this.isDirectory;
|
||||
json[r'path'] = this.path;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [FilesystemListingItemDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FilesystemListingItemDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FilesystemListingItemDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return FilesystemListingItemDto(
|
||||
isDirectory: mapValueOfType<bool>(json, r'isDirectory')!,
|
||||
path: mapValueOfType<String>(json, r'path')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<FilesystemListingItemDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <FilesystemListingItemDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = FilesystemListingItemDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, FilesystemListingItemDto> mapFromJson(dynamic json) {
|
||||
final map = <String, FilesystemListingItemDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = FilesystemListingItemDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of FilesystemListingItemDto-objects as value to a dart map
|
||||
static Map<String, List<FilesystemListingItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<FilesystemListingItemDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = FilesystemListingItemDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'isDirectory',
|
||||
'path',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// 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 FilesystemListingResponseDto {
|
||||
/// Returns a new [FilesystemListingResponseDto] instance.
|
||||
FilesystemListingResponseDto({
|
||||
this.items = const [],
|
||||
required this.parent,
|
||||
required this.path,
|
||||
});
|
||||
|
||||
List<FilesystemListingItemDto> items;
|
||||
|
||||
String parent;
|
||||
|
||||
String path;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is FilesystemListingResponseDto &&
|
||||
_deepEquality.equals(other.items, items) &&
|
||||
other.parent == parent &&
|
||||
other.path == path;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(items.hashCode) +
|
||||
(parent.hashCode) +
|
||||
(path.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'FilesystemListingResponseDto[items=$items, parent=$parent, path=$path]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'items'] = this.items;
|
||||
json[r'parent'] = this.parent;
|
||||
json[r'path'] = this.path;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [FilesystemListingResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static FilesystemListingResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "FilesystemListingResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return FilesystemListingResponseDto(
|
||||
items: FilesystemListingItemDto.listFromJson(json[r'items']),
|
||||
parent: mapValueOfType<String>(json, r'parent')!,
|
||||
path: mapValueOfType<String>(json, r'path')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<FilesystemListingResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <FilesystemListingResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = FilesystemListingResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, FilesystemListingResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, FilesystemListingResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = FilesystemListingResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of FilesystemListingResponseDto-objects as value to a dart map
|
||||
static Map<String, List<FilesystemListingResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<FilesystemListingResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = FilesystemListingResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'items',
|
||||
'parent',
|
||||
'path',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 ImmichIntegrationConfigurationDto {
|
||||
/// Returns a new [ImmichIntegrationConfigurationDto] instance.
|
||||
ImmichIntegrationConfigurationDto({
|
||||
required this.backupConfiguration,
|
||||
this.dataFolders = const [],
|
||||
required this.libraries,
|
||||
});
|
||||
|
||||
bool backupConfiguration;
|
||||
|
||||
List<String> dataFolders;
|
||||
|
||||
ConfigureImmichIntegrationRequestDtoLibraries libraries;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImmichIntegrationConfigurationDto &&
|
||||
other.backupConfiguration == backupConfiguration &&
|
||||
_deepEquality.equals(other.dataFolders, dataFolders) &&
|
||||
other.libraries == libraries;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(backupConfiguration.hashCode) +
|
||||
(dataFolders.hashCode) +
|
||||
(libraries.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImmichIntegrationConfigurationDto[backupConfiguration=$backupConfiguration, dataFolders=$dataFolders, libraries=$libraries]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'backupConfiguration'] = this.backupConfiguration;
|
||||
json[r'dataFolders'] = this.dataFolders;
|
||||
json[r'libraries'] = this.libraries;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImmichIntegrationConfigurationDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ImmichIntegrationConfigurationDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ImmichIntegrationConfigurationDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ImmichIntegrationConfigurationDto(
|
||||
backupConfiguration: mapValueOfType<bool>(json, r'backupConfiguration')!,
|
||||
dataFolders: json[r'dataFolders'] is Iterable
|
||||
? (json[r'dataFolders'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
libraries: ConfigureImmichIntegrationRequestDtoLibraries.fromJson(json[r'libraries'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ImmichIntegrationConfigurationDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImmichIntegrationConfigurationDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ImmichIntegrationConfigurationDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ImmichIntegrationConfigurationDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ImmichIntegrationConfigurationDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ImmichIntegrationConfigurationDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImmichIntegrationConfigurationDto-objects as value to a dart map
|
||||
static Map<String, List<ImmichIntegrationConfigurationDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ImmichIntegrationConfigurationDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ImmichIntegrationConfigurationDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'backupConfiguration',
|
||||
'dataFolders',
|
||||
'libraries',
|
||||
};
|
||||
}
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// 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 ImmichIntegrationDto {
|
||||
/// Returns a new [ImmichIntegrationDto] instance.
|
||||
ImmichIntegrationDto({
|
||||
required this.configuration,
|
||||
required this.id,
|
||||
required this.scheduleId,
|
||||
});
|
||||
|
||||
ImmichIntegrationConfigurationDto configuration;
|
||||
|
||||
String id;
|
||||
|
||||
String scheduleId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImmichIntegrationDto &&
|
||||
other.configuration == configuration &&
|
||||
other.id == id &&
|
||||
other.scheduleId == scheduleId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(configuration.hashCode) +
|
||||
(id.hashCode) +
|
||||
(scheduleId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImmichIntegrationDto[configuration=$configuration, id=$id, scheduleId=$scheduleId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'configuration'] = this.configuration;
|
||||
json[r'id'] = this.id;
|
||||
json[r'scheduleId'] = this.scheduleId;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImmichIntegrationDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ImmichIntegrationDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ImmichIntegrationDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ImmichIntegrationDto(
|
||||
configuration: ImmichIntegrationConfigurationDto.fromJson(json[r'configuration'])!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
scheduleId: mapValueOfType<String>(json, r'scheduleId')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ImmichIntegrationDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImmichIntegrationDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ImmichIntegrationDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ImmichIntegrationDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ImmichIntegrationDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ImmichIntegrationDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImmichIntegrationDto-objects as value to a dart map
|
||||
static Map<String, List<ImmichIntegrationDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ImmichIntegrationDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ImmichIntegrationDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'configuration',
|
||||
'id',
|
||||
'scheduleId',
|
||||
};
|
||||
}
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// 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 ImmichLibraryDto {
|
||||
/// Returns a new [ImmichLibraryDto] instance.
|
||||
ImmichLibraryDto({
|
||||
this.exclusionPatterns = const [],
|
||||
required this.id,
|
||||
this.importPaths = const [],
|
||||
required this.name,
|
||||
});
|
||||
|
||||
List<String> exclusionPatterns;
|
||||
|
||||
String id;
|
||||
|
||||
List<String> importPaths;
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImmichLibraryDto &&
|
||||
_deepEquality.equals(other.exclusionPatterns, exclusionPatterns) &&
|
||||
other.id == id &&
|
||||
_deepEquality.equals(other.importPaths, importPaths) &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(exclusionPatterns.hashCode) +
|
||||
(id.hashCode) +
|
||||
(importPaths.hashCode) +
|
||||
(name.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImmichLibraryDto[exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'exclusionPatterns'] = this.exclusionPatterns;
|
||||
json[r'id'] = this.id;
|
||||
json[r'importPaths'] = this.importPaths;
|
||||
json[r'name'] = this.name;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImmichLibraryDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ImmichLibraryDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ImmichLibraryDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ImmichLibraryDto(
|
||||
exclusionPatterns: json[r'exclusionPatterns'] is Iterable
|
||||
? (json[r'exclusionPatterns'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
importPaths: json[r'importPaths'] is Iterable
|
||||
? (json[r'importPaths'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ImmichLibraryDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImmichLibraryDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ImmichLibraryDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ImmichLibraryDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ImmichLibraryDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ImmichLibraryDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImmichLibraryDto-objects as value to a dart map
|
||||
static Map<String, List<ImmichLibraryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ImmichLibraryDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ImmichLibraryDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'exclusionPatterns',
|
||||
'id',
|
||||
'importPaths',
|
||||
'name',
|
||||
};
|
||||
}
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 ImmichStateDto {
|
||||
/// Returns a new [ImmichStateDto] instance.
|
||||
ImmichStateDto({
|
||||
this.dataFolders = const [],
|
||||
required this.dataPath,
|
||||
this.libraries = const [],
|
||||
});
|
||||
|
||||
List<String> dataFolders;
|
||||
|
||||
String dataPath;
|
||||
|
||||
List<ImmichLibraryDto> libraries;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImmichStateDto &&
|
||||
_deepEquality.equals(other.dataFolders, dataFolders) &&
|
||||
other.dataPath == dataPath &&
|
||||
_deepEquality.equals(other.libraries, libraries);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(dataFolders.hashCode) +
|
||||
(dataPath.hashCode) +
|
||||
(libraries.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImmichStateDto[dataFolders=$dataFolders, dataPath=$dataPath, libraries=$libraries]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'dataFolders'] = this.dataFolders;
|
||||
json[r'dataPath'] = this.dataPath;
|
||||
json[r'libraries'] = this.libraries;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImmichStateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ImmichStateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ImmichStateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ImmichStateDto(
|
||||
dataFolders: json[r'dataFolders'] is Iterable
|
||||
? (json[r'dataFolders'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
dataPath: mapValueOfType<String>(json, r'dataPath')!,
|
||||
libraries: ImmichLibraryDto.listFromJson(json[r'libraries']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ImmichStateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImmichStateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ImmichStateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ImmichStateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ImmichStateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ImmichStateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImmichStateDto-objects as value to a dart map
|
||||
static Map<String, List<ImmichStateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ImmichStateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ImmichStateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'dataFolders',
|
||||
'dataPath',
|
||||
'libraries',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ImportRecoveryKeyRequest {
|
||||
/// Returns a new [ImportRecoveryKeyRequest] instance.
|
||||
ImportRecoveryKeyRequest({
|
||||
required this.recoveryKey,
|
||||
});
|
||||
|
||||
String recoveryKey;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ImportRecoveryKeyRequest &&
|
||||
other.recoveryKey == recoveryKey;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(recoveryKey.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImportRecoveryKeyRequest[recoveryKey=$recoveryKey]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'recoveryKey'] = this.recoveryKey;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ImportRecoveryKeyRequest] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ImportRecoveryKeyRequest? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ImportRecoveryKeyRequest");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ImportRecoveryKeyRequest(
|
||||
recoveryKey: mapValueOfType<String>(json, r'recoveryKey')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ImportRecoveryKeyRequest> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImportRecoveryKeyRequest>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ImportRecoveryKeyRequest.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ImportRecoveryKeyRequest> mapFromJson(dynamic json) {
|
||||
final map = <String, ImportRecoveryKeyRequest>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ImportRecoveryKeyRequest.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ImportRecoveryKeyRequest-objects as value to a dart map
|
||||
static Map<String, List<ImportRecoveryKeyRequest>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ImportRecoveryKeyRequest>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ImportRecoveryKeyRequest.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'recoveryKey',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// 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 InspectedLocalRepositoryDto {
|
||||
/// Returns a new [InspectedLocalRepositoryDto] instance.
|
||||
InspectedLocalRepositoryDto({
|
||||
this.backends,
|
||||
this.configuration,
|
||||
required this.id,
|
||||
required this.metrics,
|
||||
required this.name,
|
||||
this.snapshots = const [],
|
||||
required this.worm,
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
RepositoryBackendsDto? backends;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
RepositoryConfigurationDto? configuration;
|
||||
|
||||
String id;
|
||||
|
||||
RepositoryMetricsDto metrics;
|
||||
|
||||
String name;
|
||||
|
||||
List<SnapshotDto> snapshots;
|
||||
|
||||
bool worm;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is InspectedLocalRepositoryDto &&
|
||||
other.backends == backends &&
|
||||
other.configuration == configuration &&
|
||||
other.id == id &&
|
||||
other.metrics == metrics &&
|
||||
other.name == name &&
|
||||
_deepEquality.equals(other.snapshots, snapshots) &&
|
||||
other.worm == worm;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(backends == null ? 0 : backends!.hashCode) +
|
||||
(configuration == null ? 0 : configuration!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(metrics.hashCode) +
|
||||
(name.hashCode) +
|
||||
(snapshots.hashCode) +
|
||||
(worm.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'InspectedLocalRepositoryDto[backends=$backends, configuration=$configuration, id=$id, metrics=$metrics, name=$name, snapshots=$snapshots, worm=$worm]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.backends != null) {
|
||||
json[r'backends'] = this.backends;
|
||||
} else {
|
||||
// json[r'backends'] = null;
|
||||
}
|
||||
if (this.configuration != null) {
|
||||
json[r'configuration'] = this.configuration;
|
||||
} else {
|
||||
// json[r'configuration'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'metrics'] = this.metrics;
|
||||
json[r'name'] = this.name;
|
||||
json[r'snapshots'] = this.snapshots;
|
||||
json[r'worm'] = this.worm;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [InspectedLocalRepositoryDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static InspectedLocalRepositoryDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "InspectedLocalRepositoryDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return InspectedLocalRepositoryDto(
|
||||
backends: RepositoryBackendsDto.fromJson(json[r'backends']),
|
||||
configuration: RepositoryConfigurationDto.fromJson(json[r'configuration']),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
metrics: RepositoryMetricsDto.fromJson(json[r'metrics'])!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
snapshots: SnapshotDto.listFromJson(json[r'snapshots']),
|
||||
worm: mapValueOfType<bool>(json, r'worm')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<InspectedLocalRepositoryDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <InspectedLocalRepositoryDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = InspectedLocalRepositoryDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, InspectedLocalRepositoryDto> mapFromJson(dynamic json) {
|
||||
final map = <String, InspectedLocalRepositoryDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = InspectedLocalRepositoryDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of InspectedLocalRepositoryDto-objects as value to a dart map
|
||||
static Map<String, List<InspectedLocalRepositoryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<InspectedLocalRepositoryDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = InspectedLocalRepositoryDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'id',
|
||||
'metrics',
|
||||
'name',
|
||||
'snapshots',
|
||||
'worm',
|
||||
};
|
||||
}
|
||||
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// 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 IntegrationsResponseDto {
|
||||
/// Returns a new [IntegrationsResponseDto] instance.
|
||||
IntegrationsResponseDto({
|
||||
this.immichIntegration,
|
||||
this.immichState,
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ImmichIntegrationDto? immichIntegration;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ImmichStateDto? immichState;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is IntegrationsResponseDto &&
|
||||
other.immichIntegration == immichIntegration &&
|
||||
other.immichState == immichState;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(immichIntegration == null ? 0 : immichIntegration!.hashCode) +
|
||||
(immichState == null ? 0 : immichState!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'IntegrationsResponseDto[immichIntegration=$immichIntegration, immichState=$immichState]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.immichIntegration != null) {
|
||||
json[r'immichIntegration'] = this.immichIntegration;
|
||||
} else {
|
||||
// json[r'immichIntegration'] = null;
|
||||
}
|
||||
if (this.immichState != null) {
|
||||
json[r'immichState'] = this.immichState;
|
||||
} else {
|
||||
// json[r'immichState'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [IntegrationsResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static IntegrationsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "IntegrationsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return IntegrationsResponseDto(
|
||||
immichIntegration: ImmichIntegrationDto.fromJson(json[r'immichIntegration']),
|
||||
immichState: ImmichStateDto.fromJson(json[r'immichState']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<IntegrationsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <IntegrationsResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = IntegrationsResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, IntegrationsResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, IntegrationsResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = IntegrationsResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of IntegrationsResponseDto-objects as value to a dart map
|
||||
static Map<String, List<IntegrationsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<IntegrationsResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = IntegrationsResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ListSnapshotsResponseDto {
|
||||
/// Returns a new [ListSnapshotsResponseDto] instance.
|
||||
ListSnapshotsResponseDto({
|
||||
this.snapshots = const [],
|
||||
});
|
||||
|
||||
List<SnapshotDto> snapshots;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ListSnapshotsResponseDto &&
|
||||
_deepEquality.equals(other.snapshots, snapshots);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(snapshots.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ListSnapshotsResponseDto[snapshots=$snapshots]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'snapshots'] = this.snapshots;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ListSnapshotsResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ListSnapshotsResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ListSnapshotsResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ListSnapshotsResponseDto(
|
||||
snapshots: SnapshotDto.listFromJson(json[r'snapshots']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ListSnapshotsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ListSnapshotsResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ListSnapshotsResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ListSnapshotsResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ListSnapshotsResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ListSnapshotsResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ListSnapshotsResponseDto-objects as value to a dart map
|
||||
static Map<String, List<ListSnapshotsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ListSnapshotsResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ListSnapshotsResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'snapshots',
|
||||
};
|
||||
}
|
||||
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
//
|
||||
// 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 LocalRepositoryDto {
|
||||
/// Returns a new [LocalRepositoryDto] instance.
|
||||
LocalRepositoryDto({
|
||||
this.backends,
|
||||
this.configuration,
|
||||
required this.id,
|
||||
required this.metrics,
|
||||
required this.name,
|
||||
required this.worm,
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
RepositoryBackendsDto? backends;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
RepositoryConfigurationDto? configuration;
|
||||
|
||||
String id;
|
||||
|
||||
RepositoryMetricsDto metrics;
|
||||
|
||||
String name;
|
||||
|
||||
bool worm;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LocalRepositoryDto &&
|
||||
other.backends == backends &&
|
||||
other.configuration == configuration &&
|
||||
other.id == id &&
|
||||
other.metrics == metrics &&
|
||||
other.name == name &&
|
||||
other.worm == worm;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(backends == null ? 0 : backends!.hashCode) +
|
||||
(configuration == null ? 0 : configuration!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(metrics.hashCode) +
|
||||
(name.hashCode) +
|
||||
(worm.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LocalRepositoryDto[backends=$backends, configuration=$configuration, id=$id, metrics=$metrics, name=$name, worm=$worm]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.backends != null) {
|
||||
json[r'backends'] = this.backends;
|
||||
} else {
|
||||
// json[r'backends'] = null;
|
||||
}
|
||||
if (this.configuration != null) {
|
||||
json[r'configuration'] = this.configuration;
|
||||
} else {
|
||||
// json[r'configuration'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'metrics'] = this.metrics;
|
||||
json[r'name'] = this.name;
|
||||
json[r'worm'] = this.worm;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [LocalRepositoryDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LocalRepositoryDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LocalRepositoryDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return LocalRepositoryDto(
|
||||
backends: RepositoryBackendsDto.fromJson(json[r'backends']),
|
||||
configuration: RepositoryConfigurationDto.fromJson(json[r'configuration']),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
metrics: RepositoryMetricsDto.fromJson(json[r'metrics'])!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
worm: mapValueOfType<bool>(json, r'worm')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<LocalRepositoryDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LocalRepositoryDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = LocalRepositoryDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, LocalRepositoryDto> mapFromJson(dynamic json) {
|
||||
final map = <String, LocalRepositoryDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = LocalRepositoryDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of LocalRepositoryDto-objects as value to a dart map
|
||||
static Map<String, List<LocalRepositoryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<LocalRepositoryDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = LocalRepositoryDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'id',
|
||||
'metrics',
|
||||
'name',
|
||||
'worm',
|
||||
};
|
||||
}
|
||||
|
||||
+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 LogResponseDto {
|
||||
/// Returns a new [LogResponseDto] instance.
|
||||
LogResponseDto({
|
||||
required this.logId,
|
||||
});
|
||||
|
||||
String logId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LogResponseDto &&
|
||||
other.logId == logId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(logId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LogResponseDto[logId=$logId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'logId'] = this.logId;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [LogResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LogResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "LogResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return LogResponseDto(
|
||||
logId: mapValueOfType<String>(json, r'logId')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<LogResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LogResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = LogResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, LogResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, LogResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = LogResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of LogResponseDto-objects as value to a dart map
|
||||
static Map<String, List<LogResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<LogResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = LogResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'logId',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// 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 OnboardingStatusResponseDto {
|
||||
/// Returns a new [OnboardingStatusResponseDto] instance.
|
||||
OnboardingStatusResponseDto({
|
||||
required this.hasBackend,
|
||||
required this.hasBackup,
|
||||
required this.hasOnboardedKey,
|
||||
required this.hasSchedule,
|
||||
required this.hasSkippedExtraConfig,
|
||||
});
|
||||
|
||||
bool hasBackend;
|
||||
|
||||
bool hasBackup;
|
||||
|
||||
bool hasOnboardedKey;
|
||||
|
||||
bool hasSchedule;
|
||||
|
||||
bool hasSkippedExtraConfig;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is OnboardingStatusResponseDto &&
|
||||
other.hasBackend == hasBackend &&
|
||||
other.hasBackup == hasBackup &&
|
||||
other.hasOnboardedKey == hasOnboardedKey &&
|
||||
other.hasSchedule == hasSchedule &&
|
||||
other.hasSkippedExtraConfig == hasSkippedExtraConfig;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(hasBackend.hashCode) +
|
||||
(hasBackup.hashCode) +
|
||||
(hasOnboardedKey.hashCode) +
|
||||
(hasSchedule.hashCode) +
|
||||
(hasSkippedExtraConfig.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'OnboardingStatusResponseDto[hasBackend=$hasBackend, hasBackup=$hasBackup, hasOnboardedKey=$hasOnboardedKey, hasSchedule=$hasSchedule, hasSkippedExtraConfig=$hasSkippedExtraConfig]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'hasBackend'] = this.hasBackend;
|
||||
json[r'hasBackup'] = this.hasBackup;
|
||||
json[r'hasOnboardedKey'] = this.hasOnboardedKey;
|
||||
json[r'hasSchedule'] = this.hasSchedule;
|
||||
json[r'hasSkippedExtraConfig'] = this.hasSkippedExtraConfig;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [OnboardingStatusResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static OnboardingStatusResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "OnboardingStatusResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return OnboardingStatusResponseDto(
|
||||
hasBackend: mapValueOfType<bool>(json, r'hasBackend')!,
|
||||
hasBackup: mapValueOfType<bool>(json, r'hasBackup')!,
|
||||
hasOnboardedKey: mapValueOfType<bool>(json, r'hasOnboardedKey')!,
|
||||
hasSchedule: mapValueOfType<bool>(json, r'hasSchedule')!,
|
||||
hasSkippedExtraConfig: mapValueOfType<bool>(json, r'hasSkippedExtraConfig')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<OnboardingStatusResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <OnboardingStatusResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = OnboardingStatusResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, OnboardingStatusResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, OnboardingStatusResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = OnboardingStatusResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of OnboardingStatusResponseDto-objects as value to a dart map
|
||||
static Map<String, List<OnboardingStatusResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<OnboardingStatusResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = OnboardingStatusResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'hasBackend',
|
||||
'hasBackup',
|
||||
'hasOnboardedKey',
|
||||
'hasSchedule',
|
||||
'hasSkippedExtraConfig',
|
||||
};
|
||||
}
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// 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 RepositoryBackendDto {
|
||||
/// Returns a new [RepositoryBackendDto] instance.
|
||||
RepositoryBackendDto({
|
||||
required this.id,
|
||||
required this.online,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
bool online;
|
||||
|
||||
BackendType type;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryBackendDto &&
|
||||
other.id == id &&
|
||||
other.online == online &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(id.hashCode) +
|
||||
(online.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryBackendDto[id=$id, online=$online, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'id'] = this.id;
|
||||
json[r'online'] = this.online;
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryBackendDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryBackendDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryBackendDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryBackendDto(
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
online: mapValueOfType<bool>(json, r'online')!,
|
||||
type: BackendType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryBackendDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryBackendDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryBackendDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryBackendDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryBackendDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryBackendDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryBackendDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryBackendDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryBackendDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryBackendDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'id',
|
||||
'online',
|
||||
'type',
|
||||
};
|
||||
}
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// 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 RepositoryBackendsDto {
|
||||
/// Returns a new [RepositoryBackendsDto] instance.
|
||||
RepositoryBackendsDto({
|
||||
required this.primary,
|
||||
this.secondary = const [],
|
||||
});
|
||||
|
||||
RepositoryBackendDto primary;
|
||||
|
||||
List<RepositoryBackendDto> secondary;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryBackendsDto &&
|
||||
other.primary == primary &&
|
||||
_deepEquality.equals(other.secondary, secondary);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(primary.hashCode) +
|
||||
(secondary.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryBackendsDto[primary=$primary, secondary=$secondary]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'primary'] = this.primary;
|
||||
json[r'secondary'] = this.secondary;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryBackendsDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryBackendsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryBackendsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryBackendsDto(
|
||||
primary: RepositoryBackendDto.fromJson(json[r'primary'])!,
|
||||
secondary: RepositoryBackendDto.listFromJson(json[r'secondary']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryBackendsDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryBackendsDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryBackendsDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryBackendsDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryBackendsDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryBackendsDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryBackendsDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryBackendsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryBackendsDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryBackendsDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'primary',
|
||||
'secondary',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RepositoryCheckImportResponseDto {
|
||||
/// Returns a new [RepositoryCheckImportResponseDto] instance.
|
||||
RepositoryCheckImportResponseDto({
|
||||
required this.readable,
|
||||
});
|
||||
|
||||
bool readable;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryCheckImportResponseDto &&
|
||||
other.readable == readable;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(readable.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryCheckImportResponseDto[readable=$readable]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'readable'] = this.readable;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryCheckImportResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryCheckImportResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryCheckImportResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryCheckImportResponseDto(
|
||||
readable: mapValueOfType<bool>(json, r'readable')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryCheckImportResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryCheckImportResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryCheckImportResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryCheckImportResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryCheckImportResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryCheckImportResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryCheckImportResponseDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryCheckImportResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryCheckImportResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryCheckImportResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'readable',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// 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 RepositoryConfigurationDto {
|
||||
/// Returns a new [RepositoryConfigurationDto] instance.
|
||||
RepositoryConfigurationDto({
|
||||
this.paths = const [],
|
||||
});
|
||||
|
||||
List<String> paths;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryConfigurationDto &&
|
||||
_deepEquality.equals(other.paths, paths);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(paths.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryConfigurationDto[paths=$paths]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'paths'] = this.paths;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryConfigurationDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryConfigurationDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryConfigurationDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryConfigurationDto(
|
||||
paths: json[r'paths'] is Iterable
|
||||
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryConfigurationDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryConfigurationDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryConfigurationDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryConfigurationDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryConfigurationDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryConfigurationDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryConfigurationDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryConfigurationDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryConfigurationDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryConfigurationDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'paths',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// 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 RepositoryCreateRequestDto {
|
||||
/// Returns a new [RepositoryCreateRequestDto] instance.
|
||||
RepositoryCreateRequestDto({
|
||||
required this.name,
|
||||
this.paths = const [],
|
||||
required this.worm,
|
||||
});
|
||||
|
||||
String name;
|
||||
|
||||
List<String> paths;
|
||||
|
||||
bool worm;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryCreateRequestDto &&
|
||||
other.name == name &&
|
||||
_deepEquality.equals(other.paths, paths) &&
|
||||
other.worm == worm;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(name.hashCode) +
|
||||
(paths.hashCode) +
|
||||
(worm.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryCreateRequestDto[name=$name, paths=$paths, worm=$worm]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'name'] = this.name;
|
||||
json[r'paths'] = this.paths;
|
||||
json[r'worm'] = this.worm;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryCreateRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryCreateRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryCreateRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryCreateRequestDto(
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
paths: json[r'paths'] is Iterable
|
||||
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
worm: mapValueOfType<bool>(json, r'worm')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryCreateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryCreateRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryCreateRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryCreateRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryCreateRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryCreateRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryCreateRequestDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryCreateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryCreateRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryCreateRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'name',
|
||||
'worm',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RepositoryCreateResponseDto {
|
||||
/// Returns a new [RepositoryCreateResponseDto] instance.
|
||||
RepositoryCreateResponseDto({
|
||||
required this.repository,
|
||||
});
|
||||
|
||||
LocalRepositoryDto repository;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryCreateResponseDto &&
|
||||
other.repository == repository;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(repository.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryCreateResponseDto[repository=$repository]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'repository'] = this.repository;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryCreateResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryCreateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryCreateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryCreateResponseDto(
|
||||
repository: LocalRepositoryDto.fromJson(json[r'repository'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryCreateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryCreateResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryCreateResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryCreateResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryCreateResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryCreateResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryCreateResponseDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryCreateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryCreateResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryCreateResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'repository',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RepositoryInspectResponseDto {
|
||||
/// Returns a new [RepositoryInspectResponseDto] instance.
|
||||
RepositoryInspectResponseDto({
|
||||
this.repositories = const [],
|
||||
});
|
||||
|
||||
List<InspectedLocalRepositoryDto> repositories;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryInspectResponseDto &&
|
||||
_deepEquality.equals(other.repositories, repositories);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(repositories.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryInspectResponseDto[repositories=$repositories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'repositories'] = this.repositories;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryInspectResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryInspectResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryInspectResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryInspectResponseDto(
|
||||
repositories: InspectedLocalRepositoryDto.listFromJson(json[r'repositories']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryInspectResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryInspectResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryInspectResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryInspectResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryInspectResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryInspectResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryInspectResponseDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryInspectResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryInspectResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryInspectResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'repositories',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RepositoryListResponseDto {
|
||||
/// Returns a new [RepositoryListResponseDto] instance.
|
||||
RepositoryListResponseDto({
|
||||
this.repositories = const [],
|
||||
});
|
||||
|
||||
List<LocalRepositoryDto> repositories;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryListResponseDto &&
|
||||
_deepEquality.equals(other.repositories, repositories);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(repositories.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryListResponseDto[repositories=$repositories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'repositories'] = this.repositories;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryListResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryListResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryListResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryListResponseDto(
|
||||
repositories: LocalRepositoryDto.listFromJson(json[r'repositories']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryListResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryListResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryListResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryListResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryListResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryListResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryListResponseDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryListResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryListResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryListResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'repositories',
|
||||
};
|
||||
}
|
||||
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
//
|
||||
// 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 RepositoryMetricsDto {
|
||||
/// Returns a new [RepositoryMetricsDto] instance.
|
||||
RepositoryMetricsDto({
|
||||
this.lastBackup,
|
||||
this.lastBackupDuration,
|
||||
this.lastSuccessfulBackup,
|
||||
required this.sizeBytes,
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? lastBackup;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
num? lastBackupDuration;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? lastSuccessfulBackup;
|
||||
|
||||
num sizeBytes;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryMetricsDto &&
|
||||
other.lastBackup == lastBackup &&
|
||||
other.lastBackupDuration == lastBackupDuration &&
|
||||
other.lastSuccessfulBackup == lastSuccessfulBackup &&
|
||||
other.sizeBytes == sizeBytes;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(lastBackup == null ? 0 : lastBackup!.hashCode) +
|
||||
(lastBackupDuration == null ? 0 : lastBackupDuration!.hashCode) +
|
||||
(lastSuccessfulBackup == null ? 0 : lastSuccessfulBackup!.hashCode) +
|
||||
(sizeBytes.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryMetricsDto[lastBackup=$lastBackup, lastBackupDuration=$lastBackupDuration, lastSuccessfulBackup=$lastSuccessfulBackup, sizeBytes=$sizeBytes]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.lastBackup != null) {
|
||||
json[r'lastBackup'] = this.lastBackup;
|
||||
} else {
|
||||
// json[r'lastBackup'] = null;
|
||||
}
|
||||
if (this.lastBackupDuration != null) {
|
||||
json[r'lastBackupDuration'] = this.lastBackupDuration;
|
||||
} else {
|
||||
// json[r'lastBackupDuration'] = null;
|
||||
}
|
||||
if (this.lastSuccessfulBackup != null) {
|
||||
json[r'lastSuccessfulBackup'] = this.lastSuccessfulBackup;
|
||||
} else {
|
||||
// json[r'lastSuccessfulBackup'] = null;
|
||||
}
|
||||
json[r'sizeBytes'] = this.sizeBytes;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryMetricsDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryMetricsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryMetricsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryMetricsDto(
|
||||
lastBackup: mapValueOfType<String>(json, r'lastBackup'),
|
||||
lastBackupDuration: num.parse('${json[r'lastBackupDuration']}'),
|
||||
lastSuccessfulBackup: mapValueOfType<String>(json, r'lastSuccessfulBackup'),
|
||||
sizeBytes: num.parse('${json[r'sizeBytes']}'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryMetricsDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryMetricsDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryMetricsDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryMetricsDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryMetricsDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryMetricsDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryMetricsDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryMetricsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryMetricsDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryMetricsDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'sizeBytes',
|
||||
};
|
||||
}
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 RepositorySnapshotRestoreFromPointRequestDto {
|
||||
/// Returns a new [RepositorySnapshotRestoreFromPointRequestDto] instance.
|
||||
RepositorySnapshotRestoreFromPointRequestDto({
|
||||
this.include = const [],
|
||||
this.yuccaConfig,
|
||||
});
|
||||
|
||||
List<String> include;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? yuccaConfig;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositorySnapshotRestoreFromPointRequestDto &&
|
||||
_deepEquality.equals(other.include, include) &&
|
||||
other.yuccaConfig == yuccaConfig;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(include.hashCode) +
|
||||
(yuccaConfig == null ? 0 : yuccaConfig!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositorySnapshotRestoreFromPointRequestDto[include=$include, yuccaConfig=$yuccaConfig]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'include'] = this.include;
|
||||
if (this.yuccaConfig != null) {
|
||||
json[r'yuccaConfig'] = this.yuccaConfig;
|
||||
} else {
|
||||
// json[r'yuccaConfig'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositorySnapshotRestoreFromPointRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositorySnapshotRestoreFromPointRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositorySnapshotRestoreFromPointRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositorySnapshotRestoreFromPointRequestDto(
|
||||
include: json[r'include'] is Iterable
|
||||
? (json[r'include'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
yuccaConfig: mapValueOfType<String>(json, r'yuccaConfig'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositorySnapshotRestoreFromPointRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositorySnapshotRestoreFromPointRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositorySnapshotRestoreFromPointRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositorySnapshotRestoreFromPointRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositorySnapshotRestoreFromPointRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositorySnapshotRestoreFromPointRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositorySnapshotRestoreFromPointRequestDto-objects as value to a dart map
|
||||
static Map<String, List<RepositorySnapshotRestoreFromPointRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositorySnapshotRestoreFromPointRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositorySnapshotRestoreFromPointRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 RepositorySnapshotRestoreRequestDto {
|
||||
/// Returns a new [RepositorySnapshotRestoreRequestDto] instance.
|
||||
RepositorySnapshotRestoreRequestDto({
|
||||
this.include = const [],
|
||||
this.target,
|
||||
});
|
||||
|
||||
List<String> include;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? target;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositorySnapshotRestoreRequestDto &&
|
||||
_deepEquality.equals(other.include, include) &&
|
||||
other.target == target;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(include.hashCode) +
|
||||
(target == null ? 0 : target!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositorySnapshotRestoreRequestDto[include=$include, target=$target]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'include'] = this.include;
|
||||
if (this.target != null) {
|
||||
json[r'target'] = this.target;
|
||||
} else {
|
||||
// json[r'target'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositorySnapshotRestoreRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositorySnapshotRestoreRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositorySnapshotRestoreRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositorySnapshotRestoreRequestDto(
|
||||
include: json[r'include'] is Iterable
|
||||
? (json[r'include'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
target: mapValueOfType<String>(json, r'target'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositorySnapshotRestoreRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositorySnapshotRestoreRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositorySnapshotRestoreRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositorySnapshotRestoreRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositorySnapshotRestoreRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositorySnapshotRestoreRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositorySnapshotRestoreRequestDto-objects as value to a dart map
|
||||
static Map<String, List<RepositorySnapshotRestoreRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositorySnapshotRestoreRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositorySnapshotRestoreRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 RepositoryUpdateRequestDto {
|
||||
/// Returns a new [RepositoryUpdateRequestDto] instance.
|
||||
RepositoryUpdateRequestDto({
|
||||
this.name,
|
||||
this.paths = const [],
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? name;
|
||||
|
||||
List<String> paths;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryUpdateRequestDto &&
|
||||
other.name == name &&
|
||||
_deepEquality.equals(other.paths, paths);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(paths.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryUpdateRequestDto[name=$name, paths=$paths]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
} else {
|
||||
// json[r'name'] = null;
|
||||
}
|
||||
json[r'paths'] = this.paths;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryUpdateRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryUpdateRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryUpdateRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryUpdateRequestDto(
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
paths: json[r'paths'] is Iterable
|
||||
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryUpdateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryUpdateRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryUpdateRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryUpdateRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryUpdateRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryUpdateRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryUpdateRequestDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryUpdateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryUpdateRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryUpdateRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RepositoryUpdateResponseDto {
|
||||
/// Returns a new [RepositoryUpdateResponseDto] instance.
|
||||
RepositoryUpdateResponseDto({
|
||||
required this.repository,
|
||||
});
|
||||
|
||||
LocalRepositoryDto repository;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RepositoryUpdateResponseDto &&
|
||||
other.repository == repository;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(repository.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RepositoryUpdateResponseDto[repository=$repository]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'repository'] = this.repository;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RepositoryUpdateResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RepositoryUpdateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RepositoryUpdateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RepositoryUpdateResponseDto(
|
||||
repository: LocalRepositoryDto.fromJson(json[r'repository'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RepositoryUpdateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RepositoryUpdateResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RepositoryUpdateResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RepositoryUpdateResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RepositoryUpdateResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RepositoryUpdateResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RepositoryUpdateResponseDto-objects as value to a dart map
|
||||
static Map<String, List<RepositoryUpdateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RepositoryUpdateResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RepositoryUpdateResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'repository',
|
||||
};
|
||||
}
|
||||
|
||||
Generated
+131
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// 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 RunDto {
|
||||
/// Returns a new [RunDto] instance.
|
||||
RunDto({
|
||||
required this.end,
|
||||
required this.id,
|
||||
required this.logFilePath,
|
||||
required this.start,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
String end;
|
||||
|
||||
String id;
|
||||
|
||||
String logFilePath;
|
||||
|
||||
String start;
|
||||
|
||||
RunStatus status;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RunDto &&
|
||||
other.end == end &&
|
||||
other.id == id &&
|
||||
other.logFilePath == logFilePath &&
|
||||
other.start == start &&
|
||||
other.status == status;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(end.hashCode) +
|
||||
(id.hashCode) +
|
||||
(logFilePath.hashCode) +
|
||||
(start.hashCode) +
|
||||
(status.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RunDto[end=$end, id=$id, logFilePath=$logFilePath, start=$start, status=$status]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'end'] = this.end;
|
||||
json[r'id'] = this.id;
|
||||
json[r'logFilePath'] = this.logFilePath;
|
||||
json[r'start'] = this.start;
|
||||
json[r'status'] = this.status;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RunDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RunDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RunDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RunDto(
|
||||
end: mapValueOfType<String>(json, r'end')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
logFilePath: mapValueOfType<String>(json, r'logFilePath')!,
|
||||
start: mapValueOfType<String>(json, r'start')!,
|
||||
status: RunStatus.fromJson(json[r'status'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RunDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RunDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RunDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RunDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RunDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RunDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RunDto-objects as value to a dart map
|
||||
static Map<String, List<RunDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RunDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RunDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'end',
|
||||
'id',
|
||||
'logFilePath',
|
||||
'start',
|
||||
'status',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RunHistoryResponseDto {
|
||||
/// Returns a new [RunHistoryResponseDto] instance.
|
||||
RunHistoryResponseDto({
|
||||
this.runs = const [],
|
||||
});
|
||||
|
||||
List<RunDto> runs;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RunHistoryResponseDto &&
|
||||
_deepEquality.equals(other.runs, runs);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(runs.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RunHistoryResponseDto[runs=$runs]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'runs'] = this.runs;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RunHistoryResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RunHistoryResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RunHistoryResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RunHistoryResponseDto(
|
||||
runs: RunDto.listFromJson(json[r'runs']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RunHistoryResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RunHistoryResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RunHistoryResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RunHistoryResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RunHistoryResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RunHistoryResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RunHistoryResponseDto-objects as value to a dart map
|
||||
static Map<String, List<RunHistoryResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RunHistoryResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RunHistoryResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'runs',
|
||||
};
|
||||
}
|
||||
|
||||
Generated
+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 RunStatus {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const RunStatus._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const incomplete = RunStatus._(r'incomplete');
|
||||
static const complete = RunStatus._(r'complete');
|
||||
static const failed = RunStatus._(r'failed');
|
||||
|
||||
/// List of all possible values in this [enum][RunStatus].
|
||||
static const values = <RunStatus>[
|
||||
incomplete,
|
||||
complete,
|
||||
failed,
|
||||
];
|
||||
|
||||
static RunStatus? fromJson(dynamic value) => RunStatusTypeTransformer().decode(value);
|
||||
|
||||
static List<RunStatus> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RunStatus>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RunStatus.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [RunStatus] to String,
|
||||
/// and [decode] dynamic data back to [RunStatus].
|
||||
class RunStatusTypeTransformer {
|
||||
factory RunStatusTypeTransformer() => _instance ??= const RunStatusTypeTransformer._();
|
||||
|
||||
const RunStatusTypeTransformer._();
|
||||
|
||||
String encode(RunStatus data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a RunStatus.
|
||||
///
|
||||
/// 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.
|
||||
RunStatus? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'incomplete': return RunStatus.incomplete;
|
||||
case r'complete': return RunStatus.complete;
|
||||
case r'failed': return RunStatus.failed;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [RunStatusTypeTransformer] instance.
|
||||
static RunStatusTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// 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 RunningTaskDto {
|
||||
/// Returns a new [RunningTaskDto] instance.
|
||||
RunningTaskDto({
|
||||
this.logId,
|
||||
required this.parentId,
|
||||
this.scheduleStatus = const [],
|
||||
required this.type,
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? logId;
|
||||
|
||||
String parentId;
|
||||
|
||||
List<ActiveScheduleItemDto> scheduleStatus;
|
||||
|
||||
TaskType type;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RunningTaskDto &&
|
||||
other.logId == logId &&
|
||||
other.parentId == parentId &&
|
||||
_deepEquality.equals(other.scheduleStatus, scheduleStatus) &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(logId == null ? 0 : logId!.hashCode) +
|
||||
(parentId.hashCode) +
|
||||
(scheduleStatus.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RunningTaskDto[logId=$logId, parentId=$parentId, scheduleStatus=$scheduleStatus, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.logId != null) {
|
||||
json[r'logId'] = this.logId;
|
||||
} else {
|
||||
// json[r'logId'] = null;
|
||||
}
|
||||
json[r'parentId'] = this.parentId;
|
||||
json[r'scheduleStatus'] = this.scheduleStatus;
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RunningTaskDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RunningTaskDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RunningTaskDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RunningTaskDto(
|
||||
logId: mapValueOfType<String>(json, r'logId'),
|
||||
parentId: mapValueOfType<String>(json, r'parentId')!,
|
||||
scheduleStatus: ActiveScheduleItemDto.listFromJson(json[r'scheduleStatus']),
|
||||
type: TaskType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RunningTaskDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RunningTaskDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RunningTaskDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RunningTaskDto> mapFromJson(dynamic json) {
|
||||
final map = <String, RunningTaskDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RunningTaskDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RunningTaskDto-objects as value to a dart map
|
||||
static Map<String, List<RunningTaskDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RunningTaskDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RunningTaskDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'parentId',
|
||||
'type',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 RunningTaskListResponse {
|
||||
/// Returns a new [RunningTaskListResponse] instance.
|
||||
RunningTaskListResponse({
|
||||
this.tasks = const [],
|
||||
});
|
||||
|
||||
List<RunningTaskDto> tasks;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RunningTaskListResponse &&
|
||||
_deepEquality.equals(other.tasks, tasks);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(tasks.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RunningTaskListResponse[tasks=$tasks]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'tasks'] = this.tasks;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [RunningTaskListResponse] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static RunningTaskListResponse? fromJson(dynamic value) {
|
||||
upgradeDto(value, "RunningTaskListResponse");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RunningTaskListResponse(
|
||||
tasks: RunningTaskDto.listFromJson(json[r'tasks']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<RunningTaskListResponse> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <RunningTaskListResponse>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = RunningTaskListResponse.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, RunningTaskListResponse> mapFromJson(dynamic json) {
|
||||
final map = <String, RunningTaskListResponse>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = RunningTaskListResponse.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of RunningTaskListResponse-objects as value to a dart map
|
||||
static Map<String, List<RunningTaskListResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<RunningTaskListResponse>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = RunningTaskListResponse.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'tasks',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 ScheduleCreateRequestDto {
|
||||
/// Returns a new [ScheduleCreateRequestDto] instance.
|
||||
ScheduleCreateRequestDto({
|
||||
required this.cron,
|
||||
required this.name,
|
||||
this.repositories = const [],
|
||||
});
|
||||
|
||||
String cron;
|
||||
|
||||
String name;
|
||||
|
||||
List<String> repositories;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScheduleCreateRequestDto &&
|
||||
other.cron == cron &&
|
||||
other.name == name &&
|
||||
_deepEquality.equals(other.repositories, repositories);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(cron.hashCode) +
|
||||
(name.hashCode) +
|
||||
(repositories.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScheduleCreateRequestDto[cron=$cron, name=$name, repositories=$repositories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'cron'] = this.cron;
|
||||
json[r'name'] = this.name;
|
||||
json[r'repositories'] = this.repositories;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScheduleCreateRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScheduleCreateRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ScheduleCreateRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScheduleCreateRequestDto(
|
||||
cron: mapValueOfType<String>(json, r'cron')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
repositories: json[r'repositories'] is Iterable
|
||||
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScheduleCreateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScheduleCreateRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScheduleCreateRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScheduleCreateRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScheduleCreateRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScheduleCreateRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScheduleCreateRequestDto-objects as value to a dart map
|
||||
static Map<String, List<ScheduleCreateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScheduleCreateRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScheduleCreateRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'cron',
|
||||
'name',
|
||||
'repositories',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ScheduleCreateResponseDto {
|
||||
/// Returns a new [ScheduleCreateResponseDto] instance.
|
||||
ScheduleCreateResponseDto({
|
||||
required this.schedule,
|
||||
});
|
||||
|
||||
ScheduleDto schedule;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScheduleCreateResponseDto &&
|
||||
other.schedule == schedule;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(schedule.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScheduleCreateResponseDto[schedule=$schedule]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'schedule'] = this.schedule;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScheduleCreateResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScheduleCreateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ScheduleCreateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScheduleCreateResponseDto(
|
||||
schedule: ScheduleDto.fromJson(json[r'schedule'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScheduleCreateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScheduleCreateResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScheduleCreateResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScheduleCreateResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScheduleCreateResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScheduleCreateResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScheduleCreateResponseDto-objects as value to a dart map
|
||||
static Map<String, List<ScheduleCreateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScheduleCreateResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScheduleCreateResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'schedule',
|
||||
};
|
||||
}
|
||||
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
//
|
||||
// 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 ScheduleDto {
|
||||
/// Returns a new [ScheduleDto] instance.
|
||||
ScheduleDto({
|
||||
required this.cron,
|
||||
required this.id,
|
||||
this.lastFinished,
|
||||
this.lastRun,
|
||||
required this.name,
|
||||
required this.paused,
|
||||
this.repositories = const [],
|
||||
});
|
||||
|
||||
String cron;
|
||||
|
||||
String id;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? lastFinished;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? lastRun;
|
||||
|
||||
String name;
|
||||
|
||||
bool paused;
|
||||
|
||||
List<String> repositories;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScheduleDto &&
|
||||
other.cron == cron &&
|
||||
other.id == id &&
|
||||
other.lastFinished == lastFinished &&
|
||||
other.lastRun == lastRun &&
|
||||
other.name == name &&
|
||||
other.paused == paused &&
|
||||
_deepEquality.equals(other.repositories, repositories);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(cron.hashCode) +
|
||||
(id.hashCode) +
|
||||
(lastFinished == null ? 0 : lastFinished!.hashCode) +
|
||||
(lastRun == null ? 0 : lastRun!.hashCode) +
|
||||
(name.hashCode) +
|
||||
(paused.hashCode) +
|
||||
(repositories.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScheduleDto[cron=$cron, id=$id, lastFinished=$lastFinished, lastRun=$lastRun, name=$name, paused=$paused, repositories=$repositories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'cron'] = this.cron;
|
||||
json[r'id'] = this.id;
|
||||
if (this.lastFinished != null) {
|
||||
json[r'lastFinished'] = this.lastFinished;
|
||||
} else {
|
||||
// json[r'lastFinished'] = null;
|
||||
}
|
||||
if (this.lastRun != null) {
|
||||
json[r'lastRun'] = this.lastRun;
|
||||
} else {
|
||||
// json[r'lastRun'] = null;
|
||||
}
|
||||
json[r'name'] = this.name;
|
||||
json[r'paused'] = this.paused;
|
||||
json[r'repositories'] = this.repositories;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScheduleDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScheduleDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ScheduleDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScheduleDto(
|
||||
cron: mapValueOfType<String>(json, r'cron')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
lastFinished: mapValueOfType<String>(json, r'lastFinished'),
|
||||
lastRun: mapValueOfType<String>(json, r'lastRun'),
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
paused: mapValueOfType<bool>(json, r'paused')!,
|
||||
repositories: json[r'repositories'] is Iterable
|
||||
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScheduleDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScheduleDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScheduleDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScheduleDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScheduleDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScheduleDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScheduleDto-objects as value to a dart map
|
||||
static Map<String, List<ScheduleDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScheduleDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScheduleDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'cron',
|
||||
'id',
|
||||
'name',
|
||||
'paused',
|
||||
'repositories',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ScheduleListResponseDto {
|
||||
/// Returns a new [ScheduleListResponseDto] instance.
|
||||
ScheduleListResponseDto({
|
||||
this.schedules = const [],
|
||||
});
|
||||
|
||||
List<ScheduleDto> schedules;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScheduleListResponseDto &&
|
||||
_deepEquality.equals(other.schedules, schedules);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(schedules.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScheduleListResponseDto[schedules=$schedules]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'schedules'] = this.schedules;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScheduleListResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScheduleListResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ScheduleListResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScheduleListResponseDto(
|
||||
schedules: ScheduleDto.listFromJson(json[r'schedules']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScheduleListResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScheduleListResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScheduleListResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScheduleListResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScheduleListResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScheduleListResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScheduleListResponseDto-objects as value to a dart map
|
||||
static Map<String, List<ScheduleListResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScheduleListResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScheduleListResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'schedules',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
//
|
||||
// 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 ScheduleUpdateRequestDto {
|
||||
/// Returns a new [ScheduleUpdateRequestDto] instance.
|
||||
ScheduleUpdateRequestDto({
|
||||
this.cron,
|
||||
this.name,
|
||||
this.paused,
|
||||
this.repositories = const [],
|
||||
});
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? cron;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? name;
|
||||
|
||||
///
|
||||
/// 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
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? paused;
|
||||
|
||||
List<String> repositories;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScheduleUpdateRequestDto &&
|
||||
other.cron == cron &&
|
||||
other.name == name &&
|
||||
other.paused == paused &&
|
||||
_deepEquality.equals(other.repositories, repositories);
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(cron == null ? 0 : cron!.hashCode) +
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(paused == null ? 0 : paused!.hashCode) +
|
||||
(repositories.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScheduleUpdateRequestDto[cron=$cron, name=$name, paused=$paused, repositories=$repositories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.cron != null) {
|
||||
json[r'cron'] = this.cron;
|
||||
} else {
|
||||
// json[r'cron'] = null;
|
||||
}
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
} else {
|
||||
// json[r'name'] = null;
|
||||
}
|
||||
if (this.paused != null) {
|
||||
json[r'paused'] = this.paused;
|
||||
} else {
|
||||
// json[r'paused'] = null;
|
||||
}
|
||||
json[r'repositories'] = this.repositories;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScheduleUpdateRequestDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScheduleUpdateRequestDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ScheduleUpdateRequestDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScheduleUpdateRequestDto(
|
||||
cron: mapValueOfType<String>(json, r'cron'),
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
paused: mapValueOfType<bool>(json, r'paused'),
|
||||
repositories: json[r'repositories'] is Iterable
|
||||
? (json[r'repositories'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScheduleUpdateRequestDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScheduleUpdateRequestDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScheduleUpdateRequestDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScheduleUpdateRequestDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScheduleUpdateRequestDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScheduleUpdateRequestDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScheduleUpdateRequestDto-objects as value to a dart map
|
||||
static Map<String, List<ScheduleUpdateRequestDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScheduleUpdateRequestDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScheduleUpdateRequestDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ScheduleUpdateResponseDto {
|
||||
/// Returns a new [ScheduleUpdateResponseDto] instance.
|
||||
ScheduleUpdateResponseDto({
|
||||
required this.schedule,
|
||||
});
|
||||
|
||||
ScheduleDto schedule;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScheduleUpdateResponseDto &&
|
||||
other.schedule == schedule;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(schedule.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScheduleUpdateResponseDto[schedule=$schedule]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'schedule'] = this.schedule;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScheduleUpdateResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScheduleUpdateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "ScheduleUpdateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScheduleUpdateResponseDto(
|
||||
schedule: ScheduleDto.fromJson(json[r'schedule'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScheduleUpdateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScheduleUpdateResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScheduleUpdateResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScheduleUpdateResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScheduleUpdateResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScheduleUpdateResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScheduleUpdateResponseDto-objects as value to a dart map
|
||||
static Map<String, List<ScheduleUpdateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScheduleUpdateResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScheduleUpdateResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'schedule',
|
||||
};
|
||||
}
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// 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 SnapshotDto {
|
||||
/// Returns a new [SnapshotDto] instance.
|
||||
SnapshotDto({
|
||||
required this.id,
|
||||
this.paths = const [],
|
||||
required this.time,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
List<String> paths;
|
||||
|
||||
String time;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SnapshotDto &&
|
||||
other.id == id &&
|
||||
_deepEquality.equals(other.paths, paths) &&
|
||||
other.time == time;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(id.hashCode) +
|
||||
(paths.hashCode) +
|
||||
(time.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SnapshotDto[id=$id, paths=$paths, time=$time]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'id'] = this.id;
|
||||
json[r'paths'] = this.paths;
|
||||
json[r'time'] = this.time;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SnapshotDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SnapshotDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "SnapshotDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SnapshotDto(
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
paths: json[r'paths'] is Iterable
|
||||
? (json[r'paths'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
time: mapValueOfType<String>(json, r'time')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SnapshotDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SnapshotDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SnapshotDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SnapshotDto> mapFromJson(dynamic json) {
|
||||
final map = <String, SnapshotDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SnapshotDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SnapshotDto-objects as value to a dart map
|
||||
static Map<String, List<SnapshotDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SnapshotDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SnapshotDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'id',
|
||||
'paths',
|
||||
'time',
|
||||
};
|
||||
}
|
||||
|
||||
+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 TaskStatus {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const TaskStatus._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const incomplete = TaskStatus._(r'incomplete');
|
||||
static const complete = TaskStatus._(r'complete');
|
||||
static const failed = TaskStatus._(r'failed');
|
||||
|
||||
/// List of all possible values in this [enum][TaskStatus].
|
||||
static const values = <TaskStatus>[
|
||||
incomplete,
|
||||
complete,
|
||||
failed,
|
||||
];
|
||||
|
||||
static TaskStatus? fromJson(dynamic value) => TaskStatusTypeTransformer().decode(value);
|
||||
|
||||
static List<TaskStatus> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TaskStatus>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = TaskStatus.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [TaskStatus] to String,
|
||||
/// and [decode] dynamic data back to [TaskStatus].
|
||||
class TaskStatusTypeTransformer {
|
||||
factory TaskStatusTypeTransformer() => _instance ??= const TaskStatusTypeTransformer._();
|
||||
|
||||
const TaskStatusTypeTransformer._();
|
||||
|
||||
String encode(TaskStatus data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a TaskStatus.
|
||||
///
|
||||
/// 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.
|
||||
TaskStatus? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'incomplete': return TaskStatus.incomplete;
|
||||
case r'complete': return TaskStatus.complete;
|
||||
case r'failed': return TaskStatus.failed;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [TaskStatusTypeTransformer] instance.
|
||||
static TaskStatusTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
Generated
+91
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// 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 TaskType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const TaskType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const schedule = TaskType._(r'schedule');
|
||||
static const restore = TaskType._(r'restore');
|
||||
static const backup = TaskType._(r'backup');
|
||||
static const forget = TaskType._(r'forget');
|
||||
|
||||
/// List of all possible values in this [enum][TaskType].
|
||||
static const values = <TaskType>[
|
||||
schedule,
|
||||
restore,
|
||||
backup,
|
||||
forget,
|
||||
];
|
||||
|
||||
static TaskType? fromJson(dynamic value) => TaskTypeTypeTransformer().decode(value);
|
||||
|
||||
static List<TaskType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TaskType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = TaskType.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [TaskType] to String,
|
||||
/// and [decode] dynamic data back to [TaskType].
|
||||
class TaskTypeTypeTransformer {
|
||||
factory TaskTypeTypeTransformer() => _instance ??= const TaskTypeTypeTransformer._();
|
||||
|
||||
const TaskTypeTypeTransformer._();
|
||||
|
||||
String encode(TaskType data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a TaskType.
|
||||
///
|
||||
/// 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.
|
||||
TaskType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'schedule': return TaskType.schedule;
|
||||
case r'restore': return TaskType.restore;
|
||||
case r'backup': return TaskType.backup;
|
||||
case r'forget': return TaskType.forget;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [TaskTypeTypeTransformer] instance.
|
||||
static TaskTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user