From 75325b00f2b9cdb0a6274aa5b0d408b5a5d282ab Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 5 Nov 2023 16:35:06 +0100 Subject: [PATCH] feat(nextcloud): Add spreed internal signaling Signed-off-by: jld3103 --- .../nextcloud/lib/src/api/spreed.openapi.dart | 660 ++++- .../lib/src/api/spreed.openapi.g.dart | 2349 ++++++++++++++++- .../nextcloud/lib/src/api/spreed.openapi.json | 346 ++- .../patches/spreed/internal-signaling.json | 342 +++ packages/nextcloud/test/spreed_test.dart | 50 +- 5 files changed, 3459 insertions(+), 288 deletions(-) create mode 100644 packages/nextcloud/lib/src/patches/spreed/internal-signaling.json diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.dart b/packages/nextcloud/lib/src/api/spreed.openapi.dart index 4ac2520c..56f424ba 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.dart +++ b/packages/nextcloud/lib/src/api/spreed.openapi.dart @@ -12501,7 +12501,7 @@ class SignalingClient { /// See: /// * [sendMessagesRaw] for an experimental operation that returns a [DynamiteRawResponse] that can be serialized. Future> sendMessages({ - required final String messages, + required final ContentString> messages, required final String token, final SignalingSendMessagesApiVersion apiVersion = SignalingSendMessagesApiVersion.v3, final bool oCSAPIRequest = true, @@ -12537,7 +12537,7 @@ class SignalingClient { /// * [sendMessages] for an operation that returns a [DynamiteResponse] with a stable API. @experimental DynamiteRawResponse sendMessagesRaw({ - required final String messages, + required final ContentString> messages, required final String token, final SignalingSendMessagesApiVersion apiVersion = SignalingSendMessagesApiVersion.v3, final bool oCSAPIRequest = true, @@ -12564,7 +12564,12 @@ class SignalingClient { } // coverage:ignore-end - queryParameters['messages'] = messages; + queryParameters['messages'] = _jsonSerializers.serialize( + messages, + specifiedType: const FullType(ContentString, [ + FullType(BuiltList, [FullType(SignalingSendMessagesMessages)]), + ]), + ); dynamite_utils.checkPattern(token, RegExp(r'^[a-z0-9]{4,30}$'), 'token'); pathParameters['token'] = token; pathParameters['apiVersion'] = apiVersion.name; @@ -23343,26 +23348,352 @@ abstract class SignalingSession implements SignalingSessionInterface, Built? get builtListSignalingSession; - String? get string; +abstract interface class SignalingSessionsInterface { + String get type; + BuiltList get data; +} + +abstract class SignalingSessions + implements SignalingSessionsInterface, Built { + factory SignalingSessions([final void Function(SignalingSessionsBuilder)? b]) = _$SignalingSessions; + + // coverage:ignore-start + const SignalingSessions._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingSessions.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 => _$signalingSessionsSerializer; +} + +class SignalingMessageType extends EnumClass { + const SignalingMessageType._(super.name); + + static const SignalingMessageType offer = _$signalingMessageTypeOffer; + + static const SignalingMessageType answer = _$signalingMessageTypeAnswer; + + static const SignalingMessageType candidate = _$signalingMessageTypeCandidate; + + static const SignalingMessageType unshareScreen = _$signalingMessageTypeUnshareScreen; + + @BuiltValueEnumConst(wireName: 'remove-candidates') + static const SignalingMessageType removeCandidates = _$signalingMessageTypeRemoveCandidates; + + static const SignalingMessageType control = _$signalingMessageTypeControl; + + static const SignalingMessageType forceMute = _$signalingMessageTypeForceMute; + + static const SignalingMessageType mute = _$signalingMessageTypeMute; + + static const SignalingMessageType unmute = _$signalingMessageTypeUnmute; + + static const SignalingMessageType nickChanged = _$signalingMessageTypeNickChanged; + + // coverage:ignore-start + static BuiltSet get values => _$signalingMessageTypeValues; + // coverage:ignore-end + + static SignalingMessageType valueOf(final String name) => _$valueOfSignalingMessageType(name); + + static Serializer get serializer => _$signalingMessageTypeSerializer; +} + +class SignalingRoomType extends EnumClass { + const SignalingRoomType._(super.name); + + static const SignalingRoomType video = _$signalingRoomTypeVideo; + + static const SignalingRoomType screen = _$signalingRoomTypeScreen; + + // coverage:ignore-start + static BuiltSet get values => _$signalingRoomTypeValues; + // coverage:ignore-end + + static SignalingRoomType valueOf(final String name) => _$valueOfSignalingRoomType(name); + + static Serializer get serializer => _$signalingRoomTypeSerializer; +} + +class SignalingSessionDescriptionMessage_Payload_Type extends EnumClass { + const SignalingSessionDescriptionMessage_Payload_Type._(super.name); + + static const SignalingSessionDescriptionMessage_Payload_Type offer = + _$signalingSessionDescriptionMessagePayloadTypeOffer; + + static const SignalingSessionDescriptionMessage_Payload_Type answer = + _$signalingSessionDescriptionMessagePayloadTypeAnswer; + + // coverage:ignore-start + static BuiltSet get values => + _$signalingSessionDescriptionMessagePayloadTypeValues; + // coverage:ignore-end + + static SignalingSessionDescriptionMessage_Payload_Type valueOf(final String name) => + _$valueOfSignalingSessionDescriptionMessage_Payload_Type(name); + + static Serializer get serializer => + _$signalingSessionDescriptionMessagePayloadTypeSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingSessionDescriptionMessage_PayloadInterface { + SignalingSessionDescriptionMessage_Payload_Type get type; + String get sdp; + String get nick; +} + +abstract class SignalingSessionDescriptionMessage_Payload + implements + SignalingSessionDescriptionMessage_PayloadInterface, + Built { + factory SignalingSessionDescriptionMessage_Payload([ + final void Function(SignalingSessionDescriptionMessage_PayloadBuilder)? b, + ]) = _$SignalingSessionDescriptionMessage_Payload; + + // coverage:ignore-start + const SignalingSessionDescriptionMessage_Payload._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingSessionDescriptionMessage_Payload.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 => + _$signalingSessionDescriptionMessagePayloadSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingSessionDescriptionMessageInterface { + String get from; + String get to; + SignalingMessageType get type; + SignalingRoomType? get roomType; + String? get sid; + SignalingSessionDescriptionMessage_Payload get payload; +} + +abstract class SignalingSessionDescriptionMessage + implements + SignalingSessionDescriptionMessageInterface, + Built { + factory SignalingSessionDescriptionMessage([final void Function(SignalingSessionDescriptionMessageBuilder)? b]) = + _$SignalingSessionDescriptionMessage; + + // coverage:ignore-start + const SignalingSessionDescriptionMessage._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingSessionDescriptionMessage.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 => + _$signalingSessionDescriptionMessageSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingICECandidateMessage_Payload_CandidateInterface { + int get sdpMLineIndex; + String get sdpMid; + String get candidate; +} + +abstract class SignalingICECandidateMessage_Payload_Candidate + implements + SignalingICECandidateMessage_Payload_CandidateInterface, + Built { + factory SignalingICECandidateMessage_Payload_Candidate([ + final void Function(SignalingICECandidateMessage_Payload_CandidateBuilder)? b, + ]) = _$SignalingICECandidateMessage_Payload_Candidate; + + // coverage:ignore-start + const SignalingICECandidateMessage_Payload_Candidate._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingICECandidateMessage_Payload_Candidate.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 => + _$signalingICECandidateMessagePayloadCandidateSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingICECandidateMessage_PayloadInterface { + SignalingICECandidateMessage_Payload_Candidate get candidate; +} + +abstract class SignalingICECandidateMessage_Payload + implements + SignalingICECandidateMessage_PayloadInterface, + Built { + factory SignalingICECandidateMessage_Payload([final void Function(SignalingICECandidateMessage_PayloadBuilder)? b]) = + _$SignalingICECandidateMessage_Payload; + + // coverage:ignore-start + const SignalingICECandidateMessage_Payload._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingICECandidateMessage_Payload.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 => + _$signalingICECandidateMessagePayloadSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingICECandidateMessageInterface { + String get from; + String get to; + SignalingMessageType get type; + SignalingRoomType? get roomType; + String? get sid; + SignalingICECandidateMessage_Payload get payload; +} + +abstract class SignalingICECandidateMessage + implements + SignalingICECandidateMessageInterface, + Built { + factory SignalingICECandidateMessage([final void Function(SignalingICECandidateMessageBuilder)? b]) = + _$SignalingICECandidateMessage; + + // coverage:ignore-start + const SignalingICECandidateMessage._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingICECandidateMessage.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 => _$signalingICECandidateMessageSerializer; +} + +class SignalingMuteMessage_Payload_Name extends EnumClass { + const SignalingMuteMessage_Payload_Name._(super.name); + + static const SignalingMuteMessage_Payload_Name audio = _$signalingMuteMessagePayloadNameAudio; + + static const SignalingMuteMessage_Payload_Name video = _$signalingMuteMessagePayloadNameVideo; + + // coverage:ignore-start + static BuiltSet get values => _$signalingMuteMessagePayloadNameValues; + // coverage:ignore-end + + static SignalingMuteMessage_Payload_Name valueOf(final String name) => + _$valueOfSignalingMuteMessage_Payload_Name(name); + + static Serializer get serializer => _$signalingMuteMessagePayloadNameSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingMuteMessage_PayloadInterface { + SignalingMuteMessage_Payload_Name get name; } -abstract class SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data +abstract class SignalingMuteMessage_Payload implements - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataInterface, - Built { - factory SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data([ - final void Function(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder)? b, - ]) = _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data; + SignalingMuteMessage_PayloadInterface, + Built { + factory SignalingMuteMessage_Payload([final void Function(SignalingMuteMessage_PayloadBuilder)? b]) = + _$SignalingMuteMessage_Payload; + + // coverage:ignore-start + const SignalingMuteMessage_Payload._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingMuteMessage_Payload.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 => _$signalingMuteMessagePayloadSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingMuteMessageInterface { + String get from; + String get to; + SignalingMessageType get type; + SignalingRoomType? get roomType; + String? get sid; + SignalingMuteMessage_Payload get payload; +} + +abstract class SignalingMuteMessage + implements SignalingMuteMessageInterface, Built { + factory SignalingMuteMessage([final void Function(SignalingMuteMessageBuilder)? b]) = _$SignalingMuteMessage; // coverage:ignore-start - const SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data._(); + const SignalingMuteMessage._(); // coverage:ignore-end // coverage:ignore-start - factory SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data.fromJson(final Map json) => + factory SignalingMuteMessage.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 => _$signalingMuteMessageSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingMessageInterface { + SignalingSessionDescriptionMessage? get signalingSessionDescriptionMessage; + SignalingICECandidateMessage? get signalingICECandidateMessage; + SignalingMuteMessage? get signalingMuteMessage; +} + +abstract class SignalingMessage implements SignalingMessageInterface, Built { + factory SignalingMessage([final void Function(SignalingMessageBuilder)? b]) = _$SignalingMessage; + + // coverage:ignore-start + const SignalingMessage._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingMessage.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end @@ -23371,86 +23702,113 @@ abstract class SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data // coverage:ignore-end @BuiltValueSerializer(custom: true) - static Serializer get serializer => - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataSerializer(); + static Serializer get serializer => _$SignalingMessageSerializer(); JsonObject get data; @BuiltValueHook(finalizeBuilder: true) - static void _validate(final SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder b) { + static void _validate(final SignalingMessageBuilder b) { // When this is rebuild from another builder if (b._data == null) { return; } - final match = [b._builtListSignalingSession, b._string].singleWhereOrNull((final x) => x != null); + final match = [b._signalingSessionDescriptionMessage, b._signalingICECandidateMessage, b._signalingMuteMessage] + .singleWhereOrNull((final x) => x != null); if (match == null) { - throw StateError("Need exactly one of 'builtListSignalingSession', 'string' for ${b._data}"); + throw StateError( + "Need exactly one of 'signalingSessionDescriptionMessage', 'signalingICECandidateMessage', 'signalingMuteMessage' for ${b._data}", + ); } } } -class _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataSerializer - implements PrimitiveSerializer { +class _$SignalingMessageSerializer implements PrimitiveSerializer { @override - final Iterable types = const [ - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data, - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data, - ]; + final Iterable types = const [SignalingMessage, _$SignalingMessage]; @override - final String wireName = 'SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data'; + final String wireName = 'SignalingMessage'; @override Object serialize( final Serializers serializers, - final SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data object, { + final SignalingMessage object, { final FullType specifiedType = FullType.unspecified, }) => object.data.value; @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data deserialize( + SignalingMessage deserialize( final Serializers serializers, final Object data, { final FullType specifiedType = FullType.unspecified, }) { - final result = SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder()..data = JsonObject(data); - try { - final value = _jsonSerializers.deserialize( - data, - specifiedType: const FullType(BuiltList, [FullType(SignalingSession)]), - )! as BuiltList; - result.builtListSignalingSession.replace(value); - } catch (_) {} - try { - final value = _jsonSerializers.deserialize(data, specifiedType: const FullType(String))! as String; - result.string = value; - } catch (_) {} + final result = SignalingMessageBuilder()..data = JsonObject(data); + if (data is! Iterable) { + throw StateError('Expected an Iterable but got ${data.runtimeType}'); + } + String? discriminator; + final iterator = data.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + if (key == 'type') { + discriminator = value! as String; + break; + } + } + if (discriminator == 'SignalingSessionDescriptionMessage' || + discriminator == 'offer' || + discriminator == 'answer') { + try { + final value = _jsonSerializers.deserialize( + data, + specifiedType: const FullType(SignalingSessionDescriptionMessage), + )! as SignalingSessionDescriptionMessage; + result.signalingSessionDescriptionMessage.replace(value); + } catch (_) { + rethrow; + } + } + if (discriminator == 'SignalingICECandidateMessage' || discriminator == 'candidate') { + try { + final value = _jsonSerializers.deserialize(data, specifiedType: const FullType(SignalingICECandidateMessage))! + as SignalingICECandidateMessage; + result.signalingICECandidateMessage.replace(value); + } catch (_) { + rethrow; + } + } + if (discriminator == 'SignalingMuteMessage' || discriminator == 'mute' || discriminator == 'unmute') { + try { + final value = _jsonSerializers.deserialize(data, specifiedType: const FullType(SignalingMuteMessage))! + as SignalingMuteMessage; + result.signalingMuteMessage.replace(value); + } catch (_) { + rethrow; + } + } return result.build(); } } @BuiltValue(instantiable: false) -abstract interface class SignalingPullMessagesResponseApplicationJson_Ocs_DataInterface { +abstract interface class SignalingMessageWrapperInterface { String get type; - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data get data; + ContentString get data; } -abstract class SignalingPullMessagesResponseApplicationJson_Ocs_Data - implements - SignalingPullMessagesResponseApplicationJson_Ocs_DataInterface, - Built { - factory SignalingPullMessagesResponseApplicationJson_Ocs_Data([ - final void Function(SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder)? b, - ]) = _$SignalingPullMessagesResponseApplicationJson_Ocs_Data; +abstract class SignalingMessageWrapper + implements SignalingMessageWrapperInterface, Built { + factory SignalingMessageWrapper([final void Function(SignalingMessageWrapperBuilder)? b]) = _$SignalingMessageWrapper; // coverage:ignore-start - const SignalingPullMessagesResponseApplicationJson_Ocs_Data._(); + const SignalingMessageWrapper._(); // coverage:ignore-end // coverage:ignore-start - factory SignalingPullMessagesResponseApplicationJson_Ocs_Data.fromJson(final Map json) => + factory SignalingMessageWrapper.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end @@ -23458,14 +23816,111 @@ abstract class SignalingPullMessagesResponseApplicationJson_Ocs_Data Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end - static Serializer get serializer => - _$signalingPullMessagesResponseApplicationJsonOcsDataSerializer; + static Serializer get serializer => _$signalingMessageWrapperSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class SignalingDataInterface { + SignalingSessions? get signalingSessions; + SignalingMessageWrapper? get signalingMessageWrapper; +} + +abstract class SignalingData implements SignalingDataInterface, Built { + factory SignalingData([final void Function(SignalingDataBuilder)? b]) = _$SignalingData; + + // coverage:ignore-start + const SignalingData._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingData.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 => _$SignalingDataSerializer(); + + JsonObject get data; + @BuiltValueHook(finalizeBuilder: true) + static void _validate(final SignalingDataBuilder b) { + // When this is rebuild from another builder + if (b._data == null) { + return; + } + + final match = [b._signalingSessions, b._signalingMessageWrapper].singleWhereOrNull((final x) => x != null); + if (match == null) { + throw StateError("Need exactly one of 'signalingSessions', 'signalingMessageWrapper' for ${b._data}"); + } + } +} + +class _$SignalingDataSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SignalingData, _$SignalingData]; + + @override + final String wireName = 'SignalingData'; + + @override + Object serialize( + final Serializers serializers, + final SignalingData object, { + final FullType specifiedType = FullType.unspecified, + }) => + object.data.value; + + @override + SignalingData deserialize( + final Serializers serializers, + final Object data, { + final FullType specifiedType = FullType.unspecified, + }) { + final result = SignalingDataBuilder()..data = JsonObject(data); + if (data is! Iterable) { + throw StateError('Expected an Iterable but got ${data.runtimeType}'); + } + String? discriminator; + final iterator = data.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + if (key == 'type') { + discriminator = value! as String; + break; + } + } + if (discriminator == 'SignalingSessions' || discriminator == 'usersInRoom') { + try { + final value = + _jsonSerializers.deserialize(data, specifiedType: const FullType(SignalingSessions))! as SignalingSessions; + result.signalingSessions.replace(value); + } catch (_) { + rethrow; + } + } + if (discriminator == 'SignalingMessageWrapper' || discriminator == 'message') { + try { + final value = _jsonSerializers.deserialize(data, specifiedType: const FullType(SignalingMessageWrapper))! + as SignalingMessageWrapper; + result.signalingMessageWrapper.replace(value); + } catch (_) { + rethrow; + } + } + return result.build(); + } } @BuiltValue(instantiable: false) abstract interface class SignalingPullMessagesResponseApplicationJson_OcsInterface { OCSMeta get meta; - BuiltList get data; + BuiltList get data; } abstract class SignalingPullMessagesResponseApplicationJson_Ocs @@ -23524,6 +23979,39 @@ abstract class SignalingPullMessagesResponseApplicationJson _$signalingPullMessagesResponseApplicationJsonSerializer; } +@BuiltValue(instantiable: false) +abstract interface class SignalingSendMessagesMessagesInterface { + String get ev; + ContentString get fn; + String get sessionId; +} + +abstract class SignalingSendMessagesMessages + implements + SignalingSendMessagesMessagesInterface, + Built { + factory SignalingSendMessagesMessages([final void Function(SignalingSendMessagesMessagesBuilder)? b]) = + _$SignalingSendMessagesMessages; + + // coverage:ignore-start + const SignalingSendMessagesMessages._(); + // coverage:ignore-end + + // coverage:ignore-start + factory SignalingSendMessagesMessages.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 => _$signalingSendMessagesMessagesSerializer; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(final SignalingSendMessagesMessagesBuilder b) => b..ev = 'message'; +} + class SignalingSendMessagesApiVersion extends EnumClass { const SignalingSendMessagesApiVersion._(super.name); @@ -25511,22 +25999,60 @@ final Serializers _serializers = (Serializers().toBuilder() SignalingPullMessagesResponseApplicationJson_Ocs.new, ) ..add(SignalingPullMessagesResponseApplicationJson_Ocs.serializer) + ..addBuilderFactory(const FullType(SignalingData), SignalingData.new) + ..add(SignalingData.serializer) + ..addBuilderFactory(const FullType(SignalingSessions), SignalingSessions.new) + ..add(SignalingSessions.serializer) + ..addBuilderFactory(const FullType(SignalingSession), SignalingSession.new) + ..add(SignalingSession.serializer) + ..addBuilderFactory(const FullType(BuiltList, [FullType(SignalingSession)]), ListBuilder.new) + ..addBuilderFactory(const FullType(SignalingMessageWrapper), SignalingMessageWrapper.new) + ..add(SignalingMessageWrapper.serializer) + ..addBuilderFactory(const FullType(SignalingMessage), SignalingMessage.new) + ..add(SignalingMessage.serializer) + ..addBuilderFactory(const FullType(SignalingSessionDescriptionMessage), SignalingSessionDescriptionMessage.new) + ..add(SignalingSessionDescriptionMessage.serializer) + ..add(SignalingMessageType.serializer) + ..add(SignalingRoomType.serializer) ..addBuilderFactory( - const FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data), - SignalingPullMessagesResponseApplicationJson_Ocs_Data.new, + const FullType(SignalingSessionDescriptionMessage_Payload), + SignalingSessionDescriptionMessage_Payload.new, ) - ..add(SignalingPullMessagesResponseApplicationJson_Ocs_Data.serializer) + ..add(SignalingSessionDescriptionMessage_Payload.serializer) + ..add(SignalingSessionDescriptionMessage_Payload_Type.serializer) + ..addBuilderFactory(const FullType(SignalingICECandidateMessage), SignalingICECandidateMessage.new) + ..add(SignalingICECandidateMessage.serializer) ..addBuilderFactory( - const FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data), - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data.new, + const FullType(SignalingICECandidateMessage_Payload), + SignalingICECandidateMessage_Payload.new, ) - ..add(SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data.serializer) - ..addBuilderFactory(const FullType(SignalingSession), SignalingSession.new) - ..add(SignalingSession.serializer) - ..addBuilderFactory(const FullType(BuiltList, [FullType(SignalingSession)]), ListBuilder.new) + ..add(SignalingICECandidateMessage_Payload.serializer) + ..addBuilderFactory( + const FullType(SignalingICECandidateMessage_Payload_Candidate), + SignalingICECandidateMessage_Payload_Candidate.new, + ) + ..add(SignalingICECandidateMessage_Payload_Candidate.serializer) + ..addBuilderFactory(const FullType(SignalingMuteMessage), SignalingMuteMessage.new) + ..add(SignalingMuteMessage.serializer) + ..addBuilderFactory(const FullType(SignalingMuteMessage_Payload), SignalingMuteMessage_Payload.new) + ..add(SignalingMuteMessage_Payload.serializer) + ..add(SignalingMuteMessage_Payload_Name.serializer) + ..addBuilderFactory( + const FullType(ContentString, [FullType(SignalingMessage)]), + ContentString.new, + ) + ..addBuilderFactory(const FullType(BuiltList, [FullType(SignalingData)]), ListBuilder.new) + ..addBuilderFactory(const FullType(SignalingSendMessagesMessages), SignalingSendMessagesMessages.new) + ..add(SignalingSendMessagesMessages.serializer) ..addBuilderFactory( - const FullType(BuiltList, [FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data)]), - ListBuilder.new, + const FullType(BuiltList, [FullType(SignalingSendMessagesMessages)]), + ListBuilder.new, + ) + ..addBuilderFactory( + const FullType(ContentString, [ + FullType(BuiltList, [FullType(SignalingSendMessagesMessages)]), + ]), + ContentString>.new, ) ..add(SignalingSendMessagesApiVersion.serializer) ..addBuilderFactory( diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.g.dart b/packages/nextcloud/lib/src/api/spreed.openapi.g.dart index 8ecbe54f..fd937cf2 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/spreed.openapi.g.dart @@ -1821,6 +1821,121 @@ final BuiltSet _$signalingPullMessagesApiVersio _$signalingPullMessagesApiVersionV3, ]); +const SignalingMessageType _$signalingMessageTypeOffer = SignalingMessageType._('offer'); +const SignalingMessageType _$signalingMessageTypeAnswer = SignalingMessageType._('answer'); +const SignalingMessageType _$signalingMessageTypeCandidate = SignalingMessageType._('candidate'); +const SignalingMessageType _$signalingMessageTypeUnshareScreen = SignalingMessageType._('unshareScreen'); +const SignalingMessageType _$signalingMessageTypeRemoveCandidates = SignalingMessageType._('removeCandidates'); +const SignalingMessageType _$signalingMessageTypeControl = SignalingMessageType._('control'); +const SignalingMessageType _$signalingMessageTypeForceMute = SignalingMessageType._('forceMute'); +const SignalingMessageType _$signalingMessageTypeMute = SignalingMessageType._('mute'); +const SignalingMessageType _$signalingMessageTypeUnmute = SignalingMessageType._('unmute'); +const SignalingMessageType _$signalingMessageTypeNickChanged = SignalingMessageType._('nickChanged'); + +SignalingMessageType _$valueOfSignalingMessageType(String name) { + switch (name) { + case 'offer': + return _$signalingMessageTypeOffer; + case 'answer': + return _$signalingMessageTypeAnswer; + case 'candidate': + return _$signalingMessageTypeCandidate; + case 'unshareScreen': + return _$signalingMessageTypeUnshareScreen; + case 'removeCandidates': + return _$signalingMessageTypeRemoveCandidates; + case 'control': + return _$signalingMessageTypeControl; + case 'forceMute': + return _$signalingMessageTypeForceMute; + case 'mute': + return _$signalingMessageTypeMute; + case 'unmute': + return _$signalingMessageTypeUnmute; + case 'nickChanged': + return _$signalingMessageTypeNickChanged; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$signalingMessageTypeValues = + BuiltSet(const [ + _$signalingMessageTypeOffer, + _$signalingMessageTypeAnswer, + _$signalingMessageTypeCandidate, + _$signalingMessageTypeUnshareScreen, + _$signalingMessageTypeRemoveCandidates, + _$signalingMessageTypeControl, + _$signalingMessageTypeForceMute, + _$signalingMessageTypeMute, + _$signalingMessageTypeUnmute, + _$signalingMessageTypeNickChanged, +]); + +const SignalingRoomType _$signalingRoomTypeVideo = SignalingRoomType._('video'); +const SignalingRoomType _$signalingRoomTypeScreen = SignalingRoomType._('screen'); + +SignalingRoomType _$valueOfSignalingRoomType(String name) { + switch (name) { + case 'video': + return _$signalingRoomTypeVideo; + case 'screen': + return _$signalingRoomTypeScreen; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$signalingRoomTypeValues = BuiltSet(const [ + _$signalingRoomTypeVideo, + _$signalingRoomTypeScreen, +]); + +const SignalingSessionDescriptionMessage_Payload_Type _$signalingSessionDescriptionMessagePayloadTypeOffer = + SignalingSessionDescriptionMessage_Payload_Type._('offer'); +const SignalingSessionDescriptionMessage_Payload_Type _$signalingSessionDescriptionMessagePayloadTypeAnswer = + SignalingSessionDescriptionMessage_Payload_Type._('answer'); + +SignalingSessionDescriptionMessage_Payload_Type _$valueOfSignalingSessionDescriptionMessage_Payload_Type(String name) { + switch (name) { + case 'offer': + return _$signalingSessionDescriptionMessagePayloadTypeOffer; + case 'answer': + return _$signalingSessionDescriptionMessagePayloadTypeAnswer; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$signalingSessionDescriptionMessagePayloadTypeValues = + BuiltSet(const [ + _$signalingSessionDescriptionMessagePayloadTypeOffer, + _$signalingSessionDescriptionMessagePayloadTypeAnswer, +]); + +const SignalingMuteMessage_Payload_Name _$signalingMuteMessagePayloadNameAudio = + SignalingMuteMessage_Payload_Name._('audio'); +const SignalingMuteMessage_Payload_Name _$signalingMuteMessagePayloadNameVideo = + SignalingMuteMessage_Payload_Name._('video'); + +SignalingMuteMessage_Payload_Name _$valueOfSignalingMuteMessage_Payload_Name(String name) { + switch (name) { + case 'audio': + return _$signalingMuteMessagePayloadNameAudio; + case 'video': + return _$signalingMuteMessagePayloadNameVideo; + default: + throw ArgumentError(name); + } +} + +final BuiltSet _$signalingMuteMessagePayloadNameValues = + BuiltSet(const [ + _$signalingMuteMessagePayloadNameAudio, + _$signalingMuteMessagePayloadNameVideo, +]); + const SignalingSendMessagesApiVersion _$signalingSendMessagesApiVersionV3 = SignalingSendMessagesApiVersion._('v3'); SignalingSendMessagesApiVersion _$valueOfSignalingSendMessagesApiVersion(String name) { @@ -2591,14 +2706,34 @@ Serializer Serializer _$signalingPullMessagesApiVersionSerializer = _$SignalingPullMessagesApiVersionSerializer(); Serializer _$signalingSessionSerializer = _$SignalingSessionSerializer(); -Serializer - _$signalingPullMessagesResponseApplicationJsonOcsDataSerializer = - _$SignalingPullMessagesResponseApplicationJson_Ocs_DataSerializer(); +Serializer _$signalingSessionsSerializer = _$SignalingSessionsSerializer(); +Serializer _$signalingMessageTypeSerializer = _$SignalingMessageTypeSerializer(); +Serializer _$signalingRoomTypeSerializer = _$SignalingRoomTypeSerializer(); +Serializer _$signalingSessionDescriptionMessagePayloadTypeSerializer = + _$SignalingSessionDescriptionMessage_Payload_TypeSerializer(); +Serializer _$signalingSessionDescriptionMessagePayloadSerializer = + _$SignalingSessionDescriptionMessage_PayloadSerializer(); +Serializer _$signalingSessionDescriptionMessageSerializer = + _$SignalingSessionDescriptionMessageSerializer(); +Serializer _$signalingICECandidateMessagePayloadCandidateSerializer = + _$SignalingICECandidateMessage_Payload_CandidateSerializer(); +Serializer _$signalingICECandidateMessagePayloadSerializer = + _$SignalingICECandidateMessage_PayloadSerializer(); +Serializer _$signalingICECandidateMessageSerializer = + _$SignalingICECandidateMessageSerializer(); +Serializer _$signalingMuteMessagePayloadNameSerializer = + _$SignalingMuteMessage_Payload_NameSerializer(); +Serializer _$signalingMuteMessagePayloadSerializer = + _$SignalingMuteMessage_PayloadSerializer(); +Serializer _$signalingMuteMessageSerializer = _$SignalingMuteMessageSerializer(); +Serializer _$signalingMessageWrapperSerializer = _$SignalingMessageWrapperSerializer(); Serializer _$signalingPullMessagesResponseApplicationJsonOcsSerializer = _$SignalingPullMessagesResponseApplicationJson_OcsSerializer(); Serializer _$signalingPullMessagesResponseApplicationJsonSerializer = _$SignalingPullMessagesResponseApplicationJsonSerializer(); +Serializer _$signalingSendMessagesMessagesSerializer = + _$SignalingSendMessagesMessagesSerializer(); Serializer _$signalingSendMessagesApiVersionSerializer = _$SignalingSendMessagesApiVersionSerializer(); Serializer @@ -16854,35 +16989,562 @@ class _$SignalingSessionSerializer implements StructuredSerializer { +class _$SignalingSessionsSerializer implements StructuredSerializer { + @override + final Iterable types = const [SignalingSessions, _$SignalingSessions]; + @override + final String wireName = 'SignalingSessions'; + + @override + Iterable serialize(Serializers serializers, SignalingSessions object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'type', + serializers.serialize(object.type, specifiedType: const FullType(String)), + 'data', + serializers.serialize(object.data, specifiedType: const FullType(BuiltList, [FullType(SignalingSession)])), + ]; + + return result; + } + + @override + SignalingSessions deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingSessionsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'type': + result.type = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'data': + result.data.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(SignalingSession)]))! as BuiltList); + break; + } + } + + return result.build(); + } +} + +class _$SignalingMessageTypeSerializer implements PrimitiveSerializer { + static const Map _toWire = { + 'removeCandidates': 'remove-candidates', + }; + static const Map _fromWire = { + 'remove-candidates': 'removeCandidates', + }; + + @override + final Iterable types = const [SignalingMessageType]; + @override + final String wireName = 'SignalingMessageType'; + + @override + Object serialize(Serializers serializers, SignalingMessageType object, + {FullType specifiedType = FullType.unspecified}) => + _toWire[object.name] ?? object.name; + + @override + SignalingMessageType deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + SignalingMessageType.valueOf(_fromWire[serialized] ?? (serialized is String ? serialized : '')); +} + +class _$SignalingRoomTypeSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SignalingRoomType]; + @override + final String wireName = 'SignalingRoomType'; + + @override + Object serialize(Serializers serializers, SignalingRoomType object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + SignalingRoomType deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + SignalingRoomType.valueOf(serialized as String); +} + +class _$SignalingSessionDescriptionMessage_Payload_TypeSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [SignalingSessionDescriptionMessage_Payload_Type]; + @override + final String wireName = 'SignalingSessionDescriptionMessage_Payload_Type'; + + @override + Object serialize(Serializers serializers, SignalingSessionDescriptionMessage_Payload_Type object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + SignalingSessionDescriptionMessage_Payload_Type deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + SignalingSessionDescriptionMessage_Payload_Type.valueOf(serialized as String); +} + +class _$SignalingSessionDescriptionMessage_PayloadSerializer + implements StructuredSerializer { @override final Iterable types = const [ - SignalingPullMessagesResponseApplicationJson_Ocs_Data, - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data + SignalingSessionDescriptionMessage_Payload, + _$SignalingSessionDescriptionMessage_Payload ]; @override - final String wireName = 'SignalingPullMessagesResponseApplicationJson_Ocs_Data'; + final String wireName = 'SignalingSessionDescriptionMessage_Payload'; + + @override + Iterable serialize(Serializers serializers, SignalingSessionDescriptionMessage_Payload object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'type', + serializers.serialize(object.type, + specifiedType: const FullType(SignalingSessionDescriptionMessage_Payload_Type)), + 'sdp', + serializers.serialize(object.sdp, specifiedType: const FullType(String)), + 'nick', + serializers.serialize(object.nick, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + SignalingSessionDescriptionMessage_Payload deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingSessionDescriptionMessage_PayloadBuilder(); + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'type': + result.type = serializers.deserialize(value, + specifiedType: const FullType(SignalingSessionDescriptionMessage_Payload_Type))! + as SignalingSessionDescriptionMessage_Payload_Type; + break; + case 'sdp': + result.sdp = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'nick': + result.nick = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + } + } + + return result.build(); + } +} + +class _$SignalingSessionDescriptionMessageSerializer + implements StructuredSerializer { @override - Iterable serialize(Serializers serializers, SignalingPullMessagesResponseApplicationJson_Ocs_Data object, + final Iterable types = const [SignalingSessionDescriptionMessage, _$SignalingSessionDescriptionMessage]; + @override + final String wireName = 'SignalingSessionDescriptionMessage'; + + @override + Iterable serialize(Serializers serializers, SignalingSessionDescriptionMessage object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'from', + serializers.serialize(object.from, specifiedType: const FullType(String)), + 'to', + serializers.serialize(object.to, specifiedType: const FullType(String)), + 'type', + serializers.serialize(object.type, specifiedType: const FullType(SignalingMessageType)), + 'payload', + serializers.serialize(object.payload, specifiedType: const FullType(SignalingSessionDescriptionMessage_Payload)), + ]; + Object? value; + value = object.roomType; + if (value != null) { + result + ..add('roomType') + ..add(serializers.serialize(value, specifiedType: const FullType(SignalingRoomType))); + } + value = object.sid; + if (value != null) { + result + ..add('sid') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + SignalingSessionDescriptionMessage deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingSessionDescriptionMessageBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'from': + result.from = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'to': + result.to = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'type': + result.type = serializers.deserialize(value, specifiedType: const FullType(SignalingMessageType))! + as SignalingMessageType; + break; + case 'roomType': + result.roomType = + serializers.deserialize(value, specifiedType: const FullType(SignalingRoomType)) as SignalingRoomType?; + break; + case 'sid': + result.sid = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'payload': + result.payload.replace( + serializers.deserialize(value, specifiedType: const FullType(SignalingSessionDescriptionMessage_Payload))! + as SignalingSessionDescriptionMessage_Payload); + break; + } + } + + return result.build(); + } +} + +class _$SignalingICECandidateMessage_Payload_CandidateSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + SignalingICECandidateMessage_Payload_Candidate, + _$SignalingICECandidateMessage_Payload_Candidate + ]; + @override + final String wireName = 'SignalingICECandidateMessage_Payload_Candidate'; + + @override + Iterable serialize(Serializers serializers, SignalingICECandidateMessage_Payload_Candidate object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'sdpMLineIndex', + serializers.serialize(object.sdpMLineIndex, specifiedType: const FullType(int)), + 'sdpMid', + serializers.serialize(object.sdpMid, specifiedType: const FullType(String)), + 'candidate', + serializers.serialize(object.candidate, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + SignalingICECandidateMessage_Payload_Candidate deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingICECandidateMessage_Payload_CandidateBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'sdpMLineIndex': + result.sdpMLineIndex = serializers.deserialize(value, specifiedType: const FullType(int))! as int; + break; + case 'sdpMid': + result.sdpMid = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'candidate': + result.candidate = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + } + } + + return result.build(); + } +} + +class _$SignalingICECandidateMessage_PayloadSerializer + implements StructuredSerializer { + @override + final Iterable types = const [SignalingICECandidateMessage_Payload, _$SignalingICECandidateMessage_Payload]; + @override + final String wireName = 'SignalingICECandidateMessage_Payload'; + + @override + Iterable serialize(Serializers serializers, SignalingICECandidateMessage_Payload object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'candidate', + serializers.serialize(object.candidate, + specifiedType: const FullType(SignalingICECandidateMessage_Payload_Candidate)), + ]; + + return result; + } + + @override + SignalingICECandidateMessage_Payload deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingICECandidateMessage_PayloadBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'candidate': + result.candidate.replace(serializers.deserialize(value, + specifiedType: const FullType(SignalingICECandidateMessage_Payload_Candidate))! + as SignalingICECandidateMessage_Payload_Candidate); + break; + } + } + + return result.build(); + } +} + +class _$SignalingICECandidateMessageSerializer implements StructuredSerializer { + @override + final Iterable types = const [SignalingICECandidateMessage, _$SignalingICECandidateMessage]; + @override + final String wireName = 'SignalingICECandidateMessage'; + + @override + Iterable serialize(Serializers serializers, SignalingICECandidateMessage object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'from', + serializers.serialize(object.from, specifiedType: const FullType(String)), + 'to', + serializers.serialize(object.to, specifiedType: const FullType(String)), + 'type', + serializers.serialize(object.type, specifiedType: const FullType(SignalingMessageType)), + 'payload', + serializers.serialize(object.payload, specifiedType: const FullType(SignalingICECandidateMessage_Payload)), + ]; + Object? value; + value = object.roomType; + if (value != null) { + result + ..add('roomType') + ..add(serializers.serialize(value, specifiedType: const FullType(SignalingRoomType))); + } + value = object.sid; + if (value != null) { + result + ..add('sid') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + SignalingICECandidateMessage deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingICECandidateMessageBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'from': + result.from = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'to': + result.to = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'type': + result.type = serializers.deserialize(value, specifiedType: const FullType(SignalingMessageType))! + as SignalingMessageType; + break; + case 'roomType': + result.roomType = + serializers.deserialize(value, specifiedType: const FullType(SignalingRoomType)) as SignalingRoomType?; + break; + case 'sid': + result.sid = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'payload': + result.payload.replace( + serializers.deserialize(value, specifiedType: const FullType(SignalingICECandidateMessage_Payload))! + as SignalingICECandidateMessage_Payload); + break; + } + } + + return result.build(); + } +} + +class _$SignalingMuteMessage_Payload_NameSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SignalingMuteMessage_Payload_Name]; + @override + final String wireName = 'SignalingMuteMessage_Payload_Name'; + + @override + Object serialize(Serializers serializers, SignalingMuteMessage_Payload_Name object, + {FullType specifiedType = FullType.unspecified}) => + object.name; + + @override + SignalingMuteMessage_Payload_Name deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) => + SignalingMuteMessage_Payload_Name.valueOf(serialized as String); +} + +class _$SignalingMuteMessage_PayloadSerializer implements StructuredSerializer { + @override + final Iterable types = const [SignalingMuteMessage_Payload, _$SignalingMuteMessage_Payload]; + @override + final String wireName = 'SignalingMuteMessage_Payload'; + + @override + Iterable serialize(Serializers serializers, SignalingMuteMessage_Payload object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'name', + serializers.serialize(object.name, specifiedType: const FullType(SignalingMuteMessage_Payload_Name)), + ]; + + return result; + } + + @override + SignalingMuteMessage_Payload deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingMuteMessage_PayloadBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(SignalingMuteMessage_Payload_Name))! as SignalingMuteMessage_Payload_Name; + break; + } + } + + return result.build(); + } +} + +class _$SignalingMuteMessageSerializer implements StructuredSerializer { + @override + final Iterable types = const [SignalingMuteMessage, _$SignalingMuteMessage]; + @override + final String wireName = 'SignalingMuteMessage'; + + @override + Iterable serialize(Serializers serializers, SignalingMuteMessage object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'from', + serializers.serialize(object.from, specifiedType: const FullType(String)), + 'to', + serializers.serialize(object.to, specifiedType: const FullType(String)), + 'type', + serializers.serialize(object.type, specifiedType: const FullType(SignalingMessageType)), + 'payload', + serializers.serialize(object.payload, specifiedType: const FullType(SignalingMuteMessage_Payload)), + ]; + Object? value; + value = object.roomType; + if (value != null) { + result + ..add('roomType') + ..add(serializers.serialize(value, specifiedType: const FullType(SignalingRoomType))); + } + value = object.sid; + if (value != null) { + result + ..add('sid') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + SignalingMuteMessage deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingMuteMessageBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'from': + result.from = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'to': + result.to = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'type': + result.type = serializers.deserialize(value, specifiedType: const FullType(SignalingMessageType))! + as SignalingMessageType; + break; + case 'roomType': + result.roomType = + serializers.deserialize(value, specifiedType: const FullType(SignalingRoomType)) as SignalingRoomType?; + break; + case 'sid': + result.sid = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + case 'payload': + result.payload.replace(serializers.deserialize(value, + specifiedType: const FullType(SignalingMuteMessage_Payload))! as SignalingMuteMessage_Payload); + break; + } + } + + return result.build(); + } +} + +class _$SignalingMessageWrapperSerializer implements StructuredSerializer { + @override + final Iterable types = const [SignalingMessageWrapper, _$SignalingMessageWrapper]; + @override + final String wireName = 'SignalingMessageWrapper'; + + @override + Iterable serialize(Serializers serializers, SignalingMessageWrapper object, {FullType specifiedType = FullType.unspecified}) { final result = [ 'type', serializers.serialize(object.type, specifiedType: const FullType(String)), 'data', - serializers.serialize(object.data, - specifiedType: const FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data)), + serializers.serialize(object.data, specifiedType: const FullType(ContentString, [FullType(SignalingMessage)])), ]; return result; } @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data deserialize( - Serializers serializers, Iterable serialized, + SignalingMessageWrapper deserialize(Serializers serializers, Iterable serialized, {FullType specifiedType = FullType.unspecified}) { - final result = SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder(); + final result = SignalingMessageWrapperBuilder(); final iterator = serialized.iterator; while (iterator.moveNext()) { @@ -16895,8 +17557,8 @@ class _$SignalingPullMessagesResponseApplicationJson_Ocs_DataSerializer break; case 'data': result.data.replace(serializers.deserialize(value, - specifiedType: const FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data))! - as SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data); + specifiedType: const FullType(ContentString, [FullType(SignalingMessage)]))! + as ContentString); break; } } @@ -16922,8 +17584,7 @@ class _$SignalingPullMessagesResponseApplicationJson_OcsSerializer 'meta', serializers.serialize(object.meta, specifiedType: const FullType(OCSMeta)), 'data', - serializers.serialize(object.data, - specifiedType: const FullType(BuiltList, [FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data)])), + serializers.serialize(object.data, specifiedType: const FullType(BuiltList, [FullType(SignalingData)])), ]; return result; @@ -16945,9 +17606,7 @@ class _$SignalingPullMessagesResponseApplicationJson_OcsSerializer break; case 'data': result.data.replace(serializers.deserialize(value, - specifiedType: - const FullType(BuiltList, [FullType(SignalingPullMessagesResponseApplicationJson_Ocs_Data)]))! - as BuiltList); + specifiedType: const FullType(BuiltList, [FullType(SignalingData)]))! as BuiltList); break; } } @@ -17001,6 +17660,56 @@ class _$SignalingPullMessagesResponseApplicationJsonSerializer } } +class _$SignalingSendMessagesMessagesSerializer implements StructuredSerializer { + @override + final Iterable types = const [SignalingSendMessagesMessages, _$SignalingSendMessagesMessages]; + @override + final String wireName = 'SignalingSendMessagesMessages'; + + @override + Iterable serialize(Serializers serializers, SignalingSendMessagesMessages object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'ev', + serializers.serialize(object.ev, specifiedType: const FullType(String)), + 'fn', + serializers.serialize(object.fn, specifiedType: const FullType(ContentString, [FullType(SignalingMessage)])), + 'sessionId', + serializers.serialize(object.sessionId, specifiedType: const FullType(String)), + ]; + + return result; + } + + @override + SignalingSendMessagesMessages deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = SignalingSendMessagesMessagesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'ev': + result.ev = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + case 'fn': + result.fn.replace(serializers.deserialize(value, + specifiedType: const FullType(ContentString, [FullType(SignalingMessage)]))! + as ContentString); + break; + case 'sessionId': + result.sessionId = serializers.deserialize(value, specifiedType: const FullType(String))! as String; + break; + } + } + + return result.build(); + } +} + class _$SignalingSendMessagesApiVersionSerializer implements PrimitiveSerializer { @override final Iterable types = const [SignalingSendMessagesApiVersion]; @@ -50013,139 +50722,1255 @@ class SignalingSessionBuilder } } -abstract mixin class SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataInterfaceBuilder { - void replace(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataInterface other); - void update(void Function(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataInterfaceBuilder) updates); - ListBuilder get builtListSignalingSession; - set builtListSignalingSession(ListBuilder? builtListSignalingSession); +abstract mixin class SignalingSessionsInterfaceBuilder { + void replace(SignalingSessionsInterface other); + void update(void Function(SignalingSessionsInterfaceBuilder) updates); + String? get type; + set type(String? type); - String? get string; - set string(String? string); + ListBuilder get data; + set data(ListBuilder? data); } -class _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data - extends SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data { +class _$SignalingSessions extends SignalingSessions { @override - final JsonObject data; + final String type; + @override + final BuiltList data; + + factory _$SignalingSessions([void Function(SignalingSessionsBuilder)? updates]) => + (SignalingSessionsBuilder()..update(updates))._build(); + + _$SignalingSessions._({required this.type, required this.data}) : super._() { + BuiltValueNullFieldError.checkNotNull(type, r'SignalingSessions', 'type'); + BuiltValueNullFieldError.checkNotNull(data, r'SignalingSessions', 'data'); + } + @override - final BuiltList? builtListSignalingSession; + SignalingSessions rebuild(void Function(SignalingSessionsBuilder) updates) => (toBuilder()..update(updates)).build(); + @override - final String? string; + SignalingSessionsBuilder toBuilder() => SignalingSessionsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingSessions && type == other.type && data == other.data; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingSessions') + ..add('type', type) + ..add('data', data)) + .toString(); + } +} + +class SignalingSessionsBuilder + implements Builder, SignalingSessionsInterfaceBuilder { + _$SignalingSessions? _$v; + + String? _type; + String? get type => _$this._type; + set type(covariant String? type) => _$this._type = type; + + ListBuilder? _data; + ListBuilder get data => _$this._data ??= ListBuilder(); + set data(covariant ListBuilder? data) => _$this._data = data; + + SignalingSessionsBuilder(); + + SignalingSessionsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _type = $v.type; + _data = $v.data.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingSessions other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingSessions; + } + + @override + void update(void Function(SignalingSessionsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingSessions build() => _build(); + + _$SignalingSessions _build() { + _$SignalingSessions _$result; + try { + _$result = _$v ?? + _$SignalingSessions._( + type: BuiltValueNullFieldError.checkNotNull(type, r'SignalingSessions', 'type'), data: data.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'data'; + data.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingSessions', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingSessionDescriptionMessage_PayloadInterfaceBuilder { + void replace(SignalingSessionDescriptionMessage_PayloadInterface other); + void update(void Function(SignalingSessionDescriptionMessage_PayloadInterfaceBuilder) updates); + SignalingSessionDescriptionMessage_Payload_Type? get type; + set type(SignalingSessionDescriptionMessage_Payload_Type? type); + + String? get sdp; + set sdp(String? sdp); + + String? get nick; + set nick(String? nick); +} + +class _$SignalingSessionDescriptionMessage_Payload extends SignalingSessionDescriptionMessage_Payload { + @override + final SignalingSessionDescriptionMessage_Payload_Type type; + @override + final String sdp; + @override + final String nick; + + factory _$SignalingSessionDescriptionMessage_Payload( + [void Function(SignalingSessionDescriptionMessage_PayloadBuilder)? updates]) => + (SignalingSessionDescriptionMessage_PayloadBuilder()..update(updates))._build(); + + _$SignalingSessionDescriptionMessage_Payload._({required this.type, required this.sdp, required this.nick}) + : super._() { + BuiltValueNullFieldError.checkNotNull(type, r'SignalingSessionDescriptionMessage_Payload', 'type'); + BuiltValueNullFieldError.checkNotNull(sdp, r'SignalingSessionDescriptionMessage_Payload', 'sdp'); + BuiltValueNullFieldError.checkNotNull(nick, r'SignalingSessionDescriptionMessage_Payload', 'nick'); + } + + @override + SignalingSessionDescriptionMessage_Payload rebuild( + void Function(SignalingSessionDescriptionMessage_PayloadBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingSessionDescriptionMessage_PayloadBuilder toBuilder() => + SignalingSessionDescriptionMessage_PayloadBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingSessionDescriptionMessage_Payload && + type == other.type && + sdp == other.sdp && + nick == other.nick; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, sdp.hashCode); + _$hash = $jc(_$hash, nick.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingSessionDescriptionMessage_Payload') + ..add('type', type) + ..add('sdp', sdp) + ..add('nick', nick)) + .toString(); + } +} + +class SignalingSessionDescriptionMessage_PayloadBuilder + implements + Builder, + SignalingSessionDescriptionMessage_PayloadInterfaceBuilder { + _$SignalingSessionDescriptionMessage_Payload? _$v; + + SignalingSessionDescriptionMessage_Payload_Type? _type; + SignalingSessionDescriptionMessage_Payload_Type? get type => _$this._type; + set type(covariant SignalingSessionDescriptionMessage_Payload_Type? type) => _$this._type = type; + + String? _sdp; + String? get sdp => _$this._sdp; + set sdp(covariant String? sdp) => _$this._sdp = sdp; + + String? _nick; + String? get nick => _$this._nick; + set nick(covariant String? nick) => _$this._nick = nick; + + SignalingSessionDescriptionMessage_PayloadBuilder(); + + SignalingSessionDescriptionMessage_PayloadBuilder get _$this { + final $v = _$v; + if ($v != null) { + _type = $v.type; + _sdp = $v.sdp; + _nick = $v.nick; + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingSessionDescriptionMessage_Payload other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingSessionDescriptionMessage_Payload; + } + + @override + void update(void Function(SignalingSessionDescriptionMessage_PayloadBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingSessionDescriptionMessage_Payload build() => _build(); + + _$SignalingSessionDescriptionMessage_Payload _build() { + final _$result = _$v ?? + _$SignalingSessionDescriptionMessage_Payload._( + type: BuiltValueNullFieldError.checkNotNull(type, r'SignalingSessionDescriptionMessage_Payload', 'type'), + sdp: BuiltValueNullFieldError.checkNotNull(sdp, r'SignalingSessionDescriptionMessage_Payload', 'sdp'), + nick: BuiltValueNullFieldError.checkNotNull(nick, r'SignalingSessionDescriptionMessage_Payload', 'nick')); + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingSessionDescriptionMessageInterfaceBuilder { + void replace(SignalingSessionDescriptionMessageInterface other); + void update(void Function(SignalingSessionDescriptionMessageInterfaceBuilder) updates); + String? get from; + set from(String? from); + + String? get to; + set to(String? to); + + SignalingMessageType? get type; + set type(SignalingMessageType? type); + + SignalingRoomType? get roomType; + set roomType(SignalingRoomType? roomType); + + String? get sid; + set sid(String? sid); + + SignalingSessionDescriptionMessage_PayloadBuilder get payload; + set payload(SignalingSessionDescriptionMessage_PayloadBuilder? payload); +} + +class _$SignalingSessionDescriptionMessage extends SignalingSessionDescriptionMessage { + @override + final String from; + @override + final String to; + @override + final SignalingMessageType type; + @override + final SignalingRoomType? roomType; + @override + final String? sid; + @override + final SignalingSessionDescriptionMessage_Payload payload; + + factory _$SignalingSessionDescriptionMessage([void Function(SignalingSessionDescriptionMessageBuilder)? updates]) => + (SignalingSessionDescriptionMessageBuilder()..update(updates))._build(); + + _$SignalingSessionDescriptionMessage._( + {required this.from, required this.to, required this.type, this.roomType, this.sid, required this.payload}) + : super._() { + BuiltValueNullFieldError.checkNotNull(from, r'SignalingSessionDescriptionMessage', 'from'); + BuiltValueNullFieldError.checkNotNull(to, r'SignalingSessionDescriptionMessage', 'to'); + BuiltValueNullFieldError.checkNotNull(type, r'SignalingSessionDescriptionMessage', 'type'); + BuiltValueNullFieldError.checkNotNull(payload, r'SignalingSessionDescriptionMessage', 'payload'); + } + + @override + SignalingSessionDescriptionMessage rebuild(void Function(SignalingSessionDescriptionMessageBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingSessionDescriptionMessageBuilder toBuilder() => SignalingSessionDescriptionMessageBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingSessionDescriptionMessage && + from == other.from && + to == other.to && + type == other.type && + roomType == other.roomType && + sid == other.sid && + payload == other.payload; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, from.hashCode); + _$hash = $jc(_$hash, to.hashCode); + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, roomType.hashCode); + _$hash = $jc(_$hash, sid.hashCode); + _$hash = $jc(_$hash, payload.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingSessionDescriptionMessage') + ..add('from', from) + ..add('to', to) + ..add('type', type) + ..add('roomType', roomType) + ..add('sid', sid) + ..add('payload', payload)) + .toString(); + } +} + +class SignalingSessionDescriptionMessageBuilder + implements + Builder, + SignalingSessionDescriptionMessageInterfaceBuilder { + _$SignalingSessionDescriptionMessage? _$v; + + String? _from; + String? get from => _$this._from; + set from(covariant String? from) => _$this._from = from; + + String? _to; + String? get to => _$this._to; + set to(covariant String? to) => _$this._to = to; + + SignalingMessageType? _type; + SignalingMessageType? get type => _$this._type; + set type(covariant SignalingMessageType? type) => _$this._type = type; + + SignalingRoomType? _roomType; + SignalingRoomType? get roomType => _$this._roomType; + set roomType(covariant SignalingRoomType? roomType) => _$this._roomType = roomType; + + String? _sid; + String? get sid => _$this._sid; + set sid(covariant String? sid) => _$this._sid = sid; + + SignalingSessionDescriptionMessage_PayloadBuilder? _payload; + SignalingSessionDescriptionMessage_PayloadBuilder get payload => + _$this._payload ??= SignalingSessionDescriptionMessage_PayloadBuilder(); + set payload(covariant SignalingSessionDescriptionMessage_PayloadBuilder? payload) => _$this._payload = payload; + + SignalingSessionDescriptionMessageBuilder(); + + SignalingSessionDescriptionMessageBuilder get _$this { + final $v = _$v; + if ($v != null) { + _from = $v.from; + _to = $v.to; + _type = $v.type; + _roomType = $v.roomType; + _sid = $v.sid; + _payload = $v.payload.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingSessionDescriptionMessage other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingSessionDescriptionMessage; + } + + @override + void update(void Function(SignalingSessionDescriptionMessageBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingSessionDescriptionMessage build() => _build(); + + _$SignalingSessionDescriptionMessage _build() { + _$SignalingSessionDescriptionMessage _$result; + try { + _$result = _$v ?? + _$SignalingSessionDescriptionMessage._( + from: BuiltValueNullFieldError.checkNotNull(from, r'SignalingSessionDescriptionMessage', 'from'), + to: BuiltValueNullFieldError.checkNotNull(to, r'SignalingSessionDescriptionMessage', 'to'), + type: BuiltValueNullFieldError.checkNotNull(type, r'SignalingSessionDescriptionMessage', 'type'), + roomType: roomType, + sid: sid, + payload: payload.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'payload'; + payload.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingSessionDescriptionMessage', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingICECandidateMessage_Payload_CandidateInterfaceBuilder { + void replace(SignalingICECandidateMessage_Payload_CandidateInterface other); + void update(void Function(SignalingICECandidateMessage_Payload_CandidateInterfaceBuilder) updates); + int? get sdpMLineIndex; + set sdpMLineIndex(int? sdpMLineIndex); + + String? get sdpMid; + set sdpMid(String? sdpMid); + + String? get candidate; + set candidate(String? candidate); +} + +class _$SignalingICECandidateMessage_Payload_Candidate extends SignalingICECandidateMessage_Payload_Candidate { + @override + final int sdpMLineIndex; + @override + final String sdpMid; + @override + final String candidate; + + factory _$SignalingICECandidateMessage_Payload_Candidate( + [void Function(SignalingICECandidateMessage_Payload_CandidateBuilder)? updates]) => + (SignalingICECandidateMessage_Payload_CandidateBuilder()..update(updates))._build(); + + _$SignalingICECandidateMessage_Payload_Candidate._( + {required this.sdpMLineIndex, required this.sdpMid, required this.candidate}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + sdpMLineIndex, r'SignalingICECandidateMessage_Payload_Candidate', 'sdpMLineIndex'); + BuiltValueNullFieldError.checkNotNull(sdpMid, r'SignalingICECandidateMessage_Payload_Candidate', 'sdpMid'); + BuiltValueNullFieldError.checkNotNull(candidate, r'SignalingICECandidateMessage_Payload_Candidate', 'candidate'); + } + + @override + SignalingICECandidateMessage_Payload_Candidate rebuild( + void Function(SignalingICECandidateMessage_Payload_CandidateBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingICECandidateMessage_Payload_CandidateBuilder toBuilder() => + SignalingICECandidateMessage_Payload_CandidateBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingICECandidateMessage_Payload_Candidate && + sdpMLineIndex == other.sdpMLineIndex && + sdpMid == other.sdpMid && + candidate == other.candidate; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, sdpMLineIndex.hashCode); + _$hash = $jc(_$hash, sdpMid.hashCode); + _$hash = $jc(_$hash, candidate.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingICECandidateMessage_Payload_Candidate') + ..add('sdpMLineIndex', sdpMLineIndex) + ..add('sdpMid', sdpMid) + ..add('candidate', candidate)) + .toString(); + } +} + +class SignalingICECandidateMessage_Payload_CandidateBuilder + implements + Builder, + SignalingICECandidateMessage_Payload_CandidateInterfaceBuilder { + _$SignalingICECandidateMessage_Payload_Candidate? _$v; + + int? _sdpMLineIndex; + int? get sdpMLineIndex => _$this._sdpMLineIndex; + set sdpMLineIndex(covariant int? sdpMLineIndex) => _$this._sdpMLineIndex = sdpMLineIndex; + + String? _sdpMid; + String? get sdpMid => _$this._sdpMid; + set sdpMid(covariant String? sdpMid) => _$this._sdpMid = sdpMid; + + String? _candidate; + String? get candidate => _$this._candidate; + set candidate(covariant String? candidate) => _$this._candidate = candidate; + + SignalingICECandidateMessage_Payload_CandidateBuilder(); + + SignalingICECandidateMessage_Payload_CandidateBuilder get _$this { + final $v = _$v; + if ($v != null) { + _sdpMLineIndex = $v.sdpMLineIndex; + _sdpMid = $v.sdpMid; + _candidate = $v.candidate; + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingICECandidateMessage_Payload_Candidate other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingICECandidateMessage_Payload_Candidate; + } + + @override + void update(void Function(SignalingICECandidateMessage_Payload_CandidateBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingICECandidateMessage_Payload_Candidate build() => _build(); + + _$SignalingICECandidateMessage_Payload_Candidate _build() { + final _$result = _$v ?? + _$SignalingICECandidateMessage_Payload_Candidate._( + sdpMLineIndex: BuiltValueNullFieldError.checkNotNull( + sdpMLineIndex, r'SignalingICECandidateMessage_Payload_Candidate', 'sdpMLineIndex'), + sdpMid: BuiltValueNullFieldError.checkNotNull( + sdpMid, r'SignalingICECandidateMessage_Payload_Candidate', 'sdpMid'), + candidate: BuiltValueNullFieldError.checkNotNull( + candidate, r'SignalingICECandidateMessage_Payload_Candidate', 'candidate')); + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingICECandidateMessage_PayloadInterfaceBuilder { + void replace(SignalingICECandidateMessage_PayloadInterface other); + void update(void Function(SignalingICECandidateMessage_PayloadInterfaceBuilder) updates); + SignalingICECandidateMessage_Payload_CandidateBuilder get candidate; + set candidate(SignalingICECandidateMessage_Payload_CandidateBuilder? candidate); +} + +class _$SignalingICECandidateMessage_Payload extends SignalingICECandidateMessage_Payload { + @override + final SignalingICECandidateMessage_Payload_Candidate candidate; + + factory _$SignalingICECandidateMessage_Payload( + [void Function(SignalingICECandidateMessage_PayloadBuilder)? updates]) => + (SignalingICECandidateMessage_PayloadBuilder()..update(updates))._build(); + + _$SignalingICECandidateMessage_Payload._({required this.candidate}) : super._() { + BuiltValueNullFieldError.checkNotNull(candidate, r'SignalingICECandidateMessage_Payload', 'candidate'); + } + + @override + SignalingICECandidateMessage_Payload rebuild(void Function(SignalingICECandidateMessage_PayloadBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingICECandidateMessage_PayloadBuilder toBuilder() => + SignalingICECandidateMessage_PayloadBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingICECandidateMessage_Payload && candidate == other.candidate; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, candidate.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingICECandidateMessage_Payload')..add('candidate', candidate)) + .toString(); + } +} + +class SignalingICECandidateMessage_PayloadBuilder + implements + Builder, + SignalingICECandidateMessage_PayloadInterfaceBuilder { + _$SignalingICECandidateMessage_Payload? _$v; + + SignalingICECandidateMessage_Payload_CandidateBuilder? _candidate; + SignalingICECandidateMessage_Payload_CandidateBuilder get candidate => + _$this._candidate ??= SignalingICECandidateMessage_Payload_CandidateBuilder(); + set candidate(covariant SignalingICECandidateMessage_Payload_CandidateBuilder? candidate) => + _$this._candidate = candidate; + + SignalingICECandidateMessage_PayloadBuilder(); + + SignalingICECandidateMessage_PayloadBuilder get _$this { + final $v = _$v; + if ($v != null) { + _candidate = $v.candidate.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingICECandidateMessage_Payload other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingICECandidateMessage_Payload; + } + + @override + void update(void Function(SignalingICECandidateMessage_PayloadBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingICECandidateMessage_Payload build() => _build(); + + _$SignalingICECandidateMessage_Payload _build() { + _$SignalingICECandidateMessage_Payload _$result; + try { + _$result = _$v ?? _$SignalingICECandidateMessage_Payload._(candidate: candidate.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'candidate'; + candidate.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingICECandidateMessage_Payload', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingICECandidateMessageInterfaceBuilder { + void replace(SignalingICECandidateMessageInterface other); + void update(void Function(SignalingICECandidateMessageInterfaceBuilder) updates); + String? get from; + set from(String? from); + + String? get to; + set to(String? to); + + SignalingMessageType? get type; + set type(SignalingMessageType? type); - factory _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data( - [void Function(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder)? updates]) => - (SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder()..update(updates))._build(); + SignalingRoomType? get roomType; + set roomType(SignalingRoomType? roomType); - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data._( - {required this.data, this.builtListSignalingSession, this.string}) + String? get sid; + set sid(String? sid); + + SignalingICECandidateMessage_PayloadBuilder get payload; + set payload(SignalingICECandidateMessage_PayloadBuilder? payload); +} + +class _$SignalingICECandidateMessage extends SignalingICECandidateMessage { + @override + final String from; + @override + final String to; + @override + final SignalingMessageType type; + @override + final SignalingRoomType? roomType; + @override + final String? sid; + @override + final SignalingICECandidateMessage_Payload payload; + + factory _$SignalingICECandidateMessage([void Function(SignalingICECandidateMessageBuilder)? updates]) => + (SignalingICECandidateMessageBuilder()..update(updates))._build(); + + _$SignalingICECandidateMessage._( + {required this.from, required this.to, required this.type, this.roomType, this.sid, required this.payload}) + : super._() { + BuiltValueNullFieldError.checkNotNull(from, r'SignalingICECandidateMessage', 'from'); + BuiltValueNullFieldError.checkNotNull(to, r'SignalingICECandidateMessage', 'to'); + BuiltValueNullFieldError.checkNotNull(type, r'SignalingICECandidateMessage', 'type'); + BuiltValueNullFieldError.checkNotNull(payload, r'SignalingICECandidateMessage', 'payload'); + } + + @override + SignalingICECandidateMessage rebuild(void Function(SignalingICECandidateMessageBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingICECandidateMessageBuilder toBuilder() => SignalingICECandidateMessageBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingICECandidateMessage && + from == other.from && + to == other.to && + type == other.type && + roomType == other.roomType && + sid == other.sid && + payload == other.payload; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, from.hashCode); + _$hash = $jc(_$hash, to.hashCode); + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, roomType.hashCode); + _$hash = $jc(_$hash, sid.hashCode); + _$hash = $jc(_$hash, payload.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingICECandidateMessage') + ..add('from', from) + ..add('to', to) + ..add('type', type) + ..add('roomType', roomType) + ..add('sid', sid) + ..add('payload', payload)) + .toString(); + } +} + +class SignalingICECandidateMessageBuilder + implements + Builder, + SignalingICECandidateMessageInterfaceBuilder { + _$SignalingICECandidateMessage? _$v; + + String? _from; + String? get from => _$this._from; + set from(covariant String? from) => _$this._from = from; + + String? _to; + String? get to => _$this._to; + set to(covariant String? to) => _$this._to = to; + + SignalingMessageType? _type; + SignalingMessageType? get type => _$this._type; + set type(covariant SignalingMessageType? type) => _$this._type = type; + + SignalingRoomType? _roomType; + SignalingRoomType? get roomType => _$this._roomType; + set roomType(covariant SignalingRoomType? roomType) => _$this._roomType = roomType; + + String? _sid; + String? get sid => _$this._sid; + set sid(covariant String? sid) => _$this._sid = sid; + + SignalingICECandidateMessage_PayloadBuilder? _payload; + SignalingICECandidateMessage_PayloadBuilder get payload => + _$this._payload ??= SignalingICECandidateMessage_PayloadBuilder(); + set payload(covariant SignalingICECandidateMessage_PayloadBuilder? payload) => _$this._payload = payload; + + SignalingICECandidateMessageBuilder(); + + SignalingICECandidateMessageBuilder get _$this { + final $v = _$v; + if ($v != null) { + _from = $v.from; + _to = $v.to; + _type = $v.type; + _roomType = $v.roomType; + _sid = $v.sid; + _payload = $v.payload.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingICECandidateMessage other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingICECandidateMessage; + } + + @override + void update(void Function(SignalingICECandidateMessageBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingICECandidateMessage build() => _build(); + + _$SignalingICECandidateMessage _build() { + _$SignalingICECandidateMessage _$result; + try { + _$result = _$v ?? + _$SignalingICECandidateMessage._( + from: BuiltValueNullFieldError.checkNotNull(from, r'SignalingICECandidateMessage', 'from'), + to: BuiltValueNullFieldError.checkNotNull(to, r'SignalingICECandidateMessage', 'to'), + type: BuiltValueNullFieldError.checkNotNull(type, r'SignalingICECandidateMessage', 'type'), + roomType: roomType, + sid: sid, + payload: payload.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'payload'; + payload.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingICECandidateMessage', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingMuteMessage_PayloadInterfaceBuilder { + void replace(SignalingMuteMessage_PayloadInterface other); + void update(void Function(SignalingMuteMessage_PayloadInterfaceBuilder) updates); + SignalingMuteMessage_Payload_Name? get name; + set name(SignalingMuteMessage_Payload_Name? name); +} + +class _$SignalingMuteMessage_Payload extends SignalingMuteMessage_Payload { + @override + final SignalingMuteMessage_Payload_Name name; + + factory _$SignalingMuteMessage_Payload([void Function(SignalingMuteMessage_PayloadBuilder)? updates]) => + (SignalingMuteMessage_PayloadBuilder()..update(updates))._build(); + + _$SignalingMuteMessage_Payload._({required this.name}) : super._() { + BuiltValueNullFieldError.checkNotNull(name, r'SignalingMuteMessage_Payload', 'name'); + } + + @override + SignalingMuteMessage_Payload rebuild(void Function(SignalingMuteMessage_PayloadBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingMuteMessage_PayloadBuilder toBuilder() => SignalingMuteMessage_PayloadBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingMuteMessage_Payload && name == other.name; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingMuteMessage_Payload')..add('name', name)).toString(); + } +} + +class SignalingMuteMessage_PayloadBuilder + implements + Builder, + SignalingMuteMessage_PayloadInterfaceBuilder { + _$SignalingMuteMessage_Payload? _$v; + + SignalingMuteMessage_Payload_Name? _name; + SignalingMuteMessage_Payload_Name? get name => _$this._name; + set name(covariant SignalingMuteMessage_Payload_Name? name) => _$this._name = name; + + SignalingMuteMessage_PayloadBuilder(); + + SignalingMuteMessage_PayloadBuilder get _$this { + final $v = _$v; + if ($v != null) { + _name = $v.name; + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingMuteMessage_Payload other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingMuteMessage_Payload; + } + + @override + void update(void Function(SignalingMuteMessage_PayloadBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingMuteMessage_Payload build() => _build(); + + _$SignalingMuteMessage_Payload _build() { + final _$result = _$v ?? + _$SignalingMuteMessage_Payload._( + name: BuiltValueNullFieldError.checkNotNull(name, r'SignalingMuteMessage_Payload', 'name')); + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingMuteMessageInterfaceBuilder { + void replace(SignalingMuteMessageInterface other); + void update(void Function(SignalingMuteMessageInterfaceBuilder) updates); + String? get from; + set from(String? from); + + String? get to; + set to(String? to); + + SignalingMessageType? get type; + set type(SignalingMessageType? type); + + SignalingRoomType? get roomType; + set roomType(SignalingRoomType? roomType); + + String? get sid; + set sid(String? sid); + + SignalingMuteMessage_PayloadBuilder get payload; + set payload(SignalingMuteMessage_PayloadBuilder? payload); +} + +class _$SignalingMuteMessage extends SignalingMuteMessage { + @override + final String from; + @override + final String to; + @override + final SignalingMessageType type; + @override + final SignalingRoomType? roomType; + @override + final String? sid; + @override + final SignalingMuteMessage_Payload payload; + + factory _$SignalingMuteMessage([void Function(SignalingMuteMessageBuilder)? updates]) => + (SignalingMuteMessageBuilder()..update(updates))._build(); + + _$SignalingMuteMessage._( + {required this.from, required this.to, required this.type, this.roomType, this.sid, required this.payload}) : super._() { - BuiltValueNullFieldError.checkNotNull(data, r'SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data', 'data'); + BuiltValueNullFieldError.checkNotNull(from, r'SignalingMuteMessage', 'from'); + BuiltValueNullFieldError.checkNotNull(to, r'SignalingMuteMessage', 'to'); + BuiltValueNullFieldError.checkNotNull(type, r'SignalingMuteMessage', 'type'); + BuiltValueNullFieldError.checkNotNull(payload, r'SignalingMuteMessage', 'payload'); } @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data rebuild( - void Function(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder) updates) => + SignalingMuteMessage rebuild(void Function(SignalingMuteMessageBuilder) updates) => (toBuilder()..update(updates)).build(); @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder toBuilder() => - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder()..replace(this); + SignalingMuteMessageBuilder toBuilder() => SignalingMuteMessageBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data && + return other is SignalingMuteMessage && + from == other.from && + to == other.to && + type == other.type && + roomType == other.roomType && + sid == other.sid && + payload == other.payload; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, from.hashCode); + _$hash = $jc(_$hash, to.hashCode); + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jc(_$hash, roomType.hashCode); + _$hash = $jc(_$hash, sid.hashCode); + _$hash = $jc(_$hash, payload.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingMuteMessage') + ..add('from', from) + ..add('to', to) + ..add('type', type) + ..add('roomType', roomType) + ..add('sid', sid) + ..add('payload', payload)) + .toString(); + } +} + +class SignalingMuteMessageBuilder + implements Builder, SignalingMuteMessageInterfaceBuilder { + _$SignalingMuteMessage? _$v; + + String? _from; + String? get from => _$this._from; + set from(covariant String? from) => _$this._from = from; + + String? _to; + String? get to => _$this._to; + set to(covariant String? to) => _$this._to = to; + + SignalingMessageType? _type; + SignalingMessageType? get type => _$this._type; + set type(covariant SignalingMessageType? type) => _$this._type = type; + + SignalingRoomType? _roomType; + SignalingRoomType? get roomType => _$this._roomType; + set roomType(covariant SignalingRoomType? roomType) => _$this._roomType = roomType; + + String? _sid; + String? get sid => _$this._sid; + set sid(covariant String? sid) => _$this._sid = sid; + + SignalingMuteMessage_PayloadBuilder? _payload; + SignalingMuteMessage_PayloadBuilder get payload => _$this._payload ??= SignalingMuteMessage_PayloadBuilder(); + set payload(covariant SignalingMuteMessage_PayloadBuilder? payload) => _$this._payload = payload; + + SignalingMuteMessageBuilder(); + + SignalingMuteMessageBuilder get _$this { + final $v = _$v; + if ($v != null) { + _from = $v.from; + _to = $v.to; + _type = $v.type; + _roomType = $v.roomType; + _sid = $v.sid; + _payload = $v.payload.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingMuteMessage other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingMuteMessage; + } + + @override + void update(void Function(SignalingMuteMessageBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingMuteMessage build() => _build(); + + _$SignalingMuteMessage _build() { + _$SignalingMuteMessage _$result; + try { + _$result = _$v ?? + _$SignalingMuteMessage._( + from: BuiltValueNullFieldError.checkNotNull(from, r'SignalingMuteMessage', 'from'), + to: BuiltValueNullFieldError.checkNotNull(to, r'SignalingMuteMessage', 'to'), + type: BuiltValueNullFieldError.checkNotNull(type, r'SignalingMuteMessage', 'type'), + roomType: roomType, + sid: sid, + payload: payload.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'payload'; + payload.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingMuteMessage', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingMessageInterfaceBuilder { + void replace(SignalingMessageInterface other); + void update(void Function(SignalingMessageInterfaceBuilder) updates); + SignalingSessionDescriptionMessageBuilder get signalingSessionDescriptionMessage; + set signalingSessionDescriptionMessage(SignalingSessionDescriptionMessageBuilder? signalingSessionDescriptionMessage); + + SignalingICECandidateMessageBuilder get signalingICECandidateMessage; + set signalingICECandidateMessage(SignalingICECandidateMessageBuilder? signalingICECandidateMessage); + + SignalingMuteMessageBuilder get signalingMuteMessage; + set signalingMuteMessage(SignalingMuteMessageBuilder? signalingMuteMessage); +} + +class _$SignalingMessage extends SignalingMessage { + @override + final JsonObject data; + @override + final SignalingSessionDescriptionMessage? signalingSessionDescriptionMessage; + @override + final SignalingICECandidateMessage? signalingICECandidateMessage; + @override + final SignalingMuteMessage? signalingMuteMessage; + + factory _$SignalingMessage([void Function(SignalingMessageBuilder)? updates]) => + (SignalingMessageBuilder()..update(updates))._build(); + + _$SignalingMessage._( + {required this.data, + this.signalingSessionDescriptionMessage, + this.signalingICECandidateMessage, + this.signalingMuteMessage}) + : super._() { + BuiltValueNullFieldError.checkNotNull(data, r'SignalingMessage', 'data'); + } + + @override + SignalingMessage rebuild(void Function(SignalingMessageBuilder) updates) => (toBuilder()..update(updates)).build(); + + @override + SignalingMessageBuilder toBuilder() => SignalingMessageBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingMessage && data == other.data && - builtListSignalingSession == other.builtListSignalingSession && - string == other.string; + signalingSessionDescriptionMessage == other.signalingSessionDescriptionMessage && + signalingICECandidateMessage == other.signalingICECandidateMessage && + signalingMuteMessage == other.signalingMuteMessage; } @override int get hashCode { var _$hash = 0; _$hash = $jc(_$hash, data.hashCode); - _$hash = $jc(_$hash, builtListSignalingSession.hashCode); - _$hash = $jc(_$hash, string.hashCode); + _$hash = $jc(_$hash, signalingSessionDescriptionMessage.hashCode); + _$hash = $jc(_$hash, signalingICECandidateMessage.hashCode); + _$hash = $jc(_$hash, signalingMuteMessage.hashCode); _$hash = $jf(_$hash); return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper(r'SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data') + return (newBuiltValueToStringHelper(r'SignalingMessage') ..add('data', data) - ..add('builtListSignalingSession', builtListSignalingSession) - ..add('string', string)) + ..add('signalingSessionDescriptionMessage', signalingSessionDescriptionMessage) + ..add('signalingICECandidateMessage', signalingICECandidateMessage) + ..add('signalingMuteMessage', signalingMuteMessage)) .toString(); } } -class SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder - implements - Builder, - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataInterfaceBuilder { - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data? _$v; +class SignalingMessageBuilder + implements Builder, SignalingMessageInterfaceBuilder { + _$SignalingMessage? _$v; JsonObject? _data; JsonObject? get data => _$this._data; set data(covariant JsonObject? data) => _$this._data = data; - ListBuilder? _builtListSignalingSession; - ListBuilder get builtListSignalingSession => - _$this._builtListSignalingSession ??= ListBuilder(); - set builtListSignalingSession(covariant ListBuilder? builtListSignalingSession) => - _$this._builtListSignalingSession = builtListSignalingSession; + SignalingSessionDescriptionMessageBuilder? _signalingSessionDescriptionMessage; + SignalingSessionDescriptionMessageBuilder get signalingSessionDescriptionMessage => + _$this._signalingSessionDescriptionMessage ??= SignalingSessionDescriptionMessageBuilder(); + set signalingSessionDescriptionMessage( + covariant SignalingSessionDescriptionMessageBuilder? signalingSessionDescriptionMessage) => + _$this._signalingSessionDescriptionMessage = signalingSessionDescriptionMessage; - String? _string; - String? get string => _$this._string; - set string(covariant String? string) => _$this._string = string; + SignalingICECandidateMessageBuilder? _signalingICECandidateMessage; + SignalingICECandidateMessageBuilder get signalingICECandidateMessage => + _$this._signalingICECandidateMessage ??= SignalingICECandidateMessageBuilder(); + set signalingICECandidateMessage(covariant SignalingICECandidateMessageBuilder? signalingICECandidateMessage) => + _$this._signalingICECandidateMessage = signalingICECandidateMessage; - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder(); + SignalingMuteMessageBuilder? _signalingMuteMessage; + SignalingMuteMessageBuilder get signalingMuteMessage => + _$this._signalingMuteMessage ??= SignalingMuteMessageBuilder(); + set signalingMuteMessage(covariant SignalingMuteMessageBuilder? signalingMuteMessage) => + _$this._signalingMuteMessage = signalingMuteMessage; - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder get _$this { + SignalingMessageBuilder(); + + SignalingMessageBuilder get _$this { final $v = _$v; if ($v != null) { _data = $v.data; - _builtListSignalingSession = $v.builtListSignalingSession?.toBuilder(); - _string = $v.string; + _signalingSessionDescriptionMessage = $v.signalingSessionDescriptionMessage?.toBuilder(); + _signalingICECandidateMessage = $v.signalingICECandidateMessage?.toBuilder(); + _signalingMuteMessage = $v.signalingMuteMessage?.toBuilder(); _$v = null; } return this; } @override - void replace(covariant SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data other) { + void replace(covariant SignalingMessage other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data; + _$v = other as _$SignalingMessage; } @override - void update(void Function(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder)? updates) { + void update(void Function(SignalingMessageBuilder)? updates) { if (updates != null) updates(this); } @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data build() => _build(); + SignalingMessage build() => _build(); - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data _build() { - SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data._validate(this); - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data _$result; + _$SignalingMessage _build() { + SignalingMessage._validate(this); + _$SignalingMessage _$result; try { _$result = _$v ?? - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data._( - data: BuiltValueNullFieldError.checkNotNull( - data, r'SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data', 'data'), - builtListSignalingSession: _builtListSignalingSession?.build(), - string: string); + _$SignalingMessage._( + data: BuiltValueNullFieldError.checkNotNull(data, r'SignalingMessage', 'data'), + signalingSessionDescriptionMessage: _signalingSessionDescriptionMessage?.build(), + signalingICECandidateMessage: _signalingICECandidateMessage?.build(), + signalingMuteMessage: _signalingMuteMessage?.build()); } catch (_) { late String _$failedField; try { - _$failedField = 'builtListSignalingSession'; - _builtListSignalingSession?.build(); + _$failedField = 'signalingSessionDescriptionMessage'; + _signalingSessionDescriptionMessage?.build(); + _$failedField = 'signalingICECandidateMessage'; + _signalingICECandidateMessage?.build(); + _$failedField = 'signalingMuteMessage'; + _signalingMuteMessage?.build(); } catch (e) { - throw BuiltValueNestedFieldError( - r'SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data', _$failedField, e.toString()); + throw BuiltValueNestedFieldError(r'SignalingMessage', _$failedField, e.toString()); } rethrow; } @@ -50154,45 +51979,41 @@ class SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder } } -abstract mixin class SignalingPullMessagesResponseApplicationJson_Ocs_DataInterfaceBuilder { - void replace(SignalingPullMessagesResponseApplicationJson_Ocs_DataInterface other); - void update(void Function(SignalingPullMessagesResponseApplicationJson_Ocs_DataInterfaceBuilder) updates); +abstract mixin class SignalingMessageWrapperInterfaceBuilder { + void replace(SignalingMessageWrapperInterface other); + void update(void Function(SignalingMessageWrapperInterfaceBuilder) updates); String? get type; set type(String? type); - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder get data; - set data(SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder? data); + ContentStringBuilder get data; + set data(ContentStringBuilder? data); } -class _$SignalingPullMessagesResponseApplicationJson_Ocs_Data - extends SignalingPullMessagesResponseApplicationJson_Ocs_Data { +class _$SignalingMessageWrapper extends SignalingMessageWrapper { @override final String type; @override - final SignalingPullMessagesResponseApplicationJson_Ocs_Data_Data data; + final ContentString data; - factory _$SignalingPullMessagesResponseApplicationJson_Ocs_Data( - [void Function(SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder)? updates]) => - (SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder()..update(updates))._build(); + factory _$SignalingMessageWrapper([void Function(SignalingMessageWrapperBuilder)? updates]) => + (SignalingMessageWrapperBuilder()..update(updates))._build(); - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data._({required this.type, required this.data}) : super._() { - BuiltValueNullFieldError.checkNotNull(type, r'SignalingPullMessagesResponseApplicationJson_Ocs_Data', 'type'); - BuiltValueNullFieldError.checkNotNull(data, r'SignalingPullMessagesResponseApplicationJson_Ocs_Data', 'data'); + _$SignalingMessageWrapper._({required this.type, required this.data}) : super._() { + BuiltValueNullFieldError.checkNotNull(type, r'SignalingMessageWrapper', 'type'); + BuiltValueNullFieldError.checkNotNull(data, r'SignalingMessageWrapper', 'data'); } @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data rebuild( - void Function(SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder) updates) => + SignalingMessageWrapper rebuild(void Function(SignalingMessageWrapperBuilder) updates) => (toBuilder()..update(updates)).build(); @override - SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder toBuilder() => - SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder()..replace(this); + SignalingMessageWrapperBuilder toBuilder() => SignalingMessageWrapperBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is SignalingPullMessagesResponseApplicationJson_Ocs_Data && type == other.type && data == other.data; + return other is SignalingMessageWrapper && type == other.type && data == other.data; } @override @@ -50206,32 +52027,30 @@ class _$SignalingPullMessagesResponseApplicationJson_Ocs_Data @override String toString() { - return (newBuiltValueToStringHelper(r'SignalingPullMessagesResponseApplicationJson_Ocs_Data') + return (newBuiltValueToStringHelper(r'SignalingMessageWrapper') ..add('type', type) ..add('data', data)) .toString(); } } -class SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder +class SignalingMessageWrapperBuilder implements - Builder, - SignalingPullMessagesResponseApplicationJson_Ocs_DataInterfaceBuilder { - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data? _$v; + Builder, + SignalingMessageWrapperInterfaceBuilder { + _$SignalingMessageWrapper? _$v; String? _type; String? get type => _$this._type; set type(covariant String? type) => _$this._type = type; - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder? _data; - SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder get data => - _$this._data ??= SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder(); - set data(covariant SignalingPullMessagesResponseApplicationJson_Ocs_Data_DataBuilder? data) => _$this._data = data; + ContentStringBuilder? _data; + ContentStringBuilder get data => _$this._data ??= ContentStringBuilder(); + set data(covariant ContentStringBuilder? data) => _$this._data = data; - SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder(); + SignalingMessageWrapperBuilder(); - SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder get _$this { + SignalingMessageWrapperBuilder get _$this { final $v = _$v; if ($v != null) { _type = $v.type; @@ -50242,26 +52061,25 @@ class SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder } @override - void replace(covariant SignalingPullMessagesResponseApplicationJson_Ocs_Data other) { + void replace(covariant SignalingMessageWrapper other) { ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SignalingPullMessagesResponseApplicationJson_Ocs_Data; + _$v = other as _$SignalingMessageWrapper; } @override - void update(void Function(SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder)? updates) { + void update(void Function(SignalingMessageWrapperBuilder)? updates) { if (updates != null) updates(this); } @override - SignalingPullMessagesResponseApplicationJson_Ocs_Data build() => _build(); + SignalingMessageWrapper build() => _build(); - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data _build() { - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data _$result; + _$SignalingMessageWrapper _build() { + _$SignalingMessageWrapper _$result; try { _$result = _$v ?? - _$SignalingPullMessagesResponseApplicationJson_Ocs_Data._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'SignalingPullMessagesResponseApplicationJson_Ocs_Data', 'type'), + _$SignalingMessageWrapper._( + type: BuiltValueNullFieldError.checkNotNull(type, r'SignalingMessageWrapper', 'type'), data: data.build()); } catch (_) { late String _$failedField; @@ -50269,8 +52087,138 @@ class SignalingPullMessagesResponseApplicationJson_Ocs_DataBuilder _$failedField = 'data'; data.build(); } catch (e) { - throw BuiltValueNestedFieldError( - r'SignalingPullMessagesResponseApplicationJson_Ocs_Data', _$failedField, e.toString()); + throw BuiltValueNestedFieldError(r'SignalingMessageWrapper', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class SignalingDataInterfaceBuilder { + void replace(SignalingDataInterface other); + void update(void Function(SignalingDataInterfaceBuilder) updates); + SignalingSessionsBuilder get signalingSessions; + set signalingSessions(SignalingSessionsBuilder? signalingSessions); + + SignalingMessageWrapperBuilder get signalingMessageWrapper; + set signalingMessageWrapper(SignalingMessageWrapperBuilder? signalingMessageWrapper); +} + +class _$SignalingData extends SignalingData { + @override + final JsonObject data; + @override + final SignalingSessions? signalingSessions; + @override + final SignalingMessageWrapper? signalingMessageWrapper; + + factory _$SignalingData([void Function(SignalingDataBuilder)? updates]) => + (SignalingDataBuilder()..update(updates))._build(); + + _$SignalingData._({required this.data, this.signalingSessions, this.signalingMessageWrapper}) : super._() { + BuiltValueNullFieldError.checkNotNull(data, r'SignalingData', 'data'); + } + + @override + SignalingData rebuild(void Function(SignalingDataBuilder) updates) => (toBuilder()..update(updates)).build(); + + @override + SignalingDataBuilder toBuilder() => SignalingDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingData && + data == other.data && + signalingSessions == other.signalingSessions && + signalingMessageWrapper == other.signalingMessageWrapper; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jc(_$hash, signalingSessions.hashCode); + _$hash = $jc(_$hash, signalingMessageWrapper.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingData') + ..add('data', data) + ..add('signalingSessions', signalingSessions) + ..add('signalingMessageWrapper', signalingMessageWrapper)) + .toString(); + } +} + +class SignalingDataBuilder implements Builder, SignalingDataInterfaceBuilder { + _$SignalingData? _$v; + + JsonObject? _data; + JsonObject? get data => _$this._data; + set data(covariant JsonObject? data) => _$this._data = data; + + SignalingSessionsBuilder? _signalingSessions; + SignalingSessionsBuilder get signalingSessions => _$this._signalingSessions ??= SignalingSessionsBuilder(); + set signalingSessions(covariant SignalingSessionsBuilder? signalingSessions) => + _$this._signalingSessions = signalingSessions; + + SignalingMessageWrapperBuilder? _signalingMessageWrapper; + SignalingMessageWrapperBuilder get signalingMessageWrapper => + _$this._signalingMessageWrapper ??= SignalingMessageWrapperBuilder(); + set signalingMessageWrapper(covariant SignalingMessageWrapperBuilder? signalingMessageWrapper) => + _$this._signalingMessageWrapper = signalingMessageWrapper; + + SignalingDataBuilder(); + + SignalingDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _data = $v.data; + _signalingSessions = $v.signalingSessions?.toBuilder(); + _signalingMessageWrapper = $v.signalingMessageWrapper?.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingData other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingData; + } + + @override + void update(void Function(SignalingDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingData build() => _build(); + + _$SignalingData _build() { + SignalingData._validate(this); + _$SignalingData _$result; + try { + _$result = _$v ?? + _$SignalingData._( + data: BuiltValueNullFieldError.checkNotNull(data, r'SignalingData', 'data'), + signalingSessions: _signalingSessions?.build(), + signalingMessageWrapper: _signalingMessageWrapper?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'signalingSessions'; + _signalingSessions?.build(); + _$failedField = 'signalingMessageWrapper'; + _signalingMessageWrapper?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingData', _$failedField, e.toString()); } rethrow; } @@ -50285,15 +52233,15 @@ abstract mixin class SignalingPullMessagesResponseApplicationJson_OcsInterfaceBu OCSMetaBuilder get meta; set meta(OCSMetaBuilder? meta); - ListBuilder get data; - set data(ListBuilder? data); + ListBuilder get data; + set data(ListBuilder? data); } class _$SignalingPullMessagesResponseApplicationJson_Ocs extends SignalingPullMessagesResponseApplicationJson_Ocs { @override final OCSMeta meta; @override - final BuiltList data; + final BuiltList data; factory _$SignalingPullMessagesResponseApplicationJson_Ocs( [void Function(SignalingPullMessagesResponseApplicationJson_OcsBuilder)? updates]) => @@ -50348,10 +52296,9 @@ class SignalingPullMessagesResponseApplicationJson_OcsBuilder OCSMetaBuilder get meta => _$this._meta ??= OCSMetaBuilder(); set meta(covariant OCSMetaBuilder? meta) => _$this._meta = meta; - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; + ListBuilder? _data; + ListBuilder get data => _$this._data ??= ListBuilder(); + set data(covariant ListBuilder? data) => _$this._data = data; SignalingPullMessagesResponseApplicationJson_OcsBuilder(); @@ -50504,6 +52451,140 @@ class SignalingPullMessagesResponseApplicationJsonBuilder } } +abstract mixin class SignalingSendMessagesMessagesInterfaceBuilder { + void replace(SignalingSendMessagesMessagesInterface other); + void update(void Function(SignalingSendMessagesMessagesInterfaceBuilder) updates); + String? get ev; + set ev(String? ev); + + ContentStringBuilder get fn; + set fn(ContentStringBuilder? fn); + + String? get sessionId; + set sessionId(String? sessionId); +} + +class _$SignalingSendMessagesMessages extends SignalingSendMessagesMessages { + @override + final String ev; + @override + final ContentString fn; + @override + final String sessionId; + + factory _$SignalingSendMessagesMessages([void Function(SignalingSendMessagesMessagesBuilder)? updates]) => + (SignalingSendMessagesMessagesBuilder()..update(updates))._build(); + + _$SignalingSendMessagesMessages._({required this.ev, required this.fn, required this.sessionId}) : super._() { + BuiltValueNullFieldError.checkNotNull(ev, r'SignalingSendMessagesMessages', 'ev'); + BuiltValueNullFieldError.checkNotNull(fn, r'SignalingSendMessagesMessages', 'fn'); + BuiltValueNullFieldError.checkNotNull(sessionId, r'SignalingSendMessagesMessages', 'sessionId'); + } + + @override + SignalingSendMessagesMessages rebuild(void Function(SignalingSendMessagesMessagesBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + SignalingSendMessagesMessagesBuilder toBuilder() => SignalingSendMessagesMessagesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is SignalingSendMessagesMessages && ev == other.ev && fn == other.fn && sessionId == other.sessionId; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, ev.hashCode); + _$hash = $jc(_$hash, fn.hashCode); + _$hash = $jc(_$hash, sessionId.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'SignalingSendMessagesMessages') + ..add('ev', ev) + ..add('fn', fn) + ..add('sessionId', sessionId)) + .toString(); + } +} + +class SignalingSendMessagesMessagesBuilder + implements + Builder, + SignalingSendMessagesMessagesInterfaceBuilder { + _$SignalingSendMessagesMessages? _$v; + + String? _ev; + String? get ev => _$this._ev; + set ev(covariant String? ev) => _$this._ev = ev; + + ContentStringBuilder? _fn; + ContentStringBuilder get fn => _$this._fn ??= ContentStringBuilder(); + set fn(covariant ContentStringBuilder? fn) => _$this._fn = fn; + + String? _sessionId; + String? get sessionId => _$this._sessionId; + set sessionId(covariant String? sessionId) => _$this._sessionId = sessionId; + + SignalingSendMessagesMessagesBuilder() { + SignalingSendMessagesMessages._defaults(this); + } + + SignalingSendMessagesMessagesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _ev = $v.ev; + _fn = $v.fn.toBuilder(); + _sessionId = $v.sessionId; + _$v = null; + } + return this; + } + + @override + void replace(covariant SignalingSendMessagesMessages other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$SignalingSendMessagesMessages; + } + + @override + void update(void Function(SignalingSendMessagesMessagesBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + SignalingSendMessagesMessages build() => _build(); + + _$SignalingSendMessagesMessages _build() { + _$SignalingSendMessagesMessages _$result; + try { + _$result = _$v ?? + _$SignalingSendMessagesMessages._( + ev: BuiltValueNullFieldError.checkNotNull(ev, r'SignalingSendMessagesMessages', 'ev'), + fn: fn.build(), + sessionId: + BuiltValueNullFieldError.checkNotNull(sessionId, r'SignalingSendMessagesMessages', 'sessionId')); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'fn'; + fn.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'SignalingSendMessagesMessages', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + abstract mixin class SignalingSendMessagesResponseApplicationJson_OcsInterfaceBuilder { void replace(SignalingSendMessagesResponseApplicationJson_OcsInterface other); void update(void Function(SignalingSendMessagesResponseApplicationJson_OcsInterfaceBuilder) updates); diff --git a/packages/nextcloud/lib/src/api/spreed.openapi.json b/packages/nextcloud/lib/src/api/spreed.openapi.json index a44111ee..faa586db 100644 --- a/packages/nextcloud/lib/src/api/spreed.openapi.json +++ b/packages/nextcloud/lib/src/api/spreed.openapi.json @@ -1213,6 +1213,248 @@ "nullable": true } } + }, + "SignalingSessions": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalingSession" + } + } + } + }, + "SignalingData": { + "discriminator": { + "propertyName": "type", + "mapping": { + "usersInRoom": "#/components/schemas/SignalingSessions", + "message": "#/components/schemas/SignalingMessageWrapper" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/SignalingSessions" + }, + { + "$ref": "#/components/schemas/SignalingMessageWrapper" + } + ] + }, + "SignalingMessageWrapper": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": { + "$ref": "#/components/schemas/SignalingMessage" + } + } + } + }, + "SignalingMessageType": { + "type": "string", + "enum": [ + "offer", + "answer", + "candidate", + "unshareScreen", + "remove-candidates", + "control", + "forceMute", + "mute", + "unmute", + "nickChanged" + ] + }, + "SignalingMessage": { + "discriminator": { + "propertyName": "type", + "mapping": { + "offer": "#/components/schemas/SignalingSessionDescriptionMessage", + "answer": "#/components/schemas/SignalingSessionDescriptionMessage", + "candidate": "#/components/schemas/SignalingICECandidateMessage", + "mute": "#/components/schemas/SignalingMuteMessage", + "unmute": "#/components/schemas/SignalingMuteMessage" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/SignalingSessionDescriptionMessage" + }, + { + "$ref": "#/components/schemas/SignalingICECandidateMessage" + }, + { + "$ref": "#/components/schemas/SignalingMuteMessage" + } + ] + }, + "SignalingRoomType": { + "type": "string", + "enum": [ + "video", + "screen" + ] + }, + "SignalingSessionDescriptionMessage": { + "type": "object", + "required": [ + "from", + "to", + "type", + "payload" + ], + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/SignalingMessageType" + }, + "roomType": { + "$ref": "#/components/schemas/SignalingRoomType" + }, + "sid": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "type", + "sdp", + "nick" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "offer", + "answer" + ] + }, + "sdp": { + "type": "string" + }, + "nick": { + "type": "string" + } + } + } + } + }, + "SignalingICECandidateMessage": { + "type": "object", + "required": [ + "from", + "to", + "type", + "payload" + ], + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/SignalingMessageType" + }, + "roomType": { + "$ref": "#/components/schemas/SignalingRoomType" + }, + "sid": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "candidate" + ], + "properties": { + "candidate": { + "type": "object", + "required": [ + "sdpMLineIndex", + "sdpMid", + "candidate" + ], + "properties": { + "sdpMLineIndex": { + "type": "integer" + }, + "sdpMid": { + "type": "string" + }, + "candidate": { + "type": "string" + } + } + } + } + } + } + }, + "SignalingMuteMessage": { + "type": "object", + "required": [ + "from", + "to", + "type", + "payload" + ], + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/SignalingMessageType" + }, + "roomType": { + "$ref": "#/components/schemas/SignalingRoomType" + }, + "sid": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "audio", + "video" + ] + } + } + } + } } } }, @@ -16254,8 +16496,36 @@ "in": "query", "description": "JSON encoded messages", "required": true, - "schema": { - "type": "string" + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "ev", + "fn", + "sessionId" + ], + "properties": { + "ev": { + "type": "string", + "default": "message" + }, + "fn": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": { + "$ref": "#/components/schemas/SignalingMessage" + } + }, + "sessionId": { + "type": "string" + } + } + } + } + } } }, { @@ -16425,29 +16695,7 @@ "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type", - "data" - ], - "properties": { - "type": { - "type": "string" - }, - "data": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalingSession" - } - }, - { - "type": "string" - } - ] - } - } + "$ref": "#/components/schemas/SignalingData" } } } @@ -16480,29 +16728,7 @@ "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type", - "data" - ], - "properties": { - "type": { - "type": "string" - }, - "data": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalingSession" - } - }, - { - "type": "string" - } - ] - } - } + "$ref": "#/components/schemas/SignalingData" } } } @@ -16535,29 +16761,7 @@ "data": { "type": "array", "items": { - "type": "object", - "required": [ - "type", - "data" - ], - "properties": { - "type": { - "type": "string" - }, - "data": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/SignalingSession" - } - }, - { - "type": "string" - } - ] - } - } + "$ref": "#/components/schemas/SignalingData" } } } diff --git a/packages/nextcloud/lib/src/patches/spreed/internal-signaling.json b/packages/nextcloud/lib/src/patches/spreed/internal-signaling.json new file mode 100644 index 00000000..64fe3d8b --- /dev/null +++ b/packages/nextcloud/lib/src/patches/spreed/internal-signaling.json @@ -0,0 +1,342 @@ +[ + { + "op": "replace", + "path": "/paths/~1ocs~1v2.php~1apps~1spreed~1api~1{apiVersion}~1signaling~1{token}/get/responses/200/content/application~1json/schema/properties/ocs/properties/data/items", + "value": { + "$ref": "#/components/schemas/SignalingData" + } + }, + { + "op": "replace", + "path": "/paths/~1ocs~1v2.php~1apps~1spreed~1api~1{apiVersion}~1signaling~1{token}/get/responses/404/content/application~1json/schema/properties/ocs/properties/data/items", + "value": { + "$ref": "#/components/schemas/SignalingData" + } + }, + { + "op": "replace", + "path": "/paths/~1ocs~1v2.php~1apps~1spreed~1api~1{apiVersion}~1signaling~1{token}/get/responses/409/content/application~1json/schema/properties/ocs/properties/data/items", + "value": { + "$ref": "#/components/schemas/SignalingData" + } + }, + { + "op": "replace", + "path": "/paths/~1ocs~1v2.php~1apps~1spreed~1api~1{apiVersion}~1signaling~1{token}/post/parameters/0", + "value": { + "name": "messages", + "in": "query", + "description": "JSON encoded messages", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "ev", + "fn", + "sessionId" + ], + "properties": { + "ev": { + "type": "string", + "default": "message" + }, + "fn": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": { + "$ref": "#/components/schemas/SignalingMessage" + } + }, + "sessionId": { + "type": "string" + } + } + } + } + } + } + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingSessions", + "value": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignalingSession" + } + } + } + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingData", + "value": { + "discriminator": { + "propertyName": "type", + "mapping": { + "usersInRoom": "#/components/schemas/SignalingSessions", + "message": "#/components/schemas/SignalingMessageWrapper" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/SignalingSessions" + }, + { + "$ref": "#/components/schemas/SignalingMessageWrapper" + } + ] + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingMessageWrapper", + "value": { + "type": "object", + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string" + }, + "data": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": { + "$ref": "#/components/schemas/SignalingMessage" + } + } + } + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingMessageType", + "value": { + "type": "string", + "enum": [ + "offer", + "answer", + "candidate", + "unshareScreen", + "remove-candidates", + "control", + "forceMute", + "mute", + "unmute", + "nickChanged" + ] + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingMessage", + "value": { + "discriminator": { + "propertyName": "type", + "mapping": { + "offer": "#/components/schemas/SignalingSessionDescriptionMessage", + "answer": "#/components/schemas/SignalingSessionDescriptionMessage", + "candidate": "#/components/schemas/SignalingICECandidateMessage", + "mute": "#/components/schemas/SignalingMuteMessage", + "unmute": "#/components/schemas/SignalingMuteMessage" + } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/SignalingSessionDescriptionMessage" + }, + { + "$ref": "#/components/schemas/SignalingICECandidateMessage" + }, + { + "$ref": "#/components/schemas/SignalingMuteMessage" + } + ] + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingRoomType", + "value": { + "type": "string", + "enum": [ + "video", + "screen" + ] + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingSessionDescriptionMessage", + "value": { + "type": "object", + "required": [ + "from", + "to", + "type", + "payload" + ], + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/SignalingMessageType" + }, + "roomType": { + "$ref": "#/components/schemas/SignalingRoomType" + }, + "sid": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "type", + "sdp", + "nick" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "offer", + "answer" + ] + }, + "sdp": { + "type": "string" + }, + "nick": { + "type": "string" + } + } + } + } + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingICECandidateMessage", + "value": { + "type": "object", + "required": [ + "from", + "to", + "type", + "payload" + ], + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/SignalingMessageType" + }, + "roomType": { + "$ref": "#/components/schemas/SignalingRoomType" + }, + "sid": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "candidate" + ], + "properties": { + "candidate": { + "type": "object", + "required": [ + "sdpMLineIndex", + "sdpMid", + "candidate" + ], + "properties": { + "sdpMLineIndex": { + "type": "integer" + }, + "sdpMid": { + "type": "string" + }, + "candidate": { + "type": "string" + } + } + } + } + } + } + } + }, + { + "op": "add", + "path": "/components/schemas/SignalingMuteMessage", + "value": { + "type": "object", + "required": [ + "from", + "to", + "type", + "payload" + ], + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/SignalingMessageType" + }, + "roomType": { + "$ref": "#/components/schemas/SignalingRoomType" + }, + "sid": { + "type": "string" + }, + "payload": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "audio", + "video" + ] + } + } + } + } + } + } +] diff --git a/packages/nextcloud/test/spreed_test.dart b/packages/nextcloud/test/spreed_test.dart index 84ad5773..82b8f854 100644 --- a/packages/nextcloud/test/spreed_test.dart +++ b/packages/nextcloud/test/spreed_test.dart @@ -1,8 +1,9 @@ import 'dart:async'; -import 'dart:convert'; +import 'package:built_collection/built_collection.dart'; import 'package:built_value/json_object.dart'; import 'package:nextcloud/core.dart' as core; +import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/spreed.dart' as spreed; import 'package:test/test.dart'; @@ -385,29 +386,46 @@ void main() { final room2 = (await client2.spreed.room.joinRoom(token: room.token)).body.ocs.data; await client2.spreed.call.joinCall(token: room.token); + final muteMessage = spreed.SignalingMuteMessage( + (final b) => b + ..from = room1.sessionId + ..to = room2.sessionId + ..type = spreed.SignalingMessageType.mute + ..payload.update( + (final b) => b..name = spreed.SignalingMuteMessage_Payload_Name.audio, + ), + ); + final message = spreed.SignalingMessage( + (final b) => b + ..data = JsonObject(muteMessage.toJson()) + ..signalingMuteMessage = muteMessage.toBuilder(), + ); await client1.spreed.signaling.sendMessages( token: room.token, - messages: json.encode([ - { - 'ev': 'message', - 'sessionId': room1.sessionId, - 'fn': json.encode({ - 'to': room2.sessionId, - }), - }, - ]), + messages: ContentString( + (final b) => b + ..content = BuiltList([ + spreed.SignalingSendMessagesMessages( + (final b) => b + ..sessionId = room1.sessionId + ..fn = ContentString( + (final b) => b..content = message, + ).toBuilder(), + ), + ]), + ), ); await Future.delayed(const Duration(seconds: 1)); final messages = (await client2.spreed.signaling.pullMessages(token: room.token)).body.ocs.data; expect(messages, hasLength(2)); - expect(messages[0].type, 'message'); - expect(json.decode(messages[0].data.string!), {'to': room2.sessionId, 'from': room1.sessionId}); - expect(messages[1].type, 'usersInRoom'); - expect(messages[1].data.builtListSignalingSession, hasLength(2)); - expect(messages[1].data.builtListSignalingSession![0].userId, 'user1'); - expect(messages[1].data.builtListSignalingSession![1].userId, 'user2'); + expect(messages[0].signalingMessageWrapper!.type, 'message'); + expect(messages[0].signalingMessageWrapper!.data.content, {'to': room2.sessionId, 'from': room1.sessionId}); + expect(messages[1].signalingSessions!.type, 'usersInRoom'); + expect(messages[1].signalingSessions!.data, hasLength(2)); + expect(messages[1].signalingSessions!.data[0].userId, 'user1'); + expect(messages[1].signalingSessions!.data[1].userId, 'user2'); }); }); },