From e8631bfad573ac79d2eec3d6e01cd60afd81c8b0 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Mon, 4 Sep 2023 19:33:24 +0200 Subject: [PATCH 1/2] feat(nextcloud): Use generated OpenAPI notifications spec Signed-off-by: jld3103 --- external/nextcloud-notifications | 2 +- .../nextcloud/lib/src/api/core.openapi.dart | 6 +- .../nextcloud/lib/src/api/core.openapi.g.dart | 60 +- .../nextcloud/lib/src/api/core.openapi.json | 6 +- .../lib/src/api/notifications.openapi.dart | 1525 ++++- .../lib/src/api/notifications.openapi.g.dart | 4991 ++++++++++++----- .../lib/src/api/notifications.openapi.json | 2036 +++++-- .../nextcloud/test/notifications_test.dart | 27 +- tool/generate-specs.sh | 28 +- 9 files changed, 6539 insertions(+), 2142 deletions(-) diff --git a/external/nextcloud-notifications b/external/nextcloud-notifications index 09d3a1c9..9e4bfdcf 160000 --- a/external/nextcloud-notifications +++ b/external/nextcloud-notifications @@ -1 +1 @@ -Subproject commit 09d3a1c9abcdd1c0ec4d8531907b56ac9f368666 +Subproject commit 9e4bfdcf04d3a17402f4b22166e1afd4fc7ff833 diff --git a/packages/nextcloud/lib/src/api/core.openapi.dart b/packages/nextcloud/lib/src/api/core.openapi.dart index 8a92c00a..3de233e4 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.dart @@ -4664,10 +4664,10 @@ abstract class CoreNotesCapabilities @BuiltValue(instantiable: false) abstract interface class CoreNotificationsCapabilities_NotificationsInterface { @BuiltValueField(wireName: 'ocs-endpoints') - BuiltList? get ocsEndpoints; - BuiltList? get push; + BuiltList get ocsEndpoints; + BuiltList get push; @BuiltValueField(wireName: 'admin-notifications') - BuiltList? get adminNotifications; + BuiltList get adminNotifications; CoreNotificationsCapabilities_NotificationsInterface rebuild( final void Function(CoreNotificationsCapabilities_NotificationsInterfaceBuilder) updates, ); diff --git a/packages/nextcloud/lib/src/api/core.openapi.g.dart b/packages/nextcloud/lib/src/api/core.openapi.g.dart index 192252fa..c9fcec3a 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.g.dart @@ -4077,26 +4077,15 @@ class _$CoreNotificationsCapabilities_NotificationsSerializer @override Iterable serialize(Serializers serializers, CoreNotificationsCapabilities_Notifications object, {FullType specifiedType = FullType.unspecified}) { - final result = []; - Object? value; - value = object.ocsEndpoints; - if (value != null) { - result - ..add('ocs-endpoints') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - value = object.push; - if (value != null) { - result - ..add('push') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - value = object.adminNotifications; - if (value != null) { - result - ..add('admin-notifications') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } + final result = [ + 'ocs-endpoints', + serializers.serialize(object.ocsEndpoints, specifiedType: const FullType(BuiltList, [FullType(String)])), + 'push', + serializers.serialize(object.push, specifiedType: const FullType(BuiltList, [FullType(String)])), + 'admin-notifications', + serializers.serialize(object.adminNotifications, specifiedType: const FullType(BuiltList, [FullType(String)])), + ]; + return result; } @@ -17095,17 +17084,24 @@ abstract mixin class CoreNotificationsCapabilities_NotificationsInterfaceBuilder class _$CoreNotificationsCapabilities_Notifications extends CoreNotificationsCapabilities_Notifications { @override - final BuiltList? ocsEndpoints; + final BuiltList ocsEndpoints; @override - final BuiltList? push; + final BuiltList push; @override - final BuiltList? adminNotifications; + final BuiltList adminNotifications; factory _$CoreNotificationsCapabilities_Notifications( [void Function(CoreNotificationsCapabilities_NotificationsBuilder)? updates]) => (CoreNotificationsCapabilities_NotificationsBuilder()..update(updates))._build(); - _$CoreNotificationsCapabilities_Notifications._({this.ocsEndpoints, this.push, this.adminNotifications}) : super._(); + _$CoreNotificationsCapabilities_Notifications._( + {required this.ocsEndpoints, required this.push, required this.adminNotifications}) + : super._() { + BuiltValueNullFieldError.checkNotNull(ocsEndpoints, r'CoreNotificationsCapabilities_Notifications', 'ocsEndpoints'); + BuiltValueNullFieldError.checkNotNull(push, r'CoreNotificationsCapabilities_Notifications', 'push'); + BuiltValueNullFieldError.checkNotNull( + adminNotifications, r'CoreNotificationsCapabilities_Notifications', 'adminNotifications'); + } @override CoreNotificationsCapabilities_Notifications rebuild( @@ -17169,9 +17165,9 @@ class CoreNotificationsCapabilities_NotificationsBuilder CoreNotificationsCapabilities_NotificationsBuilder get _$this { final $v = _$v; if ($v != null) { - _ocsEndpoints = $v.ocsEndpoints?.toBuilder(); - _push = $v.push?.toBuilder(); - _adminNotifications = $v.adminNotifications?.toBuilder(); + _ocsEndpoints = $v.ocsEndpoints.toBuilder(); + _push = $v.push.toBuilder(); + _adminNotifications = $v.adminNotifications.toBuilder(); _$v = null; } return this; @@ -17196,18 +17192,16 @@ class CoreNotificationsCapabilities_NotificationsBuilder try { _$result = _$v ?? _$CoreNotificationsCapabilities_Notifications._( - ocsEndpoints: _ocsEndpoints?.build(), - push: _push?.build(), - adminNotifications: _adminNotifications?.build()); + ocsEndpoints: ocsEndpoints.build(), push: push.build(), adminNotifications: adminNotifications.build()); } catch (_) { late String _$failedField; try { _$failedField = 'ocsEndpoints'; - _ocsEndpoints?.build(); + ocsEndpoints.build(); _$failedField = 'push'; - _push?.build(); + push.build(); _$failedField = 'adminNotifications'; - _adminNotifications?.build(); + adminNotifications.build(); } catch (e) { throw BuiltValueNestedFieldError(r'CoreNotificationsCapabilities_Notifications', _$failedField, e.toString()); } diff --git a/packages/nextcloud/lib/src/api/core.openapi.json b/packages/nextcloud/lib/src/api/core.openapi.json index 22c308fd..50609c1f 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.json +++ b/packages/nextcloud/lib/src/api/core.openapi.json @@ -898,7 +898,11 @@ "properties": { "notifications": { "type": "object", - "additionalProperties": true, + "required": [ + "ocs-endpoints", + "push", + "admin-notifications" + ], "properties": { "ocs-endpoints": { "type": "array", diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.dart b/packages/nextcloud/lib/src/api/notifications.openapi.dart index e20abf84..dc6bb367 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.dart +++ b/packages/nextcloud/lib/src/api/notifications.openapi.dart @@ -70,24 +70,55 @@ class NotificationsClient extends DynamiteClient { authentications: client.authentications, ); - Future listNotifications() async { - const path = '/ocs/v2.php/apps/notifications/api/v2/notifications'; + NotificationsApiClient get api => NotificationsApiClient(this); + NotificationsEndpointClient get endpoint => NotificationsEndpointClient(this); + NotificationsPushClient get push => NotificationsPushClient(this); + NotificationsSettingsClient get settings => NotificationsSettingsClient(this); +} + +class NotificationsApiClient { + NotificationsApiClient(this._rootClient); + + final NotificationsClient _rootClient; + + /// Generate a notification for a user + /// + /// This endpoint requires admin access + Future generateNotification({ + required final String shortMessage, + required final String userId, + final String longMessage = '', + final NotificationsApiGenerateNotificationApiVersion apiVersion = NotificationsApiGenerateNotificationApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/admin_notifications/{userId}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); - } else if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer or basic_auth'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end - final response = await doRequest( - 'get', + queryParameters['shortMessage'] = shortMessage; + path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); + if (longMessage != '') { + queryParameters['longMessage'] = longMessage; + } + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( + 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, body, @@ -95,56 +126,140 @@ class NotificationsClient extends DynamiteClient { if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, - specifiedType: const FullType(NotificationsListNotifications), - )! as NotificationsListNotifications; + specifiedType: const FullType(NotificationsApiGenerateNotificationResponseApplicationJson), + )! as NotificationsApiGenerateNotificationResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } +} - Future deleteAllNotifications() async { - const path = '/ocs/v2.php/apps/notifications/api/v2/notifications'; +class NotificationsEndpointClient { + NotificationsEndpointClient(this._rootClient); + + final NotificationsClient _rootClient; + + /// Get all notifications + Future< + NotificationsResponse> listNotifications({ + final NotificationsEndpointListNotificationsApiVersion apiVersion = + NotificationsEndpointListNotificationsApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end - final response = await doRequest( + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( + 'get', + Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), + headers, + body, + ); + if (response.statusCode == 200) { + return NotificationsResponse( + _jsonSerializers.deserialize( + await response.jsonBody, + specifiedType: const FullType(NotificationsEndpointListNotificationsResponseApplicationJson), + )! as NotificationsEndpointListNotificationsResponseApplicationJson, + _jsonSerializers.deserialize( + response.responseHeaders, + specifiedType: const FullType(NotificationsEndpointEndpointListNotificationsHeaders), + )! as NotificationsEndpointEndpointListNotificationsHeaders, + ); + } + throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line + } + + /// Delete all notifications + Future deleteAllNotifications({ + final NotificationsEndpointDeleteAllNotificationsApiVersion apiVersion = + NotificationsEndpointDeleteAllNotificationsApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications'; + final queryParameters = {}; + final headers = { + 'Accept': 'application/json', + }; + Uint8List? body; + // coverage:ignore-start + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); + } else { + throw Exception('Missing authentication for bearer_auth or basic_auth'); + } + // coverage:ignore-end + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, body, ); if (response.statusCode == 200) { - return response.body; + return _jsonSerializers.deserialize( + await response.jsonBody, + specifiedType: const FullType(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson), + )! as NotificationsEndpointDeleteAllNotificationsResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } - Future getNotification({required final int id}) async { - var path = '/ocs/v2.php/apps/notifications/api/v2/notifications/{id}'; + /// Get a notification + Future getNotification({ + required final int id, + final NotificationsEndpointGetNotificationApiVersion apiVersion = NotificationsEndpointGetNotificationApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/{id}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); - } else if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer or basic_auth'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); - final response = await doRequest( + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, @@ -153,28 +268,42 @@ class NotificationsClient extends DynamiteClient { if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, - specifiedType: const FullType(NotificationsGetNotification), - )! as NotificationsGetNotification; + specifiedType: const FullType(NotificationsEndpointGetNotificationResponseApplicationJson), + )! as NotificationsEndpointGetNotificationResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } - Future deleteNotification({required final int id}) async { - var path = '/ocs/v2.php/apps/notifications/api/v2/notifications/{id}'; + /// Delete a notification + Future deleteNotification({ + required final int id, + final NotificationsEndpointDeleteNotificationApiVersion apiVersion = + NotificationsEndpointDeleteNotificationApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/{id}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end path = path.replaceAll('{id}', Uri.encodeQueryComponent(id.toString())); - final response = await doRequest( + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, @@ -183,98 +312,238 @@ class NotificationsClient extends DynamiteClient { if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, - specifiedType: const FullType(NotificationsEmptyOCS), - )! as NotificationsEmptyOCS; + specifiedType: const FullType(NotificationsEndpointDeleteNotificationResponseApplicationJson), + )! as NotificationsEndpointDeleteNotificationResponseApplicationJson; + } + throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line + } + + /// Check if notification IDs exist + Future confirmIdsForUser({ + required final List ids, + final NotificationsEndpointConfirmIdsForUserApiVersion apiVersion = + NotificationsEndpointConfirmIdsForUserApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/exists'; + final queryParameters = {}; + final headers = { + 'Accept': 'application/json', + }; + Uint8List? body; + // coverage:ignore-start + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); + } else { + throw Exception('Missing authentication for bearer_auth or basic_auth'); + } + // coverage:ignore-end + queryParameters['ids[]'] = ids.map((final e) => e.toString()); + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( + 'post', + Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), + headers, + body, + ); + if (response.statusCode == 200 || response.statusCode == 400) { + return _jsonSerializers.deserialize( + await response.jsonBody, + specifiedType: const FullType(NotificationsEndpointConfirmIdsForUserResponseApplicationJson), + )! as NotificationsEndpointConfirmIdsForUserResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } +} - Future registerDevice({ +class NotificationsPushClient { + NotificationsPushClient(this._rootClient); + + final NotificationsClient _rootClient; + + /// Register device for push notifications + Future registerDevice({ required final String pushTokenHash, required final String devicePublicKey, required final String proxyServer, + final NotificationsPushRegisterDeviceApiVersion apiVersion = NotificationsPushRegisterDeviceApiVersion.v2, + final String oCSAPIRequest = 'true', }) async { - const path = '/ocs/v2.php/apps/notifications/api/v2/push'; + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/push'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end queryParameters['pushTokenHash'] = pushTokenHash; queryParameters['devicePublicKey'] = devicePublicKey; queryParameters['proxyServer'] = proxyServer; - final response = await doRequest( + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, body, ); - if (response.statusCode == 201) { + if (response.statusCode == 200 || response.statusCode == 201) { return _jsonSerializers.deserialize( await response.jsonBody, - specifiedType: const FullType(NotificationsPushServerRegistration), - )! as NotificationsPushServerRegistration; + specifiedType: const FullType(NotificationsPushRegisterDeviceResponseApplicationJson), + )! as NotificationsPushRegisterDeviceResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } - Future removeDevice() async { - const path = '/ocs/v2.php/apps/notifications/api/v2/push'; + /// Remove a device from push notifications + Future removeDevice({ + final NotificationsPushRemoveDeviceApiVersion apiVersion = NotificationsPushRemoveDeviceApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/push'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end - final response = await doRequest( + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, body, ); - if (response.statusCode == 202) { - return response.body; + if (response.statusCode == 200 || response.statusCode == 202 || response.statusCode == 401) { + return _jsonSerializers.deserialize( + await response.jsonBody, + specifiedType: const FullType(NotificationsPushRemoveDeviceResponseApplicationJson), + )! as NotificationsPushRemoveDeviceResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } +} - Future sendAdminNotification({ - required final String userId, - required final String shortMessage, - final String longMessage = '', +class NotificationsSettingsClient { + NotificationsSettingsClient(this._rootClient); + + final NotificationsClient _rootClient; + + /// Update personal notification settings + Future personal({ + required final int batchSetting, + required final String soundNotification, + required final String soundTalk, + final NotificationsSettingsPersonalApiVersion apiVersion = NotificationsSettingsPersonalApiVersion.v2, + final String oCSAPIRequest = 'true', }) async { - var path = '/ocs/v2.php/apps/notifications/api/v2/admin_notifications/{userId}'; + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/settings'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; // coverage:ignore-start - if (authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { - headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers); + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); } else { - throw Exception('Missing authentication for bearer'); + throw Exception('Missing authentication for bearer_auth or basic_auth'); } // coverage:ignore-end - path = path.replaceAll('{userId}', Uri.encodeQueryComponent(userId)); - queryParameters['shortMessage'] = shortMessage; - if (longMessage != '') { - queryParameters['longMessage'] = longMessage; + queryParameters['batchSetting'] = batchSetting.toString(); + queryParameters['soundNotification'] = soundNotification; + queryParameters['soundTalk'] = soundTalk; + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( + 'post', + Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), + headers, + body, + ); + if (response.statusCode == 200) { + return _jsonSerializers.deserialize( + await response.jsonBody, + specifiedType: const FullType(NotificationsSettingsPersonalResponseApplicationJson), + )! as NotificationsSettingsPersonalResponseApplicationJson; } - final response = await doRequest( + throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line + } + + /// Update default notification settings for new users + /// + /// This endpoint requires admin access + Future admin({ + required final int batchSetting, + required final String soundNotification, + required final String soundTalk, + final NotificationsSettingsAdminApiVersion apiVersion = NotificationsSettingsAdminApiVersion.v2, + final String oCSAPIRequest = 'true', + }) async { + var path = '/ocs/v2.php/apps/notifications/api/{apiVersion}/settings/admin'; + final queryParameters = {}; + final headers = { + 'Accept': 'application/json', + }; + Uint8List? body; + // coverage:ignore-start + if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'bearer').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'bearer').headers, + ); + } else if (_rootClient.authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { + headers.addAll( + _rootClient.authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers, + ); + } else { + throw Exception('Missing authentication for bearer_auth or basic_auth'); + } + // coverage:ignore-end + queryParameters['batchSetting'] = batchSetting.toString(); + queryParameters['soundNotification'] = soundNotification; + queryParameters['soundTalk'] = soundTalk; + path = path.replaceAll('{apiVersion}', Uri.encodeQueryComponent(apiVersion.name)); + headers['OCS-APIRequest'] = oCSAPIRequest; + final response = await _rootClient.doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), headers, @@ -283,13 +552,30 @@ class NotificationsClient extends DynamiteClient { if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, - specifiedType: const FullType(NotificationsEmptyOCS), - )! as NotificationsEmptyOCS; + specifiedType: const FullType(NotificationsSettingsAdminResponseApplicationJson), + )! as NotificationsSettingsAdminResponseApplicationJson; } throw await NotificationsApiException.fromResponse(response); // coverage:ignore-line } } +class NotificationsApiGenerateNotificationApiVersion extends EnumClass { + const NotificationsApiGenerateNotificationApiVersion._(super.name); + + static const NotificationsApiGenerateNotificationApiVersion v1 = _$notificationsApiGenerateNotificationApiVersionV1; + + static const NotificationsApiGenerateNotificationApiVersion v2 = _$notificationsApiGenerateNotificationApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsApiGenerateNotificationApiVersionValues; + // coverage:ignore-end + static NotificationsApiGenerateNotificationApiVersion valueOf(final String name) => + _$valueOfNotificationsApiGenerateNotificationApiVersion(name); + static Serializer get serializer => + _$notificationsApiGenerateNotificationApiVersionSerializer; +} + @BuiltValue(instantiable: false) abstract interface class NotificationsOCSMetaInterface { String get status; @@ -320,12 +606,179 @@ abstract class NotificationsOCSMeta static Serializer get serializer => _$notificationsOCSMetaSerializer; } +@BuiltValue(instantiable: false) +abstract interface class NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterface { + NotificationsOCSMeta get meta; + JsonObject get data; + NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterfaceBuilder) updates, + ); + NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterfaceBuilder toBuilder(); +} + +abstract class NotificationsApiGenerateNotificationResponseApplicationJson_Ocs + implements + NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterface, + Built { + factory NotificationsApiGenerateNotificationResponseApplicationJson_Ocs([ + final void Function(NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs; + + // coverage:ignore-start + const NotificationsApiGenerateNotificationResponseApplicationJson_Ocs._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsApiGenerateNotificationResponseApplicationJson_Ocs.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsApiGenerateNotificationResponseApplicationJsonOcsSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsApiGenerateNotificationResponseApplicationJsonInterface { + NotificationsApiGenerateNotificationResponseApplicationJson_Ocs get ocs; + NotificationsApiGenerateNotificationResponseApplicationJsonInterface rebuild( + final void Function(NotificationsApiGenerateNotificationResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsApiGenerateNotificationResponseApplicationJsonInterfaceBuilder toBuilder(); +} + +abstract class NotificationsApiGenerateNotificationResponseApplicationJson + implements + NotificationsApiGenerateNotificationResponseApplicationJsonInterface, + Built { + factory NotificationsApiGenerateNotificationResponseApplicationJson([ + final void Function(NotificationsApiGenerateNotificationResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsApiGenerateNotificationResponseApplicationJson; + + // coverage:ignore-start + const NotificationsApiGenerateNotificationResponseApplicationJson._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsApiGenerateNotificationResponseApplicationJson.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsApiGenerateNotificationResponseApplicationJsonSerializer; +} + +class NotificationsEndpointListNotificationsApiVersion extends EnumClass { + const NotificationsEndpointListNotificationsApiVersion._(super.name); + + static const NotificationsEndpointListNotificationsApiVersion v1 = + _$notificationsEndpointListNotificationsApiVersionV1; + + static const NotificationsEndpointListNotificationsApiVersion v2 = + _$notificationsEndpointListNotificationsApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsEndpointListNotificationsApiVersionValues; + // coverage:ignore-end + static NotificationsEndpointListNotificationsApiVersion valueOf(final String name) => + _$valueOfNotificationsEndpointListNotificationsApiVersion(name); + static Serializer get serializer => + _$notificationsEndpointListNotificationsApiVersionSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsEndpointEndpointListNotificationsHeadersInterface { + @BuiltValueField(wireName: 'x-nextcloud-user-status') + String? get xNextcloudUserStatus; + NotificationsEndpointEndpointListNotificationsHeadersInterface rebuild( + final void Function(NotificationsEndpointEndpointListNotificationsHeadersInterfaceBuilder) updates, + ); + NotificationsEndpointEndpointListNotificationsHeadersInterfaceBuilder toBuilder(); +} + +abstract class NotificationsEndpointEndpointListNotificationsHeaders + implements + NotificationsEndpointEndpointListNotificationsHeadersInterface, + Built { + factory NotificationsEndpointEndpointListNotificationsHeaders([ + final void Function(NotificationsEndpointEndpointListNotificationsHeadersBuilder)? b, + ]) = _$NotificationsEndpointEndpointListNotificationsHeaders; + + // coverage:ignore-start + const NotificationsEndpointEndpointListNotificationsHeaders._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsEndpointEndpointListNotificationsHeaders.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + @BuiltValueSerializer(custom: true) + static Serializer get serializer => + _$NotificationsEndpointEndpointListNotificationsHeadersSerializer(); +} + +class _$NotificationsEndpointEndpointListNotificationsHeadersSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsEndpointEndpointListNotificationsHeaders, + _$NotificationsEndpointEndpointListNotificationsHeaders, + ]; + + @override + final String wireName = 'NotificationsEndpointEndpointListNotificationsHeaders'; + + @override + Iterable serialize( + final Serializers serializers, + final NotificationsEndpointEndpointListNotificationsHeaders object, { + final FullType specifiedType = FullType.unspecified, + }) { + throw UnimplementedError(); + } + + @override + NotificationsEndpointEndpointListNotificationsHeaders deserialize( + final Serializers serializers, + final Iterable serialized, { + final FullType specifiedType = FullType.unspecified, + }) { + final result = NotificationsEndpointEndpointListNotificationsHeadersBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final value = iterator.current! as String; + switch (key) { + case 'x-nextcloud-user-status': + result.xNextcloudUserStatus = value; + } + } + + return result.build(); + } +} + @BuiltValue(instantiable: false) abstract interface class NotificationsNotificationActionInterface { String get label; String get link; String get type; - bool? get primary; + bool get primary; NotificationsNotificationActionInterface rebuild( final void Function(NotificationsNotificationActionInterfaceBuilder) updates, ); @@ -368,13 +821,13 @@ abstract interface class NotificationsNotificationInterface { String get subject; String get message; String get link; + BuiltList get actions; String? get subjectRich; - JsonObject? get subjectRichParameters; + BuiltMap? get subjectRichParameters; String? get messageRich; - JsonObject? get messageRichParameters; + BuiltMap? get messageRichParameters; String? get icon; bool? get shouldNotify; - BuiltList get actions; NotificationsNotificationInterface rebuild(final void Function(NotificationsNotificationInterfaceBuilder) updates); NotificationsNotificationInterfaceBuilder toBuilder(); } @@ -400,293 +853,800 @@ abstract class NotificationsNotification } @BuiltValue(instantiable: false) -abstract interface class NotificationsListNotifications_OcsInterface { +abstract interface class NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterface { NotificationsOCSMeta get meta; BuiltList get data; - NotificationsListNotifications_OcsInterface rebuild( - final void Function(NotificationsListNotifications_OcsInterfaceBuilder) updates, + NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterfaceBuilder) updates, ); - NotificationsListNotifications_OcsInterfaceBuilder toBuilder(); + NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterfaceBuilder toBuilder(); } -abstract class NotificationsListNotifications_Ocs +abstract class NotificationsEndpointListNotificationsResponseApplicationJson_Ocs implements - NotificationsListNotifications_OcsInterface, - Built { - factory NotificationsListNotifications_Ocs([final void Function(NotificationsListNotifications_OcsBuilder)? b]) = - _$NotificationsListNotifications_Ocs; + NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterface, + Built { + factory NotificationsEndpointListNotificationsResponseApplicationJson_Ocs([ + final void Function(NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs; // coverage:ignore-start - const NotificationsListNotifications_Ocs._(); + const NotificationsEndpointListNotificationsResponseApplicationJson_Ocs._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsListNotifications_Ocs.fromJson(final Map json) => + factory NotificationsEndpointListNotificationsResponseApplicationJson_Ocs.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => _$notificationsListNotificationsOcsSerializer; + static Serializer get serializer => + _$notificationsEndpointListNotificationsResponseApplicationJsonOcsSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsListNotificationsInterface { - NotificationsListNotifications_Ocs get ocs; - NotificationsListNotificationsInterface rebuild( - final void Function(NotificationsListNotificationsInterfaceBuilder) updates, +abstract interface class NotificationsEndpointListNotificationsResponseApplicationJsonInterface { + NotificationsEndpointListNotificationsResponseApplicationJson_Ocs get ocs; + NotificationsEndpointListNotificationsResponseApplicationJsonInterface rebuild( + final void Function(NotificationsEndpointListNotificationsResponseApplicationJsonInterfaceBuilder) updates, ); - NotificationsListNotificationsInterfaceBuilder toBuilder(); + NotificationsEndpointListNotificationsResponseApplicationJsonInterfaceBuilder toBuilder(); } -abstract class NotificationsListNotifications +abstract class NotificationsEndpointListNotificationsResponseApplicationJson implements - NotificationsListNotificationsInterface, - Built { - factory NotificationsListNotifications([final void Function(NotificationsListNotificationsBuilder)? b]) = - _$NotificationsListNotifications; + NotificationsEndpointListNotificationsResponseApplicationJsonInterface, + Built { + factory NotificationsEndpointListNotificationsResponseApplicationJson([ + final void Function(NotificationsEndpointListNotificationsResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsEndpointListNotificationsResponseApplicationJson; // coverage:ignore-start - const NotificationsListNotifications._(); + const NotificationsEndpointListNotificationsResponseApplicationJson._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsListNotifications.fromJson(final Map json) => + factory NotificationsEndpointListNotificationsResponseApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => _$notificationsListNotificationsSerializer; + static Serializer get serializer => + _$notificationsEndpointListNotificationsResponseApplicationJsonSerializer; +} + +class NotificationsEndpointDeleteAllNotificationsApiVersion extends EnumClass { + const NotificationsEndpointDeleteAllNotificationsApiVersion._(super.name); + + static const NotificationsEndpointDeleteAllNotificationsApiVersion v1 = + _$notificationsEndpointDeleteAllNotificationsApiVersionV1; + + static const NotificationsEndpointDeleteAllNotificationsApiVersion v2 = + _$notificationsEndpointDeleteAllNotificationsApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsEndpointDeleteAllNotificationsApiVersionValues; + // coverage:ignore-end + static NotificationsEndpointDeleteAllNotificationsApiVersion valueOf(final String name) => + _$valueOfNotificationsEndpointDeleteAllNotificationsApiVersion(name); + static Serializer get serializer => + _$notificationsEndpointDeleteAllNotificationsApiVersionSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsGetNotification_OcsInterface { +abstract interface class NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterface { + NotificationsOCSMeta get meta; + JsonObject get data; + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterfaceBuilder) updates, + ); + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterfaceBuilder toBuilder(); +} + +abstract class NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs + implements + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterface, + Built { + factory NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs([ + final void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs; + + // coverage:ignore-start + const NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs.fromJson( + final Map json, + ) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsEndpointDeleteAllNotificationsResponseApplicationJsonOcsSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterface { + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs get ocs; + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterface rebuild( + final void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterfaceBuilder toBuilder(); +} + +abstract class NotificationsEndpointDeleteAllNotificationsResponseApplicationJson + implements + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterface, + Built { + factory NotificationsEndpointDeleteAllNotificationsResponseApplicationJson([ + final void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson; + + // coverage:ignore-start + const NotificationsEndpointDeleteAllNotificationsResponseApplicationJson._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsEndpointDeleteAllNotificationsResponseApplicationJson.fromJson( + final Map json, + ) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsEndpointDeleteAllNotificationsResponseApplicationJsonSerializer; +} + +class NotificationsEndpointGetNotificationApiVersion extends EnumClass { + const NotificationsEndpointGetNotificationApiVersion._(super.name); + + static const NotificationsEndpointGetNotificationApiVersion v1 = _$notificationsEndpointGetNotificationApiVersionV1; + + static const NotificationsEndpointGetNotificationApiVersion v2 = _$notificationsEndpointGetNotificationApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsEndpointGetNotificationApiVersionValues; + // coverage:ignore-end + static NotificationsEndpointGetNotificationApiVersion valueOf(final String name) => + _$valueOfNotificationsEndpointGetNotificationApiVersion(name); + static Serializer get serializer => + _$notificationsEndpointGetNotificationApiVersionSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterface { NotificationsOCSMeta get meta; NotificationsNotification get data; - NotificationsGetNotification_OcsInterface rebuild( - final void Function(NotificationsGetNotification_OcsInterfaceBuilder) updates, + NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterfaceBuilder) updates, ); - NotificationsGetNotification_OcsInterfaceBuilder toBuilder(); + NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterfaceBuilder toBuilder(); } -abstract class NotificationsGetNotification_Ocs +abstract class NotificationsEndpointGetNotificationResponseApplicationJson_Ocs implements - NotificationsGetNotification_OcsInterface, - Built { - factory NotificationsGetNotification_Ocs([final void Function(NotificationsGetNotification_OcsBuilder)? b]) = - _$NotificationsGetNotification_Ocs; + NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterface, + Built { + factory NotificationsEndpointGetNotificationResponseApplicationJson_Ocs([ + final void Function(NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs; // coverage:ignore-start - const NotificationsGetNotification_Ocs._(); + const NotificationsEndpointGetNotificationResponseApplicationJson_Ocs._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsGetNotification_Ocs.fromJson(final Map json) => + factory NotificationsEndpointGetNotificationResponseApplicationJson_Ocs.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => _$notificationsGetNotificationOcsSerializer; + static Serializer get serializer => + _$notificationsEndpointGetNotificationResponseApplicationJsonOcsSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsGetNotificationInterface { - NotificationsGetNotification_Ocs get ocs; - NotificationsGetNotificationInterface rebuild( - final void Function(NotificationsGetNotificationInterfaceBuilder) updates, +abstract interface class NotificationsEndpointGetNotificationResponseApplicationJsonInterface { + NotificationsEndpointGetNotificationResponseApplicationJson_Ocs get ocs; + NotificationsEndpointGetNotificationResponseApplicationJsonInterface rebuild( + final void Function(NotificationsEndpointGetNotificationResponseApplicationJsonInterfaceBuilder) updates, ); - NotificationsGetNotificationInterfaceBuilder toBuilder(); + NotificationsEndpointGetNotificationResponseApplicationJsonInterfaceBuilder toBuilder(); } -abstract class NotificationsGetNotification +abstract class NotificationsEndpointGetNotificationResponseApplicationJson implements - NotificationsGetNotificationInterface, - Built { - factory NotificationsGetNotification([final void Function(NotificationsGetNotificationBuilder)? b]) = - _$NotificationsGetNotification; + NotificationsEndpointGetNotificationResponseApplicationJsonInterface, + Built { + factory NotificationsEndpointGetNotificationResponseApplicationJson([ + final void Function(NotificationsEndpointGetNotificationResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsEndpointGetNotificationResponseApplicationJson; // coverage:ignore-start - const NotificationsGetNotification._(); + const NotificationsEndpointGetNotificationResponseApplicationJson._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsGetNotification.fromJson(final Map json) => + factory NotificationsEndpointGetNotificationResponseApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => _$notificationsGetNotificationSerializer; + static Serializer get serializer => + _$notificationsEndpointGetNotificationResponseApplicationJsonSerializer; +} + +class NotificationsEndpointDeleteNotificationApiVersion extends EnumClass { + const NotificationsEndpointDeleteNotificationApiVersion._(super.name); + + static const NotificationsEndpointDeleteNotificationApiVersion v1 = + _$notificationsEndpointDeleteNotificationApiVersionV1; + + static const NotificationsEndpointDeleteNotificationApiVersion v2 = + _$notificationsEndpointDeleteNotificationApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsEndpointDeleteNotificationApiVersionValues; + // coverage:ignore-end + static NotificationsEndpointDeleteNotificationApiVersion valueOf(final String name) => + _$valueOfNotificationsEndpointDeleteNotificationApiVersion(name); + static Serializer get serializer => + _$notificationsEndpointDeleteNotificationApiVersionSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsEmptyOCS_OcsInterface { +abstract interface class NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterface { NotificationsOCSMeta get meta; - BuiltList get data; - NotificationsEmptyOCS_OcsInterface rebuild(final void Function(NotificationsEmptyOCS_OcsInterfaceBuilder) updates); - NotificationsEmptyOCS_OcsInterfaceBuilder toBuilder(); + JsonObject get data; + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterfaceBuilder) updates, + ); + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterfaceBuilder toBuilder(); } -abstract class NotificationsEmptyOCS_Ocs - implements NotificationsEmptyOCS_OcsInterface, Built { - factory NotificationsEmptyOCS_Ocs([final void Function(NotificationsEmptyOCS_OcsBuilder)? b]) = - _$NotificationsEmptyOCS_Ocs; +abstract class NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs + implements + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterface, + Built { + factory NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs([ + final void Function(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs; // coverage:ignore-start - const NotificationsEmptyOCS_Ocs._(); + const NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsEmptyOCS_Ocs.fromJson(final Map json) => + factory NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs.fromJson( + final Map json, + ) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => _$notificationsEmptyOCSOcsSerializer; + static Serializer get serializer => + _$notificationsEndpointDeleteNotificationResponseApplicationJsonOcsSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsEmptyOCSInterface { - NotificationsEmptyOCS_Ocs get ocs; - NotificationsEmptyOCSInterface rebuild(final void Function(NotificationsEmptyOCSInterfaceBuilder) updates); - NotificationsEmptyOCSInterfaceBuilder toBuilder(); +abstract interface class NotificationsEndpointDeleteNotificationResponseApplicationJsonInterface { + NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs get ocs; + NotificationsEndpointDeleteNotificationResponseApplicationJsonInterface rebuild( + final void Function(NotificationsEndpointDeleteNotificationResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsEndpointDeleteNotificationResponseApplicationJsonInterfaceBuilder toBuilder(); } -abstract class NotificationsEmptyOCS - implements NotificationsEmptyOCSInterface, Built { - factory NotificationsEmptyOCS([final void Function(NotificationsEmptyOCSBuilder)? b]) = _$NotificationsEmptyOCS; +abstract class NotificationsEndpointDeleteNotificationResponseApplicationJson + implements + NotificationsEndpointDeleteNotificationResponseApplicationJsonInterface, + Built { + factory NotificationsEndpointDeleteNotificationResponseApplicationJson([ + final void Function(NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsEndpointDeleteNotificationResponseApplicationJson; // coverage:ignore-start - const NotificationsEmptyOCS._(); + const NotificationsEndpointDeleteNotificationResponseApplicationJson._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsEmptyOCS.fromJson(final Map json) => + factory NotificationsEndpointDeleteNotificationResponseApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => _$notificationsEmptyOCSSerializer; + static Serializer get serializer => + _$notificationsEndpointDeleteNotificationResponseApplicationJsonSerializer; +} + +class NotificationsEndpointConfirmIdsForUserApiVersion extends EnumClass { + const NotificationsEndpointConfirmIdsForUserApiVersion._(super.name); + + static const NotificationsEndpointConfirmIdsForUserApiVersion v1 = + _$notificationsEndpointConfirmIdsForUserApiVersionV1; + + static const NotificationsEndpointConfirmIdsForUserApiVersion v2 = + _$notificationsEndpointConfirmIdsForUserApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsEndpointConfirmIdsForUserApiVersionValues; + // coverage:ignore-end + static NotificationsEndpointConfirmIdsForUserApiVersion valueOf(final String name) => + _$valueOfNotificationsEndpointConfirmIdsForUserApiVersion(name); + static Serializer get serializer => + _$notificationsEndpointConfirmIdsForUserApiVersionSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsPushServerSubscriptionInterface { +abstract interface class NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterface { + NotificationsOCSMeta get meta; + BuiltList get data; + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterfaceBuilder) updates, + ); + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterfaceBuilder toBuilder(); +} + +abstract class NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs + implements + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterface, + Built { + factory NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs([ + final void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs; + + // coverage:ignore-start + const NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsEndpointConfirmIdsForUserResponseApplicationJsonOcsSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterface { + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs get ocs; + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterface rebuild( + final void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterfaceBuilder toBuilder(); +} + +abstract class NotificationsEndpointConfirmIdsForUserResponseApplicationJson + implements + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterface, + Built { + factory NotificationsEndpointConfirmIdsForUserResponseApplicationJson([ + final void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson; + + // coverage:ignore-start + const NotificationsEndpointConfirmIdsForUserResponseApplicationJson._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsEndpointConfirmIdsForUserResponseApplicationJson.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsEndpointConfirmIdsForUserResponseApplicationJsonSerializer; +} + +class NotificationsPushRegisterDeviceApiVersion extends EnumClass { + const NotificationsPushRegisterDeviceApiVersion._(super.name); + + static const NotificationsPushRegisterDeviceApiVersion v2 = _$notificationsPushRegisterDeviceApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsPushRegisterDeviceApiVersionValues; + // coverage:ignore-end + static NotificationsPushRegisterDeviceApiVersion valueOf(final String name) => + _$valueOfNotificationsPushRegisterDeviceApiVersion(name); + static Serializer get serializer => + _$notificationsPushRegisterDeviceApiVersionSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsPushDeviceInterface { String get publicKey; String get deviceIdentifier; String get signature; - String? get message; - NotificationsPushServerSubscriptionInterface rebuild( - final void Function(NotificationsPushServerSubscriptionInterfaceBuilder) updates, + NotificationsPushDeviceInterface rebuild(final void Function(NotificationsPushDeviceInterfaceBuilder) updates); + NotificationsPushDeviceInterfaceBuilder toBuilder(); +} + +abstract class NotificationsPushDevice + implements NotificationsPushDeviceInterface, Built { + factory NotificationsPushDevice([final void Function(NotificationsPushDeviceBuilder)? b]) = _$NotificationsPushDevice; + + // coverage:ignore-start + const NotificationsPushDevice._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsPushDevice.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => _$notificationsPushDeviceSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterface { + NotificationsOCSMeta get meta; + NotificationsPushDevice get data; + NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterfaceBuilder) updates, ); - NotificationsPushServerSubscriptionInterfaceBuilder toBuilder(); + NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterfaceBuilder toBuilder(); } -abstract class NotificationsPushServerSubscription +abstract class NotificationsPushRegisterDeviceResponseApplicationJson_Ocs implements - NotificationsPushServerSubscriptionInterface, - Built { - factory NotificationsPushServerSubscription([final void Function(NotificationsPushServerSubscriptionBuilder)? b]) = - _$NotificationsPushServerSubscription; + NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterface, + Built { + factory NotificationsPushRegisterDeviceResponseApplicationJson_Ocs([ + final void Function(NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs; // coverage:ignore-start - const NotificationsPushServerSubscription._(); + const NotificationsPushRegisterDeviceResponseApplicationJson_Ocs._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsPushServerSubscription.fromJson(final Map json) => + factory NotificationsPushRegisterDeviceResponseApplicationJson_Ocs.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => - _$notificationsPushServerSubscriptionSerializer; + static Serializer get serializer => + _$notificationsPushRegisterDeviceResponseApplicationJsonOcsSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsPushServerRegistration_OcsInterface { +abstract interface class NotificationsPushRegisterDeviceResponseApplicationJsonInterface { + NotificationsPushRegisterDeviceResponseApplicationJson_Ocs get ocs; + NotificationsPushRegisterDeviceResponseApplicationJsonInterface rebuild( + final void Function(NotificationsPushRegisterDeviceResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsPushRegisterDeviceResponseApplicationJsonInterfaceBuilder toBuilder(); +} + +abstract class NotificationsPushRegisterDeviceResponseApplicationJson + implements + NotificationsPushRegisterDeviceResponseApplicationJsonInterface, + Built { + factory NotificationsPushRegisterDeviceResponseApplicationJson([ + final void Function(NotificationsPushRegisterDeviceResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsPushRegisterDeviceResponseApplicationJson; + + // coverage:ignore-start + const NotificationsPushRegisterDeviceResponseApplicationJson._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsPushRegisterDeviceResponseApplicationJson.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsPushRegisterDeviceResponseApplicationJsonSerializer; +} + +class NotificationsPushRemoveDeviceApiVersion extends EnumClass { + const NotificationsPushRemoveDeviceApiVersion._(super.name); + + static const NotificationsPushRemoveDeviceApiVersion v2 = _$notificationsPushRemoveDeviceApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsPushRemoveDeviceApiVersionValues; + // coverage:ignore-end + static NotificationsPushRemoveDeviceApiVersion valueOf(final String name) => + _$valueOfNotificationsPushRemoveDeviceApiVersion(name); + static Serializer get serializer => + _$notificationsPushRemoveDeviceApiVersionSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterface { NotificationsOCSMeta get meta; - NotificationsPushServerSubscription get data; - NotificationsPushServerRegistration_OcsInterface rebuild( - final void Function(NotificationsPushServerRegistration_OcsInterfaceBuilder) updates, + JsonObject get data; + NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterfaceBuilder) updates, + ); + NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterfaceBuilder toBuilder(); +} + +abstract class NotificationsPushRemoveDeviceResponseApplicationJson_Ocs + implements + NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterface, + Built { + factory NotificationsPushRemoveDeviceResponseApplicationJson_Ocs([ + final void Function(NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs; + + // coverage:ignore-start + const NotificationsPushRemoveDeviceResponseApplicationJson_Ocs._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsPushRemoveDeviceResponseApplicationJson_Ocs.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsPushRemoveDeviceResponseApplicationJsonOcsSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsPushRemoveDeviceResponseApplicationJsonInterface { + NotificationsPushRemoveDeviceResponseApplicationJson_Ocs get ocs; + NotificationsPushRemoveDeviceResponseApplicationJsonInterface rebuild( + final void Function(NotificationsPushRemoveDeviceResponseApplicationJsonInterfaceBuilder) updates, ); - NotificationsPushServerRegistration_OcsInterfaceBuilder toBuilder(); + NotificationsPushRemoveDeviceResponseApplicationJsonInterfaceBuilder toBuilder(); } -abstract class NotificationsPushServerRegistration_Ocs +abstract class NotificationsPushRemoveDeviceResponseApplicationJson implements - NotificationsPushServerRegistration_OcsInterface, - Built { - factory NotificationsPushServerRegistration_Ocs([ - final void Function(NotificationsPushServerRegistration_OcsBuilder)? b, - ]) = _$NotificationsPushServerRegistration_Ocs; + NotificationsPushRemoveDeviceResponseApplicationJsonInterface, + Built { + factory NotificationsPushRemoveDeviceResponseApplicationJson([ + final void Function(NotificationsPushRemoveDeviceResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsPushRemoveDeviceResponseApplicationJson; // coverage:ignore-start - const NotificationsPushServerRegistration_Ocs._(); + const NotificationsPushRemoveDeviceResponseApplicationJson._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsPushServerRegistration_Ocs.fromJson(final Map json) => + factory NotificationsPushRemoveDeviceResponseApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => - _$notificationsPushServerRegistrationOcsSerializer; + static Serializer get serializer => + _$notificationsPushRemoveDeviceResponseApplicationJsonSerializer; +} + +class NotificationsSettingsPersonalApiVersion extends EnumClass { + const NotificationsSettingsPersonalApiVersion._(super.name); + + static const NotificationsSettingsPersonalApiVersion v2 = _$notificationsSettingsPersonalApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => + _$notificationsSettingsPersonalApiVersionValues; + // coverage:ignore-end + static NotificationsSettingsPersonalApiVersion valueOf(final String name) => + _$valueOfNotificationsSettingsPersonalApiVersion(name); + static Serializer get serializer => + _$notificationsSettingsPersonalApiVersionSerializer; } @BuiltValue(instantiable: false) -abstract interface class NotificationsPushServerRegistrationInterface { - NotificationsPushServerRegistration_Ocs get ocs; - NotificationsPushServerRegistrationInterface rebuild( - final void Function(NotificationsPushServerRegistrationInterfaceBuilder) updates, +abstract interface class NotificationsSettingsPersonalResponseApplicationJson_OcsInterface { + NotificationsOCSMeta get meta; + JsonObject get data; + NotificationsSettingsPersonalResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsSettingsPersonalResponseApplicationJson_OcsInterfaceBuilder) updates, ); - NotificationsPushServerRegistrationInterfaceBuilder toBuilder(); + NotificationsSettingsPersonalResponseApplicationJson_OcsInterfaceBuilder toBuilder(); } -abstract class NotificationsPushServerRegistration +abstract class NotificationsSettingsPersonalResponseApplicationJson_Ocs implements - NotificationsPushServerRegistrationInterface, - Built { - factory NotificationsPushServerRegistration([final void Function(NotificationsPushServerRegistrationBuilder)? b]) = - _$NotificationsPushServerRegistration; + NotificationsSettingsPersonalResponseApplicationJson_OcsInterface, + Built { + factory NotificationsSettingsPersonalResponseApplicationJson_Ocs([ + final void Function(NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsSettingsPersonalResponseApplicationJson_Ocs; // coverage:ignore-start - const NotificationsPushServerRegistration._(); + const NotificationsSettingsPersonalResponseApplicationJson_Ocs._(); // coverage:ignore-end // coverage:ignore-start - factory NotificationsPushServerRegistration.fromJson(final Map json) => + factory NotificationsSettingsPersonalResponseApplicationJson_Ocs.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => - _$notificationsPushServerRegistrationSerializer; + static Serializer get serializer => + _$notificationsSettingsPersonalResponseApplicationJsonOcsSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsSettingsPersonalResponseApplicationJsonInterface { + NotificationsSettingsPersonalResponseApplicationJson_Ocs get ocs; + NotificationsSettingsPersonalResponseApplicationJsonInterface rebuild( + final void Function(NotificationsSettingsPersonalResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsSettingsPersonalResponseApplicationJsonInterfaceBuilder toBuilder(); +} + +abstract class NotificationsSettingsPersonalResponseApplicationJson + implements + NotificationsSettingsPersonalResponseApplicationJsonInterface, + Built { + factory NotificationsSettingsPersonalResponseApplicationJson([ + final void Function(NotificationsSettingsPersonalResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsSettingsPersonalResponseApplicationJson; + + // coverage:ignore-start + const NotificationsSettingsPersonalResponseApplicationJson._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsSettingsPersonalResponseApplicationJson.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsSettingsPersonalResponseApplicationJsonSerializer; +} + +class NotificationsSettingsAdminApiVersion extends EnumClass { + const NotificationsSettingsAdminApiVersion._(super.name); + + static const NotificationsSettingsAdminApiVersion v2 = _$notificationsSettingsAdminApiVersionV2; + + // coverage:ignore-start + static BuiltSet get values => _$notificationsSettingsAdminApiVersionValues; + // coverage:ignore-end + static NotificationsSettingsAdminApiVersion valueOf(final String name) => + _$valueOfNotificationsSettingsAdminApiVersion(name); + static Serializer get serializer => + _$notificationsSettingsAdminApiVersionSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsSettingsAdminResponseApplicationJson_OcsInterface { + NotificationsOCSMeta get meta; + JsonObject get data; + NotificationsSettingsAdminResponseApplicationJson_OcsInterface rebuild( + final void Function(NotificationsSettingsAdminResponseApplicationJson_OcsInterfaceBuilder) updates, + ); + NotificationsSettingsAdminResponseApplicationJson_OcsInterfaceBuilder toBuilder(); +} + +abstract class NotificationsSettingsAdminResponseApplicationJson_Ocs + implements + NotificationsSettingsAdminResponseApplicationJson_OcsInterface, + Built { + factory NotificationsSettingsAdminResponseApplicationJson_Ocs([ + final void Function(NotificationsSettingsAdminResponseApplicationJson_OcsBuilder)? b, + ]) = _$NotificationsSettingsAdminResponseApplicationJson_Ocs; + + // coverage:ignore-start + const NotificationsSettingsAdminResponseApplicationJson_Ocs._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsSettingsAdminResponseApplicationJson_Ocs.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsSettingsAdminResponseApplicationJsonOcsSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class NotificationsSettingsAdminResponseApplicationJsonInterface { + NotificationsSettingsAdminResponseApplicationJson_Ocs get ocs; + NotificationsSettingsAdminResponseApplicationJsonInterface rebuild( + final void Function(NotificationsSettingsAdminResponseApplicationJsonInterfaceBuilder) updates, + ); + NotificationsSettingsAdminResponseApplicationJsonInterfaceBuilder toBuilder(); +} + +abstract class NotificationsSettingsAdminResponseApplicationJson + implements + NotificationsSettingsAdminResponseApplicationJsonInterface, + Built { + factory NotificationsSettingsAdminResponseApplicationJson([ + final void Function(NotificationsSettingsAdminResponseApplicationJsonBuilder)? b, + ]) = _$NotificationsSettingsAdminResponseApplicationJson; + + // coverage:ignore-start + const NotificationsSettingsAdminResponseApplicationJson._(); + // coverage:ignore-end + + // coverage:ignore-start + factory NotificationsSettingsAdminResponseApplicationJson.fromJson(final Map json) => + _jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + // coverage:ignore-start + Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + static Serializer get serializer => + _$notificationsSettingsAdminResponseApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class NotificationsCapabilities_NotificationsInterface { @BuiltValueField(wireName: 'ocs-endpoints') - BuiltList? get ocsEndpoints; - BuiltList? get push; + BuiltList get ocsEndpoints; + BuiltList get push; @BuiltValueField(wireName: 'admin-notifications') - BuiltList? get adminNotifications; + BuiltList get adminNotifications; NotificationsCapabilities_NotificationsInterface rebuild( final void Function(NotificationsCapabilities_NotificationsInterfaceBuilder) updates, ); @@ -744,54 +1704,37 @@ abstract class NotificationsCapabilities static Serializer get serializer => _$notificationsCapabilitiesSerializer; } -@BuiltValue(instantiable: false) -abstract interface class NotificationsNotificationDecryptedSubjectInterface { - int? get nid; - String? get app; - String? get subject; - String? get type; - String? get id; - bool? get delete; - @BuiltValueField(wireName: 'delete-all') - bool? get deleteAll; - NotificationsNotificationDecryptedSubjectInterface rebuild( - final void Function(NotificationsNotificationDecryptedSubjectInterfaceBuilder) updates, - ); - NotificationsNotificationDecryptedSubjectInterfaceBuilder toBuilder(); -} - -abstract class NotificationsNotificationDecryptedSubject - implements - NotificationsNotificationDecryptedSubjectInterface, - Built { - factory NotificationsNotificationDecryptedSubject([ - final void Function(NotificationsNotificationDecryptedSubjectBuilder)? b, - ]) = _$NotificationsNotificationDecryptedSubject; - - // coverage:ignore-start - const NotificationsNotificationDecryptedSubject._(); - // coverage:ignore-end - - // coverage:ignore-start - factory NotificationsNotificationDecryptedSubject.fromJson(final Map json) => - _jsonSerializers.deserializeWith(serializer, json)!; - // coverage:ignore-end - - // coverage:ignore-start - Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; - // coverage:ignore-end - static Serializer get serializer => - _$notificationsNotificationDecryptedSubjectSerializer; -} - // coverage:ignore-start final Serializers _serializers = (Serializers().toBuilder() - ..addBuilderFactory(const FullType(NotificationsListNotifications), NotificationsListNotifications.new) - ..add(NotificationsListNotifications.serializer) - ..addBuilderFactory(const FullType(NotificationsListNotifications_Ocs), NotificationsListNotifications_Ocs.new) - ..add(NotificationsListNotifications_Ocs.serializer) + ..add(NotificationsApiGenerateNotificationApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsApiGenerateNotificationResponseApplicationJson), + NotificationsApiGenerateNotificationResponseApplicationJson.new, + ) + ..add(NotificationsApiGenerateNotificationResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsApiGenerateNotificationResponseApplicationJson_Ocs), + NotificationsApiGenerateNotificationResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsApiGenerateNotificationResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(NotificationsOCSMeta), NotificationsOCSMeta.new) ..add(NotificationsOCSMeta.serializer) + ..add(NotificationsEndpointListNotificationsApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointEndpointListNotificationsHeaders), + NotificationsEndpointEndpointListNotificationsHeaders.new, + ) + ..add(NotificationsEndpointEndpointListNotificationsHeaders.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointListNotificationsResponseApplicationJson), + NotificationsEndpointListNotificationsResponseApplicationJson.new, + ) + ..add(NotificationsEndpointListNotificationsResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointListNotificationsResponseApplicationJson_Ocs), + NotificationsEndpointListNotificationsResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsEndpointListNotificationsResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(NotificationsNotification), NotificationsNotification.new) ..add(NotificationsNotification.serializer) ..addBuilderFactory(const FullType(NotificationsNotificationAction), NotificationsNotificationAction.new) @@ -800,28 +1743,105 @@ final Serializers _serializers = (Serializers().toBuilder() const FullType(BuiltList, [FullType(NotificationsNotificationAction)]), ListBuilder.new, ) + ..addBuilderFactory( + const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]), + MapBuilder.new, + ) ..addBuilderFactory( const FullType(BuiltList, [FullType(NotificationsNotification)]), ListBuilder.new, ) - ..addBuilderFactory(const FullType(NotificationsGetNotification), NotificationsGetNotification.new) - ..add(NotificationsGetNotification.serializer) - ..addBuilderFactory(const FullType(NotificationsGetNotification_Ocs), NotificationsGetNotification_Ocs.new) - ..add(NotificationsGetNotification_Ocs.serializer) - ..addBuilderFactory(const FullType(NotificationsEmptyOCS), NotificationsEmptyOCS.new) - ..add(NotificationsEmptyOCS.serializer) - ..addBuilderFactory(const FullType(NotificationsEmptyOCS_Ocs), NotificationsEmptyOCS_Ocs.new) - ..add(NotificationsEmptyOCS_Ocs.serializer) - ..addBuilderFactory(const FullType(BuiltList, [FullType(JsonObject)]), ListBuilder.new) - ..addBuilderFactory(const FullType(NotificationsPushServerRegistration), NotificationsPushServerRegistration.new) - ..add(NotificationsPushServerRegistration.serializer) + ..add(NotificationsEndpointDeleteAllNotificationsApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson), + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson.new, + ) + ..add(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson.serializer) ..addBuilderFactory( - const FullType(NotificationsPushServerRegistration_Ocs), - NotificationsPushServerRegistration_Ocs.new, + const FullType(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs), + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs.new, ) - ..add(NotificationsPushServerRegistration_Ocs.serializer) - ..addBuilderFactory(const FullType(NotificationsPushServerSubscription), NotificationsPushServerSubscription.new) - ..add(NotificationsPushServerSubscription.serializer) + ..add(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs.serializer) + ..add(NotificationsEndpointGetNotificationApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointGetNotificationResponseApplicationJson), + NotificationsEndpointGetNotificationResponseApplicationJson.new, + ) + ..add(NotificationsEndpointGetNotificationResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointGetNotificationResponseApplicationJson_Ocs), + NotificationsEndpointGetNotificationResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsEndpointGetNotificationResponseApplicationJson_Ocs.serializer) + ..add(NotificationsEndpointDeleteNotificationApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointDeleteNotificationResponseApplicationJson), + NotificationsEndpointDeleteNotificationResponseApplicationJson.new, + ) + ..add(NotificationsEndpointDeleteNotificationResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs), + NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs.serializer) + ..addBuilderFactory(const FullType(BuiltList, [FullType(int)]), ListBuilder.new) + ..add(NotificationsEndpointConfirmIdsForUserApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointConfirmIdsForUserResponseApplicationJson), + NotificationsEndpointConfirmIdsForUserResponseApplicationJson.new, + ) + ..add(NotificationsEndpointConfirmIdsForUserResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs), + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs.serializer) + ..add(NotificationsPushRegisterDeviceApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsPushRegisterDeviceResponseApplicationJson), + NotificationsPushRegisterDeviceResponseApplicationJson.new, + ) + ..add(NotificationsPushRegisterDeviceResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsPushRegisterDeviceResponseApplicationJson_Ocs), + NotificationsPushRegisterDeviceResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsPushRegisterDeviceResponseApplicationJson_Ocs.serializer) + ..addBuilderFactory(const FullType(NotificationsPushDevice), NotificationsPushDevice.new) + ..add(NotificationsPushDevice.serializer) + ..add(NotificationsPushRemoveDeviceApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsPushRemoveDeviceResponseApplicationJson), + NotificationsPushRemoveDeviceResponseApplicationJson.new, + ) + ..add(NotificationsPushRemoveDeviceResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsPushRemoveDeviceResponseApplicationJson_Ocs), + NotificationsPushRemoveDeviceResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsPushRemoveDeviceResponseApplicationJson_Ocs.serializer) + ..add(NotificationsSettingsPersonalApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsSettingsPersonalResponseApplicationJson), + NotificationsSettingsPersonalResponseApplicationJson.new, + ) + ..add(NotificationsSettingsPersonalResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsSettingsPersonalResponseApplicationJson_Ocs), + NotificationsSettingsPersonalResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsSettingsPersonalResponseApplicationJson_Ocs.serializer) + ..add(NotificationsSettingsAdminApiVersion.serializer) + ..addBuilderFactory( + const FullType(NotificationsSettingsAdminResponseApplicationJson), + NotificationsSettingsAdminResponseApplicationJson.new, + ) + ..add(NotificationsSettingsAdminResponseApplicationJson.serializer) + ..addBuilderFactory( + const FullType(NotificationsSettingsAdminResponseApplicationJson_Ocs), + NotificationsSettingsAdminResponseApplicationJson_Ocs.new, + ) + ..add(NotificationsSettingsAdminResponseApplicationJson_Ocs.serializer) ..addBuilderFactory(const FullType(NotificationsCapabilities), NotificationsCapabilities.new) ..add(NotificationsCapabilities.serializer) ..addBuilderFactory( @@ -829,12 +1849,7 @@ final Serializers _serializers = (Serializers().toBuilder() NotificationsCapabilities_Notifications.new, ) ..add(NotificationsCapabilities_Notifications.serializer) - ..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder.new) - ..addBuilderFactory( - const FullType(NotificationsNotificationDecryptedSubject), - NotificationsNotificationDecryptedSubject.new, - ) - ..add(NotificationsNotificationDecryptedSubject.serializer)) + ..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder.new)) .build(); Serializers get notificationsSerializers => _serializers; diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.g.dart b/packages/nextcloud/lib/src/api/notifications.openapi.g.dart index f469fab2..1af9aacc 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/notifications.openapi.g.dart @@ -6,31 +6,324 @@ part of 'notifications.openapi.dart'; // BuiltValueGenerator // ************************************************************************** +const NotificationsApiGenerateNotificationApiVersion _$notificationsApiGenerateNotificationApiVersionV1 = + NotificationsApiGenerateNotificationApiVersion._('v1'); +const NotificationsApiGenerateNotificationApiVersion _$notificationsApiGenerateNotificationApiVersionV2 = + NotificationsApiGenerateNotificationApiVersion._('v2'); + +NotificationsApiGenerateNotificationApiVersion _$valueOfNotificationsApiGenerateNotificationApiVersion(String name) { + switch (name) { + case 'v1': + return _$notificationsApiGenerateNotificationApiVersionV1; + case 'v2': + return _$notificationsApiGenerateNotificationApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$notificationsApiGenerateNotificationApiVersionValues = + BuiltSet(const [ + _$notificationsApiGenerateNotificationApiVersionV1, + _$notificationsApiGenerateNotificationApiVersionV2, +]); + +const NotificationsEndpointListNotificationsApiVersion _$notificationsEndpointListNotificationsApiVersionV1 = + NotificationsEndpointListNotificationsApiVersion._('v1'); +const NotificationsEndpointListNotificationsApiVersion _$notificationsEndpointListNotificationsApiVersionV2 = + NotificationsEndpointListNotificationsApiVersion._('v2'); + +NotificationsEndpointListNotificationsApiVersion _$valueOfNotificationsEndpointListNotificationsApiVersion( + String name) { + switch (name) { + case 'v1': + return _$notificationsEndpointListNotificationsApiVersionV1; + case 'v2': + return _$notificationsEndpointListNotificationsApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet + _$notificationsEndpointListNotificationsApiVersionValues = + BuiltSet(const [ + _$notificationsEndpointListNotificationsApiVersionV1, + _$notificationsEndpointListNotificationsApiVersionV2, +]); + +const NotificationsEndpointDeleteAllNotificationsApiVersion _$notificationsEndpointDeleteAllNotificationsApiVersionV1 = + NotificationsEndpointDeleteAllNotificationsApiVersion._('v1'); +const NotificationsEndpointDeleteAllNotificationsApiVersion _$notificationsEndpointDeleteAllNotificationsApiVersionV2 = + NotificationsEndpointDeleteAllNotificationsApiVersion._('v2'); + +NotificationsEndpointDeleteAllNotificationsApiVersion _$valueOfNotificationsEndpointDeleteAllNotificationsApiVersion( + String name) { + switch (name) { + case 'v1': + return _$notificationsEndpointDeleteAllNotificationsApiVersionV1; + case 'v2': + return _$notificationsEndpointDeleteAllNotificationsApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet + _$notificationsEndpointDeleteAllNotificationsApiVersionValues = BuiltSet< + NotificationsEndpointDeleteAllNotificationsApiVersion>(const [ + _$notificationsEndpointDeleteAllNotificationsApiVersionV1, + _$notificationsEndpointDeleteAllNotificationsApiVersionV2, +]); + +const NotificationsEndpointGetNotificationApiVersion _$notificationsEndpointGetNotificationApiVersionV1 = + NotificationsEndpointGetNotificationApiVersion._('v1'); +const NotificationsEndpointGetNotificationApiVersion _$notificationsEndpointGetNotificationApiVersionV2 = + NotificationsEndpointGetNotificationApiVersion._('v2'); + +NotificationsEndpointGetNotificationApiVersion _$valueOfNotificationsEndpointGetNotificationApiVersion(String name) { + switch (name) { + case 'v1': + return _$notificationsEndpointGetNotificationApiVersionV1; + case 'v2': + return _$notificationsEndpointGetNotificationApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$notificationsEndpointGetNotificationApiVersionValues = + BuiltSet(const [ + _$notificationsEndpointGetNotificationApiVersionV1, + _$notificationsEndpointGetNotificationApiVersionV2, +]); + +const NotificationsEndpointDeleteNotificationApiVersion _$notificationsEndpointDeleteNotificationApiVersionV1 = + NotificationsEndpointDeleteNotificationApiVersion._('v1'); +const NotificationsEndpointDeleteNotificationApiVersion _$notificationsEndpointDeleteNotificationApiVersionV2 = + NotificationsEndpointDeleteNotificationApiVersion._('v2'); + +NotificationsEndpointDeleteNotificationApiVersion _$valueOfNotificationsEndpointDeleteNotificationApiVersion( + String name) { + switch (name) { + case 'v1': + return _$notificationsEndpointDeleteNotificationApiVersionV1; + case 'v2': + return _$notificationsEndpointDeleteNotificationApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet + _$notificationsEndpointDeleteNotificationApiVersionValues = BuiltSet< + NotificationsEndpointDeleteNotificationApiVersion>(const [ + _$notificationsEndpointDeleteNotificationApiVersionV1, + _$notificationsEndpointDeleteNotificationApiVersionV2, +]); + +const NotificationsEndpointConfirmIdsForUserApiVersion _$notificationsEndpointConfirmIdsForUserApiVersionV1 = + NotificationsEndpointConfirmIdsForUserApiVersion._('v1'); +const NotificationsEndpointConfirmIdsForUserApiVersion _$notificationsEndpointConfirmIdsForUserApiVersionV2 = + NotificationsEndpointConfirmIdsForUserApiVersion._('v2'); + +NotificationsEndpointConfirmIdsForUserApiVersion _$valueOfNotificationsEndpointConfirmIdsForUserApiVersion( + String name) { + switch (name) { + case 'v1': + return _$notificationsEndpointConfirmIdsForUserApiVersionV1; + case 'v2': + return _$notificationsEndpointConfirmIdsForUserApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet + _$notificationsEndpointConfirmIdsForUserApiVersionValues = + BuiltSet(const [ + _$notificationsEndpointConfirmIdsForUserApiVersionV1, + _$notificationsEndpointConfirmIdsForUserApiVersionV2, +]); + +const NotificationsPushRegisterDeviceApiVersion _$notificationsPushRegisterDeviceApiVersionV2 = + NotificationsPushRegisterDeviceApiVersion._('v2'); + +NotificationsPushRegisterDeviceApiVersion _$valueOfNotificationsPushRegisterDeviceApiVersion(String name) { + switch (name) { + case 'v2': + return _$notificationsPushRegisterDeviceApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$notificationsPushRegisterDeviceApiVersionValues = + BuiltSet(const [ + _$notificationsPushRegisterDeviceApiVersionV2, +]); + +const NotificationsPushRemoveDeviceApiVersion _$notificationsPushRemoveDeviceApiVersionV2 = + NotificationsPushRemoveDeviceApiVersion._('v2'); + +NotificationsPushRemoveDeviceApiVersion _$valueOfNotificationsPushRemoveDeviceApiVersion(String name) { + switch (name) { + case 'v2': + return _$notificationsPushRemoveDeviceApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$notificationsPushRemoveDeviceApiVersionValues = + BuiltSet(const [ + _$notificationsPushRemoveDeviceApiVersionV2, +]); + +const NotificationsSettingsPersonalApiVersion _$notificationsSettingsPersonalApiVersionV2 = + NotificationsSettingsPersonalApiVersion._('v2'); + +NotificationsSettingsPersonalApiVersion _$valueOfNotificationsSettingsPersonalApiVersion(String name) { + switch (name) { + case 'v2': + return _$notificationsSettingsPersonalApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$notificationsSettingsPersonalApiVersionValues = + BuiltSet(const [ + _$notificationsSettingsPersonalApiVersionV2, +]); + +const NotificationsSettingsAdminApiVersion _$notificationsSettingsAdminApiVersionV2 = + NotificationsSettingsAdminApiVersion._('v2'); + +NotificationsSettingsAdminApiVersion _$valueOfNotificationsSettingsAdminApiVersion(String name) { + switch (name) { + case 'v2': + return _$notificationsSettingsAdminApiVersionV2; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$notificationsSettingsAdminApiVersionValues = + BuiltSet(const [ + _$notificationsSettingsAdminApiVersionV2, +]); + +Serializer _$notificationsApiGenerateNotificationApiVersionSerializer = + _$NotificationsApiGenerateNotificationApiVersionSerializer(); Serializer _$notificationsOCSMetaSerializer = _$NotificationsOCSMetaSerializer(); +Serializer + _$notificationsApiGenerateNotificationResponseApplicationJsonOcsSerializer = + _$NotificationsApiGenerateNotificationResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsApiGenerateNotificationResponseApplicationJsonSerializer = + _$NotificationsApiGenerateNotificationResponseApplicationJsonSerializer(); +Serializer + _$notificationsEndpointListNotificationsApiVersionSerializer = + _$NotificationsEndpointListNotificationsApiVersionSerializer(); Serializer _$notificationsNotificationActionSerializer = _$NotificationsNotificationActionSerializer(); Serializer _$notificationsNotificationSerializer = _$NotificationsNotificationSerializer(); -Serializer _$notificationsListNotificationsOcsSerializer = - _$NotificationsListNotifications_OcsSerializer(); -Serializer _$notificationsListNotificationsSerializer = - _$NotificationsListNotificationsSerializer(); -Serializer _$notificationsGetNotificationOcsSerializer = - _$NotificationsGetNotification_OcsSerializer(); -Serializer _$notificationsGetNotificationSerializer = - _$NotificationsGetNotificationSerializer(); -Serializer _$notificationsEmptyOCSOcsSerializer = _$NotificationsEmptyOCS_OcsSerializer(); -Serializer _$notificationsEmptyOCSSerializer = _$NotificationsEmptyOCSSerializer(); -Serializer _$notificationsPushServerSubscriptionSerializer = - _$NotificationsPushServerSubscriptionSerializer(); -Serializer _$notificationsPushServerRegistrationOcsSerializer = - _$NotificationsPushServerRegistration_OcsSerializer(); -Serializer _$notificationsPushServerRegistrationSerializer = - _$NotificationsPushServerRegistrationSerializer(); +Serializer + _$notificationsEndpointListNotificationsResponseApplicationJsonOcsSerializer = + _$NotificationsEndpointListNotificationsResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsEndpointListNotificationsResponseApplicationJsonSerializer = + _$NotificationsEndpointListNotificationsResponseApplicationJsonSerializer(); +Serializer + _$notificationsEndpointDeleteAllNotificationsApiVersionSerializer = + _$NotificationsEndpointDeleteAllNotificationsApiVersionSerializer(); +Serializer + _$notificationsEndpointDeleteAllNotificationsResponseApplicationJsonOcsSerializer = + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsEndpointDeleteAllNotificationsResponseApplicationJsonSerializer = + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonSerializer(); +Serializer _$notificationsEndpointGetNotificationApiVersionSerializer = + _$NotificationsEndpointGetNotificationApiVersionSerializer(); +Serializer + _$notificationsEndpointGetNotificationResponseApplicationJsonOcsSerializer = + _$NotificationsEndpointGetNotificationResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsEndpointGetNotificationResponseApplicationJsonSerializer = + _$NotificationsEndpointGetNotificationResponseApplicationJsonSerializer(); +Serializer + _$notificationsEndpointDeleteNotificationApiVersionSerializer = + _$NotificationsEndpointDeleteNotificationApiVersionSerializer(); +Serializer + _$notificationsEndpointDeleteNotificationResponseApplicationJsonOcsSerializer = + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsEndpointDeleteNotificationResponseApplicationJsonSerializer = + _$NotificationsEndpointDeleteNotificationResponseApplicationJsonSerializer(); +Serializer + _$notificationsEndpointConfirmIdsForUserApiVersionSerializer = + _$NotificationsEndpointConfirmIdsForUserApiVersionSerializer(); +Serializer + _$notificationsEndpointConfirmIdsForUserResponseApplicationJsonOcsSerializer = + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsEndpointConfirmIdsForUserResponseApplicationJsonSerializer = + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJsonSerializer(); +Serializer _$notificationsPushRegisterDeviceApiVersionSerializer = + _$NotificationsPushRegisterDeviceApiVersionSerializer(); +Serializer _$notificationsPushDeviceSerializer = _$NotificationsPushDeviceSerializer(); +Serializer + _$notificationsPushRegisterDeviceResponseApplicationJsonOcsSerializer = + _$NotificationsPushRegisterDeviceResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsPushRegisterDeviceResponseApplicationJsonSerializer = + _$NotificationsPushRegisterDeviceResponseApplicationJsonSerializer(); +Serializer _$notificationsPushRemoveDeviceApiVersionSerializer = + _$NotificationsPushRemoveDeviceApiVersionSerializer(); +Serializer + _$notificationsPushRemoveDeviceResponseApplicationJsonOcsSerializer = + _$NotificationsPushRemoveDeviceResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsPushRemoveDeviceResponseApplicationJsonSerializer = + _$NotificationsPushRemoveDeviceResponseApplicationJsonSerializer(); +Serializer _$notificationsSettingsPersonalApiVersionSerializer = + _$NotificationsSettingsPersonalApiVersionSerializer(); +Serializer + _$notificationsSettingsPersonalResponseApplicationJsonOcsSerializer = + _$NotificationsSettingsPersonalResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsSettingsPersonalResponseApplicationJsonSerializer = + _$NotificationsSettingsPersonalResponseApplicationJsonSerializer(); +Serializer _$notificationsSettingsAdminApiVersionSerializer = + _$NotificationsSettingsAdminApiVersionSerializer(); +Serializer + _$notificationsSettingsAdminResponseApplicationJsonOcsSerializer = + _$NotificationsSettingsAdminResponseApplicationJson_OcsSerializer(); +Serializer + _$notificationsSettingsAdminResponseApplicationJsonSerializer = + _$NotificationsSettingsAdminResponseApplicationJsonSerializer(); Serializer _$notificationsCapabilitiesNotificationsSerializer = _$NotificationsCapabilities_NotificationsSerializer(); Serializer _$notificationsCapabilitiesSerializer = _$NotificationsCapabilitiesSerializer(); -Serializer _$notificationsNotificationDecryptedSubjectSerializer = - _$NotificationsNotificationDecryptedSubjectSerializer(); + +class _$NotificationsApiGenerateNotificationApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsApiGenerateNotificationApiVersion]; + @override + final String wireName = 'NotificationsApiGenerateNotificationApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsApiGenerateNotificationApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsApiGenerateNotificationApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsApiGenerateNotificationApiVersion.valueOf(serialized as String); +} class _$NotificationsOCSMetaSerializer implements StructuredSerializer { @override @@ -102,6 +395,121 @@ class _$NotificationsOCSMetaSerializer implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsApiGenerateNotificationResponseApplicationJson_Ocs, + _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs + ]; + @override + final String wireName = 'NotificationsApiGenerateNotificationResponseApplicationJson_Ocs'; + + @override + Iterable serialize( + Serializers serializers, NotificationsApiGenerateNotificationResponseApplicationJson_Ocs object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(JsonObject)), + ]; + + return result; + } + + @override + NotificationsApiGenerateNotificationResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); + break; + case 'data': + result.data = serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject; + break; + } + } + + return result.build(); + } +} + +class _$NotificationsApiGenerateNotificationResponseApplicationJsonSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsApiGenerateNotificationResponseApplicationJson, + _$NotificationsApiGenerateNotificationResponseApplicationJson + ]; + @override + final String wireName = 'NotificationsApiGenerateNotificationResponseApplicationJson'; + + @override + Iterable serialize( + Serializers serializers, NotificationsApiGenerateNotificationResponseApplicationJson object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsApiGenerateNotificationResponseApplicationJson_Ocs)), + ]; + + return result; + } + + @override + NotificationsApiGenerateNotificationResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsApiGenerateNotificationResponseApplicationJsonBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsApiGenerateNotificationResponseApplicationJson_Ocs))! + as NotificationsApiGenerateNotificationResponseApplicationJson_Ocs); + break; + } + } + + return result.build(); + } +} + +class _$NotificationsEndpointListNotificationsApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsEndpointListNotificationsApiVersion]; + @override + final String wireName = 'NotificationsEndpointListNotificationsApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsEndpointListNotificationsApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsEndpointListNotificationsApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsEndpointListNotificationsApiVersion.valueOf(serialized as String); +} + class _$NotificationsNotificationActionSerializer implements StructuredSerializer { @override final Iterable types = const [NotificationsNotificationAction, _$NotificationsNotificationAction]; @@ -118,14 +526,10 @@ class _$NotificationsNotificationActionSerializer implements StructuredSerialize serializers.serialize(object.link, specifiedType: const FullType(String)), 'type', serializers.serialize(object.type, specifiedType: const FullType(String)), + 'primary', + serializers.serialize(object.primary, specifiedType: const FullType(bool)), ]; - Object? value; - value = object.primary; - if (value != null) { - result - ..add('primary') - ..add(serializers.serialize(value, specifiedType: const FullType(bool))); - } + return result; } @@ -150,7 +554,7 @@ class _$NotificationsNotificationActionSerializer implements StructuredSerialize result.type = serializers.deserialize(value, specifiedType: const FullType(String))! as String; break; case 'primary': - result.primary = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool?; + result.primary = serializers.deserialize(value, specifiedType: const FullType(bool))! as bool; break; } } @@ -202,7 +606,8 @@ class _$NotificationsNotificationSerializer implements StructuredSerializer); + break; case 'subjectRich': result.subjectRich = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; break; case 'subjectRichParameters': - result.subjectRichParameters = - serializers.deserialize(value, specifiedType: const FullType(JsonObject)) as JsonObject?; + result.subjectRichParameters.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]))!); break; case 'messageRich': result.messageRich = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; break; case 'messageRichParameters': - result.messageRichParameters = - serializers.deserialize(value, specifiedType: const FullType(JsonObject)) as JsonObject?; + result.messageRichParameters.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(JsonObject)]))!); break; case 'icon': result.icon = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; @@ -289,11 +700,6 @@ class _$NotificationsNotificationSerializer implements StructuredSerializer); - break; } } @@ -301,15 +707,19 @@ class _$NotificationsNotificationSerializer implements StructuredSerializer { +class _$NotificationsEndpointListNotificationsResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsListNotifications_Ocs, _$NotificationsListNotifications_Ocs]; + final Iterable types = const [ + NotificationsEndpointListNotificationsResponseApplicationJson_Ocs, + _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs + ]; @override - final String wireName = 'NotificationsListNotifications_Ocs'; + final String wireName = 'NotificationsEndpointListNotificationsResponseApplicationJson_Ocs'; @override - Iterable serialize(Serializers serializers, NotificationsListNotifications_Ocs object, + Iterable serialize( + Serializers serializers, NotificationsEndpointListNotificationsResponseApplicationJson_Ocs object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'meta', @@ -323,9 +733,10 @@ class _$NotificationsListNotifications_OcsSerializer } @override - NotificationsListNotifications_Ocs deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointListNotificationsResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsListNotifications_OcsBuilder(); + final result = NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -348,27 +759,34 @@ class _$NotificationsListNotifications_OcsSerializer } } -class _$NotificationsListNotificationsSerializer implements StructuredSerializer { +class _$NotificationsEndpointListNotificationsResponseApplicationJsonSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsListNotifications, _$NotificationsListNotifications]; + final Iterable types = const [ + NotificationsEndpointListNotificationsResponseApplicationJson, + _$NotificationsEndpointListNotificationsResponseApplicationJson + ]; @override - final String wireName = 'NotificationsListNotifications'; + final String wireName = 'NotificationsEndpointListNotificationsResponseApplicationJson'; @override - Iterable serialize(Serializers serializers, NotificationsListNotifications object, + Iterable serialize( + Serializers serializers, NotificationsEndpointListNotificationsResponseApplicationJson object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'ocs', - serializers.serialize(object.ocs, specifiedType: const FullType(NotificationsListNotifications_Ocs)), + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsEndpointListNotificationsResponseApplicationJson_Ocs)), ]; return result; } @override - NotificationsListNotifications deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointListNotificationsResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsListNotificationsBuilder(); + final result = NotificationsEndpointListNotificationsResponseApplicationJsonBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -377,9 +795,9 @@ class _$NotificationsListNotificationsSerializer implements StructuredSerializer final Object? value = iterator.current; switch (key) { case 'ocs': - result.ocs.replace( - serializers.deserialize(value, specifiedType: const FullType(NotificationsListNotifications_Ocs))! - as NotificationsListNotifications_Ocs); + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsEndpointListNotificationsResponseApplicationJson_Ocs))! + as NotificationsEndpointListNotificationsResponseApplicationJson_Ocs); break; } } @@ -388,29 +806,53 @@ class _$NotificationsListNotificationsSerializer implements StructuredSerializer } } -class _$NotificationsGetNotification_OcsSerializer implements StructuredSerializer { +class _$NotificationsEndpointDeleteAllNotificationsApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsEndpointDeleteAllNotificationsApiVersion]; + @override + final String wireName = 'NotificationsEndpointDeleteAllNotificationsApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsEndpointDeleteAllNotificationsApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsEndpointDeleteAllNotificationsApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsEndpointDeleteAllNotificationsApiVersion.valueOf(serialized as String); +} + +class _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsGetNotification_Ocs, _$NotificationsGetNotification_Ocs]; + final Iterable types = const [ + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs, + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs + ]; @override - final String wireName = 'NotificationsGetNotification_Ocs'; + final String wireName = 'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs'; @override - Iterable serialize(Serializers serializers, NotificationsGetNotification_Ocs object, + Iterable serialize( + Serializers serializers, NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'meta', serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), 'data', - serializers.serialize(object.data, specifiedType: const FullType(NotificationsNotification)), + serializers.serialize(object.data, specifiedType: const FullType(JsonObject)), ]; return result; } @override - NotificationsGetNotification_Ocs deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsGetNotification_OcsBuilder(); + final result = NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -423,8 +865,7 @@ class _$NotificationsGetNotification_OcsSerializer implements StructuredSerializ as NotificationsOCSMeta); break; case 'data': - result.data.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsNotification))! - as NotificationsNotification); + result.data = serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject; break; } } @@ -433,27 +874,34 @@ class _$NotificationsGetNotification_OcsSerializer implements StructuredSerializ } } -class _$NotificationsGetNotificationSerializer implements StructuredSerializer { +class _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsGetNotification, _$NotificationsGetNotification]; + final Iterable types = const [ + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson, + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson + ]; @override - final String wireName = 'NotificationsGetNotification'; + final String wireName = 'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson'; @override - Iterable serialize(Serializers serializers, NotificationsGetNotification object, + Iterable serialize( + Serializers serializers, NotificationsEndpointDeleteAllNotificationsResponseApplicationJson object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'ocs', - serializers.serialize(object.ocs, specifiedType: const FullType(NotificationsGetNotification_Ocs)), + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs)), ]; return result; } @override - NotificationsGetNotification deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsGetNotificationBuilder(); + final result = NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -463,7 +911,9 @@ class _$NotificationsGetNotificationSerializer implements StructuredSerializer { +class _$NotificationsEndpointGetNotificationApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsEndpointGetNotificationApiVersion]; + @override + final String wireName = 'NotificationsEndpointGetNotificationApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsEndpointGetNotificationApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsEndpointGetNotificationApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsEndpointGetNotificationApiVersion.valueOf(serialized as String); +} + +class _$NotificationsEndpointGetNotificationResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsEmptyOCS_Ocs, _$NotificationsEmptyOCS_Ocs]; + final Iterable types = const [ + NotificationsEndpointGetNotificationResponseApplicationJson_Ocs, + _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs + ]; @override - final String wireName = 'NotificationsEmptyOCS_Ocs'; + final String wireName = 'NotificationsEndpointGetNotificationResponseApplicationJson_Ocs'; @override - Iterable serialize(Serializers serializers, NotificationsEmptyOCS_Ocs object, + Iterable serialize( + Serializers serializers, NotificationsEndpointGetNotificationResponseApplicationJson_Ocs object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'meta', serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), 'data', - serializers.serialize(object.data, specifiedType: const FullType(BuiltList, [FullType(JsonObject)])), + serializers.serialize(object.data, specifiedType: const FullType(NotificationsNotification)), ]; return result; } @override - NotificationsEmptyOCS_Ocs deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointGetNotificationResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsEmptyOCS_OcsBuilder(); + final result = NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -507,8 +981,8 @@ class _$NotificationsEmptyOCS_OcsSerializer implements StructuredSerializer); + result.data.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsNotification))! + as NotificationsNotification); break; } } @@ -517,27 +991,34 @@ class _$NotificationsEmptyOCS_OcsSerializer implements StructuredSerializer { +class _$NotificationsEndpointGetNotificationResponseApplicationJsonSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsEmptyOCS, _$NotificationsEmptyOCS]; + final Iterable types = const [ + NotificationsEndpointGetNotificationResponseApplicationJson, + _$NotificationsEndpointGetNotificationResponseApplicationJson + ]; @override - final String wireName = 'NotificationsEmptyOCS'; + final String wireName = 'NotificationsEndpointGetNotificationResponseApplicationJson'; @override - Iterable serialize(Serializers serializers, NotificationsEmptyOCS object, + Iterable serialize( + Serializers serializers, NotificationsEndpointGetNotificationResponseApplicationJson object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'ocs', - serializers.serialize(object.ocs, specifiedType: const FullType(NotificationsEmptyOCS_Ocs)), + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsEndpointGetNotificationResponseApplicationJson_Ocs)), ]; return result; } @override - NotificationsEmptyOCS deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointGetNotificationResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsEmptyOCSBuilder(); + final result = NotificationsEndpointGetNotificationResponseApplicationJsonBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -546,8 +1027,9 @@ class _$NotificationsEmptyOCSSerializer implements StructuredSerializer { +class _$NotificationsEndpointDeleteNotificationApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsEndpointDeleteNotificationApiVersion]; + @override + final String wireName = 'NotificationsEndpointDeleteNotificationApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsEndpointDeleteNotificationApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsEndpointDeleteNotificationApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsEndpointDeleteNotificationApiVersion.valueOf(serialized as String); +} + +class _$NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsPushServerSubscription, _$NotificationsPushServerSubscription]; + final Iterable types = const [ + NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs, + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs + ]; @override - final String wireName = 'NotificationsPushServerSubscription'; + final String wireName = 'NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs'; @override - Iterable serialize(Serializers serializers, NotificationsPushServerSubscription object, + Iterable serialize( + Serializers serializers, NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs object, {FullType specifiedType = FullType.unspecified}) { final result = [ - 'publicKey', - serializers.serialize(object.publicKey, specifiedType: const FullType(String)), - 'deviceIdentifier', - serializers.serialize(object.deviceIdentifier, specifiedType: const FullType(String)), - 'signature', - serializers.serialize(object.signature, specifiedType: const FullType(String)), + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(JsonObject)), ]; - Object? value; - value = object.message; - if (value != null) { - result - ..add('message') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } + return result; } @override - NotificationsPushServerSubscription deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsPushServerSubscriptionBuilder(); + final result = NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -595,17 +1092,12 @@ class _$NotificationsPushServerSubscriptionSerializer iterator.moveNext(); final Object? value = iterator.current; switch (key) { - case 'publicKey': - result.publicKey = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'deviceIdentifier': - result.deviceIdentifier = serializers.deserialize(value, specifiedType: const FullType(String))! as String; - break; - case 'signature': - result.signature = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); break; - case 'message': - result.message = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + case 'data': + result.data = serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject; break; } } @@ -614,33 +1106,34 @@ class _$NotificationsPushServerSubscriptionSerializer } } -class _$NotificationsPushServerRegistration_OcsSerializer - implements StructuredSerializer { +class _$NotificationsEndpointDeleteNotificationResponseApplicationJsonSerializer + implements StructuredSerializer { @override final Iterable types = const [ - NotificationsPushServerRegistration_Ocs, - _$NotificationsPushServerRegistration_Ocs + NotificationsEndpointDeleteNotificationResponseApplicationJson, + _$NotificationsEndpointDeleteNotificationResponseApplicationJson ]; @override - final String wireName = 'NotificationsPushServerRegistration_Ocs'; + final String wireName = 'NotificationsEndpointDeleteNotificationResponseApplicationJson'; @override - Iterable serialize(Serializers serializers, NotificationsPushServerRegistration_Ocs object, + Iterable serialize( + Serializers serializers, NotificationsEndpointDeleteNotificationResponseApplicationJson object, {FullType specifiedType = FullType.unspecified}) { final result = [ - 'meta', - serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), - 'data', - serializers.serialize(object.data, specifiedType: const FullType(NotificationsPushServerSubscription)), + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs)), ]; return result; } @override - NotificationsPushServerRegistration_Ocs deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointDeleteNotificationResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsPushServerRegistration_OcsBuilder(); + final result = NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -648,14 +1141,10 @@ class _$NotificationsPushServerRegistration_OcsSerializer iterator.moveNext(); final Object? value = iterator.current; switch (key) { - case 'meta': - result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! - as NotificationsOCSMeta); - break; - case 'data': - result.data.replace( - serializers.deserialize(value, specifiedType: const FullType(NotificationsPushServerSubscription))! - as NotificationsPushServerSubscription); + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs))! + as NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs); break; } } @@ -664,28 +1153,53 @@ class _$NotificationsPushServerRegistration_OcsSerializer } } -class _$NotificationsPushServerRegistrationSerializer - implements StructuredSerializer { +class _$NotificationsEndpointConfirmIdsForUserApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsEndpointConfirmIdsForUserApiVersion]; + @override + final String wireName = 'NotificationsEndpointConfirmIdsForUserApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsEndpointConfirmIdsForUserApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsEndpointConfirmIdsForUserApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsEndpointConfirmIdsForUserApiVersion.valueOf(serialized as String); +} + +class _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override - final Iterable types = const [NotificationsPushServerRegistration, _$NotificationsPushServerRegistration]; + final Iterable types = const [ + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs, + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs + ]; @override - final String wireName = 'NotificationsPushServerRegistration'; + final String wireName = 'NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs'; @override - Iterable serialize(Serializers serializers, NotificationsPushServerRegistration object, + Iterable serialize( + Serializers serializers, NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs object, {FullType specifiedType = FullType.unspecified}) { final result = [ - 'ocs', - serializers.serialize(object.ocs, specifiedType: const FullType(NotificationsPushServerRegistration_Ocs)), + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(BuiltList, [FullType(int)])), ]; return result; } @override - NotificationsPushServerRegistration deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsPushServerRegistrationBuilder(); + final result = NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -693,10 +1207,13 @@ class _$NotificationsPushServerRegistrationSerializer iterator.moveNext(); final Object? value = iterator.current; switch (key) { - case 'ocs': - result.ocs.replace( - serializers.deserialize(value, specifiedType: const FullType(NotificationsPushServerRegistration_Ocs))! - as NotificationsPushServerRegistration_Ocs); + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); + break; + case 'data': + result.data.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, [FullType(int)]))! + as BuiltList); break; } } @@ -705,46 +1222,34 @@ class _$NotificationsPushServerRegistrationSerializer } } -class _$NotificationsCapabilities_NotificationsSerializer - implements StructuredSerializer { +class _$NotificationsEndpointConfirmIdsForUserResponseApplicationJsonSerializer + implements StructuredSerializer { @override final Iterable types = const [ - NotificationsCapabilities_Notifications, - _$NotificationsCapabilities_Notifications + NotificationsEndpointConfirmIdsForUserResponseApplicationJson, + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson ]; @override - final String wireName = 'NotificationsCapabilities_Notifications'; + final String wireName = 'NotificationsEndpointConfirmIdsForUserResponseApplicationJson'; @override - Iterable serialize(Serializers serializers, NotificationsCapabilities_Notifications object, + Iterable serialize( + Serializers serializers, NotificationsEndpointConfirmIdsForUserResponseApplicationJson object, {FullType specifiedType = FullType.unspecified}) { - final result = []; - Object? value; - value = object.ocsEndpoints; - if (value != null) { - result - ..add('ocs-endpoints') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - value = object.push; - if (value != null) { - result - ..add('push') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - value = object.adminNotifications; - if (value != null) { - result - ..add('admin-notifications') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } + final result = [ + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs)), + ]; + return result; } @override - NotificationsCapabilities_Notifications deserialize(Serializers serializers, Iterable serialized, + NotificationsEndpointConfirmIdsForUserResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsCapabilities_NotificationsBuilder(); + final result = NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -752,17 +1257,10 @@ class _$NotificationsCapabilities_NotificationsSerializer iterator.moveNext(); final Object? value = iterator.current; switch (key) { - case 'ocs-endpoints': - result.ocsEndpoints.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); - break; - case 'push': - result.push.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); - break; - case 'admin-notifications': - result.adminNotifications.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs))! + as NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs); break; } } @@ -771,28 +1269,49 @@ class _$NotificationsCapabilities_NotificationsSerializer } } -class _$NotificationsCapabilitiesSerializer implements StructuredSerializer { +class _$NotificationsPushRegisterDeviceApiVersionSerializer + implements PrimitiveSerializer { @override - final Iterable types = const [NotificationsCapabilities, _$NotificationsCapabilities]; + final Iterable types = const [NotificationsPushRegisterDeviceApiVersion]; @override - final String wireName = 'NotificationsCapabilities'; + final String wireName = 'NotificationsPushRegisterDeviceApiVersion'; @override - Iterable serialize(Serializers serializers, NotificationsCapabilities object, + Object serialize(Serializers serializers, NotificationsPushRegisterDeviceApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsPushRegisterDeviceApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsPushRegisterDeviceApiVersion.valueOf(serialized as String); +} + +class _$NotificationsPushDeviceSerializer implements StructuredSerializer { + @override + final Iterable types = const [NotificationsPushDevice, _$NotificationsPushDevice]; + @override + final String wireName = 'NotificationsPushDevice'; + + @override + Iterable serialize(Serializers serializers, NotificationsPushDevice object, {FullType specifiedType = FullType.unspecified}) { final result = [ - 'notifications', - serializers.serialize(object.notifications, - specifiedType: const FullType(NotificationsCapabilities_Notifications)), + 'publicKey', + serializers.serialize(object.publicKey, specifiedType: const FullType(String)), + 'deviceIdentifier', + serializers.serialize(object.deviceIdentifier, specifiedType: const FullType(String)), + 'signature', + serializers.serialize(object.signature, specifiedType: const FullType(String)), ]; return result; } @override - NotificationsCapabilities deserialize(Serializers serializers, Iterable serialized, + NotificationsPushDevice deserialize(Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsCapabilitiesBuilder(); + final result = NotificationsPushDeviceBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -800,10 +1319,14 @@ class _$NotificationsCapabilitiesSerializer implements StructuredSerializer { +class _$NotificationsPushRegisterDeviceResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override final Iterable types = const [ - NotificationsNotificationDecryptedSubject, - _$NotificationsNotificationDecryptedSubject + NotificationsPushRegisterDeviceResponseApplicationJson_Ocs, + _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs ]; @override - final String wireName = 'NotificationsNotificationDecryptedSubject'; + final String wireName = 'NotificationsPushRegisterDeviceResponseApplicationJson_Ocs'; @override - Iterable serialize(Serializers serializers, NotificationsNotificationDecryptedSubject object, + Iterable serialize( + Serializers serializers, NotificationsPushRegisterDeviceResponseApplicationJson_Ocs object, {FullType specifiedType = FullType.unspecified}) { - final result = []; - Object? value; - value = object.nid; - if (value != null) { - result - ..add('nid') - ..add(serializers.serialize(value, specifiedType: const FullType(int))); - } - value = object.app; - if (value != null) { - result - ..add('app') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.subject; - if (value != null) { - result - ..add('subject') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.type; - if (value != null) { - result - ..add('type') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.id; - if (value != null) { - result - ..add('id') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - value = object.delete; - if (value != null) { - result - ..add('delete') - ..add(serializers.serialize(value, specifiedType: const FullType(bool))); - } - value = object.deleteAll; - if (value != null) { - result - ..add('delete-all') - ..add(serializers.serialize(value, specifiedType: const FullType(bool))); - } + final result = [ + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(NotificationsPushDevice)), + ]; + return result; } @override - NotificationsNotificationDecryptedSubject deserialize(Serializers serializers, Iterable serialized, + NotificationsPushRegisterDeviceResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = NotificationsNotificationDecryptedSubjectBuilder(); + final result = NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -883,26 +1371,13 @@ class _$NotificationsNotificationDecryptedSubjectSerializer iterator.moveNext(); final Object? value = iterator.current; switch (key) { - case 'nid': - result.nid = serializers.deserialize(value, specifiedType: const FullType(int)) as int?; - break; - case 'app': - result.app = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'subject': - result.subject = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'type': - result.type = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'id': - result.id = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - case 'delete': - result.delete = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool?; + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); break; - case 'delete-all': - result.deleteAll = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool?; + case 'data': + result.data.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsPushDevice))! + as NotificationsPushDevice); break; } } @@ -911,628 +1386,2639 @@ class _$NotificationsNotificationDecryptedSubjectSerializer } } -abstract mixin class NotificationsOCSMetaInterfaceBuilder { - void replace(NotificationsOCSMetaInterface other); - void update(void Function(NotificationsOCSMetaInterfaceBuilder) updates); - String? get status; - set status(String? status); +class _$NotificationsPushRegisterDeviceResponseApplicationJsonSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsPushRegisterDeviceResponseApplicationJson, + _$NotificationsPushRegisterDeviceResponseApplicationJson + ]; + @override + final String wireName = 'NotificationsPushRegisterDeviceResponseApplicationJson'; - int? get statuscode; - set statuscode(int? statuscode); + @override + Iterable serialize(Serializers serializers, NotificationsPushRegisterDeviceResponseApplicationJson object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsPushRegisterDeviceResponseApplicationJson_Ocs)), + ]; - String? get message; - set message(String? message); + return result; + } - String? get totalitems; - set totalitems(String? totalitems); + @override + NotificationsPushRegisterDeviceResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsPushRegisterDeviceResponseApplicationJsonBuilder(); - String? get itemsperpage; - set itemsperpage(String? itemsperpage); + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsPushRegisterDeviceResponseApplicationJson_Ocs))! + as NotificationsPushRegisterDeviceResponseApplicationJson_Ocs); + break; + } + } + + return result.build(); + } } -class _$NotificationsOCSMeta extends NotificationsOCSMeta { +class _$NotificationsPushRemoveDeviceApiVersionSerializer + implements PrimitiveSerializer { @override - final String status; + final Iterable types = const [NotificationsPushRemoveDeviceApiVersion]; @override - final int statuscode; + final String wireName = 'NotificationsPushRemoveDeviceApiVersion'; + @override - final String? message; + Object serialize(Serializers serializers, NotificationsPushRemoveDeviceApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + @override - final String? totalitems; + NotificationsPushRemoveDeviceApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsPushRemoveDeviceApiVersion.valueOf(serialized as String); +} + +class _$NotificationsPushRemoveDeviceResponseApplicationJson_OcsSerializer + implements StructuredSerializer { @override - final String? itemsperpage; + final Iterable types = const [ + NotificationsPushRemoveDeviceResponseApplicationJson_Ocs, + _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs + ]; + @override + final String wireName = 'NotificationsPushRemoveDeviceResponseApplicationJson_Ocs'; - factory _$NotificationsOCSMeta([void Function(NotificationsOCSMetaBuilder)? updates]) => - (NotificationsOCSMetaBuilder()..update(updates))._build(); + @override + Iterable serialize(Serializers serializers, NotificationsPushRemoveDeviceResponseApplicationJson_Ocs object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(JsonObject)), + ]; - _$NotificationsOCSMeta._( - {required this.status, required this.statuscode, this.message, this.totalitems, this.itemsperpage}) - : super._() { - BuiltValueNullFieldError.checkNotNull(status, r'NotificationsOCSMeta', 'status'); - BuiltValueNullFieldError.checkNotNull(statuscode, r'NotificationsOCSMeta', 'statuscode'); + return result; } @override - NotificationsOCSMeta rebuild(void Function(NotificationsOCSMetaBuilder) updates) => - (toBuilder()..update(updates)).build(); + NotificationsPushRemoveDeviceResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder(); - @override - NotificationsOCSMetaBuilder toBuilder() => NotificationsOCSMetaBuilder()..replace(this); + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); + break; + case 'data': + result.data = serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject; + break; + } + } - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is NotificationsOCSMeta && - status == other.status && - statuscode == other.statuscode && - message == other.message && - totalitems == other.totalitems && - itemsperpage == other.itemsperpage; + return result.build(); } +} +class _$NotificationsPushRemoveDeviceResponseApplicationJsonSerializer + implements StructuredSerializer { @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, status.hashCode); - _$hash = $jc(_$hash, statuscode.hashCode); - _$hash = $jc(_$hash, message.hashCode); - _$hash = $jc(_$hash, totalitems.hashCode); - _$hash = $jc(_$hash, itemsperpage.hashCode); - _$hash = $jf(_$hash); - return _$hash; + final Iterable types = const [ + NotificationsPushRemoveDeviceResponseApplicationJson, + _$NotificationsPushRemoveDeviceResponseApplicationJson + ]; + @override + final String wireName = 'NotificationsPushRemoveDeviceResponseApplicationJson'; + + @override + Iterable serialize(Serializers serializers, NotificationsPushRemoveDeviceResponseApplicationJson object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsPushRemoveDeviceResponseApplicationJson_Ocs)), + ]; + + return result; } @override - String toString() { - return (newBuiltValueToStringHelper(r'NotificationsOCSMeta') - ..add('status', status) - ..add('statuscode', statuscode) - ..add('message', message) - ..add('totalitems', totalitems) - ..add('itemsperpage', itemsperpage)) - .toString(); + NotificationsPushRemoveDeviceResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsPushRemoveDeviceResponseApplicationJsonBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsPushRemoveDeviceResponseApplicationJson_Ocs))! + as NotificationsPushRemoveDeviceResponseApplicationJson_Ocs); + break; + } + } + + return result.build(); } } -class NotificationsOCSMetaBuilder - implements Builder, NotificationsOCSMetaInterfaceBuilder { - _$NotificationsOCSMeta? _$v; +class _$NotificationsSettingsPersonalApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsSettingsPersonalApiVersion]; + @override + final String wireName = 'NotificationsSettingsPersonalApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsSettingsPersonalApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsSettingsPersonalApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsSettingsPersonalApiVersion.valueOf(serialized as String); +} + +class _$NotificationsSettingsPersonalResponseApplicationJson_OcsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsSettingsPersonalResponseApplicationJson_Ocs, + _$NotificationsSettingsPersonalResponseApplicationJson_Ocs + ]; + @override + final String wireName = 'NotificationsSettingsPersonalResponseApplicationJson_Ocs'; + + @override + Iterable serialize(Serializers serializers, NotificationsSettingsPersonalResponseApplicationJson_Ocs object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(JsonObject)), + ]; + + return result; + } + + @override + NotificationsSettingsPersonalResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); + break; + case 'data': + result.data = serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject; + break; + } + } + + return result.build(); + } +} + +class _$NotificationsSettingsPersonalResponseApplicationJsonSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsSettingsPersonalResponseApplicationJson, + _$NotificationsSettingsPersonalResponseApplicationJson + ]; + @override + final String wireName = 'NotificationsSettingsPersonalResponseApplicationJson'; + + @override + Iterable serialize(Serializers serializers, NotificationsSettingsPersonalResponseApplicationJson object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsSettingsPersonalResponseApplicationJson_Ocs)), + ]; + + return result; + } + + @override + NotificationsSettingsPersonalResponseApplicationJson deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsSettingsPersonalResponseApplicationJsonBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsSettingsPersonalResponseApplicationJson_Ocs))! + as NotificationsSettingsPersonalResponseApplicationJson_Ocs); + break; + } + } + + return result.build(); + } +} + +class _$NotificationsSettingsAdminApiVersionSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [NotificationsSettingsAdminApiVersion]; + @override + final String wireName = 'NotificationsSettingsAdminApiVersion'; + + @override + Object serialize(Serializers serializers, NotificationsSettingsAdminApiVersion object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + NotificationsSettingsAdminApiVersion deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + NotificationsSettingsAdminApiVersion.valueOf(serialized as String); +} + +class _$NotificationsSettingsAdminResponseApplicationJson_OcsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsSettingsAdminResponseApplicationJson_Ocs, + _$NotificationsSettingsAdminResponseApplicationJson_Ocs + ]; + @override + final String wireName = 'NotificationsSettingsAdminResponseApplicationJson_Ocs'; + + @override + Iterable serialize(Serializers serializers, NotificationsSettingsAdminResponseApplicationJson_Ocs object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'meta', + serializers.serialize(object.meta, specifiedType: const FullType(NotificationsOCSMeta)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(JsonObject)), + ]; + + return result; + } + + @override + NotificationsSettingsAdminResponseApplicationJson_Ocs deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsSettingsAdminResponseApplicationJson_OcsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'meta': + result.meta.replace(serializers.deserialize(value, specifiedType: const FullType(NotificationsOCSMeta))! + as NotificationsOCSMeta); + break; + case 'data': + result.data = serializers.deserialize(value, specifiedType: const FullType(JsonObject))! as JsonObject; + break; + } + } + + return result.build(); + } +} + +class _$NotificationsSettingsAdminResponseApplicationJsonSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsSettingsAdminResponseApplicationJson, + _$NotificationsSettingsAdminResponseApplicationJson + ]; + @override + final String wireName = 'NotificationsSettingsAdminResponseApplicationJson'; + + @override + Iterable serialize(Serializers serializers, NotificationsSettingsAdminResponseApplicationJson object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ocs', + serializers.serialize(object.ocs, + specifiedType: const FullType(NotificationsSettingsAdminResponseApplicationJson_Ocs)), + ]; + + return result; + } + + @override + NotificationsSettingsAdminResponseApplicationJson deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsSettingsAdminResponseApplicationJsonBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ocs': + result.ocs.replace(serializers.deserialize(value, + specifiedType: const FullType(NotificationsSettingsAdminResponseApplicationJson_Ocs))! + as NotificationsSettingsAdminResponseApplicationJson_Ocs); + break; + } + } + + return result.build(); + } +} + +class _$NotificationsCapabilities_NotificationsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + NotificationsCapabilities_Notifications, + _$NotificationsCapabilities_Notifications + ]; + @override + final String wireName = 'NotificationsCapabilities_Notifications'; + + @override + Iterable serialize(Serializers serializers, NotificationsCapabilities_Notifications object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ocs-endpoints', + serializers.serialize(object.ocsEndpoints, specifiedType: const FullType(BuiltList, [FullType(String)])), + 'push', + serializers.serialize(object.push, specifiedType: const FullType(BuiltList, [FullType(String)])), + 'admin-notifications', + serializers.serialize(object.adminNotifications, specifiedType: const FullType(BuiltList, [FullType(String)])), + ]; + + return result; + } + + @override + NotificationsCapabilities_Notifications deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsCapabilities_NotificationsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ocs-endpoints': + result.ocsEndpoints.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); + break; + case 'push': + result.push.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); + break; + case 'admin-notifications': + result.adminNotifications.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); + break; + } + } + + return result.build(); + } +} + +class _$NotificationsCapabilitiesSerializer implements StructuredSerializer { + @override + final Iterable types = const [NotificationsCapabilities, _$NotificationsCapabilities]; + @override + final String wireName = 'NotificationsCapabilities'; + + @override + Iterable serialize(Serializers serializers, NotificationsCapabilities object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'notifications', + serializers.serialize(object.notifications, + specifiedType: const FullType(NotificationsCapabilities_Notifications)), + ]; + + return result; + } + + @override + NotificationsCapabilities deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotificationsCapabilitiesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'notifications': + result.notifications.replace( + serializers.deserialize(value, specifiedType: const FullType(NotificationsCapabilities_Notifications))! + as NotificationsCapabilities_Notifications); + break; + } + } + + return result.build(); + } +} + +abstract mixin class NotificationsOCSMetaInterfaceBuilder { + void replace(NotificationsOCSMetaInterface other); + void update(void Function(NotificationsOCSMetaInterfaceBuilder) updates); + String? get status; + set status(String? status); + + int? get statuscode; + set statuscode(int? statuscode); + + String? get message; + set message(String? message); + + String? get totalitems; + set totalitems(String? totalitems); + + String? get itemsperpage; + set itemsperpage(String? itemsperpage); +} + +class _$NotificationsOCSMeta extends NotificationsOCSMeta { + @override + final String status; + @override + final int statuscode; + @override + final String? message; + @override + final String? totalitems; + @override + final String? itemsperpage; + + factory _$NotificationsOCSMeta([void Function(NotificationsOCSMetaBuilder)? updates]) => + (NotificationsOCSMetaBuilder()..update(updates))._build(); + + _$NotificationsOCSMeta._( + {required this.status, required this.statuscode, this.message, this.totalitems, this.itemsperpage}) + : super._() { + BuiltValueNullFieldError.checkNotNull(status, r'NotificationsOCSMeta', 'status'); + BuiltValueNullFieldError.checkNotNull(statuscode, r'NotificationsOCSMeta', 'statuscode'); + } + + @override + NotificationsOCSMeta rebuild(void Function(NotificationsOCSMetaBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsOCSMetaBuilder toBuilder() => NotificationsOCSMetaBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsOCSMeta && + status == other.status && + statuscode == other.statuscode && + message == other.message && + totalitems == other.totalitems && + itemsperpage == other.itemsperpage; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, status.hashCode); + _$hash = $jc(_$hash, statuscode.hashCode); + _$hash = $jc(_$hash, message.hashCode); + _$hash = $jc(_$hash, totalitems.hashCode); + _$hash = $jc(_$hash, itemsperpage.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsOCSMeta') + ..add('status', status) + ..add('statuscode', statuscode) + ..add('message', message) + ..add('totalitems', totalitems) + ..add('itemsperpage', itemsperpage)) + .toString(); + } +} + +class NotificationsOCSMetaBuilder + implements Builder, NotificationsOCSMetaInterfaceBuilder { + _$NotificationsOCSMeta? _$v; + + String? _status; + String? get status => _$this._status; + set status(covariant String? status) => _$this._status = status; + + int? _statuscode; + int? get statuscode => _$this._statuscode; + set statuscode(covariant int? statuscode) => _$this._statuscode = statuscode; + + String? _message; + String? get message => _$this._message; + set message(covariant String? message) => _$this._message = message; + + String? _totalitems; + String? get totalitems => _$this._totalitems; + set totalitems(covariant String? totalitems) => _$this._totalitems = totalitems; + + String? _itemsperpage; + String? get itemsperpage => _$this._itemsperpage; + set itemsperpage(covariant String? itemsperpage) => _$this._itemsperpage = itemsperpage; + + NotificationsOCSMetaBuilder(); + + NotificationsOCSMetaBuilder get _$this { + final $v = _$v; + if ($v != null) { + _status = $v.status; + _statuscode = $v.statuscode; + _message = $v.message; + _totalitems = $v.totalitems; + _itemsperpage = $v.itemsperpage; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsOCSMeta other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsOCSMeta; + } + + @override + void update(void Function(NotificationsOCSMetaBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsOCSMeta build() => _build(); + + _$NotificationsOCSMeta _build() { + final _$result = _$v ?? + _$NotificationsOCSMeta._( + status: BuiltValueNullFieldError.checkNotNull(status, r'NotificationsOCSMeta', 'status'), + statuscode: BuiltValueNullFieldError.checkNotNull(statuscode, r'NotificationsOCSMeta', 'statuscode'), + message: message, + totalitems: totalitems, + itemsperpage: itemsperpage); + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterfaceBuilder) updates); + NotificationsOCSMetaBuilder get meta; + set meta(NotificationsOCSMetaBuilder? meta); + + JsonObject? get data; + set data(JsonObject? data); +} + +class _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs + extends NotificationsApiGenerateNotificationResponseApplicationJson_Ocs { + @override + final NotificationsOCSMeta meta; + @override + final JsonObject data; + + factory _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs( + [void Function(NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder()..update(updates))._build(); + + _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs._({required this.meta, required this.data}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + meta, r'NotificationsApiGenerateNotificationResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsApiGenerateNotificationResponseApplicationJson_Ocs', 'data'); + } + + @override + NotificationsApiGenerateNotificationResponseApplicationJson_Ocs rebuild( + void Function(NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsApiGenerateNotificationResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, meta.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsApiGenerateNotificationResponseApplicationJson_Ocs') + ..add('meta', meta) + ..add('data', data)) + .toString(); + } +} + +class NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder + implements + Builder, + NotificationsApiGenerateNotificationResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs? _$v; + + NotificationsOCSMetaBuilder? _meta; + NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); + set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; + + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; + + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder(); + + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _meta = $v.meta.toBuilder(); + _data = $v.data; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsApiGenerateNotificationResponseApplicationJson_Ocs other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs; + } + + @override + void update(void Function(NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsApiGenerateNotificationResponseApplicationJson_Ocs build() => _build(); + + _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs _build() { + _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs _$result; + try { + _$result = _$v ?? + _$NotificationsApiGenerateNotificationResponseApplicationJson_Ocs._( + meta: meta.build(), + data: BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsApiGenerateNotificationResponseApplicationJson_Ocs', 'data')); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'meta'; + meta.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsApiGenerateNotificationResponseApplicationJson_Ocs', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsApiGenerateNotificationResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsApiGenerateNotificationResponseApplicationJsonInterface other); + void update(void Function(NotificationsApiGenerateNotificationResponseApplicationJsonInterfaceBuilder) updates); + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder? ocs); +} + +class _$NotificationsApiGenerateNotificationResponseApplicationJson + extends NotificationsApiGenerateNotificationResponseApplicationJson { + @override + final NotificationsApiGenerateNotificationResponseApplicationJson_Ocs ocs; + + factory _$NotificationsApiGenerateNotificationResponseApplicationJson( + [void Function(NotificationsApiGenerateNotificationResponseApplicationJsonBuilder)? updates]) => + (NotificationsApiGenerateNotificationResponseApplicationJsonBuilder()..update(updates))._build(); + + _$NotificationsApiGenerateNotificationResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsApiGenerateNotificationResponseApplicationJson', 'ocs'); + } + + @override + NotificationsApiGenerateNotificationResponseApplicationJson rebuild( + void Function(NotificationsApiGenerateNotificationResponseApplicationJsonBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsApiGenerateNotificationResponseApplicationJsonBuilder toBuilder() => + NotificationsApiGenerateNotificationResponseApplicationJsonBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsApiGenerateNotificationResponseApplicationJson && ocs == other.ocs; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, ocs.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsApiGenerateNotificationResponseApplicationJson') + ..add('ocs', ocs)) + .toString(); + } +} + +class NotificationsApiGenerateNotificationResponseApplicationJsonBuilder + implements + Builder, + NotificationsApiGenerateNotificationResponseApplicationJsonInterfaceBuilder { + _$NotificationsApiGenerateNotificationResponseApplicationJson? _$v; + + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder? _ocs; + NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsApiGenerateNotificationResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; + + NotificationsApiGenerateNotificationResponseApplicationJsonBuilder(); + + NotificationsApiGenerateNotificationResponseApplicationJsonBuilder get _$this { + final $v = _$v; + if ($v != null) { + _ocs = $v.ocs.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsApiGenerateNotificationResponseApplicationJson other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsApiGenerateNotificationResponseApplicationJson; + } + + @override + void update(void Function(NotificationsApiGenerateNotificationResponseApplicationJsonBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsApiGenerateNotificationResponseApplicationJson build() => _build(); + + _$NotificationsApiGenerateNotificationResponseApplicationJson _build() { + _$NotificationsApiGenerateNotificationResponseApplicationJson _$result; + try { + _$result = _$v ?? _$NotificationsApiGenerateNotificationResponseApplicationJson._(ocs: ocs.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'ocs'; + ocs.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsApiGenerateNotificationResponseApplicationJson', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointEndpointListNotificationsHeadersInterfaceBuilder { + void replace(NotificationsEndpointEndpointListNotificationsHeadersInterface other); + void update(void Function(NotificationsEndpointEndpointListNotificationsHeadersInterfaceBuilder) updates); + String? get xNextcloudUserStatus; + set xNextcloudUserStatus(String? xNextcloudUserStatus); +} + +class _$NotificationsEndpointEndpointListNotificationsHeaders + extends NotificationsEndpointEndpointListNotificationsHeaders { + @override + final String? xNextcloudUserStatus; + + factory _$NotificationsEndpointEndpointListNotificationsHeaders( + [void Function(NotificationsEndpointEndpointListNotificationsHeadersBuilder)? updates]) => + (NotificationsEndpointEndpointListNotificationsHeadersBuilder()..update(updates))._build(); + + _$NotificationsEndpointEndpointListNotificationsHeaders._({this.xNextcloudUserStatus}) : super._(); + + @override + NotificationsEndpointEndpointListNotificationsHeaders rebuild( + void Function(NotificationsEndpointEndpointListNotificationsHeadersBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointEndpointListNotificationsHeadersBuilder toBuilder() => + NotificationsEndpointEndpointListNotificationsHeadersBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointEndpointListNotificationsHeaders && + xNextcloudUserStatus == other.xNextcloudUserStatus; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, xNextcloudUserStatus.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointEndpointListNotificationsHeaders') + ..add('xNextcloudUserStatus', xNextcloudUserStatus)) + .toString(); + } +} + +class NotificationsEndpointEndpointListNotificationsHeadersBuilder + implements + Builder, + NotificationsEndpointEndpointListNotificationsHeadersInterfaceBuilder { + _$NotificationsEndpointEndpointListNotificationsHeaders? _$v; + + String? _xNextcloudUserStatus; + String? get xNextcloudUserStatus => _$this._xNextcloudUserStatus; + set xNextcloudUserStatus(covariant String? xNextcloudUserStatus) => + _$this._xNextcloudUserStatus = xNextcloudUserStatus; + + NotificationsEndpointEndpointListNotificationsHeadersBuilder(); + + NotificationsEndpointEndpointListNotificationsHeadersBuilder get _$this { + final $v = _$v; + if ($v != null) { + _xNextcloudUserStatus = $v.xNextcloudUserStatus; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointEndpointListNotificationsHeaders other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointEndpointListNotificationsHeaders; + } + + @override + void update(void Function(NotificationsEndpointEndpointListNotificationsHeadersBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointEndpointListNotificationsHeaders build() => _build(); + + _$NotificationsEndpointEndpointListNotificationsHeaders _build() { + final _$result = + _$v ?? _$NotificationsEndpointEndpointListNotificationsHeaders._(xNextcloudUserStatus: xNextcloudUserStatus); + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsNotificationActionInterfaceBuilder { + void replace(NotificationsNotificationActionInterface other); + void update(void Function(NotificationsNotificationActionInterfaceBuilder) updates); + String? get label; + set label(String? label); + + String? get link; + set link(String? link); + + String? get type; + set type(String? type); + + bool? get primary; + set primary(bool? primary); +} + +class _$NotificationsNotificationAction extends NotificationsNotificationAction { + @override + final String label; + @override + final String link; + @override + final String type; + @override + final bool primary; + + factory _$NotificationsNotificationAction([void Function(NotificationsNotificationActionBuilder)? updates]) => + (NotificationsNotificationActionBuilder()..update(updates))._build(); + + _$NotificationsNotificationAction._( + {required this.label, required this.link, required this.type, required this.primary}) + : super._() { + BuiltValueNullFieldError.checkNotNull(label, r'NotificationsNotificationAction', 'label'); + BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotificationAction', 'link'); + BuiltValueNullFieldError.checkNotNull(type, r'NotificationsNotificationAction', 'type'); + BuiltValueNullFieldError.checkNotNull(primary, r'NotificationsNotificationAction', 'primary'); + } + + @override + NotificationsNotificationAction rebuild(void Function(NotificationsNotificationActionBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsNotificationActionBuilder toBuilder() => NotificationsNotificationActionBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsNotificationAction && + label == other.label && + link == other.link && + type == other.type && + primary == other.primary; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, label.hashCode); + _$hash = $jc(_$hash, link.hashCode); + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, primary.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsNotificationAction') + ..add('label', label) + ..add('link', link) + ..add('type', type) + ..add('primary', primary)) + .toString(); + } +} + +class NotificationsNotificationActionBuilder + implements + Builder, + NotificationsNotificationActionInterfaceBuilder { + _$NotificationsNotificationAction? _$v; + + String? _label; + String? get label => _$this._label; + set label(covariant String? label) => _$this._label = label; + + String? _link; + String? get link => _$this._link; + set link(covariant String? link) => _$this._link = link; + + String? _type; + String? get type => _$this._type; + set type(covariant String? type) => _$this._type = type; + + bool? _primary; + bool? get primary => _$this._primary; + set primary(covariant bool? primary) => _$this._primary = primary; + + NotificationsNotificationActionBuilder(); + + NotificationsNotificationActionBuilder get _$this { + final $v = _$v; + if ($v != null) { + _label = $v.label; + _link = $v.link; + _type = $v.type; + _primary = $v.primary; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsNotificationAction other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsNotificationAction; + } + + @override + void update(void Function(NotificationsNotificationActionBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsNotificationAction build() => _build(); + + _$NotificationsNotificationAction _build() { + final _$result = _$v ?? + _$NotificationsNotificationAction._( + label: BuiltValueNullFieldError.checkNotNull(label, r'NotificationsNotificationAction', 'label'), + link: BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotificationAction', 'link'), + type: BuiltValueNullFieldError.checkNotNull(type, r'NotificationsNotificationAction', 'type'), + primary: BuiltValueNullFieldError.checkNotNull(primary, r'NotificationsNotificationAction', 'primary')); + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsNotificationInterfaceBuilder { + void replace(NotificationsNotificationInterface other); + void update(void Function(NotificationsNotificationInterfaceBuilder) updates); + int? get notificationId; + set notificationId(int? notificationId); + + String? get app; + set app(String? app); + + String? get user; + set user(String? user); + + String? get datetime; + set datetime(String? datetime); + + String? get objectType; + set objectType(String? objectType); + + String? get objectId; + set objectId(String? objectId); + + String? get subject; + set subject(String? subject); + + String? get message; + set message(String? message); + + String? get link; + set link(String? link); + + ListBuilder get actions; + set actions(ListBuilder? actions); + + String? get subjectRich; + set subjectRich(String? subjectRich); + + MapBuilder get subjectRichParameters; + set subjectRichParameters(MapBuilder? subjectRichParameters); + + String? get messageRich; + set messageRich(String? messageRich); + + MapBuilder get messageRichParameters; + set messageRichParameters(MapBuilder? messageRichParameters); + + String? get icon; + set icon(String? icon); + + bool? get shouldNotify; + set shouldNotify(bool? shouldNotify); +} + +class _$NotificationsNotification extends NotificationsNotification { + @override + final int notificationId; + @override + final String app; + @override + final String user; + @override + final String datetime; + @override + final String objectType; + @override + final String objectId; + @override + final String subject; + @override + final String message; + @override + final String link; + @override + final BuiltList actions; + @override + final String? subjectRich; + @override + final BuiltMap? subjectRichParameters; + @override + final String? messageRich; + @override + final BuiltMap? messageRichParameters; + @override + final String? icon; + @override + final bool? shouldNotify; + + factory _$NotificationsNotification([void Function(NotificationsNotificationBuilder)? updates]) => + (NotificationsNotificationBuilder()..update(updates))._build(); + + _$NotificationsNotification._( + {required this.notificationId, + required this.app, + required this.user, + required this.datetime, + required this.objectType, + required this.objectId, + required this.subject, + required this.message, + required this.link, + required this.actions, + this.subjectRich, + this.subjectRichParameters, + this.messageRich, + this.messageRichParameters, + this.icon, + this.shouldNotify}) + : super._() { + BuiltValueNullFieldError.checkNotNull(notificationId, r'NotificationsNotification', 'notificationId'); + BuiltValueNullFieldError.checkNotNull(app, r'NotificationsNotification', 'app'); + BuiltValueNullFieldError.checkNotNull(user, r'NotificationsNotification', 'user'); + BuiltValueNullFieldError.checkNotNull(datetime, r'NotificationsNotification', 'datetime'); + BuiltValueNullFieldError.checkNotNull(objectType, r'NotificationsNotification', 'objectType'); + BuiltValueNullFieldError.checkNotNull(objectId, r'NotificationsNotification', 'objectId'); + BuiltValueNullFieldError.checkNotNull(subject, r'NotificationsNotification', 'subject'); + BuiltValueNullFieldError.checkNotNull(message, r'NotificationsNotification', 'message'); + BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotification', 'link'); + BuiltValueNullFieldError.checkNotNull(actions, r'NotificationsNotification', 'actions'); + } + + @override + NotificationsNotification rebuild(void Function(NotificationsNotificationBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsNotificationBuilder toBuilder() => NotificationsNotificationBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsNotification && + notificationId == other.notificationId && + app == other.app && + user == other.user && + datetime == other.datetime && + objectType == other.objectType && + objectId == other.objectId && + subject == other.subject && + message == other.message && + link == other.link && + actions == other.actions && + subjectRich == other.subjectRich && + subjectRichParameters == other.subjectRichParameters && + messageRich == other.messageRich && + messageRichParameters == other.messageRichParameters && + icon == other.icon && + shouldNotify == other.shouldNotify; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, notificationId.hashCode); + _$hash = $jc(_$hash, app.hashCode); + _$hash = $jc(_$hash, user.hashCode); + _$hash = $jc(_$hash, datetime.hashCode); + _$hash = $jc(_$hash, objectType.hashCode); + _$hash = $jc(_$hash, objectId.hashCode); + _$hash = $jc(_$hash, subject.hashCode); + _$hash = $jc(_$hash, message.hashCode); + _$hash = $jc(_$hash, link.hashCode); + _$hash = $jc(_$hash, actions.hashCode); + _$hash = $jc(_$hash, subjectRich.hashCode); + _$hash = $jc(_$hash, subjectRichParameters.hashCode); + _$hash = $jc(_$hash, messageRich.hashCode); + _$hash = $jc(_$hash, messageRichParameters.hashCode); + _$hash = $jc(_$hash, icon.hashCode); + _$hash = $jc(_$hash, shouldNotify.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsNotification') + ..add('notificationId', notificationId) + ..add('app', app) + ..add('user', user) + ..add('datetime', datetime) + ..add('objectType', objectType) + ..add('objectId', objectId) + ..add('subject', subject) + ..add('message', message) + ..add('link', link) + ..add('actions', actions) + ..add('subjectRich', subjectRich) + ..add('subjectRichParameters', subjectRichParameters) + ..add('messageRich', messageRich) + ..add('messageRichParameters', messageRichParameters) + ..add('icon', icon) + ..add('shouldNotify', shouldNotify)) + .toString(); + } +} + +class NotificationsNotificationBuilder + implements + Builder, + NotificationsNotificationInterfaceBuilder { + _$NotificationsNotification? _$v; + + int? _notificationId; + int? get notificationId => _$this._notificationId; + set notificationId(covariant int? notificationId) => _$this._notificationId = notificationId; + + String? _app; + String? get app => _$this._app; + set app(covariant String? app) => _$this._app = app; + + String? _user; + String? get user => _$this._user; + set user(covariant String? user) => _$this._user = user; + + String? _datetime; + String? get datetime => _$this._datetime; + set datetime(covariant String? datetime) => _$this._datetime = datetime; + + String? _objectType; + String? get objectType => _$this._objectType; + set objectType(covariant String? objectType) => _$this._objectType = objectType; + + String? _objectId; + String? get objectId => _$this._objectId; + set objectId(covariant String? objectId) => _$this._objectId = objectId; + + String? _subject; + String? get subject => _$this._subject; + set subject(covariant String? subject) => _$this._subject = subject; + + String? _message; + String? get message => _$this._message; + set message(covariant String? message) => _$this._message = message; + + String? _link; + String? get link => _$this._link; + set link(covariant String? link) => _$this._link = link; + + ListBuilder? _actions; + ListBuilder get actions => + _$this._actions ??= ListBuilder(); + set actions(covariant ListBuilder? actions) => _$this._actions = actions; + + String? _subjectRich; + String? get subjectRich => _$this._subjectRich; + set subjectRich(covariant String? subjectRich) => _$this._subjectRich = subjectRich; + + MapBuilder? _subjectRichParameters; + MapBuilder get subjectRichParameters => + _$this._subjectRichParameters ??= MapBuilder(); + set subjectRichParameters(covariant MapBuilder? subjectRichParameters) => + _$this._subjectRichParameters = subjectRichParameters; + + String? _messageRich; + String? get messageRich => _$this._messageRich; + set messageRich(covariant String? messageRich) => _$this._messageRich = messageRich; + + MapBuilder? _messageRichParameters; + MapBuilder get messageRichParameters => + _$this._messageRichParameters ??= MapBuilder(); + set messageRichParameters(covariant MapBuilder? messageRichParameters) => + _$this._messageRichParameters = messageRichParameters; + + String? _icon; + String? get icon => _$this._icon; + set icon(covariant String? icon) => _$this._icon = icon; + + bool? _shouldNotify; + bool? get shouldNotify => _$this._shouldNotify; + set shouldNotify(covariant bool? shouldNotify) => _$this._shouldNotify = shouldNotify; + + NotificationsNotificationBuilder(); + + NotificationsNotificationBuilder get _$this { + final $v = _$v; + if ($v != null) { + _notificationId = $v.notificationId; + _app = $v.app; + _user = $v.user; + _datetime = $v.datetime; + _objectType = $v.objectType; + _objectId = $v.objectId; + _subject = $v.subject; + _message = $v.message; + _link = $v.link; + _actions = $v.actions.toBuilder(); + _subjectRich = $v.subjectRich; + _subjectRichParameters = $v.subjectRichParameters?.toBuilder(); + _messageRich = $v.messageRich; + _messageRichParameters = $v.messageRichParameters?.toBuilder(); + _icon = $v.icon; + _shouldNotify = $v.shouldNotify; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsNotification other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsNotification; + } + + @override + void update(void Function(NotificationsNotificationBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsNotification build() => _build(); + + _$NotificationsNotification _build() { + _$NotificationsNotification _$result; + try { + _$result = _$v ?? + _$NotificationsNotification._( + notificationId: + BuiltValueNullFieldError.checkNotNull(notificationId, r'NotificationsNotification', 'notificationId'), + app: BuiltValueNullFieldError.checkNotNull(app, r'NotificationsNotification', 'app'), + user: BuiltValueNullFieldError.checkNotNull(user, r'NotificationsNotification', 'user'), + datetime: BuiltValueNullFieldError.checkNotNull(datetime, r'NotificationsNotification', 'datetime'), + objectType: BuiltValueNullFieldError.checkNotNull(objectType, r'NotificationsNotification', 'objectType'), + objectId: BuiltValueNullFieldError.checkNotNull(objectId, r'NotificationsNotification', 'objectId'), + subject: BuiltValueNullFieldError.checkNotNull(subject, r'NotificationsNotification', 'subject'), + message: BuiltValueNullFieldError.checkNotNull(message, r'NotificationsNotification', 'message'), + link: BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotification', 'link'), + actions: actions.build(), + subjectRich: subjectRich, + subjectRichParameters: _subjectRichParameters?.build(), + messageRich: messageRich, + messageRichParameters: _messageRichParameters?.build(), + icon: icon, + shouldNotify: shouldNotify); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'actions'; + actions.build(); + + _$failedField = 'subjectRichParameters'; + _subjectRichParameters?.build(); + + _$failedField = 'messageRichParameters'; + _messageRichParameters?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'NotificationsNotification', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterfaceBuilder) updates); + NotificationsOCSMetaBuilder get meta; + set meta(NotificationsOCSMetaBuilder? meta); + + ListBuilder get data; + set data(ListBuilder? data); +} + +class _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs + extends NotificationsEndpointListNotificationsResponseApplicationJson_Ocs { + @override + final NotificationsOCSMeta meta; + @override + final BuiltList data; + + factory _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs( + [void Function(NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder()..update(updates))._build(); + + _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs._({required this.meta, required this.data}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + meta, r'NotificationsEndpointListNotificationsResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointListNotificationsResponseApplicationJson_Ocs', 'data'); + } + + @override + NotificationsEndpointListNotificationsResponseApplicationJson_Ocs rebuild( + void Function(NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointListNotificationsResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, meta.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointListNotificationsResponseApplicationJson_Ocs') + ..add('meta', meta) + ..add('data', data)) + .toString(); + } +} + +class NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder + implements + Builder, + NotificationsEndpointListNotificationsResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs? _$v; + + NotificationsOCSMetaBuilder? _meta; + NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); + set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; + + ListBuilder? _data; + ListBuilder get data => _$this._data ??= ListBuilder(); + set data(covariant ListBuilder? data) => _$this._data = data; + + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder(); + + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _meta = $v.meta.toBuilder(); + _data = $v.data.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointListNotificationsResponseApplicationJson_Ocs other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs; + } + + @override + void update(void Function(NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointListNotificationsResponseApplicationJson_Ocs build() => _build(); + + _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs _build() { + _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs _$result; + try { + _$result = _$v ?? + _$NotificationsEndpointListNotificationsResponseApplicationJson_Ocs._(meta: meta.build(), data: data.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'meta'; + meta.build(); + _$failedField = 'data'; + data.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointListNotificationsResponseApplicationJson_Ocs', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointListNotificationsResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsEndpointListNotificationsResponseApplicationJsonInterface other); + void update(void Function(NotificationsEndpointListNotificationsResponseApplicationJsonInterfaceBuilder) updates); + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder? ocs); +} + +class _$NotificationsEndpointListNotificationsResponseApplicationJson + extends NotificationsEndpointListNotificationsResponseApplicationJson { + @override + final NotificationsEndpointListNotificationsResponseApplicationJson_Ocs ocs; + + factory _$NotificationsEndpointListNotificationsResponseApplicationJson( + [void Function(NotificationsEndpointListNotificationsResponseApplicationJsonBuilder)? updates]) => + (NotificationsEndpointListNotificationsResponseApplicationJsonBuilder()..update(updates))._build(); + + _$NotificationsEndpointListNotificationsResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsEndpointListNotificationsResponseApplicationJson', 'ocs'); + } + + @override + NotificationsEndpointListNotificationsResponseApplicationJson rebuild( + void Function(NotificationsEndpointListNotificationsResponseApplicationJsonBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointListNotificationsResponseApplicationJsonBuilder toBuilder() => + NotificationsEndpointListNotificationsResponseApplicationJsonBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointListNotificationsResponseApplicationJson && ocs == other.ocs; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, ocs.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointListNotificationsResponseApplicationJson') + ..add('ocs', ocs)) + .toString(); + } +} + +class NotificationsEndpointListNotificationsResponseApplicationJsonBuilder + implements + Builder, + NotificationsEndpointListNotificationsResponseApplicationJsonInterfaceBuilder { + _$NotificationsEndpointListNotificationsResponseApplicationJson? _$v; + + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder? _ocs; + NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsEndpointListNotificationsResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; + + NotificationsEndpointListNotificationsResponseApplicationJsonBuilder(); + + NotificationsEndpointListNotificationsResponseApplicationJsonBuilder get _$this { + final $v = _$v; + if ($v != null) { + _ocs = $v.ocs.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointListNotificationsResponseApplicationJson other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointListNotificationsResponseApplicationJson; + } + + @override + void update(void Function(NotificationsEndpointListNotificationsResponseApplicationJsonBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointListNotificationsResponseApplicationJson build() => _build(); + + _$NotificationsEndpointListNotificationsResponseApplicationJson _build() { + _$NotificationsEndpointListNotificationsResponseApplicationJson _$result; + try { + _$result = _$v ?? _$NotificationsEndpointListNotificationsResponseApplicationJson._(ocs: ocs.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'ocs'; + ocs.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointListNotificationsResponseApplicationJson', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterface other); + void update( + void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterfaceBuilder) updates); + NotificationsOCSMetaBuilder get meta; + set meta(NotificationsOCSMetaBuilder? meta); + + JsonObject? get data; + set data(JsonObject? data); +} + +class _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs + extends NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs { + @override + final NotificationsOCSMeta meta; + @override + final JsonObject data; + + factory _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs( + [void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder()..update(updates))._build(); + + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs._({required this.meta, required this.data}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + meta, r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs', 'data'); + } + + @override + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs rebuild( + void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, meta.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs') + ..add('meta', meta) + ..add('data', data)) + .toString(); + } +} + +class NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder + implements + Builder, + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs? _$v; + + NotificationsOCSMetaBuilder? _meta; + NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); + set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; + + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; + + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder(); + + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _meta = $v.meta.toBuilder(); + _data = $v.data; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs; + } + + @override + void update(void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs build() => _build(); + + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs _build() { + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs _$result; + try { + _$result = _$v ?? + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs._( + meta: meta.build(), + data: BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs', 'data')); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'meta'; + meta.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterface other); + void update( + void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterfaceBuilder) updates); + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder? ocs); +} + +class _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson + extends NotificationsEndpointDeleteAllNotificationsResponseApplicationJson { + @override + final NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_Ocs ocs; + + factory _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson( + [void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder)? updates]) => + (NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder()..update(updates))._build(); + + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull( + ocs, r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson', 'ocs'); + } + + @override + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson rebuild( + void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder toBuilder() => + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointDeleteAllNotificationsResponseApplicationJson && ocs == other.ocs; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, ocs.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } - String? _status; - String? get status => _$this._status; - set status(covariant String? status) => _$this._status = status; + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson') + ..add('ocs', ocs)) + .toString(); + } +} - int? _statuscode; - int? get statuscode => _$this._statuscode; - set statuscode(covariant int? statuscode) => _$this._statuscode = statuscode; +class NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder + implements + Builder, + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonInterfaceBuilder { + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson? _$v; - String? _message; - String? get message => _$this._message; - set message(covariant String? message) => _$this._message = message; + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder? _ocs; + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsEndpointDeleteAllNotificationsResponseApplicationJson_OcsBuilder? ocs) => + _$this._ocs = ocs; - String? _totalitems; - String? get totalitems => _$this._totalitems; - set totalitems(covariant String? totalitems) => _$this._totalitems = totalitems; + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder(); + + NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder get _$this { + final $v = _$v; + if ($v != null) { + _ocs = $v.ocs.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointDeleteAllNotificationsResponseApplicationJson other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson; + } + + @override + void update(void Function(NotificationsEndpointDeleteAllNotificationsResponseApplicationJsonBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointDeleteAllNotificationsResponseApplicationJson build() => _build(); + + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson _build() { + _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson _$result; + try { + _$result = _$v ?? _$NotificationsEndpointDeleteAllNotificationsResponseApplicationJson._(ocs: ocs.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'ocs'; + ocs.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointDeleteAllNotificationsResponseApplicationJson', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterfaceBuilder) updates); + NotificationsOCSMetaBuilder get meta; + set meta(NotificationsOCSMetaBuilder? meta); + + NotificationsNotificationBuilder get data; + set data(NotificationsNotificationBuilder? data); +} + +class _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs + extends NotificationsEndpointGetNotificationResponseApplicationJson_Ocs { + @override + final NotificationsOCSMeta meta; + @override + final NotificationsNotification data; + + factory _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs( + [void Function(NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder()..update(updates))._build(); + + _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs._({required this.meta, required this.data}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + meta, r'NotificationsEndpointGetNotificationResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointGetNotificationResponseApplicationJson_Ocs', 'data'); + } + + @override + NotificationsEndpointGetNotificationResponseApplicationJson_Ocs rebuild( + void Function(NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointGetNotificationResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, meta.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointGetNotificationResponseApplicationJson_Ocs') + ..add('meta', meta) + ..add('data', data)) + .toString(); + } +} + +class NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder + implements + Builder, + NotificationsEndpointGetNotificationResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs? _$v; + + NotificationsOCSMetaBuilder? _meta; + NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); + set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; + + NotificationsNotificationBuilder? _data; + NotificationsNotificationBuilder get data => _$this._data ??= NotificationsNotificationBuilder(); + set data(covariant NotificationsNotificationBuilder? data) => _$this._data = data; + + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder(); + + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _meta = $v.meta.toBuilder(); + _data = $v.data.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointGetNotificationResponseApplicationJson_Ocs other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs; + } + + @override + void update(void Function(NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointGetNotificationResponseApplicationJson_Ocs build() => _build(); + + _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs _build() { + _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs _$result; + try { + _$result = _$v ?? + _$NotificationsEndpointGetNotificationResponseApplicationJson_Ocs._(meta: meta.build(), data: data.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'meta'; + meta.build(); + _$failedField = 'data'; + data.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointGetNotificationResponseApplicationJson_Ocs', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointGetNotificationResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsEndpointGetNotificationResponseApplicationJsonInterface other); + void update(void Function(NotificationsEndpointGetNotificationResponseApplicationJsonInterfaceBuilder) updates); + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder? ocs); +} + +class _$NotificationsEndpointGetNotificationResponseApplicationJson + extends NotificationsEndpointGetNotificationResponseApplicationJson { + @override + final NotificationsEndpointGetNotificationResponseApplicationJson_Ocs ocs; + + factory _$NotificationsEndpointGetNotificationResponseApplicationJson( + [void Function(NotificationsEndpointGetNotificationResponseApplicationJsonBuilder)? updates]) => + (NotificationsEndpointGetNotificationResponseApplicationJsonBuilder()..update(updates))._build(); + + _$NotificationsEndpointGetNotificationResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsEndpointGetNotificationResponseApplicationJson', 'ocs'); + } + + @override + NotificationsEndpointGetNotificationResponseApplicationJson rebuild( + void Function(NotificationsEndpointGetNotificationResponseApplicationJsonBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointGetNotificationResponseApplicationJsonBuilder toBuilder() => + NotificationsEndpointGetNotificationResponseApplicationJsonBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointGetNotificationResponseApplicationJson && ocs == other.ocs; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, ocs.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointGetNotificationResponseApplicationJson') + ..add('ocs', ocs)) + .toString(); + } +} + +class NotificationsEndpointGetNotificationResponseApplicationJsonBuilder + implements + Builder, + NotificationsEndpointGetNotificationResponseApplicationJsonInterfaceBuilder { + _$NotificationsEndpointGetNotificationResponseApplicationJson? _$v; + + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder? _ocs; + NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsEndpointGetNotificationResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; + + NotificationsEndpointGetNotificationResponseApplicationJsonBuilder(); + + NotificationsEndpointGetNotificationResponseApplicationJsonBuilder get _$this { + final $v = _$v; + if ($v != null) { + _ocs = $v.ocs.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsEndpointGetNotificationResponseApplicationJson other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointGetNotificationResponseApplicationJson; + } + + @override + void update(void Function(NotificationsEndpointGetNotificationResponseApplicationJsonBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsEndpointGetNotificationResponseApplicationJson build() => _build(); + + _$NotificationsEndpointGetNotificationResponseApplicationJson _build() { + _$NotificationsEndpointGetNotificationResponseApplicationJson _$result; + try { + _$result = _$v ?? _$NotificationsEndpointGetNotificationResponseApplicationJson._(ocs: ocs.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'ocs'; + ocs.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointGetNotificationResponseApplicationJson', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterface other); + void update( + void Function(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterfaceBuilder) updates); + NotificationsOCSMetaBuilder get meta; + set meta(NotificationsOCSMetaBuilder? meta); + + JsonObject? get data; + set data(JsonObject? data); +} + +class _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs + extends NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs { + @override + final NotificationsOCSMeta meta; + @override + final JsonObject data; + + factory _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs( + [void Function(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder()..update(updates))._build(); + + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs._({required this.meta, required this.data}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + meta, r'NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs', 'data'); + } + + @override + NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs rebuild( + void Function(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, meta.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs') + ..add('meta', meta) + ..add('data', data)) + .toString(); + } +} + +class NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder + implements + Builder, + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs? _$v; - String? _itemsperpage; - String? get itemsperpage => _$this._itemsperpage; - set itemsperpage(covariant String? itemsperpage) => _$this._itemsperpage = itemsperpage; + NotificationsOCSMetaBuilder? _meta; + NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); + set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; - NotificationsOCSMetaBuilder(); + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; - NotificationsOCSMetaBuilder get _$this { + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder(); + + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder get _$this { final $v = _$v; if ($v != null) { - _status = $v.status; - _statuscode = $v.statuscode; - _message = $v.message; - _totalitems = $v.totalitems; - _itemsperpage = $v.itemsperpage; + _meta = $v.meta.toBuilder(); + _data = $v.data; _$v = null; } return this; } @override - void replace(covariant NotificationsOCSMeta other) { + void replace(covariant NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsOCSMeta; + _$v = other as _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs; } @override - void update(void Function(NotificationsOCSMetaBuilder)? updates) { + void update(void Function(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsOCSMeta build() => _build(); + NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs build() => _build(); - _$NotificationsOCSMeta _build() { - final _$result = _$v ?? - _$NotificationsOCSMeta._( - status: BuiltValueNullFieldError.checkNotNull(status, r'NotificationsOCSMeta', 'status'), - statuscode: BuiltValueNullFieldError.checkNotNull(statuscode, r'NotificationsOCSMeta', 'statuscode'), - message: message, - totalitems: totalitems, - itemsperpage: itemsperpage); + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs _build() { + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs _$result; + try { + _$result = _$v ?? + _$NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs._( + meta: meta.build(), + data: BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs', 'data')); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'meta'; + meta.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } } -abstract mixin class NotificationsNotificationActionInterfaceBuilder { - void replace(NotificationsNotificationActionInterface other); - void update(void Function(NotificationsNotificationActionInterfaceBuilder) updates); - String? get label; - set label(String? label); - - String? get link; - set link(String? link); - - String? get type; - set type(String? type); - - bool? get primary; - set primary(bool? primary); +abstract mixin class NotificationsEndpointDeleteNotificationResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsEndpointDeleteNotificationResponseApplicationJsonInterface other); + void update(void Function(NotificationsEndpointDeleteNotificationResponseApplicationJsonInterfaceBuilder) updates); + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder? ocs); } -class _$NotificationsNotificationAction extends NotificationsNotificationAction { - @override - final String label; - @override - final String link; - @override - final String type; +class _$NotificationsEndpointDeleteNotificationResponseApplicationJson + extends NotificationsEndpointDeleteNotificationResponseApplicationJson { @override - final bool? primary; + final NotificationsEndpointDeleteNotificationResponseApplicationJson_Ocs ocs; - factory _$NotificationsNotificationAction([void Function(NotificationsNotificationActionBuilder)? updates]) => - (NotificationsNotificationActionBuilder()..update(updates))._build(); + factory _$NotificationsEndpointDeleteNotificationResponseApplicationJson( + [void Function(NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder)? updates]) => + (NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder()..update(updates))._build(); - _$NotificationsNotificationAction._({required this.label, required this.link, required this.type, this.primary}) - : super._() { - BuiltValueNullFieldError.checkNotNull(label, r'NotificationsNotificationAction', 'label'); - BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotificationAction', 'link'); - BuiltValueNullFieldError.checkNotNull(type, r'NotificationsNotificationAction', 'type'); + _$NotificationsEndpointDeleteNotificationResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull( + ocs, r'NotificationsEndpointDeleteNotificationResponseApplicationJson', 'ocs'); } @override - NotificationsNotificationAction rebuild(void Function(NotificationsNotificationActionBuilder) updates) => + NotificationsEndpointDeleteNotificationResponseApplicationJson rebuild( + void Function(NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsNotificationActionBuilder toBuilder() => NotificationsNotificationActionBuilder()..replace(this); + NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder toBuilder() => + NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsNotificationAction && - label == other.label && - link == other.link && - type == other.type && - primary == other.primary; + return other is NotificationsEndpointDeleteNotificationResponseApplicationJson && ocs == other.ocs; } @override int get hashCode { var _$hash = 0; - _$hash = $jc(_$hash, label.hashCode); - _$hash = $jc(_$hash, link.hashCode); - _$hash = $jc(_$hash, type.hashCode); - _$hash = $jc(_$hash, primary.hashCode); + _$hash = $jc(_$hash, ocs.hashCode); _$hash = $jf(_$hash); return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsNotificationAction') - ..add('label', label) - ..add('link', link) - ..add('type', type) - ..add('primary', primary)) + return (newBuiltValueToStringHelper(r'NotificationsEndpointDeleteNotificationResponseApplicationJson') + ..add('ocs', ocs)) .toString(); } } -class NotificationsNotificationActionBuilder +class NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder implements - Builder, - NotificationsNotificationActionInterfaceBuilder { - _$NotificationsNotificationAction? _$v; - - String? _label; - String? get label => _$this._label; - set label(covariant String? label) => _$this._label = label; - - String? _link; - String? get link => _$this._link; - set link(covariant String? link) => _$this._link = link; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; + Builder, + NotificationsEndpointDeleteNotificationResponseApplicationJsonInterfaceBuilder { + _$NotificationsEndpointDeleteNotificationResponseApplicationJson? _$v; - bool? _primary; - bool? get primary => _$this._primary; - set primary(covariant bool? primary) => _$this._primary = primary; + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder? _ocs; + NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsEndpointDeleteNotificationResponseApplicationJson_OcsBuilder? ocs) => + _$this._ocs = ocs; - NotificationsNotificationActionBuilder(); + NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder(); - NotificationsNotificationActionBuilder get _$this { + NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder get _$this { final $v = _$v; if ($v != null) { - _label = $v.label; - _link = $v.link; - _type = $v.type; - _primary = $v.primary; + _ocs = $v.ocs.toBuilder(); _$v = null; } return this; } @override - void replace(covariant NotificationsNotificationAction other) { + void replace(covariant NotificationsEndpointDeleteNotificationResponseApplicationJson other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsNotificationAction; + _$v = other as _$NotificationsEndpointDeleteNotificationResponseApplicationJson; } @override - void update(void Function(NotificationsNotificationActionBuilder)? updates) { + void update(void Function(NotificationsEndpointDeleteNotificationResponseApplicationJsonBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsNotificationAction build() => _build(); + NotificationsEndpointDeleteNotificationResponseApplicationJson build() => _build(); - _$NotificationsNotificationAction _build() { - final _$result = _$v ?? - _$NotificationsNotificationAction._( - label: BuiltValueNullFieldError.checkNotNull(label, r'NotificationsNotificationAction', 'label'), - link: BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotificationAction', 'link'), - type: BuiltValueNullFieldError.checkNotNull(type, r'NotificationsNotificationAction', 'type'), - primary: primary); + _$NotificationsEndpointDeleteNotificationResponseApplicationJson _build() { + _$NotificationsEndpointDeleteNotificationResponseApplicationJson _$result; + try { + _$result = _$v ?? _$NotificationsEndpointDeleteNotificationResponseApplicationJson._(ocs: ocs.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'ocs'; + ocs.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointDeleteNotificationResponseApplicationJson', _$failedField, e.toString()); + } + rethrow; + } replace(_$result); return _$result; } } -abstract mixin class NotificationsNotificationInterfaceBuilder { - void replace(NotificationsNotificationInterface other); - void update(void Function(NotificationsNotificationInterfaceBuilder) updates); - int? get notificationId; - set notificationId(int? notificationId); - - String? get app; - set app(String? app); +abstract mixin class NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterfaceBuilder) updates); + NotificationsOCSMetaBuilder get meta; + set meta(NotificationsOCSMetaBuilder? meta); - String? get user; - set user(String? user); + ListBuilder get data; + set data(ListBuilder? data); +} - String? get datetime; - set datetime(String? datetime); +class _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs + extends NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs { + @override + final NotificationsOCSMeta meta; + @override + final BuiltList data; - String? get objectType; - set objectType(String? objectType); + factory _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs( + [void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder()..update(updates))._build(); - String? get objectId; - set objectId(String? objectId); + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs._({required this.meta, required this.data}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + meta, r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs', 'data'); + } - String? get subject; - set subject(String? subject); + @override + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs rebuild( + void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder) updates) => + (toBuilder()..update(updates)).build(); - String? get message; - set message(String? message); + @override + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder()..replace(this); - String? get link; - set link(String? link); + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; + } - String? get subjectRich; - set subjectRich(String? subjectRich); + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, meta.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } - JsonObject? get subjectRichParameters; - set subjectRichParameters(JsonObject? subjectRichParameters); + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs') + ..add('meta', meta) + ..add('data', data)) + .toString(); + } +} - String? get messageRich; - set messageRich(String? messageRich); +class NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder + implements + Builder, + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs? _$v; - JsonObject? get messageRichParameters; - set messageRichParameters(JsonObject? messageRichParameters); + NotificationsOCSMetaBuilder? _meta; + NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); + set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; - String? get icon; - set icon(String? icon); + ListBuilder? _data; + ListBuilder get data => _$this._data ??= ListBuilder(); + set data(covariant ListBuilder? data) => _$this._data = data; - bool? get shouldNotify; - set shouldNotify(bool? shouldNotify); + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder(); - ListBuilder get actions; - set actions(ListBuilder? actions); -} + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _meta = $v.meta.toBuilder(); + _data = $v.data.toBuilder(); + _$v = null; + } + return this; + } -class _$NotificationsNotification extends NotificationsNotification { - @override - final int notificationId; - @override - final String app; - @override - final String user; - @override - final String datetime; - @override - final String objectType; - @override - final String objectId; - @override - final String subject; - @override - final String message; - @override - final String link; - @override - final String? subjectRich; @override - final JsonObject? subjectRichParameters; - @override - final String? messageRich; - @override - final JsonObject? messageRichParameters; + void replace(covariant NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs; + } + @override - final String? icon; + void update(void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder)? updates) { + if (updates != null) updates(this); + } + @override - final bool? shouldNotify; + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs build() => _build(); + + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs _build() { + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs _$result; + try { + _$result = _$v ?? + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs._(meta: meta.build(), data: data.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'meta'; + meta.build(); + _$failedField = 'data'; + data.build(); + } catch (e) { + throw BuiltValueNestedFieldError( + r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterface other); + void update(void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterfaceBuilder) updates); + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder? ocs); +} + +class _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson + extends NotificationsEndpointConfirmIdsForUserResponseApplicationJson { @override - final BuiltList actions; + final NotificationsEndpointConfirmIdsForUserResponseApplicationJson_Ocs ocs; - factory _$NotificationsNotification([void Function(NotificationsNotificationBuilder)? updates]) => - (NotificationsNotificationBuilder()..update(updates))._build(); + factory _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson( + [void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder)? updates]) => + (NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder()..update(updates))._build(); - _$NotificationsNotification._( - {required this.notificationId, - required this.app, - required this.user, - required this.datetime, - required this.objectType, - required this.objectId, - required this.subject, - required this.message, - required this.link, - this.subjectRich, - this.subjectRichParameters, - this.messageRich, - this.messageRichParameters, - this.icon, - this.shouldNotify, - required this.actions}) - : super._() { - BuiltValueNullFieldError.checkNotNull(notificationId, r'NotificationsNotification', 'notificationId'); - BuiltValueNullFieldError.checkNotNull(app, r'NotificationsNotification', 'app'); - BuiltValueNullFieldError.checkNotNull(user, r'NotificationsNotification', 'user'); - BuiltValueNullFieldError.checkNotNull(datetime, r'NotificationsNotification', 'datetime'); - BuiltValueNullFieldError.checkNotNull(objectType, r'NotificationsNotification', 'objectType'); - BuiltValueNullFieldError.checkNotNull(objectId, r'NotificationsNotification', 'objectId'); - BuiltValueNullFieldError.checkNotNull(subject, r'NotificationsNotification', 'subject'); - BuiltValueNullFieldError.checkNotNull(message, r'NotificationsNotification', 'message'); - BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotification', 'link'); - BuiltValueNullFieldError.checkNotNull(actions, r'NotificationsNotification', 'actions'); + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson', 'ocs'); } @override - NotificationsNotification rebuild(void Function(NotificationsNotificationBuilder) updates) => + NotificationsEndpointConfirmIdsForUserResponseApplicationJson rebuild( + void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsNotificationBuilder toBuilder() => NotificationsNotificationBuilder()..replace(this); + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder toBuilder() => + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsNotification && - notificationId == other.notificationId && - app == other.app && - user == other.user && - datetime == other.datetime && - objectType == other.objectType && - objectId == other.objectId && - subject == other.subject && - message == other.message && - link == other.link && - subjectRich == other.subjectRich && - subjectRichParameters == other.subjectRichParameters && - messageRich == other.messageRich && - messageRichParameters == other.messageRichParameters && - icon == other.icon && - shouldNotify == other.shouldNotify && - actions == other.actions; + return other is NotificationsEndpointConfirmIdsForUserResponseApplicationJson && ocs == other.ocs; } @override int get hashCode { var _$hash = 0; - _$hash = $jc(_$hash, notificationId.hashCode); - _$hash = $jc(_$hash, app.hashCode); - _$hash = $jc(_$hash, user.hashCode); - _$hash = $jc(_$hash, datetime.hashCode); - _$hash = $jc(_$hash, objectType.hashCode); - _$hash = $jc(_$hash, objectId.hashCode); - _$hash = $jc(_$hash, subject.hashCode); - _$hash = $jc(_$hash, message.hashCode); - _$hash = $jc(_$hash, link.hashCode); - _$hash = $jc(_$hash, subjectRich.hashCode); - _$hash = $jc(_$hash, subjectRichParameters.hashCode); - _$hash = $jc(_$hash, messageRich.hashCode); - _$hash = $jc(_$hash, messageRichParameters.hashCode); - _$hash = $jc(_$hash, icon.hashCode); - _$hash = $jc(_$hash, shouldNotify.hashCode); - _$hash = $jc(_$hash, actions.hashCode); + _$hash = $jc(_$hash, ocs.hashCode); _$hash = $jf(_$hash); return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsNotification') - ..add('notificationId', notificationId) - ..add('app', app) - ..add('user', user) - ..add('datetime', datetime) - ..add('objectType', objectType) - ..add('objectId', objectId) - ..add('subject', subject) - ..add('message', message) - ..add('link', link) - ..add('subjectRich', subjectRich) - ..add('subjectRichParameters', subjectRichParameters) - ..add('messageRich', messageRich) - ..add('messageRichParameters', messageRichParameters) - ..add('icon', icon) - ..add('shouldNotify', shouldNotify) - ..add('actions', actions)) + return (newBuiltValueToStringHelper(r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson') + ..add('ocs', ocs)) .toString(); } } -class NotificationsNotificationBuilder +class NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder implements - Builder, - NotificationsNotificationInterfaceBuilder { - _$NotificationsNotification? _$v; - - int? _notificationId; - int? get notificationId => _$this._notificationId; - set notificationId(covariant int? notificationId) => _$this._notificationId = notificationId; - - String? _app; - String? get app => _$this._app; - set app(covariant String? app) => _$this._app = app; - - String? _user; - String? get user => _$this._user; - set user(covariant String? user) => _$this._user = user; - - String? _datetime; - String? get datetime => _$this._datetime; - set datetime(covariant String? datetime) => _$this._datetime = datetime; - - String? _objectType; - String? get objectType => _$this._objectType; - set objectType(covariant String? objectType) => _$this._objectType = objectType; - - String? _objectId; - String? get objectId => _$this._objectId; - set objectId(covariant String? objectId) => _$this._objectId = objectId; - - String? _subject; - String? get subject => _$this._subject; - set subject(covariant String? subject) => _$this._subject = subject; - - String? _message; - String? get message => _$this._message; - set message(covariant String? message) => _$this._message = message; - - String? _link; - String? get link => _$this._link; - set link(covariant String? link) => _$this._link = link; - - String? _subjectRich; - String? get subjectRich => _$this._subjectRich; - set subjectRich(covariant String? subjectRich) => _$this._subjectRich = subjectRich; - - JsonObject? _subjectRichParameters; - JsonObject? get subjectRichParameters => _$this._subjectRichParameters; - set subjectRichParameters(covariant JsonObject? subjectRichParameters) => - _$this._subjectRichParameters = subjectRichParameters; - - String? _messageRich; - String? get messageRich => _$this._messageRich; - set messageRich(covariant String? messageRich) => _$this._messageRich = messageRich; + Builder, + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonInterfaceBuilder { + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson? _$v; - JsonObject? _messageRichParameters; - JsonObject? get messageRichParameters => _$this._messageRichParameters; - set messageRichParameters(covariant JsonObject? messageRichParameters) => - _$this._messageRichParameters = messageRichParameters; - - String? _icon; - String? get icon => _$this._icon; - set icon(covariant String? icon) => _$this._icon = icon; - - bool? _shouldNotify; - bool? get shouldNotify => _$this._shouldNotify; - set shouldNotify(covariant bool? shouldNotify) => _$this._shouldNotify = shouldNotify; - - ListBuilder? _actions; - ListBuilder get actions => - _$this._actions ??= ListBuilder(); - set actions(covariant ListBuilder? actions) => _$this._actions = actions; + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder? _ocs; + NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsEndpointConfirmIdsForUserResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; - NotificationsNotificationBuilder(); + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder(); - NotificationsNotificationBuilder get _$this { + NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder get _$this { final $v = _$v; if ($v != null) { - _notificationId = $v.notificationId; - _app = $v.app; - _user = $v.user; - _datetime = $v.datetime; - _objectType = $v.objectType; - _objectId = $v.objectId; - _subject = $v.subject; - _message = $v.message; - _link = $v.link; - _subjectRich = $v.subjectRich; - _subjectRichParameters = $v.subjectRichParameters; - _messageRich = $v.messageRich; - _messageRichParameters = $v.messageRichParameters; - _icon = $v.icon; - _shouldNotify = $v.shouldNotify; - _actions = $v.actions.toBuilder(); + _ocs = $v.ocs.toBuilder(); _$v = null; } return this; } @override - void replace(covariant NotificationsNotification other) { + void replace(covariant NotificationsEndpointConfirmIdsForUserResponseApplicationJson other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsNotification; + _$v = other as _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson; } @override - void update(void Function(NotificationsNotificationBuilder)? updates) { + void update(void Function(NotificationsEndpointConfirmIdsForUserResponseApplicationJsonBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsNotification build() => _build(); + NotificationsEndpointConfirmIdsForUserResponseApplicationJson build() => _build(); - _$NotificationsNotification _build() { - _$NotificationsNotification _$result; + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson _build() { + _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson _$result; try { - _$result = _$v ?? - _$NotificationsNotification._( - notificationId: - BuiltValueNullFieldError.checkNotNull(notificationId, r'NotificationsNotification', 'notificationId'), - app: BuiltValueNullFieldError.checkNotNull(app, r'NotificationsNotification', 'app'), - user: BuiltValueNullFieldError.checkNotNull(user, r'NotificationsNotification', 'user'), - datetime: BuiltValueNullFieldError.checkNotNull(datetime, r'NotificationsNotification', 'datetime'), - objectType: BuiltValueNullFieldError.checkNotNull(objectType, r'NotificationsNotification', 'objectType'), - objectId: BuiltValueNullFieldError.checkNotNull(objectId, r'NotificationsNotification', 'objectId'), - subject: BuiltValueNullFieldError.checkNotNull(subject, r'NotificationsNotification', 'subject'), - message: BuiltValueNullFieldError.checkNotNull(message, r'NotificationsNotification', 'message'), - link: BuiltValueNullFieldError.checkNotNull(link, r'NotificationsNotification', 'link'), - subjectRich: subjectRich, - subjectRichParameters: subjectRichParameters, - messageRich: messageRich, - messageRichParameters: messageRichParameters, - icon: icon, - shouldNotify: shouldNotify, - actions: actions.build()); + _$result = _$v ?? _$NotificationsEndpointConfirmIdsForUserResponseApplicationJson._(ocs: ocs.build()); } catch (_) { late String _$failedField; try { - _$failedField = 'actions'; - actions.build(); + _$failedField = 'ocs'; + ocs.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsNotification', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsEndpointConfirmIdsForUserResponseApplicationJson', _$failedField, e.toString()); } rethrow; } @@ -1541,41 +4027,171 @@ class NotificationsNotificationBuilder } } -abstract mixin class NotificationsListNotifications_OcsInterfaceBuilder { - void replace(NotificationsListNotifications_OcsInterface other); - void update(void Function(NotificationsListNotifications_OcsInterfaceBuilder) updates); +abstract mixin class NotificationsPushDeviceInterfaceBuilder { + void replace(NotificationsPushDeviceInterface other); + void update(void Function(NotificationsPushDeviceInterfaceBuilder) updates); + String? get publicKey; + set publicKey(String? publicKey); + + String? get deviceIdentifier; + set deviceIdentifier(String? deviceIdentifier); + + String? get signature; + set signature(String? signature); +} + +class _$NotificationsPushDevice extends NotificationsPushDevice { + @override + final String publicKey; + @override + final String deviceIdentifier; + @override + final String signature; + + factory _$NotificationsPushDevice([void Function(NotificationsPushDeviceBuilder)? updates]) => + (NotificationsPushDeviceBuilder()..update(updates))._build(); + + _$NotificationsPushDevice._({required this.publicKey, required this.deviceIdentifier, required this.signature}) + : super._() { + BuiltValueNullFieldError.checkNotNull(publicKey, r'NotificationsPushDevice', 'publicKey'); + BuiltValueNullFieldError.checkNotNull(deviceIdentifier, r'NotificationsPushDevice', 'deviceIdentifier'); + BuiltValueNullFieldError.checkNotNull(signature, r'NotificationsPushDevice', 'signature'); + } + + @override + NotificationsPushDevice rebuild(void Function(NotificationsPushDeviceBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotificationsPushDeviceBuilder toBuilder() => NotificationsPushDeviceBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotificationsPushDevice && + publicKey == other.publicKey && + deviceIdentifier == other.deviceIdentifier && + signature == other.signature; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, publicKey.hashCode); + _$hash = $jc(_$hash, deviceIdentifier.hashCode); + _$hash = $jc(_$hash, signature.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotificationsPushDevice') + ..add('publicKey', publicKey) + ..add('deviceIdentifier', deviceIdentifier) + ..add('signature', signature)) + .toString(); + } +} + +class NotificationsPushDeviceBuilder + implements + Builder, + NotificationsPushDeviceInterfaceBuilder { + _$NotificationsPushDevice? _$v; + + String? _publicKey; + String? get publicKey => _$this._publicKey; + set publicKey(covariant String? publicKey) => _$this._publicKey = publicKey; + + String? _deviceIdentifier; + String? get deviceIdentifier => _$this._deviceIdentifier; + set deviceIdentifier(covariant String? deviceIdentifier) => _$this._deviceIdentifier = deviceIdentifier; + + String? _signature; + String? get signature => _$this._signature; + set signature(covariant String? signature) => _$this._signature = signature; + + NotificationsPushDeviceBuilder(); + + NotificationsPushDeviceBuilder get _$this { + final $v = _$v; + if ($v != null) { + _publicKey = $v.publicKey; + _deviceIdentifier = $v.deviceIdentifier; + _signature = $v.signature; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotificationsPushDevice other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotificationsPushDevice; + } + + @override + void update(void Function(NotificationsPushDeviceBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotificationsPushDevice build() => _build(); + + _$NotificationsPushDevice _build() { + final _$result = _$v ?? + _$NotificationsPushDevice._( + publicKey: BuiltValueNullFieldError.checkNotNull(publicKey, r'NotificationsPushDevice', 'publicKey'), + deviceIdentifier: + BuiltValueNullFieldError.checkNotNull(deviceIdentifier, r'NotificationsPushDevice', 'deviceIdentifier'), + signature: BuiltValueNullFieldError.checkNotNull(signature, r'NotificationsPushDevice', 'signature')); + replace(_$result); + return _$result; + } +} + +abstract mixin class NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterfaceBuilder) updates); NotificationsOCSMetaBuilder get meta; set meta(NotificationsOCSMetaBuilder? meta); - ListBuilder get data; - set data(ListBuilder? data); + NotificationsPushDeviceBuilder get data; + set data(NotificationsPushDeviceBuilder? data); } -class _$NotificationsListNotifications_Ocs extends NotificationsListNotifications_Ocs { +class _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs + extends NotificationsPushRegisterDeviceResponseApplicationJson_Ocs { @override final NotificationsOCSMeta meta; @override - final BuiltList data; + final NotificationsPushDevice data; - factory _$NotificationsListNotifications_Ocs([void Function(NotificationsListNotifications_OcsBuilder)? updates]) => - (NotificationsListNotifications_OcsBuilder()..update(updates))._build(); + factory _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs( + [void Function(NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder()..update(updates))._build(); - _$NotificationsListNotifications_Ocs._({required this.meta, required this.data}) : super._() { - BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsListNotifications_Ocs', 'meta'); - BuiltValueNullFieldError.checkNotNull(data, r'NotificationsListNotifications_Ocs', 'data'); + _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs._({required this.meta, required this.data}) : super._() { + BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsPushRegisterDeviceResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull(data, r'NotificationsPushRegisterDeviceResponseApplicationJson_Ocs', 'data'); } @override - NotificationsListNotifications_Ocs rebuild(void Function(NotificationsListNotifications_OcsBuilder) updates) => + NotificationsPushRegisterDeviceResponseApplicationJson_Ocs rebuild( + void Function(NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsListNotifications_OcsBuilder toBuilder() => NotificationsListNotifications_OcsBuilder()..replace(this); + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsListNotifications_Ocs && meta == other.meta && data == other.data; + return other is NotificationsPushRegisterDeviceResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; } @override @@ -1589,30 +4205,31 @@ class _$NotificationsListNotifications_Ocs extends NotificationsListNotification @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsListNotifications_Ocs') + return (newBuiltValueToStringHelper(r'NotificationsPushRegisterDeviceResponseApplicationJson_Ocs') ..add('meta', meta) ..add('data', data)) .toString(); } } -class NotificationsListNotifications_OcsBuilder +class NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder implements - Builder, - NotificationsListNotifications_OcsInterfaceBuilder { - _$NotificationsListNotifications_Ocs? _$v; + Builder, + NotificationsPushRegisterDeviceResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs? _$v; NotificationsOCSMetaBuilder? _meta; NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; - ListBuilder? _data; - ListBuilder get data => _$this._data ??= ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; + NotificationsPushDeviceBuilder? _data; + NotificationsPushDeviceBuilder get data => _$this._data ??= NotificationsPushDeviceBuilder(); + set data(covariant NotificationsPushDeviceBuilder? data) => _$this._data = data; - NotificationsListNotifications_OcsBuilder(); + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder(); - NotificationsListNotifications_OcsBuilder get _$this { + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder get _$this { final $v = _$v; if ($v != null) { _meta = $v.meta.toBuilder(); @@ -1623,23 +4240,24 @@ class NotificationsListNotifications_OcsBuilder } @override - void replace(covariant NotificationsListNotifications_Ocs other) { + void replace(covariant NotificationsPushRegisterDeviceResponseApplicationJson_Ocs other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsListNotifications_Ocs; + _$v = other as _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs; } @override - void update(void Function(NotificationsListNotifications_OcsBuilder)? updates) { + void update(void Function(NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsListNotifications_Ocs build() => _build(); + NotificationsPushRegisterDeviceResponseApplicationJson_Ocs build() => _build(); - _$NotificationsListNotifications_Ocs _build() { - _$NotificationsListNotifications_Ocs _$result; + _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs _build() { + _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs _$result; try { - _$result = _$v ?? _$NotificationsListNotifications_Ocs._(meta: meta.build(), data: data.build()); + _$result = + _$v ?? _$NotificationsPushRegisterDeviceResponseApplicationJson_Ocs._(meta: meta.build(), data: data.build()); } catch (_) { late String _$failedField; try { @@ -1648,7 +4266,8 @@ class NotificationsListNotifications_OcsBuilder _$failedField = 'data'; data.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsListNotifications_Ocs', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsPushRegisterDeviceResponseApplicationJson_Ocs', _$failedField, e.toString()); } rethrow; } @@ -1657,35 +4276,39 @@ class NotificationsListNotifications_OcsBuilder } } -abstract mixin class NotificationsListNotificationsInterfaceBuilder { - void replace(NotificationsListNotificationsInterface other); - void update(void Function(NotificationsListNotificationsInterfaceBuilder) updates); - NotificationsListNotifications_OcsBuilder get ocs; - set ocs(NotificationsListNotifications_OcsBuilder? ocs); +abstract mixin class NotificationsPushRegisterDeviceResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsPushRegisterDeviceResponseApplicationJsonInterface other); + void update(void Function(NotificationsPushRegisterDeviceResponseApplicationJsonInterfaceBuilder) updates); + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder? ocs); } -class _$NotificationsListNotifications extends NotificationsListNotifications { +class _$NotificationsPushRegisterDeviceResponseApplicationJson + extends NotificationsPushRegisterDeviceResponseApplicationJson { @override - final NotificationsListNotifications_Ocs ocs; + final NotificationsPushRegisterDeviceResponseApplicationJson_Ocs ocs; - factory _$NotificationsListNotifications([void Function(NotificationsListNotificationsBuilder)? updates]) => - (NotificationsListNotificationsBuilder()..update(updates))._build(); + factory _$NotificationsPushRegisterDeviceResponseApplicationJson( + [void Function(NotificationsPushRegisterDeviceResponseApplicationJsonBuilder)? updates]) => + (NotificationsPushRegisterDeviceResponseApplicationJsonBuilder()..update(updates))._build(); - _$NotificationsListNotifications._({required this.ocs}) : super._() { - BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsListNotifications', 'ocs'); + _$NotificationsPushRegisterDeviceResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsPushRegisterDeviceResponseApplicationJson', 'ocs'); } @override - NotificationsListNotifications rebuild(void Function(NotificationsListNotificationsBuilder) updates) => + NotificationsPushRegisterDeviceResponseApplicationJson rebuild( + void Function(NotificationsPushRegisterDeviceResponseApplicationJsonBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsListNotificationsBuilder toBuilder() => NotificationsListNotificationsBuilder()..replace(this); + NotificationsPushRegisterDeviceResponseApplicationJsonBuilder toBuilder() => + NotificationsPushRegisterDeviceResponseApplicationJsonBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsListNotifications && ocs == other.ocs; + return other is NotificationsPushRegisterDeviceResponseApplicationJson && ocs == other.ocs; } @override @@ -1698,23 +4321,26 @@ class _$NotificationsListNotifications extends NotificationsListNotifications { @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsListNotifications')..add('ocs', ocs)).toString(); + return (newBuiltValueToStringHelper(r'NotificationsPushRegisterDeviceResponseApplicationJson')..add('ocs', ocs)) + .toString(); } } -class NotificationsListNotificationsBuilder +class NotificationsPushRegisterDeviceResponseApplicationJsonBuilder implements - Builder, - NotificationsListNotificationsInterfaceBuilder { - _$NotificationsListNotifications? _$v; + Builder, + NotificationsPushRegisterDeviceResponseApplicationJsonInterfaceBuilder { + _$NotificationsPushRegisterDeviceResponseApplicationJson? _$v; - NotificationsListNotifications_OcsBuilder? _ocs; - NotificationsListNotifications_OcsBuilder get ocs => _$this._ocs ??= NotificationsListNotifications_OcsBuilder(); - set ocs(covariant NotificationsListNotifications_OcsBuilder? ocs) => _$this._ocs = ocs; + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder? _ocs; + NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsPushRegisterDeviceResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; - NotificationsListNotificationsBuilder(); + NotificationsPushRegisterDeviceResponseApplicationJsonBuilder(); - NotificationsListNotificationsBuilder get _$this { + NotificationsPushRegisterDeviceResponseApplicationJsonBuilder get _$this { final $v = _$v; if ($v != null) { _ocs = $v.ocs.toBuilder(); @@ -1724,30 +4350,31 @@ class NotificationsListNotificationsBuilder } @override - void replace(covariant NotificationsListNotifications other) { + void replace(covariant NotificationsPushRegisterDeviceResponseApplicationJson other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsListNotifications; + _$v = other as _$NotificationsPushRegisterDeviceResponseApplicationJson; } @override - void update(void Function(NotificationsListNotificationsBuilder)? updates) { + void update(void Function(NotificationsPushRegisterDeviceResponseApplicationJsonBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsListNotifications build() => _build(); + NotificationsPushRegisterDeviceResponseApplicationJson build() => _build(); - _$NotificationsListNotifications _build() { - _$NotificationsListNotifications _$result; + _$NotificationsPushRegisterDeviceResponseApplicationJson _build() { + _$NotificationsPushRegisterDeviceResponseApplicationJson _$result; try { - _$result = _$v ?? _$NotificationsListNotifications._(ocs: ocs.build()); + _$result = _$v ?? _$NotificationsPushRegisterDeviceResponseApplicationJson._(ocs: ocs.build()); } catch (_) { late String _$failedField; try { _$failedField = 'ocs'; ocs.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsListNotifications', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsPushRegisterDeviceResponseApplicationJson', _$failedField, e.toString()); } rethrow; } @@ -1756,41 +4383,47 @@ class NotificationsListNotificationsBuilder } } -abstract mixin class NotificationsGetNotification_OcsInterfaceBuilder { - void replace(NotificationsGetNotification_OcsInterface other); - void update(void Function(NotificationsGetNotification_OcsInterfaceBuilder) updates); +abstract mixin class NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterfaceBuilder) updates); NotificationsOCSMetaBuilder get meta; set meta(NotificationsOCSMetaBuilder? meta); - NotificationsNotificationBuilder get data; - set data(NotificationsNotificationBuilder? data); + JsonObject? get data; + set data(JsonObject? data); } -class _$NotificationsGetNotification_Ocs extends NotificationsGetNotification_Ocs { +class _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs + extends NotificationsPushRemoveDeviceResponseApplicationJson_Ocs { @override final NotificationsOCSMeta meta; @override - final NotificationsNotification data; + final JsonObject data; - factory _$NotificationsGetNotification_Ocs([void Function(NotificationsGetNotification_OcsBuilder)? updates]) => - (NotificationsGetNotification_OcsBuilder()..update(updates))._build(); + factory _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs( + [void Function(NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder()..update(updates))._build(); - _$NotificationsGetNotification_Ocs._({required this.meta, required this.data}) : super._() { - BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsGetNotification_Ocs', 'meta'); - BuiltValueNullFieldError.checkNotNull(data, r'NotificationsGetNotification_Ocs', 'data'); + _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs._({required this.meta, required this.data}) : super._() { + BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsPushRemoveDeviceResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull(data, r'NotificationsPushRemoveDeviceResponseApplicationJson_Ocs', 'data'); } @override - NotificationsGetNotification_Ocs rebuild(void Function(NotificationsGetNotification_OcsBuilder) updates) => + NotificationsPushRemoveDeviceResponseApplicationJson_Ocs rebuild( + void Function(NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsGetNotification_OcsBuilder toBuilder() => NotificationsGetNotification_OcsBuilder()..replace(this); + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsGetNotification_Ocs && meta == other.meta && data == other.data; + return other is NotificationsPushRemoveDeviceResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; } @override @@ -1804,66 +4437,70 @@ class _$NotificationsGetNotification_Ocs extends NotificationsGetNotification_Oc @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsGetNotification_Ocs') + return (newBuiltValueToStringHelper(r'NotificationsPushRemoveDeviceResponseApplicationJson_Ocs') ..add('meta', meta) ..add('data', data)) .toString(); } } -class NotificationsGetNotification_OcsBuilder +class NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder implements - Builder, - NotificationsGetNotification_OcsInterfaceBuilder { - _$NotificationsGetNotification_Ocs? _$v; + Builder, + NotificationsPushRemoveDeviceResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs? _$v; NotificationsOCSMetaBuilder? _meta; NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; - NotificationsNotificationBuilder? _data; - NotificationsNotificationBuilder get data => _$this._data ??= NotificationsNotificationBuilder(); - set data(covariant NotificationsNotificationBuilder? data) => _$this._data = data; + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; - NotificationsGetNotification_OcsBuilder(); + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder(); - NotificationsGetNotification_OcsBuilder get _$this { + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder get _$this { final $v = _$v; if ($v != null) { _meta = $v.meta.toBuilder(); - _data = $v.data.toBuilder(); + _data = $v.data; _$v = null; } return this; } @override - void replace(covariant NotificationsGetNotification_Ocs other) { + void replace(covariant NotificationsPushRemoveDeviceResponseApplicationJson_Ocs other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsGetNotification_Ocs; + _$v = other as _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs; } @override - void update(void Function(NotificationsGetNotification_OcsBuilder)? updates) { + void update(void Function(NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsGetNotification_Ocs build() => _build(); + NotificationsPushRemoveDeviceResponseApplicationJson_Ocs build() => _build(); - _$NotificationsGetNotification_Ocs _build() { - _$NotificationsGetNotification_Ocs _$result; + _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs _build() { + _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs _$result; try { - _$result = _$v ?? _$NotificationsGetNotification_Ocs._(meta: meta.build(), data: data.build()); + _$result = _$v ?? + _$NotificationsPushRemoveDeviceResponseApplicationJson_Ocs._( + meta: meta.build(), + data: BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsPushRemoveDeviceResponseApplicationJson_Ocs', 'data')); } catch (_) { late String _$failedField; try { _$failedField = 'meta'; meta.build(); - _$failedField = 'data'; - data.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsGetNotification_Ocs', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsPushRemoveDeviceResponseApplicationJson_Ocs', _$failedField, e.toString()); } rethrow; } @@ -1872,35 +4509,39 @@ class NotificationsGetNotification_OcsBuilder } } -abstract mixin class NotificationsGetNotificationInterfaceBuilder { - void replace(NotificationsGetNotificationInterface other); - void update(void Function(NotificationsGetNotificationInterfaceBuilder) updates); - NotificationsGetNotification_OcsBuilder get ocs; - set ocs(NotificationsGetNotification_OcsBuilder? ocs); +abstract mixin class NotificationsPushRemoveDeviceResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsPushRemoveDeviceResponseApplicationJsonInterface other); + void update(void Function(NotificationsPushRemoveDeviceResponseApplicationJsonInterfaceBuilder) updates); + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder? ocs); } -class _$NotificationsGetNotification extends NotificationsGetNotification { +class _$NotificationsPushRemoveDeviceResponseApplicationJson + extends NotificationsPushRemoveDeviceResponseApplicationJson { @override - final NotificationsGetNotification_Ocs ocs; + final NotificationsPushRemoveDeviceResponseApplicationJson_Ocs ocs; - factory _$NotificationsGetNotification([void Function(NotificationsGetNotificationBuilder)? updates]) => - (NotificationsGetNotificationBuilder()..update(updates))._build(); + factory _$NotificationsPushRemoveDeviceResponseApplicationJson( + [void Function(NotificationsPushRemoveDeviceResponseApplicationJsonBuilder)? updates]) => + (NotificationsPushRemoveDeviceResponseApplicationJsonBuilder()..update(updates))._build(); - _$NotificationsGetNotification._({required this.ocs}) : super._() { - BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsGetNotification', 'ocs'); + _$NotificationsPushRemoveDeviceResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsPushRemoveDeviceResponseApplicationJson', 'ocs'); } @override - NotificationsGetNotification rebuild(void Function(NotificationsGetNotificationBuilder) updates) => + NotificationsPushRemoveDeviceResponseApplicationJson rebuild( + void Function(NotificationsPushRemoveDeviceResponseApplicationJsonBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsGetNotificationBuilder toBuilder() => NotificationsGetNotificationBuilder()..replace(this); + NotificationsPushRemoveDeviceResponseApplicationJsonBuilder toBuilder() => + NotificationsPushRemoveDeviceResponseApplicationJsonBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsGetNotification && ocs == other.ocs; + return other is NotificationsPushRemoveDeviceResponseApplicationJson && ocs == other.ocs; } @override @@ -1913,23 +4554,26 @@ class _$NotificationsGetNotification extends NotificationsGetNotification { @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsGetNotification')..add('ocs', ocs)).toString(); + return (newBuiltValueToStringHelper(r'NotificationsPushRemoveDeviceResponseApplicationJson')..add('ocs', ocs)) + .toString(); } } -class NotificationsGetNotificationBuilder +class NotificationsPushRemoveDeviceResponseApplicationJsonBuilder implements - Builder, - NotificationsGetNotificationInterfaceBuilder { - _$NotificationsGetNotification? _$v; + Builder, + NotificationsPushRemoveDeviceResponseApplicationJsonInterfaceBuilder { + _$NotificationsPushRemoveDeviceResponseApplicationJson? _$v; - NotificationsGetNotification_OcsBuilder? _ocs; - NotificationsGetNotification_OcsBuilder get ocs => _$this._ocs ??= NotificationsGetNotification_OcsBuilder(); - set ocs(covariant NotificationsGetNotification_OcsBuilder? ocs) => _$this._ocs = ocs; + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder? _ocs; + NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsPushRemoveDeviceResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; - NotificationsGetNotificationBuilder(); + NotificationsPushRemoveDeviceResponseApplicationJsonBuilder(); - NotificationsGetNotificationBuilder get _$this { + NotificationsPushRemoveDeviceResponseApplicationJsonBuilder get _$this { final $v = _$v; if ($v != null) { _ocs = $v.ocs.toBuilder(); @@ -1939,30 +4583,31 @@ class NotificationsGetNotificationBuilder } @override - void replace(covariant NotificationsGetNotification other) { + void replace(covariant NotificationsPushRemoveDeviceResponseApplicationJson other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsGetNotification; + _$v = other as _$NotificationsPushRemoveDeviceResponseApplicationJson; } @override - void update(void Function(NotificationsGetNotificationBuilder)? updates) { + void update(void Function(NotificationsPushRemoveDeviceResponseApplicationJsonBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsGetNotification build() => _build(); + NotificationsPushRemoveDeviceResponseApplicationJson build() => _build(); - _$NotificationsGetNotification _build() { - _$NotificationsGetNotification _$result; + _$NotificationsPushRemoveDeviceResponseApplicationJson _build() { + _$NotificationsPushRemoveDeviceResponseApplicationJson _$result; try { - _$result = _$v ?? _$NotificationsGetNotification._(ocs: ocs.build()); + _$result = _$v ?? _$NotificationsPushRemoveDeviceResponseApplicationJson._(ocs: ocs.build()); } catch (_) { late String _$failedField; try { _$failedField = 'ocs'; ocs.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsGetNotification', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsPushRemoveDeviceResponseApplicationJson', _$failedField, e.toString()); } rethrow; } @@ -1971,41 +4616,47 @@ class NotificationsGetNotificationBuilder } } -abstract mixin class NotificationsEmptyOCS_OcsInterfaceBuilder { - void replace(NotificationsEmptyOCS_OcsInterface other); - void update(void Function(NotificationsEmptyOCS_OcsInterfaceBuilder) updates); +abstract mixin class NotificationsSettingsPersonalResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsSettingsPersonalResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsSettingsPersonalResponseApplicationJson_OcsInterfaceBuilder) updates); NotificationsOCSMetaBuilder get meta; set meta(NotificationsOCSMetaBuilder? meta); - ListBuilder get data; - set data(ListBuilder? data); + JsonObject? get data; + set data(JsonObject? data); } -class _$NotificationsEmptyOCS_Ocs extends NotificationsEmptyOCS_Ocs { +class _$NotificationsSettingsPersonalResponseApplicationJson_Ocs + extends NotificationsSettingsPersonalResponseApplicationJson_Ocs { @override final NotificationsOCSMeta meta; @override - final BuiltList data; + final JsonObject data; - factory _$NotificationsEmptyOCS_Ocs([void Function(NotificationsEmptyOCS_OcsBuilder)? updates]) => - (NotificationsEmptyOCS_OcsBuilder()..update(updates))._build(); + factory _$NotificationsSettingsPersonalResponseApplicationJson_Ocs( + [void Function(NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder()..update(updates))._build(); - _$NotificationsEmptyOCS_Ocs._({required this.meta, required this.data}) : super._() { - BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsEmptyOCS_Ocs', 'meta'); - BuiltValueNullFieldError.checkNotNull(data, r'NotificationsEmptyOCS_Ocs', 'data'); + _$NotificationsSettingsPersonalResponseApplicationJson_Ocs._({required this.meta, required this.data}) : super._() { + BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsSettingsPersonalResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull(data, r'NotificationsSettingsPersonalResponseApplicationJson_Ocs', 'data'); } @override - NotificationsEmptyOCS_Ocs rebuild(void Function(NotificationsEmptyOCS_OcsBuilder) updates) => + NotificationsSettingsPersonalResponseApplicationJson_Ocs rebuild( + void Function(NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsEmptyOCS_OcsBuilder toBuilder() => NotificationsEmptyOCS_OcsBuilder()..replace(this); + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsEmptyOCS_Ocs && meta == other.meta && data == other.data; + return other is NotificationsSettingsPersonalResponseApplicationJson_Ocs && + meta == other.meta && + data == other.data; } @override @@ -2019,66 +4670,70 @@ class _$NotificationsEmptyOCS_Ocs extends NotificationsEmptyOCS_Ocs { @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsEmptyOCS_Ocs') + return (newBuiltValueToStringHelper(r'NotificationsSettingsPersonalResponseApplicationJson_Ocs') ..add('meta', meta) ..add('data', data)) .toString(); } } -class NotificationsEmptyOCS_OcsBuilder +class NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder implements - Builder, - NotificationsEmptyOCS_OcsInterfaceBuilder { - _$NotificationsEmptyOCS_Ocs? _$v; + Builder, + NotificationsSettingsPersonalResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsSettingsPersonalResponseApplicationJson_Ocs? _$v; NotificationsOCSMetaBuilder? _meta; NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; - ListBuilder? _data; - ListBuilder get data => _$this._data ??= ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; - NotificationsEmptyOCS_OcsBuilder(); + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder(); - NotificationsEmptyOCS_OcsBuilder get _$this { + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder get _$this { final $v = _$v; if ($v != null) { _meta = $v.meta.toBuilder(); - _data = $v.data.toBuilder(); + _data = $v.data; _$v = null; } return this; } @override - void replace(covariant NotificationsEmptyOCS_Ocs other) { + void replace(covariant NotificationsSettingsPersonalResponseApplicationJson_Ocs other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsEmptyOCS_Ocs; + _$v = other as _$NotificationsSettingsPersonalResponseApplicationJson_Ocs; } @override - void update(void Function(NotificationsEmptyOCS_OcsBuilder)? updates) { + void update(void Function(NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsEmptyOCS_Ocs build() => _build(); + NotificationsSettingsPersonalResponseApplicationJson_Ocs build() => _build(); - _$NotificationsEmptyOCS_Ocs _build() { - _$NotificationsEmptyOCS_Ocs _$result; + _$NotificationsSettingsPersonalResponseApplicationJson_Ocs _build() { + _$NotificationsSettingsPersonalResponseApplicationJson_Ocs _$result; try { - _$result = _$v ?? _$NotificationsEmptyOCS_Ocs._(meta: meta.build(), data: data.build()); + _$result = _$v ?? + _$NotificationsSettingsPersonalResponseApplicationJson_Ocs._( + meta: meta.build(), + data: BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsSettingsPersonalResponseApplicationJson_Ocs', 'data')); } catch (_) { late String _$failedField; try { _$failedField = 'meta'; meta.build(); - _$failedField = 'data'; - data.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsEmptyOCS_Ocs', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsSettingsPersonalResponseApplicationJson_Ocs', _$failedField, e.toString()); } rethrow; } @@ -2087,35 +4742,39 @@ class NotificationsEmptyOCS_OcsBuilder } } -abstract mixin class NotificationsEmptyOCSInterfaceBuilder { - void replace(NotificationsEmptyOCSInterface other); - void update(void Function(NotificationsEmptyOCSInterfaceBuilder) updates); - NotificationsEmptyOCS_OcsBuilder get ocs; - set ocs(NotificationsEmptyOCS_OcsBuilder? ocs); +abstract mixin class NotificationsSettingsPersonalResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsSettingsPersonalResponseApplicationJsonInterface other); + void update(void Function(NotificationsSettingsPersonalResponseApplicationJsonInterfaceBuilder) updates); + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder? ocs); } -class _$NotificationsEmptyOCS extends NotificationsEmptyOCS { +class _$NotificationsSettingsPersonalResponseApplicationJson + extends NotificationsSettingsPersonalResponseApplicationJson { @override - final NotificationsEmptyOCS_Ocs ocs; + final NotificationsSettingsPersonalResponseApplicationJson_Ocs ocs; - factory _$NotificationsEmptyOCS([void Function(NotificationsEmptyOCSBuilder)? updates]) => - (NotificationsEmptyOCSBuilder()..update(updates))._build(); + factory _$NotificationsSettingsPersonalResponseApplicationJson( + [void Function(NotificationsSettingsPersonalResponseApplicationJsonBuilder)? updates]) => + (NotificationsSettingsPersonalResponseApplicationJsonBuilder()..update(updates))._build(); - _$NotificationsEmptyOCS._({required this.ocs}) : super._() { - BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsEmptyOCS', 'ocs'); + _$NotificationsSettingsPersonalResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsSettingsPersonalResponseApplicationJson', 'ocs'); } @override - NotificationsEmptyOCS rebuild(void Function(NotificationsEmptyOCSBuilder) updates) => + NotificationsSettingsPersonalResponseApplicationJson rebuild( + void Function(NotificationsSettingsPersonalResponseApplicationJsonBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsEmptyOCSBuilder toBuilder() => NotificationsEmptyOCSBuilder()..replace(this); + NotificationsSettingsPersonalResponseApplicationJsonBuilder toBuilder() => + NotificationsSettingsPersonalResponseApplicationJsonBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsEmptyOCS && ocs == other.ocs; + return other is NotificationsSettingsPersonalResponseApplicationJson && ocs == other.ocs; } @override @@ -2128,21 +4787,26 @@ class _$NotificationsEmptyOCS extends NotificationsEmptyOCS { @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsEmptyOCS')..add('ocs', ocs)).toString(); + return (newBuiltValueToStringHelper(r'NotificationsSettingsPersonalResponseApplicationJson')..add('ocs', ocs)) + .toString(); } } -class NotificationsEmptyOCSBuilder - implements Builder, NotificationsEmptyOCSInterfaceBuilder { - _$NotificationsEmptyOCS? _$v; +class NotificationsSettingsPersonalResponseApplicationJsonBuilder + implements + Builder, + NotificationsSettingsPersonalResponseApplicationJsonInterfaceBuilder { + _$NotificationsSettingsPersonalResponseApplicationJson? _$v; - NotificationsEmptyOCS_OcsBuilder? _ocs; - NotificationsEmptyOCS_OcsBuilder get ocs => _$this._ocs ??= NotificationsEmptyOCS_OcsBuilder(); - set ocs(covariant NotificationsEmptyOCS_OcsBuilder? ocs) => _$this._ocs = ocs; + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder? _ocs; + NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsSettingsPersonalResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; - NotificationsEmptyOCSBuilder(); + NotificationsSettingsPersonalResponseApplicationJsonBuilder(); - NotificationsEmptyOCSBuilder get _$this { + NotificationsSettingsPersonalResponseApplicationJsonBuilder get _$this { final $v = _$v; if ($v != null) { _ocs = $v.ocs.toBuilder(); @@ -2152,30 +4816,31 @@ class NotificationsEmptyOCSBuilder } @override - void replace(covariant NotificationsEmptyOCS other) { + void replace(covariant NotificationsSettingsPersonalResponseApplicationJson other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsEmptyOCS; + _$v = other as _$NotificationsSettingsPersonalResponseApplicationJson; } @override - void update(void Function(NotificationsEmptyOCSBuilder)? updates) { + void update(void Function(NotificationsSettingsPersonalResponseApplicationJsonBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsEmptyOCS build() => _build(); + NotificationsSettingsPersonalResponseApplicationJson build() => _build(); - _$NotificationsEmptyOCS _build() { - _$NotificationsEmptyOCS _$result; + _$NotificationsSettingsPersonalResponseApplicationJson _build() { + _$NotificationsSettingsPersonalResponseApplicationJson _$result; try { - _$result = _$v ?? _$NotificationsEmptyOCS._(ocs: ocs.build()); + _$result = _$v ?? _$NotificationsSettingsPersonalResponseApplicationJson._(ocs: ocs.build()); } catch (_) { late String _$failedField; try { _$failedField = 'ocs'; ocs.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsEmptyOCS', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsSettingsPersonalResponseApplicationJson', _$failedField, e.toString()); } rethrow; } @@ -2184,185 +4849,45 @@ class NotificationsEmptyOCSBuilder } } -abstract mixin class NotificationsPushServerSubscriptionInterfaceBuilder { - void replace(NotificationsPushServerSubscriptionInterface other); - void update(void Function(NotificationsPushServerSubscriptionInterfaceBuilder) updates); - String? get publicKey; - set publicKey(String? publicKey); - - String? get deviceIdentifier; - set deviceIdentifier(String? deviceIdentifier); - - String? get signature; - set signature(String? signature); - - String? get message; - set message(String? message); -} - -class _$NotificationsPushServerSubscription extends NotificationsPushServerSubscription { - @override - final String publicKey; - @override - final String deviceIdentifier; - @override - final String signature; - @override - final String? message; - - factory _$NotificationsPushServerSubscription([void Function(NotificationsPushServerSubscriptionBuilder)? updates]) => - (NotificationsPushServerSubscriptionBuilder()..update(updates))._build(); - - _$NotificationsPushServerSubscription._( - {required this.publicKey, required this.deviceIdentifier, required this.signature, this.message}) - : super._() { - BuiltValueNullFieldError.checkNotNull(publicKey, r'NotificationsPushServerSubscription', 'publicKey'); - BuiltValueNullFieldError.checkNotNull(deviceIdentifier, r'NotificationsPushServerSubscription', 'deviceIdentifier'); - BuiltValueNullFieldError.checkNotNull(signature, r'NotificationsPushServerSubscription', 'signature'); - } - - @override - NotificationsPushServerSubscription rebuild(void Function(NotificationsPushServerSubscriptionBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - NotificationsPushServerSubscriptionBuilder toBuilder() => NotificationsPushServerSubscriptionBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is NotificationsPushServerSubscription && - publicKey == other.publicKey && - deviceIdentifier == other.deviceIdentifier && - signature == other.signature && - message == other.message; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, publicKey.hashCode); - _$hash = $jc(_$hash, deviceIdentifier.hashCode); - _$hash = $jc(_$hash, signature.hashCode); - _$hash = $jc(_$hash, message.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'NotificationsPushServerSubscription') - ..add('publicKey', publicKey) - ..add('deviceIdentifier', deviceIdentifier) - ..add('signature', signature) - ..add('message', message)) - .toString(); - } -} - -class NotificationsPushServerSubscriptionBuilder - implements - Builder, - NotificationsPushServerSubscriptionInterfaceBuilder { - _$NotificationsPushServerSubscription? _$v; - - String? _publicKey; - String? get publicKey => _$this._publicKey; - set publicKey(covariant String? publicKey) => _$this._publicKey = publicKey; - - String? _deviceIdentifier; - String? get deviceIdentifier => _$this._deviceIdentifier; - set deviceIdentifier(covariant String? deviceIdentifier) => _$this._deviceIdentifier = deviceIdentifier; - - String? _signature; - String? get signature => _$this._signature; - set signature(covariant String? signature) => _$this._signature = signature; - - String? _message; - String? get message => _$this._message; - set message(covariant String? message) => _$this._message = message; - - NotificationsPushServerSubscriptionBuilder(); - - NotificationsPushServerSubscriptionBuilder get _$this { - final $v = _$v; - if ($v != null) { - _publicKey = $v.publicKey; - _deviceIdentifier = $v.deviceIdentifier; - _signature = $v.signature; - _message = $v.message; - _$v = null; - } - return this; - } - - @override - void replace(covariant NotificationsPushServerSubscription other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsPushServerSubscription; - } - - @override - void update(void Function(NotificationsPushServerSubscriptionBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - NotificationsPushServerSubscription build() => _build(); - - _$NotificationsPushServerSubscription _build() { - final _$result = _$v ?? - _$NotificationsPushServerSubscription._( - publicKey: - BuiltValueNullFieldError.checkNotNull(publicKey, r'NotificationsPushServerSubscription', 'publicKey'), - deviceIdentifier: BuiltValueNullFieldError.checkNotNull( - deviceIdentifier, r'NotificationsPushServerSubscription', 'deviceIdentifier'), - signature: - BuiltValueNullFieldError.checkNotNull(signature, r'NotificationsPushServerSubscription', 'signature'), - message: message); - replace(_$result); - return _$result; - } -} - -abstract mixin class NotificationsPushServerRegistration_OcsInterfaceBuilder { - void replace(NotificationsPushServerRegistration_OcsInterface other); - void update(void Function(NotificationsPushServerRegistration_OcsInterfaceBuilder) updates); +abstract mixin class NotificationsSettingsAdminResponseApplicationJson_OcsInterfaceBuilder { + void replace(NotificationsSettingsAdminResponseApplicationJson_OcsInterface other); + void update(void Function(NotificationsSettingsAdminResponseApplicationJson_OcsInterfaceBuilder) updates); NotificationsOCSMetaBuilder get meta; set meta(NotificationsOCSMetaBuilder? meta); - NotificationsPushServerSubscriptionBuilder get data; - set data(NotificationsPushServerSubscriptionBuilder? data); + JsonObject? get data; + set data(JsonObject? data); } -class _$NotificationsPushServerRegistration_Ocs extends NotificationsPushServerRegistration_Ocs { +class _$NotificationsSettingsAdminResponseApplicationJson_Ocs + extends NotificationsSettingsAdminResponseApplicationJson_Ocs { @override final NotificationsOCSMeta meta; @override - final NotificationsPushServerSubscription data; + final JsonObject data; - factory _$NotificationsPushServerRegistration_Ocs( - [void Function(NotificationsPushServerRegistration_OcsBuilder)? updates]) => - (NotificationsPushServerRegistration_OcsBuilder()..update(updates))._build(); + factory _$NotificationsSettingsAdminResponseApplicationJson_Ocs( + [void Function(NotificationsSettingsAdminResponseApplicationJson_OcsBuilder)? updates]) => + (NotificationsSettingsAdminResponseApplicationJson_OcsBuilder()..update(updates))._build(); - _$NotificationsPushServerRegistration_Ocs._({required this.meta, required this.data}) : super._() { - BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsPushServerRegistration_Ocs', 'meta'); - BuiltValueNullFieldError.checkNotNull(data, r'NotificationsPushServerRegistration_Ocs', 'data'); + _$NotificationsSettingsAdminResponseApplicationJson_Ocs._({required this.meta, required this.data}) : super._() { + BuiltValueNullFieldError.checkNotNull(meta, r'NotificationsSettingsAdminResponseApplicationJson_Ocs', 'meta'); + BuiltValueNullFieldError.checkNotNull(data, r'NotificationsSettingsAdminResponseApplicationJson_Ocs', 'data'); } @override - NotificationsPushServerRegistration_Ocs rebuild( - void Function(NotificationsPushServerRegistration_OcsBuilder) updates) => + NotificationsSettingsAdminResponseApplicationJson_Ocs rebuild( + void Function(NotificationsSettingsAdminResponseApplicationJson_OcsBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsPushServerRegistration_OcsBuilder toBuilder() => - NotificationsPushServerRegistration_OcsBuilder()..replace(this); + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder toBuilder() => + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsPushServerRegistration_Ocs && meta == other.meta && data == other.data; + return other is NotificationsSettingsAdminResponseApplicationJson_Ocs && meta == other.meta && data == other.data; } @override @@ -2376,66 +4901,70 @@ class _$NotificationsPushServerRegistration_Ocs extends NotificationsPushServerR @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsPushServerRegistration_Ocs') + return (newBuiltValueToStringHelper(r'NotificationsSettingsAdminResponseApplicationJson_Ocs') ..add('meta', meta) ..add('data', data)) .toString(); } } -class NotificationsPushServerRegistration_OcsBuilder +class NotificationsSettingsAdminResponseApplicationJson_OcsBuilder implements - Builder, - NotificationsPushServerRegistration_OcsInterfaceBuilder { - _$NotificationsPushServerRegistration_Ocs? _$v; + Builder, + NotificationsSettingsAdminResponseApplicationJson_OcsInterfaceBuilder { + _$NotificationsSettingsAdminResponseApplicationJson_Ocs? _$v; NotificationsOCSMetaBuilder? _meta; NotificationsOCSMetaBuilder get meta => _$this._meta ??= NotificationsOCSMetaBuilder(); set meta(covariant NotificationsOCSMetaBuilder? meta) => _$this._meta = meta; - NotificationsPushServerSubscriptionBuilder? _data; - NotificationsPushServerSubscriptionBuilder get data => _$this._data ??= NotificationsPushServerSubscriptionBuilder(); - set data(covariant NotificationsPushServerSubscriptionBuilder? data) => _$this._data = data; + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; - NotificationsPushServerRegistration_OcsBuilder(); + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder(); - NotificationsPushServerRegistration_OcsBuilder get _$this { + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder get _$this { final $v = _$v; if ($v != null) { _meta = $v.meta.toBuilder(); - _data = $v.data.toBuilder(); + _data = $v.data; _$v = null; } return this; } @override - void replace(covariant NotificationsPushServerRegistration_Ocs other) { + void replace(covariant NotificationsSettingsAdminResponseApplicationJson_Ocs other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsPushServerRegistration_Ocs; + _$v = other as _$NotificationsSettingsAdminResponseApplicationJson_Ocs; } @override - void update(void Function(NotificationsPushServerRegistration_OcsBuilder)? updates) { + void update(void Function(NotificationsSettingsAdminResponseApplicationJson_OcsBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsPushServerRegistration_Ocs build() => _build(); + NotificationsSettingsAdminResponseApplicationJson_Ocs build() => _build(); - _$NotificationsPushServerRegistration_Ocs _build() { - _$NotificationsPushServerRegistration_Ocs _$result; + _$NotificationsSettingsAdminResponseApplicationJson_Ocs _build() { + _$NotificationsSettingsAdminResponseApplicationJson_Ocs _$result; try { - _$result = _$v ?? _$NotificationsPushServerRegistration_Ocs._(meta: meta.build(), data: data.build()); + _$result = _$v ?? + _$NotificationsSettingsAdminResponseApplicationJson_Ocs._( + meta: meta.build(), + data: BuiltValueNullFieldError.checkNotNull( + data, r'NotificationsSettingsAdminResponseApplicationJson_Ocs', 'data')); } catch (_) { late String _$failedField; try { _$failedField = 'meta'; meta.build(); - _$failedField = 'data'; - data.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsPushServerRegistration_Ocs', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsSettingsAdminResponseApplicationJson_Ocs', _$failedField, e.toString()); } rethrow; } @@ -2444,35 +4973,38 @@ class NotificationsPushServerRegistration_OcsBuilder } } -abstract mixin class NotificationsPushServerRegistrationInterfaceBuilder { - void replace(NotificationsPushServerRegistrationInterface other); - void update(void Function(NotificationsPushServerRegistrationInterfaceBuilder) updates); - NotificationsPushServerRegistration_OcsBuilder get ocs; - set ocs(NotificationsPushServerRegistration_OcsBuilder? ocs); +abstract mixin class NotificationsSettingsAdminResponseApplicationJsonInterfaceBuilder { + void replace(NotificationsSettingsAdminResponseApplicationJsonInterface other); + void update(void Function(NotificationsSettingsAdminResponseApplicationJsonInterfaceBuilder) updates); + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder get ocs; + set ocs(NotificationsSettingsAdminResponseApplicationJson_OcsBuilder? ocs); } -class _$NotificationsPushServerRegistration extends NotificationsPushServerRegistration { +class _$NotificationsSettingsAdminResponseApplicationJson extends NotificationsSettingsAdminResponseApplicationJson { @override - final NotificationsPushServerRegistration_Ocs ocs; + final NotificationsSettingsAdminResponseApplicationJson_Ocs ocs; - factory _$NotificationsPushServerRegistration([void Function(NotificationsPushServerRegistrationBuilder)? updates]) => - (NotificationsPushServerRegistrationBuilder()..update(updates))._build(); + factory _$NotificationsSettingsAdminResponseApplicationJson( + [void Function(NotificationsSettingsAdminResponseApplicationJsonBuilder)? updates]) => + (NotificationsSettingsAdminResponseApplicationJsonBuilder()..update(updates))._build(); - _$NotificationsPushServerRegistration._({required this.ocs}) : super._() { - BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsPushServerRegistration', 'ocs'); + _$NotificationsSettingsAdminResponseApplicationJson._({required this.ocs}) : super._() { + BuiltValueNullFieldError.checkNotNull(ocs, r'NotificationsSettingsAdminResponseApplicationJson', 'ocs'); } @override - NotificationsPushServerRegistration rebuild(void Function(NotificationsPushServerRegistrationBuilder) updates) => + NotificationsSettingsAdminResponseApplicationJson rebuild( + void Function(NotificationsSettingsAdminResponseApplicationJsonBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotificationsPushServerRegistrationBuilder toBuilder() => NotificationsPushServerRegistrationBuilder()..replace(this); + NotificationsSettingsAdminResponseApplicationJsonBuilder toBuilder() => + NotificationsSettingsAdminResponseApplicationJsonBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotificationsPushServerRegistration && ocs == other.ocs; + return other is NotificationsSettingsAdminResponseApplicationJson && ocs == other.ocs; } @override @@ -2485,24 +5017,26 @@ class _$NotificationsPushServerRegistration extends NotificationsPushServerRegis @override String toString() { - return (newBuiltValueToStringHelper(r'NotificationsPushServerRegistration')..add('ocs', ocs)).toString(); + return (newBuiltValueToStringHelper(r'NotificationsSettingsAdminResponseApplicationJson')..add('ocs', ocs)) + .toString(); } } -class NotificationsPushServerRegistrationBuilder +class NotificationsSettingsAdminResponseApplicationJsonBuilder implements - Builder, - NotificationsPushServerRegistrationInterfaceBuilder { - _$NotificationsPushServerRegistration? _$v; + Builder, + NotificationsSettingsAdminResponseApplicationJsonInterfaceBuilder { + _$NotificationsSettingsAdminResponseApplicationJson? _$v; - NotificationsPushServerRegistration_OcsBuilder? _ocs; - NotificationsPushServerRegistration_OcsBuilder get ocs => - _$this._ocs ??= NotificationsPushServerRegistration_OcsBuilder(); - set ocs(covariant NotificationsPushServerRegistration_OcsBuilder? ocs) => _$this._ocs = ocs; + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder? _ocs; + NotificationsSettingsAdminResponseApplicationJson_OcsBuilder get ocs => + _$this._ocs ??= NotificationsSettingsAdminResponseApplicationJson_OcsBuilder(); + set ocs(covariant NotificationsSettingsAdminResponseApplicationJson_OcsBuilder? ocs) => _$this._ocs = ocs; - NotificationsPushServerRegistrationBuilder(); + NotificationsSettingsAdminResponseApplicationJsonBuilder(); - NotificationsPushServerRegistrationBuilder get _$this { + NotificationsSettingsAdminResponseApplicationJsonBuilder get _$this { final $v = _$v; if ($v != null) { _ocs = $v.ocs.toBuilder(); @@ -2512,30 +5046,31 @@ class NotificationsPushServerRegistrationBuilder } @override - void replace(covariant NotificationsPushServerRegistration other) { + void replace(covariant NotificationsSettingsAdminResponseApplicationJson other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsPushServerRegistration; + _$v = other as _$NotificationsSettingsAdminResponseApplicationJson; } @override - void update(void Function(NotificationsPushServerRegistrationBuilder)? updates) { + void update(void Function(NotificationsSettingsAdminResponseApplicationJsonBuilder)? updates) { if (updates != null) updates(this); } @override - NotificationsPushServerRegistration build() => _build(); + NotificationsSettingsAdminResponseApplicationJson build() => _build(); - _$NotificationsPushServerRegistration _build() { - _$NotificationsPushServerRegistration _$result; + _$NotificationsSettingsAdminResponseApplicationJson _build() { + _$NotificationsSettingsAdminResponseApplicationJson _$result; try { - _$result = _$v ?? _$NotificationsPushServerRegistration._(ocs: ocs.build()); + _$result = _$v ?? _$NotificationsSettingsAdminResponseApplicationJson._(ocs: ocs.build()); } catch (_) { late String _$failedField; try { _$failedField = 'ocs'; ocs.build(); } catch (e) { - throw BuiltValueNestedFieldError(r'NotificationsPushServerRegistration', _$failedField, e.toString()); + throw BuiltValueNestedFieldError( + r'NotificationsSettingsAdminResponseApplicationJson', _$failedField, e.toString()); } rethrow; } @@ -2559,17 +5094,24 @@ abstract mixin class NotificationsCapabilities_NotificationsInterfaceBuilder { class _$NotificationsCapabilities_Notifications extends NotificationsCapabilities_Notifications { @override - final BuiltList? ocsEndpoints; + final BuiltList ocsEndpoints; @override - final BuiltList? push; + final BuiltList push; @override - final BuiltList? adminNotifications; + final BuiltList adminNotifications; factory _$NotificationsCapabilities_Notifications( [void Function(NotificationsCapabilities_NotificationsBuilder)? updates]) => (NotificationsCapabilities_NotificationsBuilder()..update(updates))._build(); - _$NotificationsCapabilities_Notifications._({this.ocsEndpoints, this.push, this.adminNotifications}) : super._(); + _$NotificationsCapabilities_Notifications._( + {required this.ocsEndpoints, required this.push, required this.adminNotifications}) + : super._() { + BuiltValueNullFieldError.checkNotNull(ocsEndpoints, r'NotificationsCapabilities_Notifications', 'ocsEndpoints'); + BuiltValueNullFieldError.checkNotNull(push, r'NotificationsCapabilities_Notifications', 'push'); + BuiltValueNullFieldError.checkNotNull( + adminNotifications, r'NotificationsCapabilities_Notifications', 'adminNotifications'); + } @override NotificationsCapabilities_Notifications rebuild( @@ -2633,9 +5175,9 @@ class NotificationsCapabilities_NotificationsBuilder NotificationsCapabilities_NotificationsBuilder get _$this { final $v = _$v; if ($v != null) { - _ocsEndpoints = $v.ocsEndpoints?.toBuilder(); - _push = $v.push?.toBuilder(); - _adminNotifications = $v.adminNotifications?.toBuilder(); + _ocsEndpoints = $v.ocsEndpoints.toBuilder(); + _push = $v.push.toBuilder(); + _adminNotifications = $v.adminNotifications.toBuilder(); _$v = null; } return this; @@ -2660,18 +5202,16 @@ class NotificationsCapabilities_NotificationsBuilder try { _$result = _$v ?? _$NotificationsCapabilities_Notifications._( - ocsEndpoints: _ocsEndpoints?.build(), - push: _push?.build(), - adminNotifications: _adminNotifications?.build()); + ocsEndpoints: ocsEndpoints.build(), push: push.build(), adminNotifications: adminNotifications.build()); } catch (_) { late String _$failedField; try { _$failedField = 'ocsEndpoints'; - _ocsEndpoints?.build(); + ocsEndpoints.build(); _$failedField = 'push'; - _push?.build(); + push.build(); _$failedField = 'adminNotifications'; - _adminNotifications?.build(); + adminNotifications.build(); } catch (e) { throw BuiltValueNestedFieldError(r'NotificationsCapabilities_Notifications', _$failedField, e.toString()); } @@ -2783,177 +5323,4 @@ class NotificationsCapabilitiesBuilder } } -abstract mixin class NotificationsNotificationDecryptedSubjectInterfaceBuilder { - void replace(NotificationsNotificationDecryptedSubjectInterface other); - void update(void Function(NotificationsNotificationDecryptedSubjectInterfaceBuilder) updates); - int? get nid; - set nid(int? nid); - - String? get app; - set app(String? app); - - String? get subject; - set subject(String? subject); - - String? get type; - set type(String? type); - - String? get id; - set id(String? id); - - bool? get delete; - set delete(bool? delete); - - bool? get deleteAll; - set deleteAll(bool? deleteAll); -} - -class _$NotificationsNotificationDecryptedSubject extends NotificationsNotificationDecryptedSubject { - @override - final int? nid; - @override - final String? app; - @override - final String? subject; - @override - final String? type; - @override - final String? id; - @override - final bool? delete; - @override - final bool? deleteAll; - - factory _$NotificationsNotificationDecryptedSubject( - [void Function(NotificationsNotificationDecryptedSubjectBuilder)? updates]) => - (NotificationsNotificationDecryptedSubjectBuilder()..update(updates))._build(); - - _$NotificationsNotificationDecryptedSubject._( - {this.nid, this.app, this.subject, this.type, this.id, this.delete, this.deleteAll}) - : super._(); - - @override - NotificationsNotificationDecryptedSubject rebuild( - void Function(NotificationsNotificationDecryptedSubjectBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - NotificationsNotificationDecryptedSubjectBuilder toBuilder() => - NotificationsNotificationDecryptedSubjectBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is NotificationsNotificationDecryptedSubject && - nid == other.nid && - app == other.app && - subject == other.subject && - type == other.type && - id == other.id && - delete == other.delete && - deleteAll == other.deleteAll; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, nid.hashCode); - _$hash = $jc(_$hash, app.hashCode); - _$hash = $jc(_$hash, subject.hashCode); - _$hash = $jc(_$hash, type.hashCode); - _$hash = $jc(_$hash, id.hashCode); - _$hash = $jc(_$hash, delete.hashCode); - _$hash = $jc(_$hash, deleteAll.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'NotificationsNotificationDecryptedSubject') - ..add('nid', nid) - ..add('app', app) - ..add('subject', subject) - ..add('type', type) - ..add('id', id) - ..add('delete', delete) - ..add('deleteAll', deleteAll)) - .toString(); - } -} - -class NotificationsNotificationDecryptedSubjectBuilder - implements - Builder, - NotificationsNotificationDecryptedSubjectInterfaceBuilder { - _$NotificationsNotificationDecryptedSubject? _$v; - - int? _nid; - int? get nid => _$this._nid; - set nid(covariant int? nid) => _$this._nid = nid; - - String? _app; - String? get app => _$this._app; - set app(covariant String? app) => _$this._app = app; - - String? _subject; - String? get subject => _$this._subject; - set subject(covariant String? subject) => _$this._subject = subject; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - bool? _delete; - bool? get delete => _$this._delete; - set delete(covariant bool? delete) => _$this._delete = delete; - - bool? _deleteAll; - bool? get deleteAll => _$this._deleteAll; - set deleteAll(covariant bool? deleteAll) => _$this._deleteAll = deleteAll; - - NotificationsNotificationDecryptedSubjectBuilder(); - - NotificationsNotificationDecryptedSubjectBuilder get _$this { - final $v = _$v; - if ($v != null) { - _nid = $v.nid; - _app = $v.app; - _subject = $v.subject; - _type = $v.type; - _id = $v.id; - _delete = $v.delete; - _deleteAll = $v.deleteAll; - _$v = null; - } - return this; - } - - @override - void replace(covariant NotificationsNotificationDecryptedSubject other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotificationsNotificationDecryptedSubject; - } - - @override - void update(void Function(NotificationsNotificationDecryptedSubjectBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - NotificationsNotificationDecryptedSubject build() => _build(); - - _$NotificationsNotificationDecryptedSubject _build() { - final _$result = _$v ?? - _$NotificationsNotificationDecryptedSubject._( - nid: nid, app: app, subject: subject, type: type, id: id, delete: delete, deleteAll: deleteAll); - replace(_$result); - return _$result; - } -} - // ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/packages/nextcloud/lib/src/api/notifications.openapi.json b/packages/nextcloud/lib/src/api/notifications.openapi.json index 6d0f61ae..6e87975a 100644 --- a/packages/nextcloud/lib/src/api/notifications.openapi.json +++ b/packages/nextcloud/lib/src/api/notifications.openapi.json @@ -1,541 +1,1547 @@ { - "openapi": "3.1.0", - "info": { - "title": "notifications", - "version": "2.15.0", - "description": "This app provides a backend and frontend for the notification API available in Nextcloud.", - "license": { - "name": "agpl", - "identifier": "AGPL-3.0" - } - }, - "servers": [ - { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" + "openapi": "3.1.0", + "info": { + "title": "notifications", + "version": "0.0.1", + "description": "This app provides a backend and frontend for the notification API available in Nextcloud.", + "license": { + "name": "agpl", + "identifier": "AGPL-3.0-only" } - } - } - ], - "security": [ - { - "bearer": [] }, - { - "basic_auth": [] - } - ], - "tags": [], - "components": { - "schemas": { - "Capabilities": { - "type": "object", - "required": ["notifications"], - "properties": { - "notifications": { - "type": "object", - "additionalProperties": true, - "properties": { - "ocs-endpoints": { - "type": "array", - "items": { - "type": "string" + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "notifications" + ], + "properties": { + "notifications": { + "type": "object", + "required": [ + "ocs-endpoints", + "push", + "admin-notifications" + ], + "properties": { + "ocs-endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "push": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin-notifications": { + "type": "array", + "items": { + "type": "string" + } + } + } + } } - }, - "push": { - "type": "array", - "items": { - "type": "string" + }, + "Notification": { + "type": "object", + "required": [ + "notification_id", + "app", + "user", + "datetime", + "object_type", + "object_id", + "subject", + "message", + "link", + "actions" + ], + "properties": { + "notification_id": { + "type": "integer", + "format": "int64" + }, + "app": { + "type": "string" + }, + "user": { + "type": "string" + }, + "datetime": { + "type": "string" + }, + "object_type": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "message": { + "type": "string" + }, + "link": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationAction" + } + }, + "subjectRich": { + "type": "string" + }, + "subjectRichParameters": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "messageRich": { + "type": "string" + }, + "messageRichParameters": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "icon": { + "type": "string" + }, + "shouldNotify": { + "type": "boolean" + } } - }, - "admin-notifications": { - "type": "array", - "items": { - "type": "string" + }, + "NotificationAction": { + "type": "object", + "required": [ + "label", + "link", + "type", + "primary" + ], + "properties": { + "label": { + "type": "string" + }, + "link": { + "type": "string" + }, + "type": { + "type": "string" + }, + "primary": { + "type": "boolean" + } } - } - } - } - } - }, - "OCSMeta": { - "type": "object", - "required": [ - "status", - "statuscode" - ], - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" - } - } - }, - "EmptyOCS": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array" - } - } - } - } - }, - "Notification": { - "type": "object", - "required": [ - "notification_id", - "app", - "user", - "datetime", - "object_type", - "object_id", - "subject", - "message", - "link", - "actions" - ], - "properties": { - "notification_id": { - "type": "integer" - }, - "app": { - "type": "string" - }, - "user": { - "type": "string" - }, - "datetime": { - "type": "string" - }, - "object_type": { - "type": "string" - }, - "object_id": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "message": { - "type": "string" - }, - "link": { - "type": "string" - }, - "subjectRich": { - "type": "string" - }, - "subjectRichParameters": { - "type": "object" - }, - "messageRich": { - "type": "string" - }, - "messageRichParameters": { - "type": "object" - }, - "icon": { - "type": "string" - }, - "shouldNotify": { - "type": "boolean" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationAction" - } - } - } - }, - "NotificationAction": { - "type": "object", - "required": [ - "label", - "link", - "type" - ], - "properties": { - "label": { - "type": "string" - }, - "link": { - "type": "string" - }, - "type": { - "type": "string" - }, - "primary": { - "type": "boolean" - } - } - }, - "ListNotifications": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Notification" + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PushDevice": { + "type": "object", + "required": [ + "publicKey", + "deviceIdentifier", + "signature" + ], + "properties": { + "publicKey": { + "type": "string" + }, + "deviceIdentifier": { + "type": "string" + }, + "signature": { + "type": "string" + } } - } - } - } - } - }, - "GetNotification": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Notification" - } - } - } - } - }, - "PushServerSubscription": { - "type": "object", - "required": [ - "publicKey", - "deviceIdentifier", - "signature" - ], - "properties": { - "publicKey": { - "type": "string" - }, - "deviceIdentifier": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, - "PushServerRegistration": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/PushServerSubscription" - } } - } } - }, - "NotificationDecryptedSubject": { - "type": "object", - "properties": { - "nid": { - "type": "integer" - }, - "app": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "delete": { - "type": "boolean" - }, - "delete-all": { - "type": "boolean" - } - } - } }, - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - }, - "bearer": { - "type": "http", - "scheme": "bearer" - } - } - }, - "paths": { - "/ocs/v2.php/apps/notifications/api/v2/notifications": { - "get": { - "operationId": "list-notifications", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListNotifications" + "paths": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications": { + "get": { + "operationId": "endpoint-list-notifications", + "summary": "Get all notifications", + "tags": [ + "endpoint" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "description": "Version of the API to use", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Notifications returned", + "headers": { + "X-Nextcloud-User-Status": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + } + } + } + } + }, + "204": { + "description": "No app uses notifications", + "headers": { + "X-Nextcloud-User-Status": { + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } } - } - } - } - } - }, - "delete": { - "operationId": "delete-all-notifications", - "security": [ - { - "bearer": [] - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" + }, + "delete": { + "operationId": "endpoint-delete-all-notifications", + "summary": "Delete all notifications", + "tags": [ + "endpoint" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "All notifications deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Deleting notification for impersonated user is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } } - } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/v2/notifications/{id}": { - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "get": { - "operationId": "get-notification", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetNotification" + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/{id}": { + "get": { + "operationId": "endpoint-get-notification", + "summary": "Get a notification", + "tags": [ + "endpoint" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "description": "Version of the API to use", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v2" + } + }, + { + "name": "id", + "in": "path", + "description": "ID of the notification", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Notification returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Notification" + } + } + } + } + } + } + } + }, + "404": { + "description": "Notification not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } } - } - } - } - } - }, - "delete": { - "operationId": "delete-notification", - "security": [ - { - "bearer": [] - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmptyOCS" + }, + "delete": { + "operationId": "endpoint-delete-notification", + "summary": "Delete a notification", + "tags": [ + "endpoint" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v2" + } + }, + { + "name": "id", + "in": "path", + "description": "ID of the notification", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Notification deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Deleting notification for impersonated user is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "404": { + "description": "Notification not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } } - } - } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/v2/push": { - "post": { - "operationId": "register-device", - "security": [ - { - "bearer": [] - } - ], - "parameters": [ - { - "name": "pushTokenHash", - "in": "query", - "required": true, - "schema": { - "type": "string" } - }, - { - "name": "devicePublicKey", - "in": "query", - "required": true, - "schema": { - "type": "string" + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/exists": { + "post": { + "operationId": "endpoint-confirm-ids-for-user", + "summary": "Check if notification IDs exist", + "tags": [ + "endpoint" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "ids[]", + "in": "query", + "description": "IDs of the notifications to check", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "apiVersion", + "in": "path", + "description": "Version of the API to use", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Existing nsotification IDs returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Too many notification IDs requested", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + } + } + } + } + } + } + } } - }, - { - "name": "proxyServer", - "in": "query", - "required": true, - "schema": { - "type": "string" + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/push": { + "post": { + "operationId": "push-register-device", + "summary": "Register device for push notifications", + "tags": [ + "push" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "pushTokenHash", + "in": "query", + "description": "Hash of the push token", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "devicePublicKey", + "in": "query", + "description": "Public key of the device", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "proxyServer", + "in": "query", + "description": "Proxy server to be used", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Device was already registered", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/PushDevice" + } + } + } + } + } + } + } + }, + "201": { + "description": "Device registered successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/PushDevice" + } + } + } + } + } + } + } + }, + "400": { + "description": "Registering device is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Missing permissions to register device", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } }, - "description": "This URL has to end with a / otherwise the device will not be able to register" - } - ], - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PushServerRegistration" + "delete": { + "operationId": "push-remove-device", + "summary": "Remove a device from push notifications", + "tags": [ + "push" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "No device registered", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "202": { + "description": "Device removed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Missing permissions to remove device", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Removing device is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + } } - } } - } - } - }, - "delete": { - "operationId": "remove-device", - "security": [ - { - "bearer": [] - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/admin_notifications/{userId}": { + "post": { + "operationId": "api-generate-notification", + "summary": "Generate a notification for a user", + "description": "This endpoint requires admin access", + "tags": [ + "api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "shortMessage", + "in": "query", + "description": "Subject of the notification", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "longMessage", + "in": "query", + "description": "Message of the notification", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v2" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "Notification generated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Generating notification is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "nullable": true + } + } + } + } + } + } + } + } } - } - } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/v2/admin_notifications/{userId}": { - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "post": { - "security": [ - { - "bearer": [] - } - ], - "operationId": "send-admin-notification", - "parameters": [ - { - "name": "shortMessage", - "in": "query", - "required": true, - "schema": { - "type": "string" } - }, - { - "name": "longMessage", - "in": "query", - "required": false, - "schema": { - "type": "string", - "default": "" + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/settings": { + "post": { + "operationId": "settings-personal", + "summary": "Update personal notification settings", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "batchSetting", + "in": "query", + "description": "How often E-mails about missed notifications should be sent (hourly: 1; every three hours: 2; daily: 3; weekly: 4)", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "soundNotification", + "in": "query", + "description": "Enable sound for notifications ('yes' or 'no')", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "soundTalk", + "in": "query", + "description": "Enable sound for Talk notifications ('yes' or 'no')", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmptyOCS" + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/settings/admin": { + "post": { + "operationId": "settings-admin", + "summary": "Update default notification settings for new users", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "batchSetting", + "in": "query", + "description": "How often E-mails about missed notifications should be sent (hourly: 1; every three hours: 2; daily: 3; weekly: 4)", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "soundNotification", + "in": "query", + "description": "Enable sound for notifications ('yes' or 'no')", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "soundTalk", + "in": "query", + "description": "Enable sound for Talk notifications ('yes' or 'no')", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "required": true, + "schema": { + "type": "string", + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } } - } } - } } - } - } - } -} + }, + "tags": [] +} \ No newline at end of file diff --git a/packages/nextcloud/test/notifications_test.dart b/packages/nextcloud/test/notifications_test.dart index cbbd13bc..6b3d8102 100644 --- a/packages/nextcloud/test/notifications_test.dart +++ b/packages/nextcloud/test/notifications_test.dart @@ -22,7 +22,7 @@ void main() { tearDown(() => container.destroy()); Future sendTestNotification() async { - await client.notifications.sendAdminNotification( + await client.notifications.api.generateNotification( userId: 'admin', shortMessage: '123', longMessage: '456', @@ -37,7 +37,7 @@ void main() { await sendTestNotification(); final startTime = DateTime.now().toUtc(); - final response = await client.notifications.listNotifications(); + final response = (await client.notifications.endpoint.listNotifications()).data; expect(response.ocs.data, hasLength(2)); expect(response.ocs.data[0].notificationId, 2); expect(response.ocs.data[0].app, 'admin_notifications'); @@ -49,9 +49,9 @@ void main() { expect(response.ocs.data[0].message, '456'); expect(response.ocs.data[0].link, ''); expect(response.ocs.data[0].subjectRich, ''); - expect(response.ocs.data[0].subjectRichParameters?.asList, isEmpty); + expect(response.ocs.data[0].subjectRichParameters, isEmpty); expect(response.ocs.data[0].messageRich, ''); - expect(response.ocs.data[0].messageRichParameters?.asList, isEmpty); + expect(response.ocs.data[0].messageRichParameters, isEmpty); expect(response.ocs.data[0].icon, isNotEmpty); expect(response.ocs.data[0].actions, hasLength(0)); }); @@ -60,7 +60,7 @@ void main() { await sendTestNotification(); final startTime = DateTime.now().toUtc(); - final response = await client.notifications.getNotification(id: 2); + final response = await client.notifications.endpoint.getNotification(id: 2); expect(response.ocs.data.notificationId, 2); expect(response.ocs.data.app, 'admin_notifications'); expect(response.ocs.data.user, 'admin'); @@ -71,27 +71,27 @@ void main() { expect(response.ocs.data.message, '456'); expect(response.ocs.data.link, ''); expect(response.ocs.data.subjectRich, ''); - expect(response.ocs.data.subjectRichParameters?.asList, isEmpty); + expect(response.ocs.data.subjectRichParameters, isEmpty); expect(response.ocs.data.messageRich, ''); - expect(response.ocs.data.messageRichParameters?.asList, isEmpty); + expect(response.ocs.data.messageRichParameters, isEmpty); expect(response.ocs.data.icon, isNotEmpty); expect(response.ocs.data.actions, hasLength(0)); }); test('Delete notification', () async { await sendTestNotification(); - await client.notifications.deleteNotification(id: 2); + await client.notifications.endpoint.deleteNotification(id: 2); - final response = await client.notifications.listNotifications(); + final response = (await client.notifications.endpoint.listNotifications()).data; expect(response.ocs.data, hasLength(1)); }); test('Delete all notifications', () async { await sendTestNotification(); await sendTestNotification(); - await client.notifications.deleteAllNotifications(); + await client.notifications.endpoint.deleteAllNotifications(); - final response = await client.notifications.listNotifications(); + final response = (await client.notifications.endpoint.listNotifications()).data; expect(response.ocs.data, hasLength(0)); }); }); @@ -121,7 +121,7 @@ void main() { const pushToken = '789'; final keypair = generateKeypair(); - final subscription = (await client.notifications.registerDevice( + final subscription = (await client.notifications.push.registerDevice( pushTokenHash: generatePushTokenHash(pushToken), devicePublicKey: keypair.publicKey.toFormattedPEM(), proxyServer: 'https://example.com/', @@ -132,9 +132,8 @@ void main() { RSAPublicKey.fromPEM(subscription.publicKey); expect(subscription.deviceIdentifier, isNotEmpty); expect(subscription.signature, isNotEmpty); - expect(subscription.message, isNull); - await client.notifications.removeDevice(); + await client.notifications.push.removeDevice(); }); }, retry: retryCount, diff --git a/tool/generate-specs.sh b/tool/generate-specs.sh index 67cf7e3e..89e062c6 100755 --- a/tool/generate-specs.sh +++ b/tool/generate-specs.sh @@ -5,12 +5,20 @@ cd "$(dirname "$0")/.." rm -rf /tmp/nextcloud-neon mkdir -p /tmp/nextcloud-neon -( - cd external/nextcloud-server - composer update - composer install --no-dev - git checkout . # Remove changed files -) +function generate_spec() { + path="$1" + codename="$2" + composer exec generate-spec -- "$path" "../../packages/nextcloud/lib/src/api/$codename.openapi.json" --first-content-type --openapi-version 3.1.0 +} + +for dir in external/nextcloud-server external/nextcloud-notifications; do + ( + cd "$dir" + composer update + composer install --no-dev + git checkout . # Remove changed files + ) +done for path in \ core \ @@ -31,13 +39,17 @@ for path in \ apps/user_status \ apps/weather_status \ ; do - codename="$(echo $path | sed "s/^apps\///")" ( cd external/nextcloud-server - composer exec generate-spec -- "$path" "../../packages/nextcloud/lib/src/api/$codename.openapi.json" --first-content-type --openapi-version 3.1.0 + generate_spec "$path" "$(basename $path)" ) done +( + cd external/nextcloud-notifications + generate_spec "." "notifications" +) + ( cd external/nextcloud-server composer exec merge-specs -- --core ../../packages/nextcloud/lib/src/api/core.openapi.json --merged /tmp/nextcloud-neon/merged.json ../../packages/nextcloud/lib/src/api/*.openapi.json --openapi-version 3.1.0 From 0f43e2baf22a88781dd300183c710fb62517f053 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Mon, 4 Sep 2023 19:33:58 +0200 Subject: [PATCH 2/2] chore(neon,neon_notifications,app): Adjust Signed-off-by: jld3103 --- packages/app/integration_test/screenshot_test.dart | 2 +- .../neon/neon/lib/src/blocs/push_notifications.dart | 4 ++-- packages/neon/neon/lib/src/utils/push_utils.dart | 4 +++- .../neon_notifications/lib/blocs/notifications.dart | 13 ++++++++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/app/integration_test/screenshot_test.dart b/packages/app/integration_test/screenshot_test.dart index 946eaff5..1e57e178 100644 --- a/packages/app/integration_test/screenshot_test.dart +++ b/packages/app/integration_test/screenshot_test.dart @@ -279,7 +279,7 @@ Future main() async { }); testWidgets('notifications', (final tester) async { - await (await getAccount('admin')).client.notifications.sendAdminNotification( + await (await getAccount('admin')).client.notifications.api.generateNotification( userId: account.username, shortMessage: 'Notifications demo', longMessage: 'This is a notifications demo of the Neon app', diff --git a/packages/neon/neon/lib/src/blocs/push_notifications.dart b/packages/neon/neon/lib/src/blocs/push_notifications.dart index a1fde3fd..a701ade7 100644 --- a/packages/neon/neon/lib/src/blocs/push_notifications.dart +++ b/packages/neon/neon/lib/src/blocs/push_notifications.dart @@ -85,7 +85,7 @@ class PushNotificationsBloc extends Bloc implements PushNotificationsBlocEvents, debugPrint('Registering account $instance for push notifications on $endpoint'); - final subscription = await account.client.notifications.registerDevice( + final subscription = await account.client.notifications.push.registerDevice( pushTokenHash: generatePushTokenHash(endpoint), devicePublicKey: keypair.publicKey.toFormattedPEM(), proxyServer: '$endpoint#', // This is a hack to make the Nextcloud server directly push to the endpoint @@ -121,7 +121,7 @@ class PushNotificationsBloc extends Bloc implements PushNotificationsBlocEvents, Future _unregisterUnifiedPushInstances(final List accounts) async { for (final account in accounts) { try { - await account.client.notifications.removeDevice(); + await account.client.notifications.push.removeDevice(); await UnifiedPush.unregister(account.id); await _storage.remove(_keyLastEndpoint(account)); } catch (e) { diff --git a/packages/neon/neon/lib/src/utils/push_utils.dart b/packages/neon/neon/lib/src/utils/push_utils.dart index 6e91d933..bf4f1639 100644 --- a/packages/neon/neon/lib/src/utils/push_utils.dart +++ b/packages/neon/neon/lib/src/utils/push_utils.dart @@ -103,7 +103,9 @@ class PushUtils { account = accounts.tryFind(instance); if (account != null) { notification = - (await account.client.notifications.getNotification(id: pushNotification.subject.nid!)).ocs.data; + (await account.client.notifications.endpoint.getNotification(id: pushNotification.subject.nid!)) + .ocs + .data; if (notification.icon?.endsWith('.svg') ?? false) { // Only SVG icons are supported right now (should be most of them) diff --git a/packages/neon/neon_notifications/lib/blocs/notifications.dart b/packages/neon/neon_notifications/lib/blocs/notifications.dart index 93dde480..ef9afa44 100644 --- a/packages/neon/neon_notifications/lib/blocs/notifications.dart +++ b/packages/neon/neon_notifications/lib/blocs/notifications.dart @@ -50,22 +50,25 @@ class NotificationsBloc extends InteractiveBloc @override Future refresh() async { - await RequestManager.instance.wrapNextcloud, NotificationsListNotifications>( + await RequestManager.instance.wrapNextcloud< + List, + NotificationsResponse>( _account.id, 'notifications-notifications', notifications, - () async => _account.client.notifications.listNotifications(), - (final response) => response.ocs.data.toList(), + () async => _account.client.notifications.endpoint.listNotifications(), + (final response) => response.data.ocs.data.toList(), ); } @override void deleteAllNotifications() { - wrapAction(() async => _account.client.notifications.deleteAllNotifications()); + wrapAction(() async => _account.client.notifications.endpoint.deleteAllNotifications()); } @override void deleteNotification(final int id) { - wrapAction(() async => _account.client.notifications.deleteNotification(id: id)); + wrapAction(() async => _account.client.notifications.endpoint.deleteNotification(id: id)); } }