From d2be0f77d9b74abbc2bc96756a880508ca6c7d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Filimowski?= Date: Mon, 2 Dec 2024 17:19:51 +0100 Subject: [PATCH] FCE-748: support for protobufs (#246) ## Description - Updated mobile SDK to support protobufs for media events. - This PR does not support old version of handling media events via JSON so this is a **BREAKING CHANGE.** ## Motivation and Context New version of fishjam added protobufs for media events. ## How has this been tested? - Run and tested bidirectional connection between Android/iOS ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) --- .eslintrc.js | 1 + .../workflows/react_native_e2e_android.yaml | 8 +- .../VideosGrid/parsePeersToTracks.ts | 10 +- .../plugin/src/with-custom-config-android.ts | 15 +- .../plugin/src/with-custom-config-ios.ts | 6 +- examples/webdriverio-test/configuration.ts | 5 +- .../webdriverio-test/utils/appium_utils.ts | 12 +- .../utils/fishjam_cloud_utils.ts | 2 +- .../android-client/FishjamClient/build.gradle | 3 +- .../client/FishjamClientInternal.kt | 104 +- .../com/fishjamcloud/client/events/Event.kt | 429 - .../client/media/RemoteAudioTrack.kt | 4 +- .../fishjamcloud/client/utils/JsonUtils.kt | 15 + .../client/webrtc/PeerConnectionManager.kt | 77 +- .../client/webrtc/RTCEngineCommunication.kt | 268 +- .../client/webrtc/RTCEngineListener.kt | 31 +- .../src/main/java/fishjam/PeerMessageKt.kt | 117 +- .../main/java/fishjam/PeerNotifications.java | 882 +- .../src/main/java/fishjam/ServerMessageKt.kt | 6 +- .../java/fishjam/ServerNotifications.java | 14 +- .../java/fishjam/media_events/CandidateKt.kt | 106 + .../java/fishjam/media_events/Shared.java | 1084 + .../java/fishjam/media_events/SharedKt.kt | 7 + .../fishjam/media_events/peer/MediaEventKt.kt | 1258 ++ .../java/fishjam/media_events/peer/Peer.java | 10540 +++++++++ .../java/fishjam/media_events/peer/PeerKt.kt | 7 + .../media_events/server/MediaEventKt.kt | 2249 ++ .../fishjam/media_events/server/Server.java | 18828 ++++++++++++++++ .../fishjam/media_events/server/ServerKt.kt | 7 + .../client/EndpointConnectionManagerTest.kt | 33 +- packages/android-client/build.gradle | 1 + .../FishjamClient/FishjamClientInternal.swift | 144 +- .../Sources/FishjamClient/events/Event.swift | 468 - .../media/Tracks/RemoteAudioTrack.swift | 4 +- .../FishjamClient/models/VadStatus.swift | 10 - .../fishjam/media_events/peer/peer.pb.swift | 983 + .../media_events/server/server.pb.swift | 1700 ++ .../fishjam/media_events/shared.pb.swift | 156 + .../fishjam/peer_notifications.pb.swift | 182 +- .../fishjam/server_notifications.pb.swift | 566 +- .../Sources/FishjamClient/utils/AnyJson.swift | 6 + .../Sources/FishjamClient/utils/types.swift | 30 + .../webrtc/PeerConnectionManager.swift | 101 +- .../webrtc/RTCEngineCommunication.swift | 179 +- .../webrtc/RTCEngineListener.swift | 14 +- .../io/fishjam/reactnative/RNFishjamClient.kt | 7 +- .../ios/RNFishjamClient.swift | 2 +- .../plugin/src/withFishjamAndroid.ts | 5 +- .../plugin/src/withFishjamIos.ts | 13 +- .../FishjamRoom/parsePeersToTracks.ts | 10 +- .../hooks/internal/useFishjamEventState.ts | 8 +- .../react-native-client/src/hooks/usePeers.ts | 1 + protos | 2 +- scripts/compile_protos.mk | 3 +- 54 files changed, 38801 insertions(+), 1922 deletions(-) delete mode 100644 packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/events/Event.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/utils/JsonUtils.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/CandidateKt.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/Shared.java create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/SharedKt.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/MediaEventKt.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/Peer.java create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/PeerKt.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/MediaEventKt.kt create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/Server.java create mode 100644 packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/ServerKt.kt delete mode 100644 packages/ios-client/Sources/FishjamClient/events/Event.swift delete mode 100644 packages/ios-client/Sources/FishjamClient/models/VadStatus.swift create mode 100644 packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/peer/peer.pb.swift create mode 100644 packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/server/server.pb.swift create mode 100644 packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/shared.pb.swift diff --git a/.eslintrc.js b/.eslintrc.js index 02459097..ebdd456f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,5 +21,6 @@ module.exports = { argsIgnorePattern: "^_", }, ], + "arrow-body-style": ["error", "as-needed"] }, }; diff --git a/.github/workflows/react_native_e2e_android.yaml b/.github/workflows/react_native_e2e_android.yaml index b3440c27..b3c30e4b 100644 --- a/.github/workflows/react_native_e2e_android.yaml +++ b/.github/workflows/react_native_e2e_android.yaml @@ -12,9 +12,15 @@ jobs: rn_e2e_android: runs-on: ubuntu-latest timeout-minutes: 40 + permissions: + contents: read + packages: read services: fishjam: - image: ghcr.io/fishjam-dev/fishjam:0.6.2 + image: ghcr.io/fishjam-cloud/fishjam:0.10.0-dev + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} env: FJ_CHECK_ORIGIN: false FJ_HOST: localhost:5002 diff --git a/examples/fishjam-chat/components/VideosGrid/parsePeersToTracks.ts b/examples/fishjam-chat/components/VideosGrid/parsePeersToTracks.ts index 2b4e00b1..8dee7596 100644 --- a/examples/fishjam-chat/components/VideosGrid/parsePeersToTracks.ts +++ b/examples/fishjam-chat/components/VideosGrid/parsePeersToTracks.ts @@ -33,9 +33,7 @@ const createGridTracksFromPeer = ( export const parsePeersToTracks = ( localPeer: PeerWithTracks | null, remotePeers: PeerWithTracks[], -): GridTrack[] => { - return [ - ...(localPeer ? createGridTracksFromPeer(localPeer) : []), - ...remotePeers.flatMap(createGridTracksFromPeer), - ]; -}; +): GridTrack[] => [ + ...(localPeer ? createGridTracksFromPeer(localPeer) : []), + ...remotePeers.flatMap(createGridTracksFromPeer), +]; diff --git a/examples/fishjam-chat/plugin/src/with-custom-config-android.ts b/examples/fishjam-chat/plugin/src/with-custom-config-android.ts index 073e0bfd..62580e70 100644 --- a/examples/fishjam-chat/plugin/src/with-custom-config-android.ts +++ b/examples/fishjam-chat/plugin/src/with-custom-config-android.ts @@ -6,8 +6,8 @@ import { } from '@expo/config-plugins'; import { INFO_GENERATED_COMMENT_ANDROID } from './utils'; -const withCustomSettingsGradle: ConfigPlugin = (config) => { - return withSettingsGradle(config, (configuration) => { +const withCustomSettingsGradle: ConfigPlugin = (config) => + withSettingsGradle(config, (configuration) => { configuration.modResults.contents += ` ${INFO_GENERATED_COMMENT_ANDROID} include ':fishjam-cloud-android-client' @@ -16,10 +16,9 @@ project(':fishjam-cloud-android-client').projectDir = new File('../../../package return configuration; }); -}; -const withCustomProjectBuildGradle: ConfigPlugin = (config) => { - return withProjectBuildGradle(config, (configuration) => { +const withCustomProjectBuildGradle: ConfigPlugin = (config) => + withProjectBuildGradle(config, (configuration) => { const dokkaClasspath = ` ${INFO_GENERATED_COMMENT_ANDROID} classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.8.10") @@ -37,10 +36,9 @@ classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.8.10") return configuration; }); -}; -const withCustomGradleProperties: ConfigPlugin = (config) => { - return withGradleProperties(config, (configuration) => { +const withCustomGradleProperties: ConfigPlugin = (config) => + withGradleProperties(config, (configuration) => { configuration.modResults.push({ type: 'property', key: 'org.gradle.caching', @@ -58,7 +56,6 @@ const withCustomGradleProperties: ConfigPlugin = (config) => { }); return configuration; }); -}; export const withCustomConfigAndroid: ConfigPlugin = (config) => { config = withCustomSettingsGradle(config); diff --git a/examples/fishjam-chat/plugin/src/with-custom-config-ios.ts b/examples/fishjam-chat/plugin/src/with-custom-config-ios.ts index 8b416a83..bce48e1a 100644 --- a/examples/fishjam-chat/plugin/src/with-custom-config-ios.ts +++ b/examples/fishjam-chat/plugin/src/with-custom-config-ios.ts @@ -13,9 +13,9 @@ function replaceCloudClientForExtension(podfileContent: string) { 'g', ); - podfileContent = podfileContent.replace(targetRegex, (match) => { - return match.replace(podToReplace, replacementPod); - }); + podfileContent = podfileContent.replace(targetRegex, (match) => + match.replace(podToReplace, replacementPod), + ); return podfileContent; } diff --git a/examples/webdriverio-test/configuration.ts b/examples/webdriverio-test/configuration.ts index d336878c..cfc3ef43 100644 --- a/examples/webdriverio-test/configuration.ts +++ b/examples/webdriverio-test/configuration.ts @@ -32,9 +32,8 @@ const getIosDeviceCapabilities = ( const getCapabilityIfDeviceAvailable = ( deviceName: string | undefined, capabilityGetter: (device: string) => Capabilities.RemoteCapability, -): Capabilities.RemoteCapability | undefined => { - return deviceName ? capabilityGetter(deviceName) : undefined; -}; +): Capabilities.RemoteCapability | undefined => + deviceName ? capabilityGetter(deviceName) : undefined; const androidDeviceName = process.env.ANDROID_DEVICE_NAME; const iosDeviceId = process.env.IOS_DEVICE_ID; diff --git a/examples/webdriverio-test/utils/appium_utils.ts b/examples/webdriverio-test/utils/appium_utils.ts index fb3c3b63..47aa79da 100644 --- a/examples/webdriverio-test/utils/appium_utils.ts +++ b/examples/webdriverio-test/utils/appium_utils.ts @@ -5,13 +5,11 @@ type TimeoutConfig = { interval: number; }; -const findTimeoutConfig = (selector: string): TimeoutConfig => { - return { - timeout: TIMEOUT, - timeoutMsg: `Element with selector ${selector} not found within the specified time`, - interval: INTERVAL, - }; -}; +const findTimeoutConfig = (selector: string): TimeoutConfig => ({ + timeout: TIMEOUT, + timeoutMsg: `Element with selector ${selector} not found within the specified time`, + interval: INTERVAL, +}); const getElement = async ( driver: WebdriverIO.Browser, diff --git a/examples/webdriverio-test/utils/fishjam_cloud_utils.ts b/examples/webdriverio-test/utils/fishjam_cloud_utils.ts index 168ccae3..1dcf9a50 100644 --- a/examples/webdriverio-test/utils/fishjam_cloud_utils.ts +++ b/examples/webdriverio-test/utils/fishjam_cloud_utils.ts @@ -20,7 +20,7 @@ const config = new Configuration(configParam); export const createFishjamRoom = async () => { const { createRoom } = RoomApiFp(config); - const createRoomFunction = await createRoom(); + const createRoomFunction = await createRoom({ videoCodec: 'vp8' }); try { const response = await createRoomFunction(); return response.data.data.room; diff --git a/packages/android-client/FishjamClient/build.gradle b/packages/android-client/FishjamClient/build.gradle index 61ea7b70..1ea462bb 100644 --- a/packages/android-client/FishjamClient/build.gradle +++ b/packages/android-client/FishjamClient/build.gradle @@ -87,7 +87,8 @@ dependencies { implementation 'com.google.android.material:material:1.9.0' implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.jakewharton.timber:timber:5.0.1' - implementation 'com.google.protobuf:protobuf-kotlin:4.26.1' + implementation 'com.google.protobuf:protobuf-kotlin:4.28.3' + api 'com.google.protobuf:protobuf-java:4.28.3' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/FishjamClientInternal.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/FishjamClientInternal.kt index 255f7e6a..e48e151d 100644 --- a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/FishjamClientInternal.kt +++ b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/FishjamClientInternal.kt @@ -1,8 +1,6 @@ package com.fishjamcloud.client import android.content.Intent -import com.fishjamcloud.client.events.OfferData -import com.fishjamcloud.client.events.TrackData import com.fishjamcloud.client.media.LocalAudioTrack import com.fishjamcloud.client.media.LocalScreenShareTrack import com.fishjamcloud.client.media.LocalTrack @@ -16,21 +14,22 @@ import com.fishjamcloud.client.models.Endpoint import com.fishjamcloud.client.models.Metadata import com.fishjamcloud.client.models.Peer import com.fishjamcloud.client.models.RTCStats -import com.fishjamcloud.client.models.SerializedMediaEvent import com.fishjamcloud.client.models.SimulcastConfig import com.fishjamcloud.client.models.TrackBandwidthLimit import com.fishjamcloud.client.models.TrackEncoding -import com.fishjamcloud.client.models.VadStatus import com.fishjamcloud.client.models.VideoParameters import com.fishjamcloud.client.ui.VideoTextureViewRenderer import com.fishjamcloud.client.utils.ClosableCoroutineScope import com.fishjamcloud.client.utils.TimberDebugTree +import com.fishjamcloud.client.utils.serializeToMap import com.fishjamcloud.client.webrtc.PeerConnectionFactoryWrapper import com.fishjamcloud.client.webrtc.PeerConnectionListener import com.fishjamcloud.client.webrtc.PeerConnectionManager import com.fishjamcloud.client.webrtc.RTCEngineCommunication import com.fishjamcloud.client.webrtc.RTCEngineListener +import com.github.ajalt.timberkt.BuildConfig import fishjam.PeerNotifications +import fishjam.media_events.server.Server import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob @@ -141,8 +140,8 @@ internal class FishjamClientInternal( if (peerMessage.hasAuthenticated()) { commandsQueue.finishCommand() join() - } else if (peerMessage.hasMediaEvent()) { - receiveEvent(peerMessage.mediaEvent.data) + } else if (peerMessage.hasServerMediaEvent()) { + receiveEvent(peerMessage.serverMediaEvent) } else { Timber.w("Received unexpected websocket message: $peerMessage") } @@ -162,6 +161,7 @@ internal class FishjamClientInternal( PeerNotifications.PeerMessage.AuthRequest .newBuilder() .setToken(connectConfig.token) + .setSdkVersion("mobile-0.6.0") ).build() sendEvent(authRequest) } @@ -209,8 +209,6 @@ internal class FishjamClientInternal( coroutineScope.launch { commandsQueue.addCommand( Command(CommandName.JOIN, ClientState.JOINED) { - // TODO: Remove after FCE-834 - localEndpoint = localEndpoint.copy(metadata = mapOf("peer" to connectConfig?.peerMetadata, "server" to mapOf())) rtcEngineCommunication.connect(connectConfig?.peerMetadata ?: emptyMap()) } ) @@ -219,20 +217,27 @@ internal class FishjamClientInternal( override fun onConnected( endpointID: String, - otherEndpoints: List + endpoints: Map, + iceServers: List ) { localEndpoint = localEndpoint.copy(id = endpointID) + peerConnectionManager.setupIceServers(iceServers) - otherEndpoints.forEach { - var endpoint = Endpoint(it.id, it.metadata) - - for ((trackId, trackData) in it.tracks) { - val track = Track(null, it.id, trackId, trackData.metadata ?: mapOf()) - endpoint = endpoint.addOrReplaceTrack(track) + endpoints.forEach { + val (endpointId, endpointData) = it + if (endpointId == endpointID) { + this.localEndpoint = this.localEndpoint.copy(metadata = endpointData.metadataJson.serializeToMap()) + } else { + var endpoint = Endpoint(endpointId, endpointData.metadataJson.serializeToMap()) - this.listener.onTrackAdded(track) + for ((trackId, trackData) in endpointData.trackIdToTrackMap) { + val track = + Track(null, endpointId, trackId, trackData.metadataJson.serializeToMap()) + endpoint = endpoint.addOrReplaceTrack(track) + this.listener.onTrackAdded(track) + } + this.remoteEndpoints[endpointId] = endpoint } - this.remoteEndpoints[it.id] = (endpoint) } listener.onJoined(endpointID, remoteEndpoints) commandsQueue.finishCommand() @@ -308,7 +313,6 @@ internal class FishjamClientInternal( } override fun onSdpAnswer( - type: String, sdp: String, midToTrackId: Map ) { @@ -465,9 +469,7 @@ internal class FishjamClientInternal( fun updatePeerMetadata(peerMetadata: Metadata) { coroutineScope.launch { - // TODO: Remove after FCE-834 rtcEngineCommunication.updatePeerMetadata(peerMetadata) - localEndpoint = localEndpoint.copy(metadata = mapOf("peer" to connectConfig?.peerMetadata, "server" to mapOf())) } } @@ -535,19 +537,16 @@ internal class FishjamClientInternal( webSocket?.send(peerMessage.toByteArray().toByteString()) } - private fun receiveEvent(event: SerializedMediaEvent) { + private fun receiveEvent(event: Server.MediaEvent) { rtcEngineCommunication.onEvent(event) } - override fun onSendMediaEvent(event: SerializedMediaEvent) { + override fun onSendMediaEvent(event: fishjam.media_events.peer.Peer.MediaEvent) { val mediaEvent = PeerNotifications.PeerMessage .newBuilder() - .setMediaEvent( - PeerNotifications.PeerMessage.MediaEvent - .newBuilder() - .setData(event) - ).build() + .setPeerMediaEvent(event) + .build() sendEvent(mediaEvent) } @@ -588,6 +587,12 @@ internal class FishjamClientInternal( endpointId: String, endpointMetadata: Metadata? ) { + if (endpointId == this.localEndpoint.id) { + localEndpoint = this.localEndpoint.copy(metadata = endpointMetadata) + listener.onPeerUpdated(localEndpoint) + return + } + val endpoint = remoteEndpoints.remove(endpointId) ?: run { Timber.e("Failed to process EndpointUpdated event: Endpoint not found: $endpointId") @@ -621,15 +626,11 @@ internal class FishjamClientInternal( prevTracks = mutableListOf() } - override fun onOfferData( - integratedTurnServers: List, - tracksTypes: Map - ) { + override fun onOfferData(tracksTypes: Server.MediaEvent.OfferData.TrackTypes) { coroutineScope.launch { try { val offer = peerConnectionManager.getSdpOffer( - integratedTurnServers, tracksTypes, localEndpoint.tracks.values.toList() ) @@ -637,7 +638,8 @@ internal class FishjamClientInternal( rtcEngineCommunication.sdpOffer( offer.description, localEndpoint.tracks.map { (_, track) -> track.webrtcId() to track.metadata }.toMap(), - offer.midToTrackIdMapping + offer.midToTrackIdMapping, + localEndpoint.tracks.map { (_, track) -> track.webrtcId() to 1500000 }.toMap() // TODO(FCE-953): Update with simulcast ) peerConnectionManager.onSentSdpOffer() } catch (e: Exception) { @@ -649,12 +651,12 @@ internal class FishjamClientInternal( override fun onRemoteCandidate( candidate: String, sdpMLineIndex: Int, - sdpMid: Int? + sdpMid: String ) { coroutineScope.launch { val iceCandidate = IceCandidate( - sdpMid?.toString() ?: "", + sdpMid, sdpMLineIndex, candidate ) @@ -665,9 +667,11 @@ internal class FishjamClientInternal( override fun onTracksAdded( endpointId: String, - tracks: Map + trackIdToTrack: Map ) { - if (localEndpoint.id == endpointId) return + if (localEndpoint.id == endpointId) { + return + } val endpoint = remoteEndpoints.remove(endpointId) ?: run { @@ -677,15 +681,15 @@ internal class FishjamClientInternal( val updatedTracks = endpoint.tracks.toMutableMap() - for ((trackId, trackData) in tracks) { + for ((trackId, trackData) in trackIdToTrack) { var track = endpoint.tracks.values.firstOrNull { track -> track.getRTCEngineId() == trackId } if (track != null) { - track.metadata = trackData.metadata ?: mapOf() + track.metadata = trackData.metadataJson.serializeToMap() } else { - track = Track(null, endpointId, trackId, trackData.metadata ?: mapOf()) + track = Track(null, endpointId, trackId, trackData.metadataJson.serializeToMap()) this.listener.onTrackAdded(track) } - updatedTracks[track.id()] = track + updatedTracks[trackId] = track } val updatedEndpoint = endpoint.copy(tracks = updatedTracks) @@ -727,7 +731,7 @@ internal class FishjamClientInternal( this.listener.onTrackUpdated(track) } - override fun onTrackEncodingChanged( + fun onTrackEncodingChanged( endpointId: String, trackId: String, encoding: String, @@ -753,20 +757,16 @@ internal class FishjamClientInternal( override fun onVadNotification( trackId: String, - status: String + status: Server.MediaEvent.VadNotification.Status ) { val track = getTrackWithRtcEngineId(trackId) as? RemoteAudioTrack ?: run { Timber.e("Invalid track id = $trackId") return } - val vadStatus = VadStatus.fromString(status) - if (vadStatus == null) { - Timber.e("Invalid vad status = $status") - return - } - if (track.vadStatus != vadStatus) { - track.vadStatus = vadStatus + + if (track.vadStatus != status) { + track.vadStatus = status listener.onTrackUpdated(track) } } @@ -785,6 +785,10 @@ internal class FishjamClientInternal( return } + if (track.endpointId == this.localEndpoint.id) { + return + } + val trackId = track.id() track = diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/events/Event.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/events/Event.kt deleted file mode 100644 index 33eab18b..00000000 --- a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/events/Event.kt +++ /dev/null @@ -1,429 +0,0 @@ -package com.fishjamcloud.client.events - -import com.fishjamcloud.client.models.Metadata -import com.fishjamcloud.client.models.Payload -import com.fishjamcloud.client.models.SimulcastConfig -import com.google.gson.GsonBuilder -import com.google.gson.JsonParseException -import com.google.gson.ToNumberPolicy -import com.google.gson.annotations.SerializedName -import com.google.gson.reflect.TypeToken -import timber.log.Timber - -internal val gson = GsonBuilder().setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE).create() - -// convert a data class to a map -internal fun T.serializeToMap(): Map = convert() - -// convert a map to a data class -internal inline fun Map.toDataClass(): T = convert() - -// convert an object of type I to type O -internal inline fun I.convert(): O { - val json = gson.toJson(this) - return gson.fromJson(json, object : TypeToken() {}.type) -} - -sealed class SendableEvent - -data class Connect( - val type: String, - val data: Data -) : SendableEvent() { - data class Data( - val metadata: Metadata? - ) - - constructor(metadata: Metadata? = mapOf()) : this("connect", Data(metadata)) -} - -data class SdpOffer( - val type: String, - val data: Payload -) : SendableEvent() { - constructor(sdp: String, trackIdToTrackMetadata: Map, midToTrackId: Map) : - this( - "custom", - mapOf( - "type" to "sdpOffer", - "data" to - mapOf( - "sdpOffer" to - mapOf( - "type" to "offer", - "sdp" to sdp - ), - "trackIdToTrackMetadata" to trackIdToTrackMetadata, - "midToTrackId" to midToTrackId - ) - ) - ) -} - -data class LocalCandidate( - val type: String, - val data: Payload -) : SendableEvent() { - constructor(candidate: String, sdpMLineIndex: Int, sdpMid: Int?, usernameFragment: String?) : - this( - "custom", - mapOf( - "type" to "candidate", - "data" to - mapOf( - "candidate" to candidate, - "sdpMLineIndex" to sdpMLineIndex, - "sdpMid" to sdpMid, - "usernameFragment" to usernameFragment - ) - ) - ) -} - -data class RenegotiateTracks( - val type: String, - val data: Payload -) : SendableEvent() { - constructor() : - this( - "custom", - mapOf( - "type" to "renegotiateTracks" - ) - ) -} - -data class SelectEncoding( - val type: String, - val data: Payload -) : SendableEvent() { - constructor(trackId: String, encoding: String) : - this( - "custom", - mapOf( - "type" to "setTargetTrackVariant", - "data" to - mapOf( - "trackId" to trackId, - "variant" to encoding - ) - ) - ) -} - -data class UpdateEndpointMetadata( - val type: String, - val data: Data -) : SendableEvent() { - data class Data( - val metadata: Metadata? - ) - - constructor(metadata: Metadata? = mapOf()) : this("updatePeerMetadata", Data(metadata)) -} - -data class UpdateTrackMetadata( - val type: String, - val data: Data -) : SendableEvent() { - data class Data( - val trackId: String, - val trackMetadata: Metadata? - ) - - constructor(trackId: String, trackMetadata: Metadata = mapOf()) : this( - "updateTrackMetadata", - Data(trackId, trackMetadata) - ) -} - -data class Disconnect( - val type: String -) : SendableEvent() { - constructor() : this("disconnect") -} - -enum class ReceivableEventType { - @SerializedName("connected") - Connected, - - @SerializedName("endpointAdded") - EndpointAdded, - - @SerializedName("endpointUpdated") - EndpointUpdated, - - @SerializedName("endpointRemoved") - EndpointRemoved, - - @SerializedName("custom") - Custom, - - @SerializedName("offerData") - OfferData, - - @SerializedName("candidate") - Candidate, - - @SerializedName("tracksAdded") - TracksAdded, - - @SerializedName("tracksRemoved") - TracksRemoved, - - @SerializedName("trackUpdated") - TrackUpdated, - - @SerializedName("sdpAnswer") - SdpAnswer, - - @SerializedName("encodingSwitched") - EncodingSwitched, - - @SerializedName("vadNotification") - VadNotification, - - @SerializedName("bandwidthEstimation") - BandwidthEstimation -} - -internal data class BaseReceivableEvent( - val type: ReceivableEventType -) - -sealed class ReceivableEvent { - companion object { - fun decode(payload: Payload): ReceivableEvent? { - try { - val eventBase: BaseReceivableEvent = payload.toDataClass() - - return when (eventBase.type) { - ReceivableEventType.Connected -> - payload.toDataClass() - - ReceivableEventType.EndpointAdded -> - payload.toDataClass() - - ReceivableEventType.EndpointRemoved -> - payload.toDataClass() - - ReceivableEventType.EndpointUpdated -> - payload.toDataClass() - - ReceivableEventType.TracksAdded -> - payload.toDataClass() - - ReceivableEventType.TracksRemoved -> - payload.toDataClass() - - ReceivableEventType.TrackUpdated -> - payload.toDataClass() - - ReceivableEventType.Custom -> { - val customEventBase = payload.toDataClass() - - return when (customEventBase.data.type) { - ReceivableEventType.OfferData -> - payload.toDataClass>().data - - ReceivableEventType.Candidate -> - payload.toDataClass>().data - - ReceivableEventType.SdpAnswer -> - payload.toDataClass>().data - - ReceivableEventType.EncodingSwitched -> - payload.toDataClass>().data - - ReceivableEventType.VadNotification -> - payload.toDataClass>().data - - ReceivableEventType.BandwidthEstimation -> - payload.toDataClass>().data - - else -> - null - } - } - - else -> - null - } - } catch (e: JsonParseException) { - Timber.e(e) - return null - } - } - } -} - -data class TrackData( - val metadata: Metadata?, - val simulcastConfig: SimulcastConfig? -) - -data class Endpoint( - val id: String, - val type: String, - val metadata: Metadata? = mapOf(), - val tracks: Map = mapOf() -) - -data class Connected( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val id: String, - val otherEndpoints: List - ) -} - -data class EndpointAdded( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val id: String, - val type: String, - val metadata: Metadata?, - val tracks: Map - ) -} - -data class EndpointUpdated( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val id: String, - val metadata: Metadata? - ) -} - -data class EndpointRemoved( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val id: String, - val reason: String - ) -} - -data class OfferData( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class TurnServer( - val username: String, - val password: String, - val serverAddr: String, - val serverPort: UInt, - val transport: String - ) - - data class Data( - val integratedTurnServers: List, - val tracksTypes: Map - ) -} - -data class TracksAdded( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val endpointId: String, - val tracks: Map - ) -} - -data class TracksRemoved( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val endpointId: String, - val trackIds: List - ) -} - -data class TrackUpdated( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val endpointId: String, - val trackId: String, - val metadata: Metadata? - ) -} - -data class SdpAnswer( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val type: String, - val sdp: String, - val midToTrackId: Map - ) -} - -data class RemoteCandidate( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val candidate: String, - val sdpMLineIndex: Int, - val sdpMid: Int?, - val usernameFragment: String? - ) -} - -data class EncodingSwitched( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val endpointId: String, - val trackId: String, - val encoding: String, - val reason: String - ) -} - -data class VadNotification( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val trackId: String, - val status: String - ) -} - -data class BandwidthEstimation( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val estimation: Double - ) -} - -data class BaseCustomEvent( - val type: ReceivableEventType, - val data: Data -) : ReceivableEvent() { - data class Data( - val type: ReceivableEventType - ) -} - -class CustomEvent( - val type: ReceivableEventType, - val data: Event -) diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/media/RemoteAudioTrack.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/media/RemoteAudioTrack.kt index ba7c0379..0159caf7 100644 --- a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/media/RemoteAudioTrack.kt +++ b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/media/RemoteAudioTrack.kt @@ -1,7 +1,7 @@ package com.fishjamcloud.client.media import com.fishjamcloud.client.models.Metadata -import com.fishjamcloud.client.models.VadStatus +import fishjam.media_events.server.Server import org.webrtc.AudioTrack import java.util.UUID @@ -18,7 +18,7 @@ class RemoteAudioTrack( ) : Track(audioTrack, endpointId, rtcEngineId, metadata, id) { private var onVadNotificationListener: (OnVoiceActivityChangedListener)? = null - var vadStatus: VadStatus = VadStatus.SILENCE + var vadStatus = Server.MediaEvent.VadNotification.Status.STATUS_SILENCE internal set(value) { field = value onVadNotificationListener?.let { onVadNotificationListener?.onVoiceActivityChanged(this) } diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/utils/JsonUtils.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/utils/JsonUtils.kt new file mode 100644 index 00000000..d5b2dd77 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/utils/JsonUtils.kt @@ -0,0 +1,15 @@ +package com.fishjamcloud.client.utils + +import com.google.gson.GsonBuilder +import com.google.gson.JsonParseException +import timber.log.Timber + +internal val gson = GsonBuilder().create() + +internal fun String.serializeToMap(): Map = + try { + gson.fromJson(this, Map::class.java) as Map + } catch (e: JsonParseException) { + Timber.e(e, "Failed to parse JSON string to map") + emptyMap() + } diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/PeerConnectionManager.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/PeerConnectionManager.kt index 8816f069..13849392 100644 --- a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/PeerConnectionManager.kt +++ b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/PeerConnectionManager.kt @@ -1,6 +1,5 @@ package com.fishjamcloud.client.webrtc -import com.fishjamcloud.client.events.OfferData import com.fishjamcloud.client.media.LocalScreenShareTrack import com.fishjamcloud.client.media.LocalVideoTrack import com.fishjamcloud.client.media.Track @@ -18,6 +17,7 @@ import com.fishjamcloud.client.utils.createOffer import com.fishjamcloud.client.utils.getEncodings import com.fishjamcloud.client.utils.setLocalDescription import com.fishjamcloud.client.utils.setRemoteDescription +import fishjam.media_events.server.Server import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.launch @@ -50,7 +50,7 @@ internal class PeerConnectionManager( private var config: PeerConnection.RTCConfiguration? = null private var queuedRemoteCandidates: MutableList? = null private val qrcMutex = Mutex() - private var midToTrackId: Map = HashMap() + private var midToTrackId: Map = emptyMap() private val coroutineScope: CoroutineScope = ClosableCoroutineScope(SupervisorJob()) @@ -264,46 +264,11 @@ internal class PeerConnectionManager( } } - private fun prepareIceServers(integratedTurnServers: List) { - if (config != null || iceServers != null) { - Timber.e("prepareIceServers: Config or ice servers are already initialized, skipping the preparation") - return - } - - val isExWebrtc = integratedTurnServers.isEmpty() - - if (isExWebrtc) { - val iceServerList = listOf("stun:stun.l.google.com:19302", "stun:stun.l.google.com:5349") - this.iceServers = listOf(PeerConnection.IceServer.builder(iceServerList).createIceServer()) - } else { - this.iceServers = - integratedTurnServers.map { - val url = "turn:${it.serverAddr}:${it.serverPort}?transport=${it.transport}" - - PeerConnection.IceServer - .builder(url) - .setUsername(it.username) - .setPassword(it.password) - .createIceServer() - } - } - - val config = PeerConnection.RTCConfiguration(iceServers) - config.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN - config.iceTransportsType = - if (isExWebrtc) { - PeerConnection.IceTransportsType.ALL - } else { - PeerConnection.IceTransportsType.RELAY - } - this.config = config - } - - private fun addNecessaryTransceivers(tracksTypes: Map) { + private fun addNecessaryTransceivers(tracksTypes: Server.MediaEvent.OfferData.TrackTypes) { val pc = peerConnection ?: return - val necessaryAudio = tracksTypes["audio"] ?: 0 - val necessaryVideo = tracksTypes["video"] ?: 0 + val necessaryAudio = tracksTypes.audio + val necessaryVideo = tracksTypes.video var lackingAudio = necessaryAudio var lackingVideo = necessaryVideo @@ -333,6 +298,19 @@ internal class PeerConnectionManager( } } + fun setupIceServers(iceServers: List) { + val rtcIceServers = + iceServers.map { server -> + PeerConnection.IceServer + .builder(server.urlsList) + .setUsername(server.username) + .setPassword(server.credential) + .createIceServer() + } + + this.iceServers = rtcIceServers + } + suspend fun onSdpAnswer( sdp: String, midToTrackId: Map @@ -376,12 +354,9 @@ internal class PeerConnectionManager( ) suspend fun getSdpOffer( - integratedTurnServers: List, - tracksTypes: Map, + tracksTypes: Server.MediaEvent.OfferData.TrackTypes, localTracks: List ): SdpOffer { - val isExWebrtc = integratedTurnServers.isEmpty() - qrcMutex.withLock { this@PeerConnectionManager.queuedRemoteCandidates = mutableListOf() } @@ -389,21 +364,19 @@ internal class PeerConnectionManager( sentSdpOffer = false this.queuedLocalCandidates = mutableListOf() } - prepareIceServers(integratedTurnServers) - var needsRestart = true + val config = PeerConnection.RTCConfiguration(iceServers) + config.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN + config.iceTransportsType = PeerConnection.IceTransportsType.ALL + this.config = config + if (peerConnection == null) { setupPeerConnection(localTracks) - needsRestart = false } peerConnectionMutex.withLock { val pc = peerConnection!! - if (needsRestart && !isExWebrtc) { - pc.restartIce() - } - addNecessaryTransceivers(tracksTypes) pc.transceivers.forEach { @@ -471,7 +444,7 @@ internal class PeerConnectionManager( iceServers = null config = null queuedRemoteCandidates = null - midToTrackId = HashMap() + midToTrackId = emptyMap() streamIds = listOf(UUID.randomUUID().toString()) } diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineCommunication.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineCommunication.kt index f00c06d8..01b3d830 100644 --- a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineCommunication.kt +++ b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineCommunication.kt @@ -1,36 +1,12 @@ package com.fishjamcloud.client.webrtc -import com.fishjamcloud.client.events.BandwidthEstimation -import com.fishjamcloud.client.events.Connect -import com.fishjamcloud.client.events.Connected -import com.fishjamcloud.client.events.Disconnect -import com.fishjamcloud.client.events.EncodingSwitched -import com.fishjamcloud.client.events.EndpointAdded -import com.fishjamcloud.client.events.EndpointRemoved -import com.fishjamcloud.client.events.EndpointUpdated -import com.fishjamcloud.client.events.LocalCandidate -import com.fishjamcloud.client.events.OfferData -import com.fishjamcloud.client.events.ReceivableEvent -import com.fishjamcloud.client.events.RemoteCandidate -import com.fishjamcloud.client.events.RenegotiateTracks -import com.fishjamcloud.client.events.SdpAnswer -import com.fishjamcloud.client.events.SdpOffer -import com.fishjamcloud.client.events.SelectEncoding -import com.fishjamcloud.client.events.SendableEvent -import com.fishjamcloud.client.events.TrackUpdated -import com.fishjamcloud.client.events.TracksAdded -import com.fishjamcloud.client.events.TracksRemoved -import com.fishjamcloud.client.events.UpdateEndpointMetadata -import com.fishjamcloud.client.events.UpdateTrackMetadata -import com.fishjamcloud.client.events.VadNotification -import com.fishjamcloud.client.events.gson -import com.fishjamcloud.client.events.serializeToMap +import android.util.Log import com.fishjamcloud.client.models.Metadata -import com.fishjamcloud.client.models.SerializedMediaEvent import com.fishjamcloud.client.models.TrackEncoding -import com.google.gson.reflect.TypeToken +import com.fishjamcloud.client.utils.gson +import com.fishjamcloud.client.utils.serializeToMap +import fishjam.media_events.Shared import timber.log.Timber -import kotlin.math.roundToLong internal class RTCEngineCommunication { private val listeners = mutableListOf() @@ -44,34 +20,69 @@ internal class RTCEngineCommunication { } fun connect(endpointMetadata: Metadata) { - sendEvent(Connect(endpointMetadata)) + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setConnect( + fishjam.media_events.peer.Peer.MediaEvent.Connect + .newBuilder() + .setMetadataJson(gson.toJson(endpointMetadata)) + .build() + ).build() + + sendEvent(mediaEvent) } fun updatePeerMetadata(endpointMetadata: Metadata) { - sendEvent(UpdateEndpointMetadata(endpointMetadata)) + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setUpdateEndpointMetadata( + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata + .newBuilder() + .setMetadataJson(gson.toJson(endpointMetadata)) + .build() + ).build() + + sendEvent(mediaEvent) } fun updateTrackMetadata( trackId: String, trackMetadata: Metadata ) { - sendEvent(UpdateTrackMetadata(trackId, trackMetadata)) + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setUpdateTrackMetadata( + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata + .newBuilder() + .setTrackId(trackId) + .setMetadataJson(gson.toJson(trackMetadata)) + .build() + ).build() + + sendEvent(mediaEvent) } fun setTargetTrackEncoding( trackId: String, encoding: TrackEncoding ) { - sendEvent( - SelectEncoding( - trackId, - encoding.rid - ) - ) + // TODO(FCE-953): This will be useful after simulcast is enabled } fun renegotiateTracks() { - sendEvent(RenegotiateTracks()) + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setRenegotiateTracks( + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks + .newBuilder() + .build() + ).build() + + sendEvent(mediaEvent) } fun localCandidate( @@ -80,149 +91,172 @@ internal class RTCEngineCommunication { sdpMid: Int?, usernameFragment: String? ) { - sendEvent( - LocalCandidate( - sdp, - sdpMLineIndex, - sdpMid, - usernameFragment - ) - ) + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setCandidate( + Shared.Candidate + .newBuilder() + .setCandidate(sdp) + .setSdpMLineIndex(sdpMLineIndex) + .apply { + sdpMid?.let { setSdpMid(it.toString()) } + usernameFragment?.let { setUsernameFragment(it) } + }.build() + ).build() + + sendEvent(mediaEvent) } fun sdpOffer( sdp: String, trackIdToTrackMetadata: Map, - midToTrackId: Map + midToTrackId: Map, + trackIdToBitrates: Map ) { - sendEvent( - SdpOffer( - sdp, - trackIdToTrackMetadata, - midToTrackId - ) - ) + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setSdpOffer( + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer + .newBuilder() + .setSdp(sdp) + .putAllMidToTrackId(midToTrackId) + .putAllTrackIdToMetadataJson( + trackIdToTrackMetadata.mapValues { (_, metadata) -> + metadata?.let { gson.toJson(it) } ?: "" + } + ).putAllTrackIdToBitrates( + trackIdToBitrates.mapValues { (trackId, bitrate) -> + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates + .newBuilder() + .setTrackId(trackId) + .addVariantBitrates( + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate + .newBuilder() + .setVariant(fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED) // TODO(FCE-953): Update with simulcast + .setBitrate(bitrate) + .build() + ).build() + } + ).build() + ).build() + + sendEvent(mediaEvent) } fun disconnect() { - sendEvent(Disconnect()) - } + val mediaEvent = + fishjam.media_events.peer.Peer.MediaEvent + .newBuilder() + .setDisconnect( + fishjam.media_events.peer.Peer.MediaEvent.Disconnect + .newBuilder() + .build() + ).build() - private fun sendEvent(event: SendableEvent) { - val serializedMediaEvent = gson.toJson(event.serializeToMap()) - listeners.forEach { listener -> listener.onSendMediaEvent(serializedMediaEvent) } + sendEvent(mediaEvent) } - private fun decodeEvent(event: SerializedMediaEvent): ReceivableEvent? { - val type = object : TypeToken>() {}.type - - val rawMessage: Map = gson.fromJson(event, type) - - ReceivableEvent.decode(rawMessage)?.let { - return it - } ?: run { - Timber.d("Failed to decode event $rawMessage") - return null - } + private fun sendEvent(event: fishjam.media_events.peer.Peer.MediaEvent) { + listeners.forEach { listener -> listener.onSendMediaEvent(event) } } - fun onEvent(serializedEvent: SerializedMediaEvent) { - when (val event = decodeEvent(serializedEvent)) { - is Connected -> + fun onEvent(event: fishjam.media_events.server.Server.MediaEvent) { + Log.i("IncomingEvent", event.toString()) + + when { + event.hasConnected() -> listeners.forEach { listener -> listener.onConnected( - event.data.id, - event.data.otherEndpoints + event.connected.endpointId, + event.connected.endpointIdToEndpointMap, + event.connected.iceServersList ) } - is OfferData -> + event.hasOfferData() -> listeners.forEach { listener -> listener.onOfferData( - event.data.integratedTurnServers, - event.data.tracksTypes + event.offerData.tracksTypes ) } - is EndpointRemoved -> listeners.forEach { listener -> listener.onEndpointRemoved(event.data.id) } - is EndpointAdded -> + event.hasEndpointRemoved() -> + listeners.forEach { listener -> + listener.onEndpointRemoved(event.endpointRemoved.endpointId) + } + + event.hasEndpointAdded() -> listeners.forEach { listener -> listener.onEndpointAdded( - event.data.id, - event.data.metadata + event.endpointAdded.endpointId, + event.endpointAdded.metadataJson.serializeToMap() ) } - is EndpointUpdated -> + event.hasEndpointUpdated() -> listeners.forEach { listener -> listener.onEndpointUpdated( - event.data.id, - event.data.metadata + event.endpointUpdated.endpointId, + event.endpointUpdated.metadataJson.serializeToMap() ) } - is RemoteCandidate -> + event.hasCandidate() -> listeners.forEach { listener -> listener.onRemoteCandidate( - event.data.candidate, - event.data.sdpMLineIndex, - event.data.sdpMid + event.candidate.candidate, + event.candidate.sdpMLineIndex, + event.candidate.sdpMid ) } - is SdpAnswer -> + event.hasSdpAnswer() -> listeners.forEach { listener -> listener.onSdpAnswer( - event.data.type, - event.data.sdp, - event.data.midToTrackId + event.sdpAnswer.sdp, + event.sdpAnswer.midToTrackIdMap ) } - is TrackUpdated -> + event.hasTrackUpdated() -> listeners.forEach { listener -> listener.onTrackUpdated( - event.data.endpointId, - event.data.trackId, - event.data.metadata + event.trackUpdated.endpointId, + event.trackUpdated.trackId, + event.trackUpdated.metadataJson.serializeToMap() ) } - is TracksAdded -> + event.hasTracksAdded() -> listeners.forEach { listener -> listener.onTracksAdded( - event.data.endpointId, - event.data.tracks + event.tracksAdded.endpointId, + event.tracksAdded.trackIdToTrackMap ) } - is TracksRemoved -> + event.hasTracksRemoved() -> listeners.forEach { listener -> listener.onTracksRemoved( - event.data.endpointId, - event.data.trackIds + event.tracksRemoved.endpointId, + event.tracksRemoved.trackIdsList ) } - is EncodingSwitched -> - listeners.forEach { listener -> - listener.onTrackEncodingChanged( - event.data.endpointId, - event.data.trackId, - event.data.encoding, - event.data.reason - ) - } - - is VadNotification -> + event.hasVadNotification() -> listeners.forEach { listener -> listener.onVadNotification( - event.data.trackId, - event.data.status + event.vadNotification.trackId, + event.vadNotification.status ) } - is BandwidthEstimation -> listeners.forEach { listener -> listener.onBandwidthEstimation(event.data.estimation.roundToLong()) } + event.hasTrackVariantSwitched() -> {} // TODO(FCE-953): Add with simulcast + event.hasTrackVariantDisabled() -> {} // TODO(FCE-953): Add with simulcast + event.hasTrackVariantEnabled() -> {} // TODO(FCE-953): Add with simulcast + else -> Timber.e("Failed to process unknown event: $event") } } diff --git a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineListener.kt b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineListener.kt index d6a6c494..027b4202 100644 --- a/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineListener.kt +++ b/packages/android-client/FishjamClient/src/main/java/com/fishjamcloud/client/webrtc/RTCEngineListener.kt @@ -1,18 +1,16 @@ package com.fishjamcloud.client.webrtc -import com.fishjamcloud.client.events.Endpoint -import com.fishjamcloud.client.events.OfferData -import com.fishjamcloud.client.events.TrackData import com.fishjamcloud.client.models.Metadata -import com.fishjamcloud.client.models.SerializedMediaEvent +import fishjam.media_events.server.Server internal interface RTCEngineListener { fun onConnected( - endpointID: String, - otherEndpoints: List + endpointId: String, + endpoints: Map, + iceServers: List ) - fun onSendMediaEvent(event: SerializedMediaEvent) + fun onSendMediaEvent(event: fishjam.media_events.peer.Peer.MediaEvent) fun onEndpointAdded( endpointId: String, @@ -26,13 +24,9 @@ internal interface RTCEngineListener { endpointMetadata: Metadata? = mapOf() ) - fun onOfferData( - integratedTurnServers: List, - tracksTypes: Map - ) + fun onOfferData(tracksTypes: Server.MediaEvent.OfferData.TrackTypes) fun onSdpAnswer( - type: String, sdp: String, midToTrackId: Map ) @@ -40,12 +34,12 @@ internal interface RTCEngineListener { fun onRemoteCandidate( candidate: String, sdpMLineIndex: Int, - sdpMid: Int? + sdpMid: String ) fun onTracksAdded( endpointId: String, - tracks: Map + trackIdToTrack: Map ) fun onTracksRemoved( @@ -59,16 +53,9 @@ internal interface RTCEngineListener { metadata: Metadata? = mapOf() ) - fun onTrackEncodingChanged( - endpointId: String, - trackId: String, - encoding: String, - encodingReason: String - ) - fun onVadNotification( trackId: String, - status: String + status: Server.MediaEvent.VadNotification.Status ) fun onBandwidthEstimation(estimation: Long) diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/PeerMessageKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/PeerMessageKt.kt index 323f2151..c786ae01 100644 --- a/packages/android-client/FishjamClient/src/main/java/fishjam/PeerMessageKt.kt +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/PeerMessageKt.kt @@ -126,6 +126,54 @@ public object PeerMessageKt { public fun hasRtcStatsReport(): kotlin.Boolean { return _builder.hasRtcStatsReport() } + + /** + * `.fishjam.media_events.peer.MediaEvent peer_media_event = 5;` + */ + public var peerMediaEvent: fishjam.media_events.peer.Peer.MediaEvent + @JvmName("getPeerMediaEvent") + get() = _builder.getPeerMediaEvent() + @JvmName("setPeerMediaEvent") + set(value) { + _builder.setPeerMediaEvent(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent peer_media_event = 5;` + */ + public fun clearPeerMediaEvent() { + _builder.clearPeerMediaEvent() + } + /** + * `.fishjam.media_events.peer.MediaEvent peer_media_event = 5;` + * @return Whether the peerMediaEvent field is set. + */ + public fun hasPeerMediaEvent(): kotlin.Boolean { + return _builder.hasPeerMediaEvent() + } + + /** + * `.fishjam.media_events.server.MediaEvent server_media_event = 6;` + */ + public var serverMediaEvent: fishjam.media_events.server.Server.MediaEvent + @JvmName("getServerMediaEvent") + get() = _builder.getServerMediaEvent() + @JvmName("setServerMediaEvent") + set(value) { + _builder.setServerMediaEvent(value) + } + /** + * `.fishjam.media_events.server.MediaEvent server_media_event = 6;` + */ + public fun clearServerMediaEvent() { + _builder.clearServerMediaEvent() + } + /** + * `.fishjam.media_events.server.MediaEvent server_media_event = 6;` + * @return Whether the serverMediaEvent field is set. + */ + public fun hasServerMediaEvent(): kotlin.Boolean { + return _builder.hasServerMediaEvent() + } public val contentCase: fishjam.PeerNotifications.PeerMessage.ContentCase @JvmName("getContentCase") get() = _builder.getContentCase() @@ -203,33 +251,51 @@ public object PeerMessageKt { public fun clearToken() { _builder.clearToken() } + + /** + * `string sdk_version = 2;` + */ + public var sdkVersion: kotlin.String + @JvmName("getSdkVersion") + get() = _builder.getSdkVersion() + @JvmName("setSdkVersion") + set(value) { + _builder.setSdkVersion(value) + } + /** + * `string sdk_version = 2;` + */ + public fun clearSdkVersion() { + _builder.clearSdkVersion() + } } } - @kotlin.jvm.JvmName("-initializemediaEvent") - public inline fun mediaEvent(block: fishjam.PeerMessageKt.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.MediaEvent = - fishjam.PeerMessageKt.MediaEventKt.Dsl._create(fishjam.PeerNotifications.PeerMessage.MediaEvent.newBuilder()).apply { block() }._build() + @kotlin.jvm.JvmName("-initializerTCStatsReport") + public inline fun rTCStatsReport(block: fishjam.PeerMessageKt.RTCStatsReportKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.RTCStatsReport = + fishjam.PeerMessageKt.RTCStatsReportKt.Dsl._create(fishjam.PeerNotifications.PeerMessage.RTCStatsReport.newBuilder()).apply { block() }._build() /** * ``` - * Any type of WebRTC messages passed betweend FJ and peer + * PeerConnection stats sent by peer + * https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types * ``` * - * Protobuf type `fishjam.PeerMessage.MediaEvent` + * Protobuf type `fishjam.PeerMessage.RTCStatsReport` */ - public object MediaEventKt { + public object RTCStatsReportKt { @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) @com.google.protobuf.kotlin.ProtoDslMarker public class Dsl private constructor( - private val _builder: fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder + private val _builder: fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder ) { public companion object { @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _create(builder: fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder): Dsl = Dsl(builder) + internal fun _create(builder: fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder): Dsl = Dsl(builder) } @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _build(): fishjam.PeerNotifications.PeerMessage.MediaEvent = _builder.build() + internal fun _build(): fishjam.PeerNotifications.PeerMessage.RTCStatsReport = _builder.build() /** * `string data = 1;` @@ -249,32 +315,31 @@ public object PeerMessageKt { } } } - @kotlin.jvm.JvmName("-initializerTCStatsReport") - public inline fun rTCStatsReport(block: fishjam.PeerMessageKt.RTCStatsReportKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.RTCStatsReport = - fishjam.PeerMessageKt.RTCStatsReportKt.Dsl._create(fishjam.PeerNotifications.PeerMessage.RTCStatsReport.newBuilder()).apply { block() }._build() + @kotlin.jvm.JvmName("-initializemediaEvent") + public inline fun mediaEvent(block: fishjam.PeerMessageKt.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.MediaEvent = + fishjam.PeerMessageKt.MediaEventKt.Dsl._create(fishjam.PeerNotifications.PeerMessage.MediaEvent.newBuilder()).apply { block() }._build() /** * ``` - * PeerConnection stats sent by peer - * https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types + * Any type of WebRTC messages passed betweend FJ and peer * ``` * - * Protobuf type `fishjam.PeerMessage.RTCStatsReport` + * Protobuf type `fishjam.PeerMessage.MediaEvent` */ - public object RTCStatsReportKt { + public object MediaEventKt { @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) @com.google.protobuf.kotlin.ProtoDslMarker public class Dsl private constructor( - private val _builder: fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder + private val _builder: fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder ) { public companion object { @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _create(builder: fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder): Dsl = Dsl(builder) + internal fun _create(builder: fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder): Dsl = Dsl(builder) } @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _build(): fishjam.PeerNotifications.PeerMessage.RTCStatsReport = _builder.build() + internal fun _build(): fishjam.PeerNotifications.PeerMessage.MediaEvent = _builder.build() /** * `string data = 1;` @@ -307,14 +372,14 @@ public inline fun fishjam.PeerNotifications.PeerMessage.Authenticated.copy(block public inline fun fishjam.PeerNotifications.PeerMessage.AuthRequest.copy(block: `fishjam`.PeerMessageKt.AuthRequestKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.AuthRequest = `fishjam`.PeerMessageKt.AuthRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() -@kotlin.jvm.JvmSynthetic -public inline fun fishjam.PeerNotifications.PeerMessage.MediaEvent.copy(block: `fishjam`.PeerMessageKt.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.MediaEvent = - `fishjam`.PeerMessageKt.MediaEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() - @kotlin.jvm.JvmSynthetic public inline fun fishjam.PeerNotifications.PeerMessage.RTCStatsReport.copy(block: `fishjam`.PeerMessageKt.RTCStatsReportKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.RTCStatsReport = `fishjam`.PeerMessageKt.RTCStatsReportKt.Dsl._create(this.toBuilder()).apply { block() }._build() +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.PeerNotifications.PeerMessage.MediaEvent.copy(block: `fishjam`.PeerMessageKt.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.PeerNotifications.PeerMessage.MediaEvent = + `fishjam`.PeerMessageKt.MediaEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + public val fishjam.PeerNotifications.PeerMessageOrBuilder.authenticatedOrNull: fishjam.PeerNotifications.PeerMessage.Authenticated? get() = if (hasAuthenticated()) getAuthenticated() else null @@ -327,3 +392,9 @@ public val fishjam.PeerNotifications.PeerMessageOrBuilder.mediaEventOrNull: fish public val fishjam.PeerNotifications.PeerMessageOrBuilder.rtcStatsReportOrNull: fishjam.PeerNotifications.PeerMessage.RTCStatsReport? get() = if (hasRtcStatsReport()) getRtcStatsReport() else null +public val fishjam.PeerNotifications.PeerMessageOrBuilder.peerMediaEventOrNull: fishjam.media_events.peer.Peer.MediaEvent? + get() = if (hasPeerMediaEvent()) getPeerMediaEvent() else null + +public val fishjam.PeerNotifications.PeerMessageOrBuilder.serverMediaEventOrNull: fishjam.media_events.server.Server.MediaEvent? + get() = if (hasServerMediaEvent()) getServerMediaEvent() else null + diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/PeerNotifications.java b/packages/android-client/FishjamClient/src/main/java/fishjam/PeerNotifications.java index 636a75ec..3b9325e8 100644 --- a/packages/android-client/FishjamClient/src/main/java/fishjam/PeerNotifications.java +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/PeerNotifications.java @@ -88,6 +88,36 @@ public interface PeerMessageOrBuilder extends */ fishjam.PeerNotifications.PeerMessage.RTCStatsReportOrBuilder getRtcStatsReportOrBuilder(); + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + * @return Whether the peerMediaEvent field is set. + */ + boolean hasPeerMediaEvent(); + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + * @return The peerMediaEvent. + */ + fishjam.media_events.peer.Peer.MediaEvent getPeerMediaEvent(); + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + fishjam.media_events.peer.Peer.MediaEventOrBuilder getPeerMediaEventOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + * @return Whether the serverMediaEvent field is set. + */ + boolean hasServerMediaEvent(); + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + * @return The serverMediaEvent. + */ + fishjam.media_events.server.Server.MediaEvent getServerMediaEvent(); + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + fishjam.media_events.server.Server.MediaEventOrBuilder getServerMediaEventOrBuilder(); + fishjam.PeerNotifications.PeerMessage.ContentCase getContentCase(); } /** @@ -509,6 +539,18 @@ public interface AuthRequestOrBuilder extends */ com.google.protobuf.ByteString getTokenBytes(); + + /** + * string sdk_version = 2; + * @return The sdkVersion. + */ + java.lang.String getSdkVersion(); + /** + * string sdk_version = 2; + * @return The bytes for sdkVersion. + */ + com.google.protobuf.ByteString + getSdkVersionBytes(); } /** *
@@ -537,6 +579,7 @@ private AuthRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
       }
       private AuthRequest() {
         token_ = "";
+        sdkVersion_ = "";
       }
 
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -591,6 +634,45 @@ public java.lang.String getToken() {
         }
       }
 
+      public static final int SDK_VERSION_FIELD_NUMBER = 2;
+      @SuppressWarnings("serial")
+      private volatile java.lang.Object sdkVersion_ = "";
+      /**
+       * string sdk_version = 2;
+       * @return The sdkVersion.
+       */
+      @java.lang.Override
+      public java.lang.String getSdkVersion() {
+        java.lang.Object ref = sdkVersion_;
+        if (ref instanceof java.lang.String) {
+          return (java.lang.String) ref;
+        } else {
+          com.google.protobuf.ByteString bs = 
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          sdkVersion_ = s;
+          return s;
+        }
+      }
+      /**
+       * string sdk_version = 2;
+       * @return The bytes for sdkVersion.
+       */
+      @java.lang.Override
+      public com.google.protobuf.ByteString
+          getSdkVersionBytes() {
+        java.lang.Object ref = sdkVersion_;
+        if (ref instanceof java.lang.String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          sdkVersion_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+
       private byte memoizedIsInitialized = -1;
       @java.lang.Override
       public final boolean isInitialized() {
@@ -608,6 +690,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
           com.google.protobuf.GeneratedMessage.writeString(output, 1, token_);
         }
+        if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdkVersion_)) {
+          com.google.protobuf.GeneratedMessage.writeString(output, 2, sdkVersion_);
+        }
         getUnknownFields().writeTo(output);
       }
 
@@ -620,6 +705,9 @@ public int getSerializedSize() {
         if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
           size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_);
         }
+        if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdkVersion_)) {
+          size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sdkVersion_);
+        }
         size += getUnknownFields().getSerializedSize();
         memoizedSize = size;
         return size;
@@ -637,6 +725,8 @@ public boolean equals(final java.lang.Object obj) {
 
         if (!getToken()
             .equals(other.getToken())) return false;
+        if (!getSdkVersion()
+            .equals(other.getSdkVersion())) return false;
         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
         return true;
       }
@@ -650,6 +740,8 @@ public int hashCode() {
         hash = (19 * hash) + getDescriptor().hashCode();
         hash = (37 * hash) + TOKEN_FIELD_NUMBER;
         hash = (53 * hash) + getToken().hashCode();
+        hash = (37 * hash) + SDK_VERSION_FIELD_NUMBER;
+        hash = (53 * hash) + getSdkVersion().hashCode();
         hash = (29 * hash) + getUnknownFields().hashCode();
         memoizedHashCode = hash;
         return hash;
@@ -786,6 +878,7 @@ public Builder clear() {
           super.clear();
           bitField0_ = 0;
           token_ = "";
+          sdkVersion_ = "";
           return this;
         }
 
@@ -822,6 +915,9 @@ private void buildPartial0(fishjam.PeerNotifications.PeerMessage.AuthRequest res
           if (((from_bitField0_ & 0x00000001) != 0)) {
             result.token_ = token_;
           }
+          if (((from_bitField0_ & 0x00000002) != 0)) {
+            result.sdkVersion_ = sdkVersion_;
+          }
         }
 
         @java.lang.Override
@@ -841,6 +937,11 @@ public Builder mergeFrom(fishjam.PeerNotifications.PeerMessage.AuthRequest other
             bitField0_ |= 0x00000001;
             onChanged();
           }
+          if (!other.getSdkVersion().isEmpty()) {
+            sdkVersion_ = other.sdkVersion_;
+            bitField0_ |= 0x00000002;
+            onChanged();
+          }
           this.mergeUnknownFields(other.getUnknownFields());
           onChanged();
           return this;
@@ -872,6 +973,11 @@ public Builder mergeFrom(
                   bitField0_ |= 0x00000001;
                   break;
                 } // case 10
+                case 18: {
+                  sdkVersion_ = input.readStringRequireUtf8();
+                  bitField0_ |= 0x00000002;
+                  break;
+                } // case 18
                 default: {
                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                     done = true; // was an endgroup tag
@@ -961,6 +1067,78 @@ public Builder setTokenBytes(
           return this;
         }
 
+        private java.lang.Object sdkVersion_ = "";
+        /**
+         * string sdk_version = 2;
+         * @return The sdkVersion.
+         */
+        public java.lang.String getSdkVersion() {
+          java.lang.Object ref = sdkVersion_;
+          if (!(ref instanceof java.lang.String)) {
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            sdkVersion_ = s;
+            return s;
+          } else {
+            return (java.lang.String) ref;
+          }
+        }
+        /**
+         * string sdk_version = 2;
+         * @return The bytes for sdkVersion.
+         */
+        public com.google.protobuf.ByteString
+            getSdkVersionBytes() {
+          java.lang.Object ref = sdkVersion_;
+          if (ref instanceof String) {
+            com.google.protobuf.ByteString b = 
+                com.google.protobuf.ByteString.copyFromUtf8(
+                    (java.lang.String) ref);
+            sdkVersion_ = b;
+            return b;
+          } else {
+            return (com.google.protobuf.ByteString) ref;
+          }
+        }
+        /**
+         * string sdk_version = 2;
+         * @param value The sdkVersion to set.
+         * @return This builder for chaining.
+         */
+        public Builder setSdkVersion(
+            java.lang.String value) {
+          if (value == null) { throw new NullPointerException(); }
+          sdkVersion_ = value;
+          bitField0_ |= 0x00000002;
+          onChanged();
+          return this;
+        }
+        /**
+         * string sdk_version = 2;
+         * @return This builder for chaining.
+         */
+        public Builder clearSdkVersion() {
+          sdkVersion_ = getDefaultInstance().getSdkVersion();
+          bitField0_ = (bitField0_ & ~0x00000002);
+          onChanged();
+          return this;
+        }
+        /**
+         * string sdk_version = 2;
+         * @param value The bytes for sdkVersion to set.
+         * @return This builder for chaining.
+         */
+        public Builder setSdkVersionBytes(
+            com.google.protobuf.ByteString value) {
+          if (value == null) { throw new NullPointerException(); }
+          checkByteStringIsUtf8(value);
+          sdkVersion_ = value;
+          bitField0_ |= 0x00000002;
+          onChanged();
+          return this;
+        }
+
         // @@protoc_insertion_point(builder_scope:fishjam.PeerMessage.AuthRequest)
       }
 
@@ -1012,8 +1190,8 @@ public fishjam.PeerNotifications.PeerMessage.AuthRequest getDefaultInstanceForTy
 
     }
 
-    public interface MediaEventOrBuilder extends
-        // @@protoc_insertion_point(interface_extends:fishjam.PeerMessage.MediaEvent)
+    public interface RTCStatsReportOrBuilder extends
+        // @@protoc_insertion_point(interface_extends:fishjam.PeerMessage.RTCStatsReport)
         com.google.protobuf.MessageOrBuilder {
 
       /**
@@ -1030,15 +1208,16 @@ public interface MediaEventOrBuilder extends
     }
     /**
      * 
-     * Any type of WebRTC messages passed betweend FJ and peer
+     * PeerConnection stats sent by peer
+     * https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types
      * 
* - * Protobuf type {@code fishjam.PeerMessage.MediaEvent} + * Protobuf type {@code fishjam.PeerMessage.RTCStatsReport} */ - public static final class MediaEvent extends + public static final class RTCStatsReport extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:fishjam.PeerMessage.MediaEvent) - MediaEventOrBuilder { + // @@protoc_insertion_point(message_implements:fishjam.PeerMessage.RTCStatsReport) + RTCStatsReportOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -1047,27 +1226,27 @@ public static final class MediaEvent extends /* minor= */ 26, /* patch= */ 1, /* suffix= */ "", - MediaEvent.class.getName()); + RTCStatsReport.class.getName()); } - // Use MediaEvent.newBuilder() to construct. - private MediaEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use RTCStatsReport.newBuilder() to construct. + private RTCStatsReport(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private MediaEvent() { + private RTCStatsReport() { data_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_descriptor; + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable .ensureFieldAccessorsInitialized( - fishjam.PeerNotifications.PeerMessage.MediaEvent.class, fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder.class); + fishjam.PeerNotifications.PeerMessage.RTCStatsReport.class, fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder.class); } public static final int DATA_FIELD_NUMBER = 1; @@ -1148,10 +1327,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof fishjam.PeerNotifications.PeerMessage.MediaEvent)) { + if (!(obj instanceof fishjam.PeerNotifications.PeerMessage.RTCStatsReport)) { return super.equals(obj); } - fishjam.PeerNotifications.PeerMessage.MediaEvent other = (fishjam.PeerNotifications.PeerMessage.MediaEvent) obj; + fishjam.PeerNotifications.PeerMessage.RTCStatsReport other = (fishjam.PeerNotifications.PeerMessage.RTCStatsReport) obj; if (!getData() .equals(other.getData())) return false; @@ -1173,44 +1352,44 @@ public int hashCode() { return hash; } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom(byte[] data) + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom(java.io.InputStream input) + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1218,26 +1397,26 @@ public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseDelimitedFrom(java.io.InputStream input) + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseDelimitedFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1250,7 +1429,7 @@ public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(fishjam.PeerNotifications.PeerMessage.MediaEvent prototype) { + public static Builder newBuilder(fishjam.PeerNotifications.PeerMessage.RTCStatsReport prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -1267,29 +1446,30 @@ protected Builder newBuilderForType( } /** *
-       * Any type of WebRTC messages passed betweend FJ and peer
+       * PeerConnection stats sent by peer
+       * https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types
        * 
* - * Protobuf type {@code fishjam.PeerMessage.MediaEvent} + * Protobuf type {@code fishjam.PeerMessage.RTCStatsReport} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:fishjam.PeerMessage.MediaEvent) - fishjam.PeerNotifications.PeerMessage.MediaEventOrBuilder { + // @@protoc_insertion_point(builder_implements:fishjam.PeerMessage.RTCStatsReport) + fishjam.PeerNotifications.PeerMessage.RTCStatsReportOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_descriptor; + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable .ensureFieldAccessorsInitialized( - fishjam.PeerNotifications.PeerMessage.MediaEvent.class, fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder.class); + fishjam.PeerNotifications.PeerMessage.RTCStatsReport.class, fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder.class); } - // Construct using fishjam.PeerNotifications.PeerMessage.MediaEvent.newBuilder() + // Construct using fishjam.PeerNotifications.PeerMessage.RTCStatsReport.newBuilder() private Builder() { } @@ -1310,17 +1490,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_descriptor; + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.MediaEvent getDefaultInstanceForType() { - return fishjam.PeerNotifications.PeerMessage.MediaEvent.getDefaultInstance(); + public fishjam.PeerNotifications.PeerMessage.RTCStatsReport getDefaultInstanceForType() { + return fishjam.PeerNotifications.PeerMessage.RTCStatsReport.getDefaultInstance(); } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.MediaEvent build() { - fishjam.PeerNotifications.PeerMessage.MediaEvent result = buildPartial(); + public fishjam.PeerNotifications.PeerMessage.RTCStatsReport build() { + fishjam.PeerNotifications.PeerMessage.RTCStatsReport result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1328,14 +1508,14 @@ public fishjam.PeerNotifications.PeerMessage.MediaEvent build() { } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.MediaEvent buildPartial() { - fishjam.PeerNotifications.PeerMessage.MediaEvent result = new fishjam.PeerNotifications.PeerMessage.MediaEvent(this); + public fishjam.PeerNotifications.PeerMessage.RTCStatsReport buildPartial() { + fishjam.PeerNotifications.PeerMessage.RTCStatsReport result = new fishjam.PeerNotifications.PeerMessage.RTCStatsReport(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(fishjam.PeerNotifications.PeerMessage.MediaEvent result) { + private void buildPartial0(fishjam.PeerNotifications.PeerMessage.RTCStatsReport result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.data_ = data_; @@ -1344,16 +1524,16 @@ private void buildPartial0(fishjam.PeerNotifications.PeerMessage.MediaEvent resu @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof fishjam.PeerNotifications.PeerMessage.MediaEvent) { - return mergeFrom((fishjam.PeerNotifications.PeerMessage.MediaEvent)other); + if (other instanceof fishjam.PeerNotifications.PeerMessage.RTCStatsReport) { + return mergeFrom((fishjam.PeerNotifications.PeerMessage.RTCStatsReport)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(fishjam.PeerNotifications.PeerMessage.MediaEvent other) { - if (other == fishjam.PeerNotifications.PeerMessage.MediaEvent.getDefaultInstance()) return this; + public Builder mergeFrom(fishjam.PeerNotifications.PeerMessage.RTCStatsReport other) { + if (other == fishjam.PeerNotifications.PeerMessage.RTCStatsReport.getDefaultInstance()) return this; if (!other.getData().isEmpty()) { data_ = other.data_; bitField0_ |= 0x00000001; @@ -1479,23 +1659,23 @@ public Builder setDataBytes( return this; } - // @@protoc_insertion_point(builder_scope:fishjam.PeerMessage.MediaEvent) + // @@protoc_insertion_point(builder_scope:fishjam.PeerMessage.RTCStatsReport) } - // @@protoc_insertion_point(class_scope:fishjam.PeerMessage.MediaEvent) - private static final fishjam.PeerNotifications.PeerMessage.MediaEvent DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:fishjam.PeerMessage.RTCStatsReport) + private static final fishjam.PeerNotifications.PeerMessage.RTCStatsReport DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new fishjam.PeerNotifications.PeerMessage.MediaEvent(); + DEFAULT_INSTANCE = new fishjam.PeerNotifications.PeerMessage.RTCStatsReport(); } - public static fishjam.PeerNotifications.PeerMessage.MediaEvent getDefaultInstance() { + public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public MediaEvent parsePartialFrom( + public RTCStatsReport parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1514,24 +1694,24 @@ public MediaEvent parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.MediaEvent getDefaultInstanceForType() { + public fishjam.PeerNotifications.PeerMessage.RTCStatsReport getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface RTCStatsReportOrBuilder extends - // @@protoc_insertion_point(interface_extends:fishjam.PeerMessage.RTCStatsReport) + public interface MediaEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.PeerMessage.MediaEvent) com.google.protobuf.MessageOrBuilder { /** @@ -1548,16 +1728,15 @@ public interface RTCStatsReportOrBuilder extends } /** *
-     * PeerConnection stats sent by peer
-     * https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types
+     * Any type of WebRTC messages passed betweend FJ and peer
      * 
* - * Protobuf type {@code fishjam.PeerMessage.RTCStatsReport} + * Protobuf type {@code fishjam.PeerMessage.MediaEvent} */ - public static final class RTCStatsReport extends + public static final class MediaEvent extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:fishjam.PeerMessage.RTCStatsReport) - RTCStatsReportOrBuilder { + // @@protoc_insertion_point(message_implements:fishjam.PeerMessage.MediaEvent) + MediaEventOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -1566,27 +1745,27 @@ public static final class RTCStatsReport extends /* minor= */ 26, /* patch= */ 1, /* suffix= */ "", - RTCStatsReport.class.getName()); + MediaEvent.class.getName()); } - // Use RTCStatsReport.newBuilder() to construct. - private RTCStatsReport(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use MediaEvent.newBuilder() to construct. + private MediaEvent(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private RTCStatsReport() { + private MediaEvent() { data_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( - fishjam.PeerNotifications.PeerMessage.RTCStatsReport.class, fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder.class); + fishjam.PeerNotifications.PeerMessage.MediaEvent.class, fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder.class); } public static final int DATA_FIELD_NUMBER = 1; @@ -1667,10 +1846,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof fishjam.PeerNotifications.PeerMessage.RTCStatsReport)) { + if (!(obj instanceof fishjam.PeerNotifications.PeerMessage.MediaEvent)) { return super.equals(obj); } - fishjam.PeerNotifications.PeerMessage.RTCStatsReport other = (fishjam.PeerNotifications.PeerMessage.RTCStatsReport) obj; + fishjam.PeerNotifications.PeerMessage.MediaEvent other = (fishjam.PeerNotifications.PeerMessage.MediaEvent) obj; if (!getData() .equals(other.getData())) return false; @@ -1692,44 +1871,44 @@ public int hashCode() { return hash; } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom(byte[] data) + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom(java.io.InputStream input) + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1737,26 +1916,26 @@ public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseDelimitedFrom(java.io.InputStream input) + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseDelimitedFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( + public static fishjam.PeerNotifications.PeerMessage.MediaEvent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1769,7 +1948,7 @@ public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(fishjam.PeerNotifications.PeerMessage.RTCStatsReport prototype) { + public static Builder newBuilder(fishjam.PeerNotifications.PeerMessage.MediaEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -1786,30 +1965,29 @@ protected Builder newBuilderForType( } /** *
-       * PeerConnection stats sent by peer
-       * https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types
+       * Any type of WebRTC messages passed betweend FJ and peer
        * 
* - * Protobuf type {@code fishjam.PeerMessage.RTCStatsReport} + * Protobuf type {@code fishjam.PeerMessage.MediaEvent} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:fishjam.PeerMessage.RTCStatsReport) - fishjam.PeerNotifications.PeerMessage.RTCStatsReportOrBuilder { + // @@protoc_insertion_point(builder_implements:fishjam.PeerMessage.MediaEvent) + fishjam.PeerNotifications.PeerMessage.MediaEventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( - fishjam.PeerNotifications.PeerMessage.RTCStatsReport.class, fishjam.PeerNotifications.PeerMessage.RTCStatsReport.Builder.class); + fishjam.PeerNotifications.PeerMessage.MediaEvent.class, fishjam.PeerNotifications.PeerMessage.MediaEvent.Builder.class); } - // Construct using fishjam.PeerNotifications.PeerMessage.RTCStatsReport.newBuilder() + // Construct using fishjam.PeerNotifications.PeerMessage.MediaEvent.newBuilder() private Builder() { } @@ -1830,17 +2008,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; + return fishjam.PeerNotifications.internal_static_fishjam_PeerMessage_MediaEvent_descriptor; } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.RTCStatsReport getDefaultInstanceForType() { - return fishjam.PeerNotifications.PeerMessage.RTCStatsReport.getDefaultInstance(); + public fishjam.PeerNotifications.PeerMessage.MediaEvent getDefaultInstanceForType() { + return fishjam.PeerNotifications.PeerMessage.MediaEvent.getDefaultInstance(); } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.RTCStatsReport build() { - fishjam.PeerNotifications.PeerMessage.RTCStatsReport result = buildPartial(); + public fishjam.PeerNotifications.PeerMessage.MediaEvent build() { + fishjam.PeerNotifications.PeerMessage.MediaEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1848,14 +2026,14 @@ public fishjam.PeerNotifications.PeerMessage.RTCStatsReport build() { } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.RTCStatsReport buildPartial() { - fishjam.PeerNotifications.PeerMessage.RTCStatsReport result = new fishjam.PeerNotifications.PeerMessage.RTCStatsReport(this); + public fishjam.PeerNotifications.PeerMessage.MediaEvent buildPartial() { + fishjam.PeerNotifications.PeerMessage.MediaEvent result = new fishjam.PeerNotifications.PeerMessage.MediaEvent(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(fishjam.PeerNotifications.PeerMessage.RTCStatsReport result) { + private void buildPartial0(fishjam.PeerNotifications.PeerMessage.MediaEvent result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.data_ = data_; @@ -1864,16 +2042,16 @@ private void buildPartial0(fishjam.PeerNotifications.PeerMessage.RTCStatsReport @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof fishjam.PeerNotifications.PeerMessage.RTCStatsReport) { - return mergeFrom((fishjam.PeerNotifications.PeerMessage.RTCStatsReport)other); + if (other instanceof fishjam.PeerNotifications.PeerMessage.MediaEvent) { + return mergeFrom((fishjam.PeerNotifications.PeerMessage.MediaEvent)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(fishjam.PeerNotifications.PeerMessage.RTCStatsReport other) { - if (other == fishjam.PeerNotifications.PeerMessage.RTCStatsReport.getDefaultInstance()) return this; + public Builder mergeFrom(fishjam.PeerNotifications.PeerMessage.MediaEvent other) { + if (other == fishjam.PeerNotifications.PeerMessage.MediaEvent.getDefaultInstance()) return this; if (!other.getData().isEmpty()) { data_ = other.data_; bitField0_ |= 0x00000001; @@ -1999,23 +2177,23 @@ public Builder setDataBytes( return this; } - // @@protoc_insertion_point(builder_scope:fishjam.PeerMessage.RTCStatsReport) + // @@protoc_insertion_point(builder_scope:fishjam.PeerMessage.MediaEvent) } - // @@protoc_insertion_point(class_scope:fishjam.PeerMessage.RTCStatsReport) - private static final fishjam.PeerNotifications.PeerMessage.RTCStatsReport DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:fishjam.PeerMessage.MediaEvent) + private static final fishjam.PeerNotifications.PeerMessage.MediaEvent DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new fishjam.PeerNotifications.PeerMessage.RTCStatsReport(); + DEFAULT_INSTANCE = new fishjam.PeerNotifications.PeerMessage.MediaEvent(); } - public static fishjam.PeerNotifications.PeerMessage.RTCStatsReport getDefaultInstance() { + public static fishjam.PeerNotifications.PeerMessage.MediaEvent getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public RTCStatsReport parsePartialFrom( + public MediaEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2034,17 +2212,17 @@ public RTCStatsReport parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public fishjam.PeerNotifications.PeerMessage.RTCStatsReport getDefaultInstanceForType() { + public fishjam.PeerNotifications.PeerMessage.MediaEvent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -2060,6 +2238,8 @@ public enum ContentCase AUTH_REQUEST(2), MEDIA_EVENT(3), RTC_STATS_REPORT(4), + PEER_MEDIA_EVENT(5), + SERVER_MEDIA_EVENT(6), CONTENT_NOT_SET(0); private final int value; private ContentCase(int value) { @@ -2081,6 +2261,8 @@ public static ContentCase forNumber(int value) { case 2: return AUTH_REQUEST; case 3: return MEDIA_EVENT; case 4: return RTC_STATS_REPORT; + case 5: return PEER_MEDIA_EVENT; + case 6: return SERVER_MEDIA_EVENT; case 0: return CONTENT_NOT_SET; default: return null; } @@ -2220,6 +2402,68 @@ public fishjam.PeerNotifications.PeerMessage.RTCStatsReportOrBuilder getRtcStats return fishjam.PeerNotifications.PeerMessage.RTCStatsReport.getDefaultInstance(); } + public static final int PEER_MEDIA_EVENT_FIELD_NUMBER = 5; + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + * @return Whether the peerMediaEvent field is set. + */ + @java.lang.Override + public boolean hasPeerMediaEvent() { + return contentCase_ == 5; + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + * @return The peerMediaEvent. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent getPeerMediaEvent() { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEventOrBuilder getPeerMediaEventOrBuilder() { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } + + public static final int SERVER_MEDIA_EVENT_FIELD_NUMBER = 6; + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + * @return Whether the serverMediaEvent field is set. + */ + @java.lang.Override + public boolean hasServerMediaEvent() { + return contentCase_ == 6; + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + * @return The serverMediaEvent. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent getServerMediaEvent() { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent) content_; + } + return fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEventOrBuilder getServerMediaEventOrBuilder() { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent) content_; + } + return fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -2246,6 +2490,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (contentCase_ == 4) { output.writeMessage(4, (fishjam.PeerNotifications.PeerMessage.RTCStatsReport) content_); } + if (contentCase_ == 5) { + output.writeMessage(5, (fishjam.media_events.peer.Peer.MediaEvent) content_); + } + if (contentCase_ == 6) { + output.writeMessage(6, (fishjam.media_events.server.Server.MediaEvent) content_); + } getUnknownFields().writeTo(output); } @@ -2271,6 +2521,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (fishjam.PeerNotifications.PeerMessage.RTCStatsReport) content_); } + if (contentCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (fishjam.media_events.peer.Peer.MediaEvent) content_); + } + if (contentCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (fishjam.media_events.server.Server.MediaEvent) content_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2304,6 +2562,14 @@ public boolean equals(final java.lang.Object obj) { if (!getRtcStatsReport() .equals(other.getRtcStatsReport())) return false; break; + case 5: + if (!getPeerMediaEvent() + .equals(other.getPeerMediaEvent())) return false; + break; + case 6: + if (!getServerMediaEvent() + .equals(other.getServerMediaEvent())) return false; + break; case 0: default: } @@ -2335,6 +2601,14 @@ public int hashCode() { hash = (37 * hash) + RTC_STATS_REPORT_FIELD_NUMBER; hash = (53 * hash) + getRtcStatsReport().hashCode(); break; + case 5: + hash = (37 * hash) + PEER_MEDIA_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getPeerMediaEvent().hashCode(); + break; + case 6: + hash = (37 * hash) + SERVER_MEDIA_EVENT_FIELD_NUMBER; + hash = (53 * hash) + getServerMediaEvent().hashCode(); + break; case 0: default: } @@ -2485,6 +2759,12 @@ public Builder clear() { if (rtcStatsReportBuilder_ != null) { rtcStatsReportBuilder_.clear(); } + if (peerMediaEventBuilder_ != null) { + peerMediaEventBuilder_.clear(); + } + if (serverMediaEventBuilder_ != null) { + serverMediaEventBuilder_.clear(); + } contentCase_ = 0; content_ = null; return this; @@ -2542,6 +2822,14 @@ private void buildPartialOneofs(fishjam.PeerNotifications.PeerMessage result) { rtcStatsReportBuilder_ != null) { result.content_ = rtcStatsReportBuilder_.build(); } + if (contentCase_ == 5 && + peerMediaEventBuilder_ != null) { + result.content_ = peerMediaEventBuilder_.build(); + } + if (contentCase_ == 6 && + serverMediaEventBuilder_ != null) { + result.content_ = serverMediaEventBuilder_.build(); + } } @java.lang.Override @@ -2573,6 +2861,14 @@ public Builder mergeFrom(fishjam.PeerNotifications.PeerMessage other) { mergeRtcStatsReport(other.getRtcStatsReport()); break; } + case PEER_MEDIA_EVENT: { + mergePeerMediaEvent(other.getPeerMediaEvent()); + break; + } + case SERVER_MEDIA_EVENT: { + mergeServerMediaEvent(other.getServerMediaEvent()); + break; + } case CONTENT_NOT_SET: { break; } @@ -2631,6 +2927,20 @@ public Builder mergeFrom( contentCase_ = 4; break; } // case 34 + case 42: { + input.readMessage( + getPeerMediaEventFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getServerMediaEventFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 6; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -3231,6 +3541,290 @@ public fishjam.PeerNotifications.PeerMessage.RTCStatsReportOrBuilder getRtcStats return rtcStatsReportBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent, fishjam.media_events.peer.Peer.MediaEvent.Builder, fishjam.media_events.peer.Peer.MediaEventOrBuilder> peerMediaEventBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + * @return Whether the peerMediaEvent field is set. + */ + @java.lang.Override + public boolean hasPeerMediaEvent() { + return contentCase_ == 5; + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + * @return The peerMediaEvent. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent getPeerMediaEvent() { + if (peerMediaEventBuilder_ == null) { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } else { + if (contentCase_ == 5) { + return peerMediaEventBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + public Builder setPeerMediaEvent(fishjam.media_events.peer.Peer.MediaEvent value) { + if (peerMediaEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + peerMediaEventBuilder_.setMessage(value); + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + public Builder setPeerMediaEvent( + fishjam.media_events.peer.Peer.MediaEvent.Builder builderForValue) { + if (peerMediaEventBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + peerMediaEventBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + public Builder mergePeerMediaEvent(fishjam.media_events.peer.Peer.MediaEvent value) { + if (peerMediaEventBuilder_ == null) { + if (contentCase_ == 5 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.newBuilder((fishjam.media_events.peer.Peer.MediaEvent) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 5) { + peerMediaEventBuilder_.mergeFrom(value); + } else { + peerMediaEventBuilder_.setMessage(value); + } + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + public Builder clearPeerMediaEvent() { + if (peerMediaEventBuilder_ == null) { + if (contentCase_ == 5) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 5) { + contentCase_ = 0; + content_ = null; + } + peerMediaEventBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + public fishjam.media_events.peer.Peer.MediaEvent.Builder getPeerMediaEventBuilder() { + return getPeerMediaEventFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEventOrBuilder getPeerMediaEventOrBuilder() { + if ((contentCase_ == 5) && (peerMediaEventBuilder_ != null)) { + return peerMediaEventBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent peer_media_event = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent, fishjam.media_events.peer.Peer.MediaEvent.Builder, fishjam.media_events.peer.Peer.MediaEventOrBuilder> + getPeerMediaEventFieldBuilder() { + if (peerMediaEventBuilder_ == null) { + if (!(contentCase_ == 5)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } + peerMediaEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent, fishjam.media_events.peer.Peer.MediaEvent.Builder, fishjam.media_events.peer.Peer.MediaEventOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 5; + onChanged(); + return peerMediaEventBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent, fishjam.media_events.server.Server.MediaEvent.Builder, fishjam.media_events.server.Server.MediaEventOrBuilder> serverMediaEventBuilder_; + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + * @return Whether the serverMediaEvent field is set. + */ + @java.lang.Override + public boolean hasServerMediaEvent() { + return contentCase_ == 6; + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + * @return The serverMediaEvent. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent getServerMediaEvent() { + if (serverMediaEventBuilder_ == null) { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent) content_; + } + return fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } else { + if (contentCase_ == 6) { + return serverMediaEventBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + public Builder setServerMediaEvent(fishjam.media_events.server.Server.MediaEvent value) { + if (serverMediaEventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + serverMediaEventBuilder_.setMessage(value); + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + public Builder setServerMediaEvent( + fishjam.media_events.server.Server.MediaEvent.Builder builderForValue) { + if (serverMediaEventBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + serverMediaEventBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + public Builder mergeServerMediaEvent(fishjam.media_events.server.Server.MediaEvent value) { + if (serverMediaEventBuilder_ == null) { + if (contentCase_ == 6 && + content_ != fishjam.media_events.server.Server.MediaEvent.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.newBuilder((fishjam.media_events.server.Server.MediaEvent) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 6) { + serverMediaEventBuilder_.mergeFrom(value); + } else { + serverMediaEventBuilder_.setMessage(value); + } + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + public Builder clearServerMediaEvent() { + if (serverMediaEventBuilder_ == null) { + if (contentCase_ == 6) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 6) { + contentCase_ = 0; + content_ = null; + } + serverMediaEventBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + public fishjam.media_events.server.Server.MediaEvent.Builder getServerMediaEventBuilder() { + return getServerMediaEventFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEventOrBuilder getServerMediaEventOrBuilder() { + if ((contentCase_ == 6) && (serverMediaEventBuilder_ != null)) { + return serverMediaEventBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent) content_; + } + return fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent server_media_event = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent, fishjam.media_events.server.Server.MediaEvent.Builder, fishjam.media_events.server.Server.MediaEventOrBuilder> + getServerMediaEventFieldBuilder() { + if (serverMediaEventBuilder_ == null) { + if (!(contentCase_ == 6)) { + content_ = fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } + serverMediaEventBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent, fishjam.media_events.server.Server.MediaEvent.Builder, fishjam.media_events.server.Server.MediaEventOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 6; + onChanged(); + return serverMediaEventBuilder_; + } + // @@protoc_insertion_point(builder_scope:fishjam.PeerMessage) } @@ -3298,15 +3892,15 @@ public fishjam.PeerNotifications.PeerMessage getDefaultInstanceForType() { com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_fishjam_PeerMessage_AuthRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_fishjam_PeerMessage_MediaEvent_descriptor; + internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable; + internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor; + internal_static_fishjam_PeerMessage_MediaEvent_descriptor; private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable; + internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -3317,27 +3911,35 @@ public fishjam.PeerNotifications.PeerMessage getDefaultInstanceForType() { static { java.lang.String[] descriptorData = { "\n fishjam/peer_notifications.proto\022\007fish" + - "jam\"\363\002\n\013PeerMessage\022;\n\rauthenticated\030\001 \001" + + "jam\032$fishjam/media_events/peer/peer.prot" + + "o\032(fishjam/media_events/server/server.pr" + + "oto\"\222\004\n\013PeerMessage\022;\n\rauthenticated\030\001 \001" + "(\0132\".fishjam.PeerMessage.AuthenticatedH\000" + "\0228\n\014auth_request\030\002 \001(\0132 .fishjam.PeerMes" + "sage.AuthRequestH\000\0226\n\013media_event\030\003 \001(\0132" + "\037.fishjam.PeerMessage.MediaEventH\000\022?\n\020rt" + "c_stats_report\030\004 \001(\0132#.fishjam.PeerMessa" + - "ge.RTCStatsReportH\000\032\017\n\rAuthenticated\032\034\n\013" + - "AuthRequest\022\r\n\005token\030\001 \001(\t\032\032\n\nMediaEvent" + - "\022\014\n\004data\030\001 \001(\t\032\036\n\016RTCStatsReport\022\014\n\004data" + - "\030\001 \001(\tB\t\n\007contentb\006proto3" + "ge.RTCStatsReportH\000\022A\n\020peer_media_event\030" + + "\005 \001(\0132%.fishjam.media_events.peer.MediaE" + + "ventH\000\022E\n\022server_media_event\030\006 \001(\0132\'.fis" + + "hjam.media_events.server.MediaEventH\000\032\017\n" + + "\rAuthenticated\0321\n\013AuthRequest\022\r\n\005token\030\001" + + " \001(\t\022\023\n\013sdk_version\030\002 \001(\t\032\036\n\016RTCStatsRep" + + "ort\022\014\n\004data\030\001 \001(\t\032\032\n\nMediaEvent\022\014\n\004data\030" + + "\001 \001(\tB\t\n\007contentb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + fishjam.media_events.peer.Peer.getDescriptor(), + fishjam.media_events.server.Server.getDescriptor(), }); internal_static_fishjam_PeerMessage_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_fishjam_PeerMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_fishjam_PeerMessage_descriptor, - new java.lang.String[] { "Authenticated", "AuthRequest", "MediaEvent", "RtcStatsReport", "Content", }); + new java.lang.String[] { "Authenticated", "AuthRequest", "MediaEvent", "RtcStatsReport", "PeerMediaEvent", "ServerMediaEvent", "Content", }); internal_static_fishjam_PeerMessage_Authenticated_descriptor = internal_static_fishjam_PeerMessage_descriptor.getNestedTypes().get(0); internal_static_fishjam_PeerMessage_Authenticated_fieldAccessorTable = new @@ -3349,20 +3951,22 @@ public fishjam.PeerNotifications.PeerMessage getDefaultInstanceForType() { internal_static_fishjam_PeerMessage_AuthRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_fishjam_PeerMessage_AuthRequest_descriptor, - new java.lang.String[] { "Token", }); - internal_static_fishjam_PeerMessage_MediaEvent_descriptor = + new java.lang.String[] { "Token", "SdkVersion", }); + internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor = internal_static_fishjam_PeerMessage_descriptor.getNestedTypes().get(2); - internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable = new + internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_fishjam_PeerMessage_MediaEvent_descriptor, + internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor, new java.lang.String[] { "Data", }); - internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor = + internal_static_fishjam_PeerMessage_MediaEvent_descriptor = internal_static_fishjam_PeerMessage_descriptor.getNestedTypes().get(3); - internal_static_fishjam_PeerMessage_RTCStatsReport_fieldAccessorTable = new + internal_static_fishjam_PeerMessage_MediaEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_fishjam_PeerMessage_RTCStatsReport_descriptor, + internal_static_fishjam_PeerMessage_MediaEvent_descriptor, new java.lang.String[] { "Data", }); descriptor.resolveAllFeaturesImmutable(); + fishjam.media_events.peer.Peer.getDescriptor(); + fishjam.media_events.server.Server.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/ServerMessageKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/ServerMessageKt.kt index b4818932..359be1f8 100644 --- a/packages/android-client/FishjamClient/src/main/java/fishjam/ServerMessageKt.kt +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/ServerMessageKt.kt @@ -10,7 +10,7 @@ public inline fun serverMessage(block: fishjam.ServerMessageKt.Dsl.() -> kotlin. fishjam.ServerMessageKt.Dsl._create(fishjam.ServerNotifications.ServerMessage.newBuilder()).apply { block() }._build() /** * ``` - * Defines any type of message passed between FJ and server client + * Defines any type of message passed between FJ and server peer * ``` * * Protobuf type `fishjam.ServerMessage` @@ -1001,7 +1001,7 @@ public object ServerMessageKt { fishjam.ServerMessageKt.AuthRequestKt.Dsl._create(fishjam.ServerNotifications.ServerMessage.AuthRequest.newBuilder()).apply { block() }._build() /** * ``` - * Request sent by client, to authenticate to FJ server + * Request sent by peer, to authenticate to FJ server * ``` * * Protobuf type `fishjam.ServerMessage.AuthRequest` @@ -1045,7 +1045,7 @@ public object ServerMessageKt { fishjam.ServerMessageKt.SubscribeRequestKt.Dsl._create(fishjam.ServerNotifications.ServerMessage.SubscribeRequest.newBuilder()).apply { block() }._build() /** * ``` - * Request sent by client to subsribe for certain message type + * Request sent by peer to subsribe for certain message type * ``` * * Protobuf type `fishjam.ServerMessage.SubscribeRequest` diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/ServerNotifications.java b/packages/android-client/FishjamClient/src/main/java/fishjam/ServerNotifications.java index f22ea5a0..3dd85858 100644 --- a/packages/android-client/FishjamClient/src/main/java/fishjam/ServerNotifications.java +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/ServerNotifications.java @@ -347,7 +347,7 @@ public interface ServerMessageOrBuilder extends } /** *
-   * Defines any type of message passed between FJ and server client
+   * Defines any type of message passed between FJ and server peer
    * 
* * Protobuf type {@code fishjam.ServerMessage} @@ -388,7 +388,7 @@ private ServerMessage() { /** *
-     * Defines message groups for which client can subscribe
+     * Defines message groups for which peer can subscribe
      * 
* * Protobuf enum {@code fishjam.ServerMessage.EventType} @@ -5689,7 +5689,7 @@ public interface AuthRequestOrBuilder extends } /** *
-     * Request sent by client, to authenticate to FJ server
+     * Request sent by peer, to authenticate to FJ server
      * 
* * Protobuf type {@code fishjam.ServerMessage.AuthRequest} @@ -5926,7 +5926,7 @@ protected Builder newBuilderForType( } /** *
-       * Request sent by client, to authenticate to FJ server
+       * Request sent by peer, to authenticate to FJ server
        * 
* * Protobuf type {@code fishjam.ServerMessage.AuthRequest} @@ -6206,7 +6206,7 @@ public interface SubscribeRequestOrBuilder extends } /** *
-     * Request sent by client to subsribe for certain message type
+     * Request sent by peer to subsribe for certain message type
      * 
* * Protobuf type {@code fishjam.ServerMessage.SubscribeRequest} @@ -6422,7 +6422,7 @@ protected Builder newBuilderForType( } /** *
-       * Request sent by client to subsribe for certain message type
+       * Request sent by peer to subsribe for certain message type
        * 
* * Protobuf type {@code fishjam.ServerMessage.SubscribeRequest} @@ -16732,7 +16732,7 @@ protected Builder newBuilderForType( } /** *
-     * Defines any type of message passed between FJ and server client
+     * Defines any type of message passed between FJ and server peer
      * 
* * Protobuf type {@code fishjam.ServerMessage} diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/CandidateKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/CandidateKt.kt new file mode 100644 index 00000000..b1f181b6 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/CandidateKt.kt @@ -0,0 +1,106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/shared.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package fishjam.media_events; + +@kotlin.jvm.JvmName("-initializecandidate") +public inline fun candidate(block: fishjam.media_events.CandidateKt.Dsl.() -> kotlin.Unit): fishjam.media_events.Shared.Candidate = + fishjam.media_events.CandidateKt.Dsl._create(fishjam.media_events.Shared.Candidate.newBuilder()).apply { block() }._build() +/** + * ``` + * Contains information about an ICE candidate which will be sent to the peer/server + * ``` + * + * Protobuf type `fishjam.media_events.Candidate` + */ +public object CandidateKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.Shared.Candidate.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.Shared.Candidate.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.Shared.Candidate = _builder.build() + + /** + * `string candidate = 1;` + */ + public var candidate: kotlin.String + @JvmName("getCandidate") + get() = _builder.getCandidate() + @JvmName("setCandidate") + set(value) { + _builder.setCandidate(value) + } + /** + * `string candidate = 1;` + */ + public fun clearCandidate() { + _builder.clearCandidate() + } + + /** + * `int32 sdp_m_line_index = 2;` + */ + public var sdpMLineIndex: kotlin.Int + @JvmName("getSdpMLineIndex") + get() = _builder.getSdpMLineIndex() + @JvmName("setSdpMLineIndex") + set(value) { + _builder.setSdpMLineIndex(value) + } + /** + * `int32 sdp_m_line_index = 2;` + */ + public fun clearSdpMLineIndex() { + _builder.clearSdpMLineIndex() + } + + /** + * `string sdp_mid = 3;` + */ + public var sdpMid: kotlin.String + @JvmName("getSdpMid") + get() = _builder.getSdpMid() + @JvmName("setSdpMid") + set(value) { + _builder.setSdpMid(value) + } + /** + * `string sdp_mid = 3;` + */ + public fun clearSdpMid() { + _builder.clearSdpMid() + } + + /** + * `string username_fragment = 4;` + */ + public var usernameFragment: kotlin.String + @JvmName("getUsernameFragment") + get() = _builder.getUsernameFragment() + @JvmName("setUsernameFragment") + set(value) { + _builder.setUsernameFragment(value) + } + /** + * `string username_fragment = 4;` + */ + public fun clearUsernameFragment() { + _builder.clearUsernameFragment() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.Shared.Candidate.copy(block: `fishjam.media_events`.CandidateKt.Dsl.() -> kotlin.Unit): fishjam.media_events.Shared.Candidate = + `fishjam.media_events`.CandidateKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/Shared.java b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/Shared.java new file mode 100644 index 00000000..8e88029a --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/Shared.java @@ -0,0 +1,1084 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/shared.proto +// Protobuf Java Version: 4.26.1 + +package fishjam.media_events; + +public final class Shared { + private Shared() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Shared.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code fishjam.media_events.Variant} + */ + public enum Variant + implements com.google.protobuf.ProtocolMessageEnum { + /** + * VARIANT_UNSPECIFIED = 0; + */ + VARIANT_UNSPECIFIED(0), + /** + * VARIANT_LOW = 1; + */ + VARIANT_LOW(1), + /** + * VARIANT_MEDIUM = 2; + */ + VARIANT_MEDIUM(2), + /** + * VARIANT_HIGH = 3; + */ + VARIANT_HIGH(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Variant.class.getName()); + } + /** + * VARIANT_UNSPECIFIED = 0; + */ + public static final int VARIANT_UNSPECIFIED_VALUE = 0; + /** + * VARIANT_LOW = 1; + */ + public static final int VARIANT_LOW_VALUE = 1; + /** + * VARIANT_MEDIUM = 2; + */ + public static final int VARIANT_MEDIUM_VALUE = 2; + /** + * VARIANT_HIGH = 3; + */ + public static final int VARIANT_HIGH_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Variant valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Variant forNumber(int value) { + switch (value) { + case 0: return VARIANT_UNSPECIFIED; + case 1: return VARIANT_LOW; + case 2: return VARIANT_MEDIUM; + case 3: return VARIANT_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Variant> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Variant findValueByNumber(int number) { + return Variant.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return fishjam.media_events.Shared.getDescriptor().getEnumTypes().get(0); + } + + private static final Variant[] VALUES = values(); + + public static Variant valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Variant(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:fishjam.media_events.Variant) + } + + public interface CandidateOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.Candidate) + com.google.protobuf.MessageOrBuilder { + + /** + * string candidate = 1; + * @return The candidate. + */ + java.lang.String getCandidate(); + /** + * string candidate = 1; + * @return The bytes for candidate. + */ + com.google.protobuf.ByteString + getCandidateBytes(); + + /** + * int32 sdp_m_line_index = 2; + * @return The sdpMLineIndex. + */ + int getSdpMLineIndex(); + + /** + * string sdp_mid = 3; + * @return The sdpMid. + */ + java.lang.String getSdpMid(); + /** + * string sdp_mid = 3; + * @return The bytes for sdpMid. + */ + com.google.protobuf.ByteString + getSdpMidBytes(); + + /** + * string username_fragment = 4; + * @return The usernameFragment. + */ + java.lang.String getUsernameFragment(); + /** + * string username_fragment = 4; + * @return The bytes for usernameFragment. + */ + com.google.protobuf.ByteString + getUsernameFragmentBytes(); + } + /** + *
+   * Contains information about an ICE candidate which will be sent to the peer/server
+   * 
+ * + * Protobuf type {@code fishjam.media_events.Candidate} + */ + public static final class Candidate extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.Candidate) + CandidateOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Candidate.class.getName()); + } + // Use Candidate.newBuilder() to construct. + private Candidate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Candidate() { + candidate_ = ""; + sdpMid_ = ""; + usernameFragment_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.Shared.internal_static_fishjam_media_events_Candidate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.Shared.internal_static_fishjam_media_events_Candidate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.Shared.Candidate.class, fishjam.media_events.Shared.Candidate.Builder.class); + } + + public static final int CANDIDATE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object candidate_ = ""; + /** + * string candidate = 1; + * @return The candidate. + */ + @java.lang.Override + public java.lang.String getCandidate() { + java.lang.Object ref = candidate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + candidate_ = s; + return s; + } + } + /** + * string candidate = 1; + * @return The bytes for candidate. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCandidateBytes() { + java.lang.Object ref = candidate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + candidate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SDP_M_LINE_INDEX_FIELD_NUMBER = 2; + private int sdpMLineIndex_ = 0; + /** + * int32 sdp_m_line_index = 2; + * @return The sdpMLineIndex. + */ + @java.lang.Override + public int getSdpMLineIndex() { + return sdpMLineIndex_; + } + + public static final int SDP_MID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object sdpMid_ = ""; + /** + * string sdp_mid = 3; + * @return The sdpMid. + */ + @java.lang.Override + public java.lang.String getSdpMid() { + java.lang.Object ref = sdpMid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdpMid_ = s; + return s; + } + } + /** + * string sdp_mid = 3; + * @return The bytes for sdpMid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSdpMidBytes() { + java.lang.Object ref = sdpMid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sdpMid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FRAGMENT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object usernameFragment_ = ""; + /** + * string username_fragment = 4; + * @return The usernameFragment. + */ + @java.lang.Override + public java.lang.String getUsernameFragment() { + java.lang.Object ref = usernameFragment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usernameFragment_ = s; + return s; + } + } + /** + * string username_fragment = 4; + * @return The bytes for usernameFragment. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameFragmentBytes() { + java.lang.Object ref = usernameFragment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + usernameFragment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(candidate_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, candidate_); + } + if (sdpMLineIndex_ != 0) { + output.writeInt32(2, sdpMLineIndex_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdpMid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sdpMid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(usernameFragment_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, usernameFragment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(candidate_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, candidate_); + } + if (sdpMLineIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, sdpMLineIndex_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdpMid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sdpMid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(usernameFragment_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, usernameFragment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.Shared.Candidate)) { + return super.equals(obj); + } + fishjam.media_events.Shared.Candidate other = (fishjam.media_events.Shared.Candidate) obj; + + if (!getCandidate() + .equals(other.getCandidate())) return false; + if (getSdpMLineIndex() + != other.getSdpMLineIndex()) return false; + if (!getSdpMid() + .equals(other.getSdpMid())) return false; + if (!getUsernameFragment() + .equals(other.getUsernameFragment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CANDIDATE_FIELD_NUMBER; + hash = (53 * hash) + getCandidate().hashCode(); + hash = (37 * hash) + SDP_M_LINE_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getSdpMLineIndex(); + hash = (37 * hash) + SDP_MID_FIELD_NUMBER; + hash = (53 * hash) + getSdpMid().hashCode(); + hash = (37 * hash) + USERNAME_FRAGMENT_FIELD_NUMBER; + hash = (53 * hash) + getUsernameFragment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.Shared.Candidate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.Shared.Candidate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.Shared.Candidate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.Shared.Candidate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.Shared.Candidate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.Shared.Candidate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.Shared.Candidate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Contains information about an ICE candidate which will be sent to the peer/server
+     * 
+ * + * Protobuf type {@code fishjam.media_events.Candidate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.Candidate) + fishjam.media_events.Shared.CandidateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.Shared.internal_static_fishjam_media_events_Candidate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.Shared.internal_static_fishjam_media_events_Candidate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.Shared.Candidate.class, fishjam.media_events.Shared.Candidate.Builder.class); + } + + // Construct using fishjam.media_events.Shared.Candidate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + candidate_ = ""; + sdpMLineIndex_ = 0; + sdpMid_ = ""; + usernameFragment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.Shared.internal_static_fishjam_media_events_Candidate_descriptor; + } + + @java.lang.Override + public fishjam.media_events.Shared.Candidate getDefaultInstanceForType() { + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.Shared.Candidate build() { + fishjam.media_events.Shared.Candidate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.Shared.Candidate buildPartial() { + fishjam.media_events.Shared.Candidate result = new fishjam.media_events.Shared.Candidate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.Shared.Candidate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.candidate_ = candidate_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sdpMLineIndex_ = sdpMLineIndex_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sdpMid_ = sdpMid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.usernameFragment_ = usernameFragment_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.Shared.Candidate) { + return mergeFrom((fishjam.media_events.Shared.Candidate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.Shared.Candidate other) { + if (other == fishjam.media_events.Shared.Candidate.getDefaultInstance()) return this; + if (!other.getCandidate().isEmpty()) { + candidate_ = other.candidate_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSdpMLineIndex() != 0) { + setSdpMLineIndex(other.getSdpMLineIndex()); + } + if (!other.getSdpMid().isEmpty()) { + sdpMid_ = other.sdpMid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUsernameFragment().isEmpty()) { + usernameFragment_ = other.usernameFragment_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + candidate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + sdpMLineIndex_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + sdpMid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + usernameFragment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object candidate_ = ""; + /** + * string candidate = 1; + * @return The candidate. + */ + public java.lang.String getCandidate() { + java.lang.Object ref = candidate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + candidate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string candidate = 1; + * @return The bytes for candidate. + */ + public com.google.protobuf.ByteString + getCandidateBytes() { + java.lang.Object ref = candidate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + candidate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string candidate = 1; + * @param value The candidate to set. + * @return This builder for chaining. + */ + public Builder setCandidate( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + candidate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string candidate = 1; + * @return This builder for chaining. + */ + public Builder clearCandidate() { + candidate_ = getDefaultInstance().getCandidate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string candidate = 1; + * @param value The bytes for candidate to set. + * @return This builder for chaining. + */ + public Builder setCandidateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + candidate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int sdpMLineIndex_ ; + /** + * int32 sdp_m_line_index = 2; + * @return The sdpMLineIndex. + */ + @java.lang.Override + public int getSdpMLineIndex() { + return sdpMLineIndex_; + } + /** + * int32 sdp_m_line_index = 2; + * @param value The sdpMLineIndex to set. + * @return This builder for chaining. + */ + public Builder setSdpMLineIndex(int value) { + + sdpMLineIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 sdp_m_line_index = 2; + * @return This builder for chaining. + */ + public Builder clearSdpMLineIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + sdpMLineIndex_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sdpMid_ = ""; + /** + * string sdp_mid = 3; + * @return The sdpMid. + */ + public java.lang.String getSdpMid() { + java.lang.Object ref = sdpMid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdpMid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string sdp_mid = 3; + * @return The bytes for sdpMid. + */ + public com.google.protobuf.ByteString + getSdpMidBytes() { + java.lang.Object ref = sdpMid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sdpMid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string sdp_mid = 3; + * @param value The sdpMid to set. + * @return This builder for chaining. + */ + public Builder setSdpMid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sdpMid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string sdp_mid = 3; + * @return This builder for chaining. + */ + public Builder clearSdpMid() { + sdpMid_ = getDefaultInstance().getSdpMid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string sdp_mid = 3; + * @param value The bytes for sdpMid to set. + * @return This builder for chaining. + */ + public Builder setSdpMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sdpMid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object usernameFragment_ = ""; + /** + * string username_fragment = 4; + * @return The usernameFragment. + */ + public java.lang.String getUsernameFragment() { + java.lang.Object ref = usernameFragment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usernameFragment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string username_fragment = 4; + * @return The bytes for usernameFragment. + */ + public com.google.protobuf.ByteString + getUsernameFragmentBytes() { + java.lang.Object ref = usernameFragment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + usernameFragment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string username_fragment = 4; + * @param value The usernameFragment to set. + * @return This builder for chaining. + */ + public Builder setUsernameFragment( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + usernameFragment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string username_fragment = 4; + * @return This builder for chaining. + */ + public Builder clearUsernameFragment() { + usernameFragment_ = getDefaultInstance().getUsernameFragment(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string username_fragment = 4; + * @param value The bytes for usernameFragment to set. + * @return This builder for chaining. + */ + public Builder setUsernameFragmentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + usernameFragment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.Candidate) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.Candidate) + private static final fishjam.media_events.Shared.Candidate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.Shared.Candidate(); + } + + public static fishjam.media_events.Shared.Candidate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Candidate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.Shared.Candidate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_Candidate_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_Candidate_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!fishjam/media_events/shared.proto\022\024fis" + + "hjam.media_events\"d\n\tCandidate\022\021\n\tcandid" + + "ate\030\001 \001(\t\022\030\n\020sdp_m_line_index\030\002 \001(\005\022\017\n\007s" + + "dp_mid\030\003 \001(\t\022\031\n\021username_fragment\030\004 \001(\t*" + + "Y\n\007Variant\022\027\n\023VARIANT_UNSPECIFIED\020\000\022\017\n\013V" + + "ARIANT_LOW\020\001\022\022\n\016VARIANT_MEDIUM\020\002\022\020\n\014VARI" + + "ANT_HIGH\020\003b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_fishjam_media_events_Candidate_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_fishjam_media_events_Candidate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_Candidate_descriptor, + new java.lang.String[] { "Candidate", "SdpMLineIndex", "SdpMid", "UsernameFragment", }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/SharedKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/SharedKt.kt new file mode 100644 index 00000000..6035fe88 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/SharedKt.kt @@ -0,0 +1,7 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/shared.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package fishjam.media_events; + diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/MediaEventKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/MediaEventKt.kt new file mode 100644 index 00000000..290d3417 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/MediaEventKt.kt @@ -0,0 +1,1258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/peer/peer.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package fishjam.media_events.peer; + +@kotlin.jvm.JvmName("-initializemediaEvent") +public inline fun mediaEvent(block: fishjam.media_events.peer.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent = + fishjam.media_events.peer.MediaEventKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.newBuilder()).apply { block() }._build() +/** + * ``` + * Defines any type of message sent from Peer to Membrane RTC Engine + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent` + */ +public object MediaEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent = _builder.build() + + /** + * `.fishjam.media_events.peer.MediaEvent.Connect connect = 1;` + */ + public var connect: fishjam.media_events.peer.Peer.MediaEvent.Connect + @JvmName("getConnect") + get() = _builder.getConnect() + @JvmName("setConnect") + set(value) { + _builder.setConnect(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.Connect connect = 1;` + */ + public fun clearConnect() { + _builder.clearConnect() + } + /** + * `.fishjam.media_events.peer.MediaEvent.Connect connect = 1;` + * @return Whether the connect field is set. + */ + public fun hasConnect(): kotlin.Boolean { + return _builder.hasConnect() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2;` + */ + public var disconnect: fishjam.media_events.peer.Peer.MediaEvent.Disconnect + @JvmName("getDisconnect") + get() = _builder.getDisconnect() + @JvmName("setDisconnect") + set(value) { + _builder.setDisconnect(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2;` + */ + public fun clearDisconnect() { + _builder.clearDisconnect() + } + /** + * `.fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2;` + * @return Whether the disconnect field is set. + */ + public fun hasDisconnect(): kotlin.Boolean { + return _builder.hasDisconnect() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3;` + */ + public var updateEndpointMetadata: fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata + @JvmName("getUpdateEndpointMetadata") + get() = _builder.getUpdateEndpointMetadata() + @JvmName("setUpdateEndpointMetadata") + set(value) { + _builder.setUpdateEndpointMetadata(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3;` + */ + public fun clearUpdateEndpointMetadata() { + _builder.clearUpdateEndpointMetadata() + } + /** + * `.fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3;` + * @return Whether the updateEndpointMetadata field is set. + */ + public fun hasUpdateEndpointMetadata(): kotlin.Boolean { + return _builder.hasUpdateEndpointMetadata() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4;` + */ + public var updateTrackMetadata: fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata + @JvmName("getUpdateTrackMetadata") + get() = _builder.getUpdateTrackMetadata() + @JvmName("setUpdateTrackMetadata") + set(value) { + _builder.setUpdateTrackMetadata(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4;` + */ + public fun clearUpdateTrackMetadata() { + _builder.clearUpdateTrackMetadata() + } + /** + * `.fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4;` + * @return Whether the updateTrackMetadata field is set. + */ + public fun hasUpdateTrackMetadata(): kotlin.Boolean { + return _builder.hasUpdateTrackMetadata() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5;` + */ + public var renegotiateTracks: fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks + @JvmName("getRenegotiateTracks") + get() = _builder.getRenegotiateTracks() + @JvmName("setRenegotiateTracks") + set(value) { + _builder.setRenegotiateTracks(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5;` + */ + public fun clearRenegotiateTracks() { + _builder.clearRenegotiateTracks() + } + /** + * `.fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5;` + * @return Whether the renegotiateTracks field is set. + */ + public fun hasRenegotiateTracks(): kotlin.Boolean { + return _builder.hasRenegotiateTracks() + } + + /** + * `.fishjam.media_events.Candidate candidate = 6;` + */ + public var candidate: fishjam.media_events.Shared.Candidate + @JvmName("getCandidate") + get() = _builder.getCandidate() + @JvmName("setCandidate") + set(value) { + _builder.setCandidate(value) + } + /** + * `.fishjam.media_events.Candidate candidate = 6;` + */ + public fun clearCandidate() { + _builder.clearCandidate() + } + /** + * `.fishjam.media_events.Candidate candidate = 6;` + * @return Whether the candidate field is set. + */ + public fun hasCandidate(): kotlin.Boolean { + return _builder.hasCandidate() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7;` + */ + public var sdpOffer: fishjam.media_events.peer.Peer.MediaEvent.SdpOffer + @JvmName("getSdpOffer") + get() = _builder.getSdpOffer() + @JvmName("setSdpOffer") + set(value) { + _builder.setSdpOffer(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7;` + */ + public fun clearSdpOffer() { + _builder.clearSdpOffer() + } + /** + * `.fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7;` + * @return Whether the sdpOffer field is set. + */ + public fun hasSdpOffer(): kotlin.Boolean { + return _builder.hasSdpOffer() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8;` + */ + public var trackBitrates: fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates + @JvmName("getTrackBitrates") + get() = _builder.getTrackBitrates() + @JvmName("setTrackBitrates") + set(value) { + _builder.setTrackBitrates(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8;` + */ + public fun clearTrackBitrates() { + _builder.clearTrackBitrates() + } + /** + * `.fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8;` + * @return Whether the trackBitrates field is set. + */ + public fun hasTrackBitrates(): kotlin.Boolean { + return _builder.hasTrackBitrates() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9;` + */ + public var enableTrackVariant: fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant + @JvmName("getEnableTrackVariant") + get() = _builder.getEnableTrackVariant() + @JvmName("setEnableTrackVariant") + set(value) { + _builder.setEnableTrackVariant(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9;` + */ + public fun clearEnableTrackVariant() { + _builder.clearEnableTrackVariant() + } + /** + * `.fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9;` + * @return Whether the enableTrackVariant field is set. + */ + public fun hasEnableTrackVariant(): kotlin.Boolean { + return _builder.hasEnableTrackVariant() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10;` + */ + public var disableTrackVariant: fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant + @JvmName("getDisableTrackVariant") + get() = _builder.getDisableTrackVariant() + @JvmName("setDisableTrackVariant") + set(value) { + _builder.setDisableTrackVariant(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10;` + */ + public fun clearDisableTrackVariant() { + _builder.clearDisableTrackVariant() + } + /** + * `.fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10;` + * @return Whether the disableTrackVariant field is set. + */ + public fun hasDisableTrackVariant(): kotlin.Boolean { + return _builder.hasDisableTrackVariant() + } + + /** + * `.fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11;` + */ + public var setTargetTrackVariant: fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant + @JvmName("getSetTargetTrackVariant") + get() = _builder.getSetTargetTrackVariant() + @JvmName("setSetTargetTrackVariant") + set(value) { + _builder.setSetTargetTrackVariant(value) + } + /** + * `.fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11;` + */ + public fun clearSetTargetTrackVariant() { + _builder.clearSetTargetTrackVariant() + } + /** + * `.fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11;` + * @return Whether the setTargetTrackVariant field is set. + */ + public fun hasSetTargetTrackVariant(): kotlin.Boolean { + return _builder.hasSetTargetTrackVariant() + } + public val contentCase: fishjam.media_events.peer.Peer.MediaEvent.ContentCase + @JvmName("getContentCase") + get() = _builder.getContentCase() + + public fun clearContent() { + _builder.clearContent() + } + } + @kotlin.jvm.JvmName("-initializevariantBitrate") + public inline fun variantBitrate(block: fishjam.media_events.peer.MediaEventKt.VariantBitrateKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate = + fishjam.media_events.peer.MediaEventKt.VariantBitrateKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.newBuilder()).apply { block() }._build() + /** + * Protobuf type `fishjam.media_events.peer.MediaEvent.VariantBitrate` + */ + public object VariantBitrateKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate = _builder.build() + + /** + * `.fishjam.media_events.Variant variant = 1;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 1;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + + /** + * `int32 bitrate = 2;` + */ + public var bitrate: kotlin.Int + @JvmName("getBitrate") + get() = _builder.getBitrate() + @JvmName("setBitrate") + set(value) { + _builder.setBitrate(value) + } + /** + * `int32 bitrate = 2;` + */ + public fun clearBitrate() { + _builder.clearBitrate() + } + } + } + @kotlin.jvm.JvmName("-initializeconnect") + public inline fun connect(block: fishjam.media_events.peer.MediaEventKt.ConnectKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.Connect = + fishjam.media_events.peer.MediaEventKt.ConnectKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.Connect.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when a peer wants to join WebRTC Endpoint. + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.Connect` + */ + public object ConnectKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.Connect = _builder.build() + + /** + * `string metadata_json = 1;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 1;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + } + } + @kotlin.jvm.JvmName("-initializedisconnect") + public inline fun disconnect(block: fishjam.media_events.peer.MediaEventKt.DisconnectKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.Disconnect = + fishjam.media_events.peer.MediaEventKt.DisconnectKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.Disconnect.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when a peer disconnects from WebRTC Endpoint. + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.Disconnect` + */ + public object DisconnectKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.Disconnect = _builder.build() + } + } + @kotlin.jvm.JvmName("-initializeupdateEndpointMetadata") + public inline fun updateEndpointMetadata(block: fishjam.media_events.peer.MediaEventKt.UpdateEndpointMetadataKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata = + fishjam.media_events.peer.MediaEventKt.UpdateEndpointMetadataKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when a peer wants to update its metadata + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata` + */ + public object UpdateEndpointMetadataKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata = _builder.build() + + /** + * `string metadata_json = 1;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 1;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + } + } + @kotlin.jvm.JvmName("-initializeupdateTrackMetadata") + public inline fun updateTrackMetadata(block: fishjam.media_events.peer.MediaEventKt.UpdateTrackMetadataKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata = + fishjam.media_events.peer.MediaEventKt.UpdateTrackMetadataKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when a peer wants to update its track's metadata + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata` + */ + public object UpdateTrackMetadataKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata = _builder.build() + + /** + * `string track_id = 1;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 1;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `string metadata_json = 2;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 2;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + } + } + @kotlin.jvm.JvmName("-initializerenegotiateTracks") + public inline fun renegotiateTracks(block: fishjam.media_events.peer.MediaEventKt.RenegotiateTracksKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks = + fishjam.media_events.peer.MediaEventKt.RenegotiateTracksKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when peer wants to renegatiate connection due to adding a track or removing a track + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.RenegotiateTracks` + */ + public object RenegotiateTracksKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks = _builder.build() + } + } + @kotlin.jvm.JvmName("-initializesdpOffer") + public inline fun sdpOffer(block: fishjam.media_events.peer.MediaEventKt.SdpOfferKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.SdpOffer = + fishjam.media_events.peer.MediaEventKt.SdpOfferKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent as a response to `offerData` media event during renegotiation + * Maps contain only information about current peer's `sendonly` tracks. + * The "mid" is an identifier used to associate an RTP packet with an MLine from the SDP offer/answer. + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.SdpOffer` + */ + public object SdpOfferKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.SdpOffer = _builder.build() + + /** + * ``` + * The value of the `sessionDescription.sdp` + * ``` + * + * `string sdp = 1;` + */ + public var sdp: kotlin.String + @JvmName("getSdp") + get() = _builder.getSdp() + @JvmName("setSdp") + set(value) { + _builder.setSdp(value) + } + /** + * ``` + * The value of the `sessionDescription.sdp` + * ``` + * + * `string sdp = 1;` + */ + public fun clearSdp() { + _builder.clearSdp() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class TrackIdToMetadataJsonProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `map track_id_to_metadata_json = 2;` + */ + public val trackIdToMetadataJson: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getTrackIdToMetadataJsonMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getTrackIdToMetadataJsonMap() + ) + /** + * `map track_id_to_metadata_json = 2;` + */ + @JvmName("putTrackIdToMetadataJson") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: kotlin.String) { + _builder.putTrackIdToMetadataJson(key, value) + } + /** + * `map track_id_to_metadata_json = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setTrackIdToMetadataJson") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: kotlin.String) { + put(key, value) + } + /** + * `map track_id_to_metadata_json = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeTrackIdToMetadataJson") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeTrackIdToMetadataJson(key) + } + /** + * `map track_id_to_metadata_json = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllTrackIdToMetadataJson") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllTrackIdToMetadataJson(map) + } + /** + * `map track_id_to_metadata_json = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearTrackIdToMetadataJson") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearTrackIdToMetadataJson() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class TrackIdToBitratesProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * ``` + * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + * ``` + * + * `map track_id_to_bitrates = 3;` + */ + public val trackIdToBitrates: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getTrackIdToBitratesMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getTrackIdToBitratesMap() + ) + /** + * ``` + * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + * ``` + * + * `map track_id_to_bitrates = 3;` + */ + @JvmName("putTrackIdToBitrates") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) { + _builder.putTrackIdToBitrates(key, value) + } + /** + * ``` + * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + * ``` + * + * `map track_id_to_bitrates = 3;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setTrackIdToBitrates") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) { + put(key, value) + } + /** + * ``` + * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + * ``` + * + * `map track_id_to_bitrates = 3;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeTrackIdToBitrates") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeTrackIdToBitrates(key) + } + /** + * ``` + * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + * ``` + * + * `map track_id_to_bitrates = 3;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllTrackIdToBitrates") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllTrackIdToBitrates(map) + } + /** + * ``` + * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + * ``` + * + * `map track_id_to_bitrates = 3;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearTrackIdToBitrates") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearTrackIdToBitrates() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class MidToTrackIdProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `map mid_to_track_id = 4;` + */ + public val midToTrackId: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getMidToTrackIdMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getMidToTrackIdMap() + ) + /** + * `map mid_to_track_id = 4;` + */ + @JvmName("putMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: kotlin.String) { + _builder.putMidToTrackId(key, value) + } + /** + * `map mid_to_track_id = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setMidToTrackId") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: kotlin.String) { + put(key, value) + } + /** + * `map mid_to_track_id = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeMidToTrackId(key) + } + /** + * `map mid_to_track_id = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllMidToTrackId(map) + } + /** + * `map mid_to_track_id = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearMidToTrackId() + } + } + } + @kotlin.jvm.JvmName("-initializetrackBitrates") + public inline fun trackBitrates(block: fishjam.media_events.peer.MediaEventKt.TrackBitratesKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates = + fishjam.media_events.peer.MediaEventKt.TrackBitratesKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when Peer wants to update its track's bitrate + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.TrackBitrates` + */ + public object TrackBitratesKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates = _builder.build() + + /** + * `string track_id = 1;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 1;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class VariantBitratesProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + */ + public val variantBitrates: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getVariantBitratesList() + ) + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + * @param value The variantBitrates to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addVariantBitrates") + public fun com.google.protobuf.kotlin.DslList.add(value: fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate) { + _builder.addVariantBitrates(value) + } + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + * @param value The variantBitrates to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignVariantBitrates") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate) { + add(value) + } + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + * @param values The variantBitrates to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllVariantBitrates") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllVariantBitrates(values) + } + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + * @param values The variantBitrates to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllVariantBitrates") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + * @param index The index to set the value at. + * @param value The variantBitrates to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setVariantBitrates") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate) { + _builder.setVariantBitrates(index, value) + } + /** + * ``` + * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + * ``` + * + * `repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearVariantBitrates") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearVariantBitrates() + } + + } + } + @kotlin.jvm.JvmName("-initializedisableTrackVariant") + public inline fun disableTrackVariant(block: fishjam.media_events.peer.MediaEventKt.DisableTrackVariantKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant = + fishjam.media_events.peer.MediaEventKt.DisableTrackVariantKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when client disables one of the track variants + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.DisableTrackVariant` + */ + public object DisableTrackVariantKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant = _builder.build() + + /** + * `string track_id = 1;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 1;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.Variant variant = 2;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 2;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + } + } + @kotlin.jvm.JvmName("-initializeenableTrackVariant") + public inline fun enableTrackVariant(block: fishjam.media_events.peer.MediaEventKt.EnableTrackVariantKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant = + fishjam.media_events.peer.MediaEventKt.EnableTrackVariantKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when client enables one of the track variants + * ``` + * + * Protobuf type `fishjam.media_events.peer.MediaEvent.EnableTrackVariant` + */ + public object EnableTrackVariantKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant = _builder.build() + + /** + * `string track_id = 1;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 1;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.Variant variant = 2;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 2;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + } + } + @kotlin.jvm.JvmName("-initializesetTargetTrackVariant") + public inline fun setTargetTrackVariant(block: fishjam.media_events.peer.MediaEventKt.SetTargetTrackVariantKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant = + fishjam.media_events.peer.MediaEventKt.SetTargetTrackVariantKt.Dsl._create(fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.newBuilder()).apply { block() }._build() + /** + * Protobuf type `fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant` + */ + public object SetTargetTrackVariantKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant = _builder.build() + + /** + * `string track_id = 1;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 1;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.Variant variant = 2;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 2;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.copy(block: `fishjam.media_events.peer`.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent = + `fishjam.media_events.peer`.MediaEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.copy(block: `fishjam.media_events.peer`.MediaEventKt.VariantBitrateKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate = + `fishjam.media_events.peer`.MediaEventKt.VariantBitrateKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.Connect.copy(block: `fishjam.media_events.peer`.MediaEventKt.ConnectKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.Connect = + `fishjam.media_events.peer`.MediaEventKt.ConnectKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.Disconnect.copy(block: `fishjam.media_events.peer`.MediaEventKt.DisconnectKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.Disconnect = + `fishjam.media_events.peer`.MediaEventKt.DisconnectKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.copy(block: `fishjam.media_events.peer`.MediaEventKt.UpdateEndpointMetadataKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata = + `fishjam.media_events.peer`.MediaEventKt.UpdateEndpointMetadataKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.copy(block: `fishjam.media_events.peer`.MediaEventKt.UpdateTrackMetadataKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata = + `fishjam.media_events.peer`.MediaEventKt.UpdateTrackMetadataKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.copy(block: `fishjam.media_events.peer`.MediaEventKt.RenegotiateTracksKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks = + `fishjam.media_events.peer`.MediaEventKt.RenegotiateTracksKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.copy(block: `fishjam.media_events.peer`.MediaEventKt.SdpOfferKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.SdpOffer = + `fishjam.media_events.peer`.MediaEventKt.SdpOfferKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.copy(block: `fishjam.media_events.peer`.MediaEventKt.TrackBitratesKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates = + `fishjam.media_events.peer`.MediaEventKt.TrackBitratesKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.copy(block: `fishjam.media_events.peer`.MediaEventKt.DisableTrackVariantKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant = + `fishjam.media_events.peer`.MediaEventKt.DisableTrackVariantKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.copy(block: `fishjam.media_events.peer`.MediaEventKt.EnableTrackVariantKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant = + `fishjam.media_events.peer`.MediaEventKt.EnableTrackVariantKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.copy(block: `fishjam.media_events.peer`.MediaEventKt.SetTargetTrackVariantKt.Dsl.() -> kotlin.Unit): fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant = + `fishjam.media_events.peer`.MediaEventKt.SetTargetTrackVariantKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.connectOrNull: fishjam.media_events.peer.Peer.MediaEvent.Connect? + get() = if (hasConnect()) getConnect() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.disconnectOrNull: fishjam.media_events.peer.Peer.MediaEvent.Disconnect? + get() = if (hasDisconnect()) getDisconnect() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.updateEndpointMetadataOrNull: fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata? + get() = if (hasUpdateEndpointMetadata()) getUpdateEndpointMetadata() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.updateTrackMetadataOrNull: fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata? + get() = if (hasUpdateTrackMetadata()) getUpdateTrackMetadata() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.renegotiateTracksOrNull: fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks? + get() = if (hasRenegotiateTracks()) getRenegotiateTracks() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.candidateOrNull: fishjam.media_events.Shared.Candidate? + get() = if (hasCandidate()) getCandidate() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.sdpOfferOrNull: fishjam.media_events.peer.Peer.MediaEvent.SdpOffer? + get() = if (hasSdpOffer()) getSdpOffer() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.trackBitratesOrNull: fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates? + get() = if (hasTrackBitrates()) getTrackBitrates() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.enableTrackVariantOrNull: fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant? + get() = if (hasEnableTrackVariant()) getEnableTrackVariant() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.disableTrackVariantOrNull: fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant? + get() = if (hasDisableTrackVariant()) getDisableTrackVariant() else null + +public val fishjam.media_events.peer.Peer.MediaEventOrBuilder.setTargetTrackVariantOrNull: fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant? + get() = if (hasSetTargetTrackVariant()) getSetTargetTrackVariant() else null + diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/Peer.java b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/Peer.java new file mode 100644 index 00000000..119506d6 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/Peer.java @@ -0,0 +1,10540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/peer/peer.proto +// Protobuf Java Version: 4.26.1 + +package fishjam.media_events.peer; + +public final class Peer { + private Peer() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Peer.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface MediaEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + * @return Whether the connect field is set. + */ + boolean hasConnect(); + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + * @return The connect. + */ + fishjam.media_events.peer.Peer.MediaEvent.Connect getConnect(); + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder getConnectOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + * @return Whether the disconnect field is set. + */ + boolean hasDisconnect(); + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + * @return The disconnect. + */ + fishjam.media_events.peer.Peer.MediaEvent.Disconnect getDisconnect(); + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder getDisconnectOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + * @return Whether the updateEndpointMetadata field is set. + */ + boolean hasUpdateEndpointMetadata(); + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + * @return The updateEndpointMetadata. + */ + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata getUpdateEndpointMetadata(); + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder getUpdateEndpointMetadataOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + * @return Whether the updateTrackMetadata field is set. + */ + boolean hasUpdateTrackMetadata(); + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + * @return The updateTrackMetadata. + */ + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata getUpdateTrackMetadata(); + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder getUpdateTrackMetadataOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + * @return Whether the renegotiateTracks field is set. + */ + boolean hasRenegotiateTracks(); + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + * @return The renegotiateTracks. + */ + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks getRenegotiateTracks(); + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder getRenegotiateTracksOrBuilder(); + + /** + * .fishjam.media_events.Candidate candidate = 6; + * @return Whether the candidate field is set. + */ + boolean hasCandidate(); + /** + * .fishjam.media_events.Candidate candidate = 6; + * @return The candidate. + */ + fishjam.media_events.Shared.Candidate getCandidate(); + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + fishjam.media_events.Shared.CandidateOrBuilder getCandidateOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + * @return Whether the sdpOffer field is set. + */ + boolean hasSdpOffer(); + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + * @return The sdpOffer. + */ + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer getSdpOffer(); + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder getSdpOfferOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + * @return Whether the trackBitrates field is set. + */ + boolean hasTrackBitrates(); + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + * @return The trackBitrates. + */ + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackBitrates(); + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder getTrackBitratesOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + * @return Whether the enableTrackVariant field is set. + */ + boolean hasEnableTrackVariant(); + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + * @return The enableTrackVariant. + */ + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant getEnableTrackVariant(); + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder getEnableTrackVariantOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + * @return Whether the disableTrackVariant field is set. + */ + boolean hasDisableTrackVariant(); + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + * @return The disableTrackVariant. + */ + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant getDisableTrackVariant(); + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder getDisableTrackVariantOrBuilder(); + + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + * @return Whether the setTargetTrackVariant field is set. + */ + boolean hasSetTargetTrackVariant(); + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + * @return The setTargetTrackVariant. + */ + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant getSetTargetTrackVariant(); + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder getSetTargetTrackVariantOrBuilder(); + + fishjam.media_events.peer.Peer.MediaEvent.ContentCase getContentCase(); + } + /** + *
+   * Defines any type of message sent from Peer to Membrane RTC Engine
+   * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent} + */ + public static final class MediaEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent) + MediaEventOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + MediaEvent.class.getName()); + } + // Use MediaEvent.newBuilder() to construct. + private MediaEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MediaEvent() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.class, fishjam.media_events.peer.Peer.MediaEvent.Builder.class); + } + + public interface VariantBitrateOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.VariantBitrate) + com.google.protobuf.MessageOrBuilder { + + /** + * .fishjam.media_events.Variant variant = 1; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 1; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + + /** + * int32 bitrate = 2; + * @return The bitrate. + */ + int getBitrate(); + } + /** + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.VariantBitrate} + */ + public static final class VariantBitrate extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.VariantBitrate) + VariantBitrateOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + VariantBitrate.class.getName()); + } + // Use VariantBitrate.newBuilder() to construct. + private VariantBitrate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VariantBitrate() { + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.class, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder.class); + } + + public static final int VARIANT_FIELD_NUMBER = 1; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 1; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 1; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + public static final int BITRATE_FIELD_NUMBER = 2; + private int bitrate_ = 0; + /** + * int32 bitrate = 2; + * @return The bitrate. + */ + @java.lang.Override + public int getBitrate() { + return bitrate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(1, variant_); + } + if (bitrate_ != 0) { + output.writeInt32(2, bitrate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, variant_); + } + if (bitrate_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, bitrate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate other = (fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate) obj; + + if (variant_ != other.variant_) return false; + if (getBitrate() + != other.getBitrate()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (37 * hash) + BITRATE_FIELD_NUMBER; + hash = (53 * hash) + getBitrate(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.VariantBitrate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.VariantBitrate) + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.class, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + variant_ = 0; + bitrate_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate build() { + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate result = new fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.variant_ = variant_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bitrate_ = bitrate_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.getDefaultInstance()) return this; + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + if (other.getBitrate() != 0) { + setBitrate(other.getBitrate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + bitrate_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 1; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 1; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 1; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 1; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 1; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000001); + variant_ = 0; + onChanged(); + return this; + } + + private int bitrate_ ; + /** + * int32 bitrate = 2; + * @return The bitrate. + */ + @java.lang.Override + public int getBitrate() { + return bitrate_; + } + /** + * int32 bitrate = 2; + * @param value The bitrate to set. + * @return This builder for chaining. + */ + public Builder setBitrate(int value) { + + bitrate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 bitrate = 2; + * @return This builder for chaining. + */ + public Builder clearBitrate() { + bitField0_ = (bitField0_ & ~0x00000002); + bitrate_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.VariantBitrate) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.VariantBitrate) + private static final fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VariantBitrate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConnectOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.Connect) + com.google.protobuf.MessageOrBuilder { + + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + } + /** + *
+     * Sent when a peer wants to join WebRTC Endpoint.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.Connect} + */ + public static final class Connect extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.Connect) + ConnectOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Connect.class.getName()); + } + // Use Connect.newBuilder() to construct. + private Connect(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Connect() { + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Connect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Connect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.Connect.class, fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder.class); + } + + public static final int METADATA_JSON_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, metadataJson_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metadataJson_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.Connect)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.Connect other = (fishjam.media_events.peer.Peer.MediaEvent.Connect) obj; + + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Connect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.Connect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when a peer wants to join WebRTC Endpoint.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.Connect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.Connect) + fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Connect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Connect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.Connect.class, fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.Connect.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadataJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Connect_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Connect getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Connect build() { + fishjam.media_events.peer.Peer.MediaEvent.Connect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Connect buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.Connect result = new fishjam.media_events.peer.Peer.MediaEvent.Connect(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.Connect result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadataJson_ = metadataJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.Connect) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.Connect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.Connect other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance()) return this; + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 1; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string metadata_json = 1; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string metadata_json = 1; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.Connect) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.Connect) + private static final fishjam.media_events.peer.Peer.MediaEvent.Connect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.Connect(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Connect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Connect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Connect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisconnectOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.Disconnect) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+     * Sent when a peer disconnects from WebRTC Endpoint.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.Disconnect} + */ + public static final class Disconnect extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.Disconnect) + DisconnectOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Disconnect.class.getName()); + } + // Use Disconnect.newBuilder() to construct. + private Disconnect(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Disconnect() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.Disconnect.class, fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.Disconnect)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.Disconnect other = (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.Disconnect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when a peer disconnects from WebRTC Endpoint.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.Disconnect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.Disconnect) + fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.Disconnect.class, fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.Disconnect.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect build() { + fishjam.media_events.peer.Peer.MediaEvent.Disconnect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.Disconnect result = new fishjam.media_events.peer.Peer.MediaEvent.Disconnect(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.Disconnect) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.Disconnect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.Disconnect other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.Disconnect) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.Disconnect) + private static final fishjam.media_events.peer.Peer.MediaEvent.Disconnect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.Disconnect(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.Disconnect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Disconnect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpdateEndpointMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + } + /** + *
+     * Sent when a peer wants to update its metadata
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata} + */ + public static final class UpdateEndpointMetadata extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata) + UpdateEndpointMetadataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + UpdateEndpointMetadata.class.getName()); + } + // Use UpdateEndpointMetadata.newBuilder() to construct. + private UpdateEndpointMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UpdateEndpointMetadata() { + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.class, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder.class); + } + + public static final int METADATA_JSON_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, metadataJson_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metadataJson_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata other = (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) obj; + + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when a peer wants to update its metadata
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata) + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.class, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadataJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata build() { + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata result = new fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadataJson_ = metadataJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance()) return this; + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 1; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string metadata_json = 1; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string metadata_json = 1; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata) + private static final fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateEndpointMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpdateTrackMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * string track_id = 1; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + } + /** + *
+     * Sent when a peer wants to update its track's metadata
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata} + */ + public static final class UpdateTrackMetadata extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata) + UpdateTrackMetadataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + UpdateTrackMetadata.class.getName()); + } + // Use UpdateTrackMetadata.newBuilder() to construct. + private UpdateTrackMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private UpdateTrackMetadata() { + trackId_ = ""; + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.class, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder.class); + } + + public static final int TRACK_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_JSON_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trackId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, metadataJson_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trackId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, metadataJson_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata other = (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) obj; + + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when a peer wants to update its track's metadata
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata) + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.class, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + metadataJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata build() { + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata result = new fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataJson_ = metadataJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 1; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string track_id = 1; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string track_id = 1; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 2; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string metadata_json = 2; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string metadata_json = 2; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata) + private static final fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTrackMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RenegotiateTracksOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.RenegotiateTracks) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+     * Sent when peer wants to renegatiate connection due to adding a track or removing a track
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.RenegotiateTracks} + */ + public static final class RenegotiateTracks extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.RenegotiateTracks) + RenegotiateTracksOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + RenegotiateTracks.class.getName()); + } + // Use RenegotiateTracks.newBuilder() to construct. + private RenegotiateTracks(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RenegotiateTracks() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.class, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks other = (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when peer wants to renegatiate connection due to adding a track or removing a track
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.RenegotiateTracks} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.RenegotiateTracks) + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.class, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks build() { + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks result = new fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.RenegotiateTracks) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.RenegotiateTracks) + private static final fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RenegotiateTracks parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SdpOfferOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.SdpOffer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The sdp. + */ + java.lang.String getSdp(); + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The bytes for sdp. + */ + com.google.protobuf.ByteString + getSdpBytes(); + + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + int getTrackIdToMetadataJsonCount(); + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + boolean containsTrackIdToMetadataJson( + java.lang.String key); + /** + * Use {@link #getTrackIdToMetadataJsonMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTrackIdToMetadataJson(); + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + java.util.Map + getTrackIdToMetadataJsonMap(); + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + /* nullable */ +java.lang.String getTrackIdToMetadataJsonOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + java.lang.String getTrackIdToMetadataJsonOrThrow( + java.lang.String key); + + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + int getTrackIdToBitratesCount(); + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + boolean containsTrackIdToBitrates( + java.lang.String key); + /** + * Use {@link #getTrackIdToBitratesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTrackIdToBitrates(); + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + java.util.Map + getTrackIdToBitratesMap(); + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + /* nullable */ +fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackIdToBitratesOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates defaultValue); + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackIdToBitratesOrThrow( + java.lang.String key); + + /** + * map<string, string> mid_to_track_id = 4; + */ + int getMidToTrackIdCount(); + /** + * map<string, string> mid_to_track_id = 4; + */ + boolean containsMidToTrackId( + java.lang.String key); + /** + * Use {@link #getMidToTrackIdMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMidToTrackId(); + /** + * map<string, string> mid_to_track_id = 4; + */ + java.util.Map + getMidToTrackIdMap(); + /** + * map<string, string> mid_to_track_id = 4; + */ + /* nullable */ +java.lang.String getMidToTrackIdOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> mid_to_track_id = 4; + */ + java.lang.String getMidToTrackIdOrThrow( + java.lang.String key); + } + /** + *
+     * Sent as a response to `offerData` media event during renegotiation
+     * Maps contain only information about current peer's `sendonly` tracks.
+     * The "mid" is an identifier used to associate an RTP packet with an MLine from the SDP offer/answer.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.SdpOffer} + */ + public static final class SdpOffer extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.SdpOffer) + SdpOfferOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + SdpOffer.class.getName()); + } + // Use SdpOffer.newBuilder() to construct. + private SdpOffer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SdpOffer() { + sdp_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetTrackIdToMetadataJson(); + case 3: + return internalGetTrackIdToBitrates(); + case 4: + return internalGetMidToTrackId(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.class, fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder.class); + } + + public static final int SDP_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object sdp_ = ""; + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The sdp. + */ + @java.lang.Override + public java.lang.String getSdp() { + java.lang.Object ref = sdp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdp_ = s; + return s; + } + } + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The bytes for sdp. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSdpBytes() { + java.lang.Object ref = sdp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sdp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_TO_METADATA_JSON_FIELD_NUMBER = 2; + private static final class TrackIdToMetadataJsonDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToMetadataJsonEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> trackIdToMetadataJson_; + private com.google.protobuf.MapField + internalGetTrackIdToMetadataJson() { + if (trackIdToMetadataJson_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrackIdToMetadataJsonDefaultEntryHolder.defaultEntry); + } + return trackIdToMetadataJson_; + } + public int getTrackIdToMetadataJsonCount() { + return internalGetTrackIdToMetadataJson().getMap().size(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public boolean containsTrackIdToMetadataJson( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToMetadataJson().getMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToMetadataJsonMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToMetadataJson() { + return getTrackIdToMetadataJsonMap(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public java.util.Map getTrackIdToMetadataJsonMap() { + return internalGetTrackIdToMetadataJson().getMap(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getTrackIdToMetadataJsonOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToMetadataJson().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public java.lang.String getTrackIdToMetadataJsonOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToMetadataJson().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TRACK_ID_TO_BITRATES_FIELD_NUMBER = 3; + private static final class TrackIdToBitratesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToBitratesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates> trackIdToBitrates_; + private com.google.protobuf.MapField + internalGetTrackIdToBitrates() { + if (trackIdToBitrates_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrackIdToBitratesDefaultEntryHolder.defaultEntry); + } + return trackIdToBitrates_; + } + public int getTrackIdToBitratesCount() { + return internalGetTrackIdToBitrates().getMap().size(); + } + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public boolean containsTrackIdToBitrates( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToBitrates().getMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToBitratesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToBitrates() { + return getTrackIdToBitratesMap(); + } + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public java.util.Map getTrackIdToBitratesMap() { + return internalGetTrackIdToBitrates().getMap(); + } + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackIdToBitratesOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToBitrates().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+       * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackIdToBitratesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToBitrates().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MID_TO_TRACK_ID_FIELD_NUMBER = 4; + private static final class MidToTrackIdDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_MidToTrackIdEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> midToTrackId_; + private com.google.protobuf.MapField + internalGetMidToTrackId() { + if (midToTrackId_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MidToTrackIdDefaultEntryHolder.defaultEntry); + } + return midToTrackId_; + } + public int getMidToTrackIdCount() { + return internalGetMidToTrackId().getMap().size(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public boolean containsMidToTrackId( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMidToTrackId().getMap().containsKey(key); + } + /** + * Use {@link #getMidToTrackIdMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMidToTrackId() { + return getMidToTrackIdMap(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public java.util.Map getMidToTrackIdMap() { + return internalGetMidToTrackId().getMap(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMidToTrackIdOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public java.lang.String getMidToTrackIdOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdp_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sdp_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetTrackIdToMetadataJson(), + TrackIdToMetadataJsonDefaultEntryHolder.defaultEntry, + 2); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetTrackIdToBitrates(), + TrackIdToBitratesDefaultEntryHolder.defaultEntry, + 3); + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetMidToTrackId(), + MidToTrackIdDefaultEntryHolder.defaultEntry, + 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdp_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sdp_); + } + for (java.util.Map.Entry entry + : internalGetTrackIdToMetadataJson().getMap().entrySet()) { + com.google.protobuf.MapEntry + trackIdToMetadataJson__ = TrackIdToMetadataJsonDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, trackIdToMetadataJson__); + } + for (java.util.Map.Entry entry + : internalGetTrackIdToBitrates().getMap().entrySet()) { + com.google.protobuf.MapEntry + trackIdToBitrates__ = TrackIdToBitratesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, trackIdToBitrates__); + } + for (java.util.Map.Entry entry + : internalGetMidToTrackId().getMap().entrySet()) { + com.google.protobuf.MapEntry + midToTrackId__ = MidToTrackIdDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, midToTrackId__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.SdpOffer)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer other = (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) obj; + + if (!getSdp() + .equals(other.getSdp())) return false; + if (!internalGetTrackIdToMetadataJson().equals( + other.internalGetTrackIdToMetadataJson())) return false; + if (!internalGetTrackIdToBitrates().equals( + other.internalGetTrackIdToBitrates())) return false; + if (!internalGetMidToTrackId().equals( + other.internalGetMidToTrackId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SDP_FIELD_NUMBER; + hash = (53 * hash) + getSdp().hashCode(); + if (!internalGetTrackIdToMetadataJson().getMap().isEmpty()) { + hash = (37 * hash) + TRACK_ID_TO_METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrackIdToMetadataJson().hashCode(); + } + if (!internalGetTrackIdToBitrates().getMap().isEmpty()) { + hash = (37 * hash) + TRACK_ID_TO_BITRATES_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrackIdToBitrates().hashCode(); + } + if (!internalGetMidToTrackId().getMap().isEmpty()) { + hash = (37 * hash) + MID_TO_TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + internalGetMidToTrackId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.SdpOffer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent as a response to `offerData` media event during renegotiation
+       * Maps contain only information about current peer's `sendonly` tracks.
+       * The "mid" is an identifier used to associate an RTP packet with an MLine from the SDP offer/answer.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.SdpOffer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.SdpOffer) + fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetTrackIdToMetadataJson(); + case 3: + return internalGetTrackIdToBitrates(); + case 4: + return internalGetMidToTrackId(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableTrackIdToMetadataJson(); + case 3: + return internalGetMutableTrackIdToBitrates(); + case 4: + return internalGetMutableMidToTrackId(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.class, fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sdp_ = ""; + internalGetMutableTrackIdToMetadataJson().clear(); + internalGetMutableTrackIdToBitrates().clear(); + internalGetMutableMidToTrackId().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer build() { + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer result = new fishjam.media_events.peer.Peer.MediaEvent.SdpOffer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.SdpOffer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sdp_ = sdp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackIdToMetadataJson_ = internalGetTrackIdToMetadataJson(); + result.trackIdToMetadataJson_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trackIdToBitrates_ = internalGetTrackIdToBitrates().build(TrackIdToBitratesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.midToTrackId_ = internalGetMidToTrackId(); + result.midToTrackId_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.SdpOffer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.SdpOffer other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance()) return this; + if (!other.getSdp().isEmpty()) { + sdp_ = other.sdp_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableTrackIdToMetadataJson().mergeFrom( + other.internalGetTrackIdToMetadataJson()); + bitField0_ |= 0x00000002; + internalGetMutableTrackIdToBitrates().mergeFrom( + other.internalGetTrackIdToBitrates()); + bitField0_ |= 0x00000004; + internalGetMutableMidToTrackId().mergeFrom( + other.internalGetMidToTrackId()); + bitField0_ |= 0x00000008; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sdp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + trackIdToMetadataJson__ = input.readMessage( + TrackIdToMetadataJsonDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTrackIdToMetadataJson().getMutableMap().put( + trackIdToMetadataJson__.getKey(), trackIdToMetadataJson__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + trackIdToBitrates__ = input.readMessage( + TrackIdToBitratesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTrackIdToBitrates().ensureBuilderMap().put( + trackIdToBitrates__.getKey(), trackIdToBitrates__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + midToTrackId__ = input.readMessage( + MidToTrackIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMidToTrackId().getMutableMap().put( + midToTrackId__.getKey(), midToTrackId__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object sdp_ = ""; + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @return The sdp. + */ + public java.lang.String getSdp() { + java.lang.Object ref = sdp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @return The bytes for sdp. + */ + public com.google.protobuf.ByteString + getSdpBytes() { + java.lang.Object ref = sdp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sdp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @param value The sdp to set. + * @return This builder for chaining. + */ + public Builder setSdp( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sdp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @return This builder for chaining. + */ + public Builder clearSdp() { + sdp_ = getDefaultInstance().getSdp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @param value The bytes for sdp to set. + * @return This builder for chaining. + */ + public Builder setSdpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sdp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> trackIdToMetadataJson_; + private com.google.protobuf.MapField + internalGetTrackIdToMetadataJson() { + if (trackIdToMetadataJson_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrackIdToMetadataJsonDefaultEntryHolder.defaultEntry); + } + return trackIdToMetadataJson_; + } + private com.google.protobuf.MapField + internalGetMutableTrackIdToMetadataJson() { + if (trackIdToMetadataJson_ == null) { + trackIdToMetadataJson_ = com.google.protobuf.MapField.newMapField( + TrackIdToMetadataJsonDefaultEntryHolder.defaultEntry); + } + if (!trackIdToMetadataJson_.isMutable()) { + trackIdToMetadataJson_ = trackIdToMetadataJson_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return trackIdToMetadataJson_; + } + public int getTrackIdToMetadataJsonCount() { + return internalGetTrackIdToMetadataJson().getMap().size(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public boolean containsTrackIdToMetadataJson( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToMetadataJson().getMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToMetadataJsonMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToMetadataJson() { + return getTrackIdToMetadataJsonMap(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public java.util.Map getTrackIdToMetadataJsonMap() { + return internalGetTrackIdToMetadataJson().getMap(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getTrackIdToMetadataJsonOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToMetadataJson().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + @java.lang.Override + public java.lang.String getTrackIdToMetadataJsonOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToMetadataJson().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearTrackIdToMetadataJson() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableTrackIdToMetadataJson().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + public Builder removeTrackIdToMetadataJson( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableTrackIdToMetadataJson().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTrackIdToMetadataJson() { + bitField0_ |= 0x00000002; + return internalGetMutableTrackIdToMetadataJson().getMutableMap(); + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + public Builder putTrackIdToMetadataJson( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableTrackIdToMetadataJson().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> track_id_to_metadata_json = 2; + */ + public Builder putAllTrackIdToMetadataJson( + java.util.Map values) { + internalGetMutableTrackIdToMetadataJson().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private static final class TrackIdToBitratesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates build(fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder val) { + if (val instanceof fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) { return (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) val; } + return ((fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return TrackIdToBitratesDefaultEntryHolder.defaultEntry; + } + }; + private static final TrackIdToBitratesConverter trackIdToBitratesConverter = new TrackIdToBitratesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder> trackIdToBitrates_; + private com.google.protobuf.MapFieldBuilder + internalGetTrackIdToBitrates() { + if (trackIdToBitrates_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(trackIdToBitratesConverter); + } + return trackIdToBitrates_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableTrackIdToBitrates() { + if (trackIdToBitrates_ == null) { + trackIdToBitrates_ = new com.google.protobuf.MapFieldBuilder<>(trackIdToBitratesConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return trackIdToBitrates_; + } + public int getTrackIdToBitratesCount() { + return internalGetTrackIdToBitrates().ensureBuilderMap().size(); + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public boolean containsTrackIdToBitrates( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToBitrates().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToBitratesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToBitrates() { + return getTrackIdToBitratesMap(); + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public java.util.Map getTrackIdToBitratesMap() { + return internalGetTrackIdToBitrates().getImmutableMap(); + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackIdToBitratesOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableTrackIdToBitrates().ensureBuilderMap(); + return map.containsKey(key) ? trackIdToBitratesConverter.build(map.get(key)) : defaultValue; + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackIdToBitratesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableTrackIdToBitrates().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return trackIdToBitratesConverter.build(map.get(key)); + } + public Builder clearTrackIdToBitrates() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableTrackIdToBitrates().clear(); + return this; + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + public Builder removeTrackIdToBitrates( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableTrackIdToBitrates().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTrackIdToBitrates() { + bitField0_ |= 0x00000004; + return internalGetMutableTrackIdToBitrates().ensureMessageMap(); + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + public Builder putTrackIdToBitrates( + java.lang.String key, + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableTrackIdToBitrates().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + public Builder putAllTrackIdToBitrates( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableTrackIdToBitrates().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+         * Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited.
+         * 
+ * + * map<string, .fishjam.media_events.peer.MediaEvent.TrackBitrates> track_id_to_bitrates = 3; + */ + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder putTrackIdToBitratesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableTrackIdToBitrates().ensureBuilderMap(); + fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) { + entry = ((fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) entry).toBuilder(); + builderMap.put(key, entry); + } + return (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder) entry; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> midToTrackId_; + private com.google.protobuf.MapField + internalGetMidToTrackId() { + if (midToTrackId_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MidToTrackIdDefaultEntryHolder.defaultEntry); + } + return midToTrackId_; + } + private com.google.protobuf.MapField + internalGetMutableMidToTrackId() { + if (midToTrackId_ == null) { + midToTrackId_ = com.google.protobuf.MapField.newMapField( + MidToTrackIdDefaultEntryHolder.defaultEntry); + } + if (!midToTrackId_.isMutable()) { + midToTrackId_ = midToTrackId_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return midToTrackId_; + } + public int getMidToTrackIdCount() { + return internalGetMidToTrackId().getMap().size(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public boolean containsMidToTrackId( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMidToTrackId().getMap().containsKey(key); + } + /** + * Use {@link #getMidToTrackIdMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMidToTrackId() { + return getMidToTrackIdMap(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public java.util.Map getMidToTrackIdMap() { + return internalGetMidToTrackId().getMap(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMidToTrackIdOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> mid_to_track_id = 4; + */ + @java.lang.Override + public java.lang.String getMidToTrackIdOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearMidToTrackId() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableMidToTrackId().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> mid_to_track_id = 4; + */ + public Builder removeMidToTrackId( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMidToTrackId().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMidToTrackId() { + bitField0_ |= 0x00000008; + return internalGetMutableMidToTrackId().getMutableMap(); + } + /** + * map<string, string> mid_to_track_id = 4; + */ + public Builder putMidToTrackId( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableMidToTrackId().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * map<string, string> mid_to_track_id = 4; + */ + public Builder putAllMidToTrackId( + java.util.Map values) { + internalGetMutableMidToTrackId().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.SdpOffer) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.SdpOffer) + private static final fishjam.media_events.peer.Peer.MediaEvent.SdpOffer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.SdpOffer(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SdpOffer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SdpOffer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TrackBitratesOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.TrackBitrates) + com.google.protobuf.MessageOrBuilder { + + /** + * string track_id = 1; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + java.util.List + getVariantBitratesList(); + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate getVariantBitrates(int index); + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + int getVariantBitratesCount(); + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + java.util.List + getVariantBitratesOrBuilderList(); + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder getVariantBitratesOrBuilder( + int index); + } + /** + *
+     * Sent when Peer wants to update its track's bitrate
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.TrackBitrates} + */ + public static final class TrackBitrates extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.TrackBitrates) + TrackBitratesOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TrackBitrates.class.getName()); + } + // Use TrackBitrates.newBuilder() to construct. + private TrackBitrates(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TrackBitrates() { + trackId_ = ""; + variantBitrates_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.class, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder.class); + } + + public static final int TRACK_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_BITRATES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List variantBitrates_; + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + @java.lang.Override + public java.util.List getVariantBitratesList() { + return variantBitrates_; + } + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + @java.lang.Override + public java.util.List + getVariantBitratesOrBuilderList() { + return variantBitrates_; + } + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + @java.lang.Override + public int getVariantBitratesCount() { + return variantBitrates_.size(); + } + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate getVariantBitrates(int index) { + return variantBitrates_.get(index); + } + /** + *
+       * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+       * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder getVariantBitratesOrBuilder( + int index) { + return variantBitrates_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trackId_); + } + for (int i = 0; i < variantBitrates_.size(); i++) { + output.writeMessage(2, variantBitrates_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trackId_); + } + for (int i = 0; i < variantBitrates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, variantBitrates_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates other = (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) obj; + + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (!getVariantBitratesList() + .equals(other.getVariantBitratesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + if (getVariantBitratesCount() > 0) { + hash = (37 * hash) + VARIANT_BITRATES_FIELD_NUMBER; + hash = (53 * hash) + getVariantBitratesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when Peer wants to update its track's bitrate
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.TrackBitrates} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.TrackBitrates) + fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.class, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + if (variantBitratesBuilder_ == null) { + variantBitrates_ = java.util.Collections.emptyList(); + } else { + variantBitrates_ = null; + variantBitratesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates build() { + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates result = new fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates result) { + if (variantBitratesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + variantBitrates_ = java.util.Collections.unmodifiableList(variantBitrates_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.variantBitrates_ = variantBitrates_; + } else { + result.variantBitrates_ = variantBitratesBuilder_.build(); + } + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (variantBitratesBuilder_ == null) { + if (!other.variantBitrates_.isEmpty()) { + if (variantBitrates_.isEmpty()) { + variantBitrates_ = other.variantBitrates_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVariantBitratesIsMutable(); + variantBitrates_.addAll(other.variantBitrates_); + } + onChanged(); + } + } else { + if (!other.variantBitrates_.isEmpty()) { + if (variantBitratesBuilder_.isEmpty()) { + variantBitratesBuilder_.dispose(); + variantBitratesBuilder_ = null; + variantBitrates_ = other.variantBitrates_; + bitField0_ = (bitField0_ & ~0x00000002); + variantBitratesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getVariantBitratesFieldBuilder() : null; + } else { + variantBitratesBuilder_.addAllMessages(other.variantBitrates_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate m = + input.readMessage( + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.parser(), + extensionRegistry); + if (variantBitratesBuilder_ == null) { + ensureVariantBitratesIsMutable(); + variantBitrates_.add(m); + } else { + variantBitratesBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 1; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string track_id = 1; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string track_id = 1; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List variantBitrates_ = + java.util.Collections.emptyList(); + private void ensureVariantBitratesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + variantBitrates_ = new java.util.ArrayList(variantBitrates_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder> variantBitratesBuilder_; + + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public java.util.List getVariantBitratesList() { + if (variantBitratesBuilder_ == null) { + return java.util.Collections.unmodifiableList(variantBitrates_); + } else { + return variantBitratesBuilder_.getMessageList(); + } + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public int getVariantBitratesCount() { + if (variantBitratesBuilder_ == null) { + return variantBitrates_.size(); + } else { + return variantBitratesBuilder_.getCount(); + } + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate getVariantBitrates(int index) { + if (variantBitratesBuilder_ == null) { + return variantBitrates_.get(index); + } else { + return variantBitratesBuilder_.getMessage(index); + } + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder setVariantBitrates( + int index, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate value) { + if (variantBitratesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantBitratesIsMutable(); + variantBitrates_.set(index, value); + onChanged(); + } else { + variantBitratesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder setVariantBitrates( + int index, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder builderForValue) { + if (variantBitratesBuilder_ == null) { + ensureVariantBitratesIsMutable(); + variantBitrates_.set(index, builderForValue.build()); + onChanged(); + } else { + variantBitratesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder addVariantBitrates(fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate value) { + if (variantBitratesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantBitratesIsMutable(); + variantBitrates_.add(value); + onChanged(); + } else { + variantBitratesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder addVariantBitrates( + int index, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate value) { + if (variantBitratesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantBitratesIsMutable(); + variantBitrates_.add(index, value); + onChanged(); + } else { + variantBitratesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder addVariantBitrates( + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder builderForValue) { + if (variantBitratesBuilder_ == null) { + ensureVariantBitratesIsMutable(); + variantBitrates_.add(builderForValue.build()); + onChanged(); + } else { + variantBitratesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder addVariantBitrates( + int index, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder builderForValue) { + if (variantBitratesBuilder_ == null) { + ensureVariantBitratesIsMutable(); + variantBitrates_.add(index, builderForValue.build()); + onChanged(); + } else { + variantBitratesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder addAllVariantBitrates( + java.lang.Iterable values) { + if (variantBitratesBuilder_ == null) { + ensureVariantBitratesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, variantBitrates_); + onChanged(); + } else { + variantBitratesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder clearVariantBitrates() { + if (variantBitratesBuilder_ == null) { + variantBitrates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + variantBitratesBuilder_.clear(); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public Builder removeVariantBitrates(int index) { + if (variantBitratesBuilder_ == null) { + ensureVariantBitratesIsMutable(); + variantBitrates_.remove(index); + onChanged(); + } else { + variantBitratesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder getVariantBitratesBuilder( + int index) { + return getVariantBitratesFieldBuilder().getBuilder(index); + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder getVariantBitratesOrBuilder( + int index) { + if (variantBitratesBuilder_ == null) { + return variantBitrates_.get(index); } else { + return variantBitratesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public java.util.List + getVariantBitratesOrBuilderList() { + if (variantBitratesBuilder_ != null) { + return variantBitratesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(variantBitrates_); + } + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder addVariantBitratesBuilder() { + return getVariantBitratesFieldBuilder().addBuilder( + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.getDefaultInstance()); + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder addVariantBitratesBuilder( + int index) { + return getVariantBitratesFieldBuilder().addBuilder( + index, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.getDefaultInstance()); + } + /** + *
+         * Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED.
+         * 
+ * + * repeated .fishjam.media_events.peer.MediaEvent.VariantBitrate variant_bitrates = 2; + */ + public java.util.List + getVariantBitratesBuilderList() { + return getVariantBitratesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder> + getVariantBitratesFieldBuilder() { + if (variantBitratesBuilder_ == null) { + variantBitratesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrate.Builder, fishjam.media_events.peer.Peer.MediaEvent.VariantBitrateOrBuilder>( + variantBitrates_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + variantBitrates_ = null; + } + return variantBitratesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.TrackBitrates) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.TrackBitrates) + private static final fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackBitrates parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DisableTrackVariantOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.DisableTrackVariant) + com.google.protobuf.MessageOrBuilder { + + /** + * string track_id = 1; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + } + /** + *
+     * Sent when client disables one of the track variants
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.DisableTrackVariant} + */ + public static final class DisableTrackVariant extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.DisableTrackVariant) + DisableTrackVariantOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + DisableTrackVariant.class.getName()); + } + // Use DisableTrackVariant.newBuilder() to construct. + private DisableTrackVariant(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private DisableTrackVariant() { + trackId_ = ""; + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.class, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder.class); + } + + public static final int TRACK_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_FIELD_NUMBER = 2; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(2, variant_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, variant_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant other = (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) obj; + + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (variant_ != other.variant_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when client disables one of the track variants
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.DisableTrackVariant} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.DisableTrackVariant) + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.class, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + variant_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant build() { + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant result = new fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.variant_ = variant_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 1; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string track_id = 1; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string track_id = 1; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000002); + variant_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.DisableTrackVariant) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.DisableTrackVariant) + private static final fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableTrackVariant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EnableTrackVariantOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.EnableTrackVariant) + com.google.protobuf.MessageOrBuilder { + + /** + * string track_id = 1; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + } + /** + *
+     * Sent when client enables one of the track variants
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.EnableTrackVariant} + */ + public static final class EnableTrackVariant extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.EnableTrackVariant) + EnableTrackVariantOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + EnableTrackVariant.class.getName()); + } + // Use EnableTrackVariant.newBuilder() to construct. + private EnableTrackVariant(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EnableTrackVariant() { + trackId_ = ""; + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.class, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder.class); + } + + public static final int TRACK_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_FIELD_NUMBER = 2; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(2, variant_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, variant_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant other = (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) obj; + + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (variant_ != other.variant_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when client enables one of the track variants
+       * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.EnableTrackVariant} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.EnableTrackVariant) + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.class, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + variant_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant build() { + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant result = new fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.variant_ = variant_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 1; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string track_id = 1; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string track_id = 1; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000002); + variant_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.EnableTrackVariant) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.EnableTrackVariant) + private static final fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnableTrackVariant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SetTargetTrackVariantOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant) + com.google.protobuf.MessageOrBuilder { + + /** + * string track_id = 1; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + } + /** + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant} + */ + public static final class SetTargetTrackVariant extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant) + SetTargetTrackVariantOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + SetTargetTrackVariant.class.getName()); + } + // Use SetTargetTrackVariant.newBuilder() to construct. + private SetTargetTrackVariant(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SetTargetTrackVariant() { + trackId_ = ""; + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.class, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder.class); + } + + public static final int TRACK_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_FIELD_NUMBER = 2; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(2, variant_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, variant_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant other = (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) obj; + + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (variant_ != other.variant_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant) + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.class, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + variant_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant build() { + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant result = new fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.variant_ = variant_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 1; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string track_id = 1; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string track_id = 1; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 2; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 2; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000002); + variant_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant) + private static final fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetTargetTrackVariant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int contentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object content_; + public enum ContentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONNECT(1), + DISCONNECT(2), + UPDATE_ENDPOINT_METADATA(3), + UPDATE_TRACK_METADATA(4), + RENEGOTIATE_TRACKS(5), + CANDIDATE(6), + SDP_OFFER(7), + TRACK_BITRATES(8), + ENABLE_TRACK_VARIANT(9), + DISABLE_TRACK_VARIANT(10), + SET_TARGET_TRACK_VARIANT(11), + CONTENT_NOT_SET(0); + private final int value; + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 1: return CONNECT; + case 2: return DISCONNECT; + case 3: return UPDATE_ENDPOINT_METADATA; + case 4: return UPDATE_TRACK_METADATA; + case 5: return RENEGOTIATE_TRACKS; + case 6: return CANDIDATE; + case 7: return SDP_OFFER; + case 8: return TRACK_BITRATES; + case 9: return ENABLE_TRACK_VARIANT; + case 10: return DISABLE_TRACK_VARIANT; + case 11: return SET_TARGET_TRACK_VARIANT; + case 0: return CONTENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); + } + + public static final int CONNECT_FIELD_NUMBER = 1; + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + * @return Whether the connect field is set. + */ + @java.lang.Override + public boolean hasConnect() { + return contentCase_ == 1; + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + * @return The connect. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Connect getConnect() { + if (contentCase_ == 1) { + return (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder getConnectOrBuilder() { + if (contentCase_ == 1) { + return (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } + + public static final int DISCONNECT_FIELD_NUMBER = 2; + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + * @return Whether the disconnect field is set. + */ + @java.lang.Override + public boolean hasDisconnect() { + return contentCase_ == 2; + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + * @return The disconnect. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect getDisconnect() { + if (contentCase_ == 2) { + return (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder getDisconnectOrBuilder() { + if (contentCase_ == 2) { + return (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } + + public static final int UPDATE_ENDPOINT_METADATA_FIELD_NUMBER = 3; + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + * @return Whether the updateEndpointMetadata field is set. + */ + @java.lang.Override + public boolean hasUpdateEndpointMetadata() { + return contentCase_ == 3; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + * @return The updateEndpointMetadata. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata getUpdateEndpointMetadata() { + if (contentCase_ == 3) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder getUpdateEndpointMetadataOrBuilder() { + if (contentCase_ == 3) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } + + public static final int UPDATE_TRACK_METADATA_FIELD_NUMBER = 4; + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + * @return Whether the updateTrackMetadata field is set. + */ + @java.lang.Override + public boolean hasUpdateTrackMetadata() { + return contentCase_ == 4; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + * @return The updateTrackMetadata. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata getUpdateTrackMetadata() { + if (contentCase_ == 4) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder getUpdateTrackMetadataOrBuilder() { + if (contentCase_ == 4) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } + + public static final int RENEGOTIATE_TRACKS_FIELD_NUMBER = 5; + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + * @return Whether the renegotiateTracks field is set. + */ + @java.lang.Override + public boolean hasRenegotiateTracks() { + return contentCase_ == 5; + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + * @return The renegotiateTracks. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks getRenegotiateTracks() { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder getRenegotiateTracksOrBuilder() { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } + + public static final int CANDIDATE_FIELD_NUMBER = 6; + /** + * .fishjam.media_events.Candidate candidate = 6; + * @return Whether the candidate field is set. + */ + @java.lang.Override + public boolean hasCandidate() { + return contentCase_ == 6; + } + /** + * .fishjam.media_events.Candidate candidate = 6; + * @return The candidate. + */ + @java.lang.Override + public fishjam.media_events.Shared.Candidate getCandidate() { + if (contentCase_ == 6) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + @java.lang.Override + public fishjam.media_events.Shared.CandidateOrBuilder getCandidateOrBuilder() { + if (contentCase_ == 6) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + + public static final int SDP_OFFER_FIELD_NUMBER = 7; + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + * @return Whether the sdpOffer field is set. + */ + @java.lang.Override + public boolean hasSdpOffer() { + return contentCase_ == 7; + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + * @return The sdpOffer. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer getSdpOffer() { + if (contentCase_ == 7) { + return (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder getSdpOfferOrBuilder() { + if (contentCase_ == 7) { + return (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } + + public static final int TRACK_BITRATES_FIELD_NUMBER = 8; + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + * @return Whether the trackBitrates field is set. + */ + @java.lang.Override + public boolean hasTrackBitrates() { + return contentCase_ == 8; + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + * @return The trackBitrates. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackBitrates() { + if (contentCase_ == 8) { + return (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder getTrackBitratesOrBuilder() { + if (contentCase_ == 8) { + return (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } + + public static final int ENABLE_TRACK_VARIANT_FIELD_NUMBER = 9; + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + * @return Whether the enableTrackVariant field is set. + */ + @java.lang.Override + public boolean hasEnableTrackVariant() { + return contentCase_ == 9; + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + * @return The enableTrackVariant. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant getEnableTrackVariant() { + if (contentCase_ == 9) { + return (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder getEnableTrackVariantOrBuilder() { + if (contentCase_ == 9) { + return (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } + + public static final int DISABLE_TRACK_VARIANT_FIELD_NUMBER = 10; + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + * @return Whether the disableTrackVariant field is set. + */ + @java.lang.Override + public boolean hasDisableTrackVariant() { + return contentCase_ == 10; + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + * @return The disableTrackVariant. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant getDisableTrackVariant() { + if (contentCase_ == 10) { + return (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder getDisableTrackVariantOrBuilder() { + if (contentCase_ == 10) { + return (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } + + public static final int SET_TARGET_TRACK_VARIANT_FIELD_NUMBER = 11; + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + * @return Whether the setTargetTrackVariant field is set. + */ + @java.lang.Override + public boolean hasSetTargetTrackVariant() { + return contentCase_ == 11; + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + * @return The setTargetTrackVariant. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant getSetTargetTrackVariant() { + if (contentCase_ == 11) { + return (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder getSetTargetTrackVariantOrBuilder() { + if (contentCase_ == 11) { + return (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (contentCase_ == 1) { + output.writeMessage(1, (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_); + } + if (contentCase_ == 2) { + output.writeMessage(2, (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_); + } + if (contentCase_ == 3) { + output.writeMessage(3, (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_); + } + if (contentCase_ == 4) { + output.writeMessage(4, (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_); + } + if (contentCase_ == 5) { + output.writeMessage(5, (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_); + } + if (contentCase_ == 6) { + output.writeMessage(6, (fishjam.media_events.Shared.Candidate) content_); + } + if (contentCase_ == 7) { + output.writeMessage(7, (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_); + } + if (contentCase_ == 8) { + output.writeMessage(8, (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_); + } + if (contentCase_ == 9) { + output.writeMessage(9, (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_); + } + if (contentCase_ == 10) { + output.writeMessage(10, (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_); + } + if (contentCase_ == 11) { + output.writeMessage(11, (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contentCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_); + } + if (contentCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_); + } + if (contentCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_); + } + if (contentCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_); + } + if (contentCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (fishjam.media_events.Shared.Candidate) content_); + } + if (contentCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_); + } + if (contentCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_); + } + if (contentCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_); + } + if (contentCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_); + } + if (contentCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.peer.Peer.MediaEvent)) { + return super.equals(obj); + } + fishjam.media_events.peer.Peer.MediaEvent other = (fishjam.media_events.peer.Peer.MediaEvent) obj; + + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getConnect() + .equals(other.getConnect())) return false; + break; + case 2: + if (!getDisconnect() + .equals(other.getDisconnect())) return false; + break; + case 3: + if (!getUpdateEndpointMetadata() + .equals(other.getUpdateEndpointMetadata())) return false; + break; + case 4: + if (!getUpdateTrackMetadata() + .equals(other.getUpdateTrackMetadata())) return false; + break; + case 5: + if (!getRenegotiateTracks() + .equals(other.getRenegotiateTracks())) return false; + break; + case 6: + if (!getCandidate() + .equals(other.getCandidate())) return false; + break; + case 7: + if (!getSdpOffer() + .equals(other.getSdpOffer())) return false; + break; + case 8: + if (!getTrackBitrates() + .equals(other.getTrackBitrates())) return false; + break; + case 9: + if (!getEnableTrackVariant() + .equals(other.getEnableTrackVariant())) return false; + break; + case 10: + if (!getDisableTrackVariant() + .equals(other.getDisableTrackVariant())) return false; + break; + case 11: + if (!getSetTargetTrackVariant() + .equals(other.getSetTargetTrackVariant())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (contentCase_) { + case 1: + hash = (37 * hash) + CONNECT_FIELD_NUMBER; + hash = (53 * hash) + getConnect().hashCode(); + break; + case 2: + hash = (37 * hash) + DISCONNECT_FIELD_NUMBER; + hash = (53 * hash) + getDisconnect().hashCode(); + break; + case 3: + hash = (37 * hash) + UPDATE_ENDPOINT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdateEndpointMetadata().hashCode(); + break; + case 4: + hash = (37 * hash) + UPDATE_TRACK_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTrackMetadata().hashCode(); + break; + case 5: + hash = (37 * hash) + RENEGOTIATE_TRACKS_FIELD_NUMBER; + hash = (53 * hash) + getRenegotiateTracks().hashCode(); + break; + case 6: + hash = (37 * hash) + CANDIDATE_FIELD_NUMBER; + hash = (53 * hash) + getCandidate().hashCode(); + break; + case 7: + hash = (37 * hash) + SDP_OFFER_FIELD_NUMBER; + hash = (53 * hash) + getSdpOffer().hashCode(); + break; + case 8: + hash = (37 * hash) + TRACK_BITRATES_FIELD_NUMBER; + hash = (53 * hash) + getTrackBitrates().hashCode(); + break; + case 9: + hash = (37 * hash) + ENABLE_TRACK_VARIANT_FIELD_NUMBER; + hash = (53 * hash) + getEnableTrackVariant().hashCode(); + break; + case 10: + hash = (37 * hash) + DISABLE_TRACK_VARIANT_FIELD_NUMBER; + hash = (53 * hash) + getDisableTrackVariant().hashCode(); + break; + case 11: + hash = (37 * hash) + SET_TARGET_TRACK_VARIANT_FIELD_NUMBER; + hash = (53 * hash) + getSetTargetTrackVariant().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.peer.Peer.MediaEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.peer.Peer.MediaEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.peer.Peer.MediaEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.peer.Peer.MediaEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Defines any type of message sent from Peer to Membrane RTC Engine
+     * 
+ * + * Protobuf type {@code fishjam.media_events.peer.MediaEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.peer.MediaEvent) + fishjam.media_events.peer.Peer.MediaEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.peer.Peer.MediaEvent.class, fishjam.media_events.peer.Peer.MediaEvent.Builder.class); + } + + // Construct using fishjam.media_events.peer.Peer.MediaEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (connectBuilder_ != null) { + connectBuilder_.clear(); + } + if (disconnectBuilder_ != null) { + disconnectBuilder_.clear(); + } + if (updateEndpointMetadataBuilder_ != null) { + updateEndpointMetadataBuilder_.clear(); + } + if (updateTrackMetadataBuilder_ != null) { + updateTrackMetadataBuilder_.clear(); + } + if (renegotiateTracksBuilder_ != null) { + renegotiateTracksBuilder_.clear(); + } + if (candidateBuilder_ != null) { + candidateBuilder_.clear(); + } + if (sdpOfferBuilder_ != null) { + sdpOfferBuilder_.clear(); + } + if (trackBitratesBuilder_ != null) { + trackBitratesBuilder_.clear(); + } + if (enableTrackVariantBuilder_ != null) { + enableTrackVariantBuilder_.clear(); + } + if (disableTrackVariantBuilder_ != null) { + disableTrackVariantBuilder_.clear(); + } + if (setTargetTrackVariantBuilder_ != null) { + setTargetTrackVariantBuilder_.clear(); + } + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.peer.Peer.internal_static_fishjam_media_events_peer_MediaEvent_descriptor; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent getDefaultInstanceForType() { + return fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent build() { + fishjam.media_events.peer.Peer.MediaEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent buildPartial() { + fishjam.media_events.peer.Peer.MediaEvent result = new fishjam.media_events.peer.Peer.MediaEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.peer.Peer.MediaEvent result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(fishjam.media_events.peer.Peer.MediaEvent result) { + result.contentCase_ = contentCase_; + result.content_ = this.content_; + if (contentCase_ == 1 && + connectBuilder_ != null) { + result.content_ = connectBuilder_.build(); + } + if (contentCase_ == 2 && + disconnectBuilder_ != null) { + result.content_ = disconnectBuilder_.build(); + } + if (contentCase_ == 3 && + updateEndpointMetadataBuilder_ != null) { + result.content_ = updateEndpointMetadataBuilder_.build(); + } + if (contentCase_ == 4 && + updateTrackMetadataBuilder_ != null) { + result.content_ = updateTrackMetadataBuilder_.build(); + } + if (contentCase_ == 5 && + renegotiateTracksBuilder_ != null) { + result.content_ = renegotiateTracksBuilder_.build(); + } + if (contentCase_ == 6 && + candidateBuilder_ != null) { + result.content_ = candidateBuilder_.build(); + } + if (contentCase_ == 7 && + sdpOfferBuilder_ != null) { + result.content_ = sdpOfferBuilder_.build(); + } + if (contentCase_ == 8 && + trackBitratesBuilder_ != null) { + result.content_ = trackBitratesBuilder_.build(); + } + if (contentCase_ == 9 && + enableTrackVariantBuilder_ != null) { + result.content_ = enableTrackVariantBuilder_.build(); + } + if (contentCase_ == 10 && + disableTrackVariantBuilder_ != null) { + result.content_ = disableTrackVariantBuilder_.build(); + } + if (contentCase_ == 11 && + setTargetTrackVariantBuilder_ != null) { + result.content_ = setTargetTrackVariantBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.peer.Peer.MediaEvent) { + return mergeFrom((fishjam.media_events.peer.Peer.MediaEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.peer.Peer.MediaEvent other) { + if (other == fishjam.media_events.peer.Peer.MediaEvent.getDefaultInstance()) return this; + switch (other.getContentCase()) { + case CONNECT: { + mergeConnect(other.getConnect()); + break; + } + case DISCONNECT: { + mergeDisconnect(other.getDisconnect()); + break; + } + case UPDATE_ENDPOINT_METADATA: { + mergeUpdateEndpointMetadata(other.getUpdateEndpointMetadata()); + break; + } + case UPDATE_TRACK_METADATA: { + mergeUpdateTrackMetadata(other.getUpdateTrackMetadata()); + break; + } + case RENEGOTIATE_TRACKS: { + mergeRenegotiateTracks(other.getRenegotiateTracks()); + break; + } + case CANDIDATE: { + mergeCandidate(other.getCandidate()); + break; + } + case SDP_OFFER: { + mergeSdpOffer(other.getSdpOffer()); + break; + } + case TRACK_BITRATES: { + mergeTrackBitrates(other.getTrackBitrates()); + break; + } + case ENABLE_TRACK_VARIANT: { + mergeEnableTrackVariant(other.getEnableTrackVariant()); + break; + } + case DISABLE_TRACK_VARIANT: { + mergeDisableTrackVariant(other.getDisableTrackVariant()); + break; + } + case SET_TARGET_TRACK_VARIANT: { + mergeSetTargetTrackVariant(other.getSetTargetTrackVariant()); + break; + } + case CONTENT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getConnectFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getDisconnectFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getUpdateEndpointMetadataFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getUpdateTrackMetadataFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getRenegotiateTracksFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getCandidateFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getSdpOfferFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getTrackBitratesFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getEnableTrackVariantFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getDisableTrackVariantFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getSetTargetTrackVariantFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 11; + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int contentCase_ = 0; + private java.lang.Object content_; + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.Connect, fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder, fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder> connectBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + * @return Whether the connect field is set. + */ + @java.lang.Override + public boolean hasConnect() { + return contentCase_ == 1; + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + * @return The connect. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Connect getConnect() { + if (connectBuilder_ == null) { + if (contentCase_ == 1) { + return (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } else { + if (contentCase_ == 1) { + return connectBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + public Builder setConnect(fishjam.media_events.peer.Peer.MediaEvent.Connect value) { + if (connectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + connectBuilder_.setMessage(value); + } + contentCase_ = 1; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + public Builder setConnect( + fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder builderForValue) { + if (connectBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + connectBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 1; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + public Builder mergeConnect(fishjam.media_events.peer.Peer.MediaEvent.Connect value) { + if (connectBuilder_ == null) { + if (contentCase_ == 1 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.Connect.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.Connect) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 1) { + connectBuilder_.mergeFrom(value); + } else { + connectBuilder_.setMessage(value); + } + } + contentCase_ = 1; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + public Builder clearConnect() { + if (connectBuilder_ == null) { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + } + connectBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + public fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder getConnectBuilder() { + return getConnectFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder getConnectOrBuilder() { + if ((contentCase_ == 1) && (connectBuilder_ != null)) { + return connectBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 1) { + return (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.Connect connect = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.Connect, fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder, fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder> + getConnectFieldBuilder() { + if (connectBuilder_ == null) { + if (!(contentCase_ == 1)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.Connect.getDefaultInstance(); + } + connectBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.Connect, fishjam.media_events.peer.Peer.MediaEvent.Connect.Builder, fishjam.media_events.peer.Peer.MediaEvent.ConnectOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.Connect) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 1; + onChanged(); + return connectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.Disconnect, fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder, fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder> disconnectBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + * @return Whether the disconnect field is set. + */ + @java.lang.Override + public boolean hasDisconnect() { + return contentCase_ == 2; + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + * @return The disconnect. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect getDisconnect() { + if (disconnectBuilder_ == null) { + if (contentCase_ == 2) { + return (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } else { + if (contentCase_ == 2) { + return disconnectBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + public Builder setDisconnect(fishjam.media_events.peer.Peer.MediaEvent.Disconnect value) { + if (disconnectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + disconnectBuilder_.setMessage(value); + } + contentCase_ = 2; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + public Builder setDisconnect( + fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder builderForValue) { + if (disconnectBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + disconnectBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 2; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + public Builder mergeDisconnect(fishjam.media_events.peer.Peer.MediaEvent.Disconnect value) { + if (disconnectBuilder_ == null) { + if (contentCase_ == 2 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.Disconnect.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 2) { + disconnectBuilder_.mergeFrom(value); + } else { + disconnectBuilder_.setMessage(value); + } + } + contentCase_ = 2; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + public Builder clearDisconnect() { + if (disconnectBuilder_ == null) { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + } + disconnectBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + public fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder getDisconnectBuilder() { + return getDisconnectFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder getDisconnectOrBuilder() { + if ((contentCase_ == 2) && (disconnectBuilder_ != null)) { + return disconnectBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 2) { + return (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.Disconnect disconnect = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.Disconnect, fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder, fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder> + getDisconnectFieldBuilder() { + if (disconnectBuilder_ == null) { + if (!(contentCase_ == 2)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.Disconnect.getDefaultInstance(); + } + disconnectBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.Disconnect, fishjam.media_events.peer.Peer.MediaEvent.Disconnect.Builder, fishjam.media_events.peer.Peer.MediaEvent.DisconnectOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.Disconnect) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 2; + onChanged(); + return disconnectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder> updateEndpointMetadataBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + * @return Whether the updateEndpointMetadata field is set. + */ + @java.lang.Override + public boolean hasUpdateEndpointMetadata() { + return contentCase_ == 3; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + * @return The updateEndpointMetadata. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata getUpdateEndpointMetadata() { + if (updateEndpointMetadataBuilder_ == null) { + if (contentCase_ == 3) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } else { + if (contentCase_ == 3) { + return updateEndpointMetadataBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + public Builder setUpdateEndpointMetadata(fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata value) { + if (updateEndpointMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + updateEndpointMetadataBuilder_.setMessage(value); + } + contentCase_ = 3; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + public Builder setUpdateEndpointMetadata( + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder builderForValue) { + if (updateEndpointMetadataBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + updateEndpointMetadataBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 3; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + public Builder mergeUpdateEndpointMetadata(fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata value) { + if (updateEndpointMetadataBuilder_ == null) { + if (contentCase_ == 3 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 3) { + updateEndpointMetadataBuilder_.mergeFrom(value); + } else { + updateEndpointMetadataBuilder_.setMessage(value); + } + } + contentCase_ = 3; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + public Builder clearUpdateEndpointMetadata() { + if (updateEndpointMetadataBuilder_ == null) { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + } + updateEndpointMetadataBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder getUpdateEndpointMetadataBuilder() { + return getUpdateEndpointMetadataFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder getUpdateEndpointMetadataOrBuilder() { + if ((contentCase_ == 3) && (updateEndpointMetadataBuilder_ != null)) { + return updateEndpointMetadataBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 3) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateEndpointMetadata update_endpoint_metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder> + getUpdateEndpointMetadataFieldBuilder() { + if (updateEndpointMetadataBuilder_ == null) { + if (!(contentCase_ == 3)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.getDefaultInstance(); + } + updateEndpointMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata.Builder, fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadataOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.UpdateEndpointMetadata) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 3; + onChanged(); + return updateEndpointMetadataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder> updateTrackMetadataBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + * @return Whether the updateTrackMetadata field is set. + */ + @java.lang.Override + public boolean hasUpdateTrackMetadata() { + return contentCase_ == 4; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + * @return The updateTrackMetadata. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata getUpdateTrackMetadata() { + if (updateTrackMetadataBuilder_ == null) { + if (contentCase_ == 4) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } else { + if (contentCase_ == 4) { + return updateTrackMetadataBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + public Builder setUpdateTrackMetadata(fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata value) { + if (updateTrackMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + updateTrackMetadataBuilder_.setMessage(value); + } + contentCase_ = 4; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + public Builder setUpdateTrackMetadata( + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder builderForValue) { + if (updateTrackMetadataBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + updateTrackMetadataBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 4; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + public Builder mergeUpdateTrackMetadata(fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata value) { + if (updateTrackMetadataBuilder_ == null) { + if (contentCase_ == 4 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 4) { + updateTrackMetadataBuilder_.mergeFrom(value); + } else { + updateTrackMetadataBuilder_.setMessage(value); + } + } + contentCase_ = 4; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + public Builder clearUpdateTrackMetadata() { + if (updateTrackMetadataBuilder_ == null) { + if (contentCase_ == 4) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 4) { + contentCase_ = 0; + content_ = null; + } + updateTrackMetadataBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder getUpdateTrackMetadataBuilder() { + return getUpdateTrackMetadataFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder getUpdateTrackMetadataOrBuilder() { + if ((contentCase_ == 4) && (updateTrackMetadataBuilder_ != null)) { + return updateTrackMetadataBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 4) { + return (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.UpdateTrackMetadata update_track_metadata = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder> + getUpdateTrackMetadataFieldBuilder() { + if (updateTrackMetadataBuilder_ == null) { + if (!(contentCase_ == 4)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.getDefaultInstance(); + } + updateTrackMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata.Builder, fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadataOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.UpdateTrackMetadata) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 4; + onChanged(); + return updateTrackMetadataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder> renegotiateTracksBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + * @return Whether the renegotiateTracks field is set. + */ + @java.lang.Override + public boolean hasRenegotiateTracks() { + return contentCase_ == 5; + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + * @return The renegotiateTracks. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks getRenegotiateTracks() { + if (renegotiateTracksBuilder_ == null) { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } else { + if (contentCase_ == 5) { + return renegotiateTracksBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + public Builder setRenegotiateTracks(fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks value) { + if (renegotiateTracksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + renegotiateTracksBuilder_.setMessage(value); + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + public Builder setRenegotiateTracks( + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder builderForValue) { + if (renegotiateTracksBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + renegotiateTracksBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + public Builder mergeRenegotiateTracks(fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks value) { + if (renegotiateTracksBuilder_ == null) { + if (contentCase_ == 5 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 5) { + renegotiateTracksBuilder_.mergeFrom(value); + } else { + renegotiateTracksBuilder_.setMessage(value); + } + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + public Builder clearRenegotiateTracks() { + if (renegotiateTracksBuilder_ == null) { + if (contentCase_ == 5) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 5) { + contentCase_ = 0; + content_ = null; + } + renegotiateTracksBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder getRenegotiateTracksBuilder() { + return getRenegotiateTracksFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder getRenegotiateTracksOrBuilder() { + if ((contentCase_ == 5) && (renegotiateTracksBuilder_ != null)) { + return renegotiateTracksBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 5) { + return (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.RenegotiateTracks renegotiate_tracks = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder> + getRenegotiateTracksFieldBuilder() { + if (renegotiateTracksBuilder_ == null) { + if (!(contentCase_ == 5)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.getDefaultInstance(); + } + renegotiateTracksBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks.Builder, fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracksOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.RenegotiateTracks) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 5; + onChanged(); + return renegotiateTracksBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.Shared.Candidate, fishjam.media_events.Shared.Candidate.Builder, fishjam.media_events.Shared.CandidateOrBuilder> candidateBuilder_; + /** + * .fishjam.media_events.Candidate candidate = 6; + * @return Whether the candidate field is set. + */ + @java.lang.Override + public boolean hasCandidate() { + return contentCase_ == 6; + } + /** + * .fishjam.media_events.Candidate candidate = 6; + * @return The candidate. + */ + @java.lang.Override + public fishjam.media_events.Shared.Candidate getCandidate() { + if (candidateBuilder_ == null) { + if (contentCase_ == 6) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } else { + if (contentCase_ == 6) { + return candidateBuilder_.getMessage(); + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + public Builder setCandidate(fishjam.media_events.Shared.Candidate value) { + if (candidateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + candidateBuilder_.setMessage(value); + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + public Builder setCandidate( + fishjam.media_events.Shared.Candidate.Builder builderForValue) { + if (candidateBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + candidateBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + public Builder mergeCandidate(fishjam.media_events.Shared.Candidate value) { + if (candidateBuilder_ == null) { + if (contentCase_ == 6 && + content_ != fishjam.media_events.Shared.Candidate.getDefaultInstance()) { + content_ = fishjam.media_events.Shared.Candidate.newBuilder((fishjam.media_events.Shared.Candidate) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 6) { + candidateBuilder_.mergeFrom(value); + } else { + candidateBuilder_.setMessage(value); + } + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + public Builder clearCandidate() { + if (candidateBuilder_ == null) { + if (contentCase_ == 6) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 6) { + contentCase_ = 0; + content_ = null; + } + candidateBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + public fishjam.media_events.Shared.Candidate.Builder getCandidateBuilder() { + return getCandidateFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + @java.lang.Override + public fishjam.media_events.Shared.CandidateOrBuilder getCandidateOrBuilder() { + if ((contentCase_ == 6) && (candidateBuilder_ != null)) { + return candidateBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 6) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.Candidate candidate = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.Shared.Candidate, fishjam.media_events.Shared.Candidate.Builder, fishjam.media_events.Shared.CandidateOrBuilder> + getCandidateFieldBuilder() { + if (candidateBuilder_ == null) { + if (!(contentCase_ == 6)) { + content_ = fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + candidateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.Shared.Candidate, fishjam.media_events.Shared.Candidate.Builder, fishjam.media_events.Shared.CandidateOrBuilder>( + (fishjam.media_events.Shared.Candidate) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 6; + onChanged(); + return candidateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer, fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder, fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder> sdpOfferBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + * @return Whether the sdpOffer field is set. + */ + @java.lang.Override + public boolean hasSdpOffer() { + return contentCase_ == 7; + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + * @return The sdpOffer. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer getSdpOffer() { + if (sdpOfferBuilder_ == null) { + if (contentCase_ == 7) { + return (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } else { + if (contentCase_ == 7) { + return sdpOfferBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + public Builder setSdpOffer(fishjam.media_events.peer.Peer.MediaEvent.SdpOffer value) { + if (sdpOfferBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + sdpOfferBuilder_.setMessage(value); + } + contentCase_ = 7; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + public Builder setSdpOffer( + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder builderForValue) { + if (sdpOfferBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + sdpOfferBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 7; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + public Builder mergeSdpOffer(fishjam.media_events.peer.Peer.MediaEvent.SdpOffer value) { + if (sdpOfferBuilder_ == null) { + if (contentCase_ == 7 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 7) { + sdpOfferBuilder_.mergeFrom(value); + } else { + sdpOfferBuilder_.setMessage(value); + } + } + contentCase_ = 7; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + public Builder clearSdpOffer() { + if (sdpOfferBuilder_ == null) { + if (contentCase_ == 7) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 7) { + contentCase_ = 0; + content_ = null; + } + sdpOfferBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + public fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder getSdpOfferBuilder() { + return getSdpOfferFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder getSdpOfferOrBuilder() { + if ((contentCase_ == 7) && (sdpOfferBuilder_ != null)) { + return sdpOfferBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 7) { + return (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.SdpOffer sdp_offer = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer, fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder, fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder> + getSdpOfferFieldBuilder() { + if (sdpOfferBuilder_ == null) { + if (!(contentCase_ == 7)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.getDefaultInstance(); + } + sdpOfferBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.SdpOffer, fishjam.media_events.peer.Peer.MediaEvent.SdpOffer.Builder, fishjam.media_events.peer.Peer.MediaEvent.SdpOfferOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.SdpOffer) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 7; + onChanged(); + return sdpOfferBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder, fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder> trackBitratesBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + * @return Whether the trackBitrates field is set. + */ + @java.lang.Override + public boolean hasTrackBitrates() { + return contentCase_ == 8; + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + * @return The trackBitrates. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates getTrackBitrates() { + if (trackBitratesBuilder_ == null) { + if (contentCase_ == 8) { + return (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } else { + if (contentCase_ == 8) { + return trackBitratesBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + public Builder setTrackBitrates(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates value) { + if (trackBitratesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + trackBitratesBuilder_.setMessage(value); + } + contentCase_ = 8; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + public Builder setTrackBitrates( + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder builderForValue) { + if (trackBitratesBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + trackBitratesBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 8; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + public Builder mergeTrackBitrates(fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates value) { + if (trackBitratesBuilder_ == null) { + if (contentCase_ == 8 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 8) { + trackBitratesBuilder_.mergeFrom(value); + } else { + trackBitratesBuilder_.setMessage(value); + } + } + contentCase_ = 8; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + public Builder clearTrackBitrates() { + if (trackBitratesBuilder_ == null) { + if (contentCase_ == 8) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 8) { + contentCase_ = 0; + content_ = null; + } + trackBitratesBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder getTrackBitratesBuilder() { + return getTrackBitratesFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder getTrackBitratesOrBuilder() { + if ((contentCase_ == 8) && (trackBitratesBuilder_ != null)) { + return trackBitratesBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 8) { + return (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.TrackBitrates track_bitrates = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder, fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder> + getTrackBitratesFieldBuilder() { + if (trackBitratesBuilder_ == null) { + if (!(contentCase_ == 8)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.getDefaultInstance(); + } + trackBitratesBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates, fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates.Builder, fishjam.media_events.peer.Peer.MediaEvent.TrackBitratesOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.TrackBitrates) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 8; + onChanged(); + return trackBitratesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder> enableTrackVariantBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + * @return Whether the enableTrackVariant field is set. + */ + @java.lang.Override + public boolean hasEnableTrackVariant() { + return contentCase_ == 9; + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + * @return The enableTrackVariant. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant getEnableTrackVariant() { + if (enableTrackVariantBuilder_ == null) { + if (contentCase_ == 9) { + return (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } else { + if (contentCase_ == 9) { + return enableTrackVariantBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + public Builder setEnableTrackVariant(fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant value) { + if (enableTrackVariantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + enableTrackVariantBuilder_.setMessage(value); + } + contentCase_ = 9; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + public Builder setEnableTrackVariant( + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder builderForValue) { + if (enableTrackVariantBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + enableTrackVariantBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 9; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + public Builder mergeEnableTrackVariant(fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant value) { + if (enableTrackVariantBuilder_ == null) { + if (contentCase_ == 9 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 9) { + enableTrackVariantBuilder_.mergeFrom(value); + } else { + enableTrackVariantBuilder_.setMessage(value); + } + } + contentCase_ = 9; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + public Builder clearEnableTrackVariant() { + if (enableTrackVariantBuilder_ == null) { + if (contentCase_ == 9) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 9) { + contentCase_ = 0; + content_ = null; + } + enableTrackVariantBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder getEnableTrackVariantBuilder() { + return getEnableTrackVariantFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder getEnableTrackVariantOrBuilder() { + if ((contentCase_ == 9) && (enableTrackVariantBuilder_ != null)) { + return enableTrackVariantBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 9) { + return (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.EnableTrackVariant enable_track_variant = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder> + getEnableTrackVariantFieldBuilder() { + if (enableTrackVariantBuilder_ == null) { + if (!(contentCase_ == 9)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.getDefaultInstance(); + } + enableTrackVariantBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariantOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.EnableTrackVariant) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 9; + onChanged(); + return enableTrackVariantBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder> disableTrackVariantBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + * @return Whether the disableTrackVariant field is set. + */ + @java.lang.Override + public boolean hasDisableTrackVariant() { + return contentCase_ == 10; + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + * @return The disableTrackVariant. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant getDisableTrackVariant() { + if (disableTrackVariantBuilder_ == null) { + if (contentCase_ == 10) { + return (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } else { + if (contentCase_ == 10) { + return disableTrackVariantBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + public Builder setDisableTrackVariant(fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant value) { + if (disableTrackVariantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + disableTrackVariantBuilder_.setMessage(value); + } + contentCase_ = 10; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + public Builder setDisableTrackVariant( + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder builderForValue) { + if (disableTrackVariantBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + disableTrackVariantBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 10; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + public Builder mergeDisableTrackVariant(fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant value) { + if (disableTrackVariantBuilder_ == null) { + if (contentCase_ == 10 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 10) { + disableTrackVariantBuilder_.mergeFrom(value); + } else { + disableTrackVariantBuilder_.setMessage(value); + } + } + contentCase_ = 10; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + public Builder clearDisableTrackVariant() { + if (disableTrackVariantBuilder_ == null) { + if (contentCase_ == 10) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 10) { + contentCase_ = 0; + content_ = null; + } + disableTrackVariantBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder getDisableTrackVariantBuilder() { + return getDisableTrackVariantFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder getDisableTrackVariantOrBuilder() { + if ((contentCase_ == 10) && (disableTrackVariantBuilder_ != null)) { + return disableTrackVariantBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 10) { + return (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.DisableTrackVariant disable_track_variant = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder> + getDisableTrackVariantFieldBuilder() { + if (disableTrackVariantBuilder_ == null) { + if (!(contentCase_ == 10)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.getDefaultInstance(); + } + disableTrackVariantBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariantOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.DisableTrackVariant) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 10; + onChanged(); + return disableTrackVariantBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder> setTargetTrackVariantBuilder_; + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + * @return Whether the setTargetTrackVariant field is set. + */ + @java.lang.Override + public boolean hasSetTargetTrackVariant() { + return contentCase_ == 11; + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + * @return The setTargetTrackVariant. + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant getSetTargetTrackVariant() { + if (setTargetTrackVariantBuilder_ == null) { + if (contentCase_ == 11) { + return (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } else { + if (contentCase_ == 11) { + return setTargetTrackVariantBuilder_.getMessage(); + } + return fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + public Builder setSetTargetTrackVariant(fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant value) { + if (setTargetTrackVariantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + setTargetTrackVariantBuilder_.setMessage(value); + } + contentCase_ = 11; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + public Builder setSetTargetTrackVariant( + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder builderForValue) { + if (setTargetTrackVariantBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + setTargetTrackVariantBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 11; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + public Builder mergeSetTargetTrackVariant(fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant value) { + if (setTargetTrackVariantBuilder_ == null) { + if (contentCase_ == 11 && + content_ != fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance()) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.newBuilder((fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 11) { + setTargetTrackVariantBuilder_.mergeFrom(value); + } else { + setTargetTrackVariantBuilder_.setMessage(value); + } + } + contentCase_ = 11; + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + public Builder clearSetTargetTrackVariant() { + if (setTargetTrackVariantBuilder_ == null) { + if (contentCase_ == 11) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 11) { + contentCase_ = 0; + content_ = null; + } + setTargetTrackVariantBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder getSetTargetTrackVariantBuilder() { + return getSetTargetTrackVariantFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder getSetTargetTrackVariantOrBuilder() { + if ((contentCase_ == 11) && (setTargetTrackVariantBuilder_ != null)) { + return setTargetTrackVariantBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 11) { + return (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_; + } + return fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.peer.MediaEvent.SetTargetTrackVariant set_target_track_variant = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder> + getSetTargetTrackVariantFieldBuilder() { + if (setTargetTrackVariantBuilder_ == null) { + if (!(contentCase_ == 11)) { + content_ = fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.getDefaultInstance(); + } + setTargetTrackVariantBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant.Builder, fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariantOrBuilder>( + (fishjam.media_events.peer.Peer.MediaEvent.SetTargetTrackVariant) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 11; + onChanged(); + return setTargetTrackVariantBuilder_; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.peer.MediaEvent) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.peer.MediaEvent) + private static final fishjam.media_events.peer.Peer.MediaEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.peer.Peer.MediaEvent(); + } + + public static fishjam.media_events.peer.Peer.MediaEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MediaEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.peer.Peer.MediaEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_Connect_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_Connect_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToMetadataJsonEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToMetadataJsonEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToBitratesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToBitratesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_MidToTrackIdEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_MidToTrackIdEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n$fishjam/media_events/peer/peer.proto\022\031" + + "fishjam.media_events.peer\032!fishjam/media" + + "_events/shared.proto\"\311\020\n\nMediaEvent\022@\n\007c" + + "onnect\030\001 \001(\0132-.fishjam.media_events.peer" + + ".MediaEvent.ConnectH\000\022F\n\ndisconnect\030\002 \001(" + + "\01320.fishjam.media_events.peer.MediaEvent" + + ".DisconnectH\000\022`\n\030update_endpoint_metadat" + + "a\030\003 \001(\0132<.fishjam.media_events.peer.Medi" + + "aEvent.UpdateEndpointMetadataH\000\022Z\n\025updat" + + "e_track_metadata\030\004 \001(\01329.fishjam.media_e" + + "vents.peer.MediaEvent.UpdateTrackMetadat" + + "aH\000\022U\n\022renegotiate_tracks\030\005 \001(\01327.fishja" + + "m.media_events.peer.MediaEvent.Renegotia" + + "teTracksH\000\0224\n\tcandidate\030\006 \001(\0132\037.fishjam." + + "media_events.CandidateH\000\022C\n\tsdp_offer\030\007 " + + "\001(\0132..fishjam.media_events.peer.MediaEve" + + "nt.SdpOfferH\000\022M\n\016track_bitrates\030\010 \001(\01323." + + "fishjam.media_events.peer.MediaEvent.Tra" + + "ckBitratesH\000\022X\n\024enable_track_variant\030\t \001" + + "(\01328.fishjam.media_events.peer.MediaEven" + + "t.EnableTrackVariantH\000\022Z\n\025disable_track_" + + "variant\030\n \001(\01329.fishjam.media_events.pee" + + "r.MediaEvent.DisableTrackVariantH\000\022_\n\030se" + + "t_target_track_variant\030\013 \001(\0132;.fishjam.m" + + "edia_events.peer.MediaEvent.SetTargetTra" + + "ckVariantH\000\032Q\n\016VariantBitrate\022.\n\007variant" + + "\030\001 \001(\0162\035.fishjam.media_events.Variant\022\017\n" + + "\007bitrate\030\002 \001(\005\032 \n\007Connect\022\025\n\rmetadata_js" + + "on\030\001 \001(\t\032\014\n\nDisconnect\032/\n\026UpdateEndpoint" + + "Metadata\022\025\n\rmetadata_json\030\001 \001(\t\032>\n\023Updat" + + "eTrackMetadata\022\020\n\010track_id\030\001 \001(\t\022\025\n\rmeta" + + "data_json\030\002 \001(\t\032\023\n\021RenegotiateTracks\032\247\004\n" + + "\010SdpOffer\022\013\n\003sdp\030\001 \001(\t\022l\n\031track_id_to_me" + + "tadata_json\030\002 \003(\0132I.fishjam.media_events" + + ".peer.MediaEvent.SdpOffer.TrackIdToMetad" + + "ataJsonEntry\022c\n\024track_id_to_bitrates\030\003 \003" + + "(\0132E.fishjam.media_events.peer.MediaEven" + + "t.SdpOffer.TrackIdToBitratesEntry\022Y\n\017mid" + + "_to_track_id\030\004 \003(\0132@.fishjam.media_event" + + "s.peer.MediaEvent.SdpOffer.MidToTrackIdE" + + "ntry\032<\n\032TrackIdToMetadataJsonEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032m\n\026TrackIdToB" + + "itratesEntry\022\013\n\003key\030\001 \001(\t\022B\n\005value\030\002 \001(\013" + + "23.fishjam.media_events.peer.MediaEvent." + + "TrackBitrates:\0028\001\0323\n\021MidToTrackIdEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032q\n\rTrackB" + + "itrates\022\020\n\010track_id\030\001 \001(\t\022N\n\020variant_bit" + + "rates\030\002 \003(\01324.fishjam.media_events.peer." + + "MediaEvent.VariantBitrate\032W\n\023DisableTrac" + + "kVariant\022\020\n\010track_id\030\001 \001(\t\022.\n\007variant\030\002 " + + "\001(\0162\035.fishjam.media_events.Variant\032V\n\022En" + + "ableTrackVariant\022\020\n\010track_id\030\001 \001(\t\022.\n\007va" + + "riant\030\002 \001(\0162\035.fishjam.media_events.Varia" + + "nt\032Y\n\025SetTargetTrackVariant\022\020\n\010track_id\030" + + "\001 \001(\t\022.\n\007variant\030\002 \001(\0162\035.fishjam.media_e" + + "vents.VariantB\t\n\007contentb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + fishjam.media_events.Shared.getDescriptor(), + }); + internal_static_fishjam_media_events_peer_MediaEvent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_fishjam_media_events_peer_MediaEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_descriptor, + new java.lang.String[] { "Connect", "Disconnect", "UpdateEndpointMetadata", "UpdateTrackMetadata", "RenegotiateTracks", "Candidate", "SdpOffer", "TrackBitrates", "EnableTrackVariant", "DisableTrackVariant", "SetTargetTrackVariant", "Content", }); + internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_VariantBitrate_descriptor, + new java.lang.String[] { "Variant", "Bitrate", }); + internal_static_fishjam_media_events_peer_MediaEvent_Connect_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(1); + internal_static_fishjam_media_events_peer_MediaEvent_Connect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_Connect_descriptor, + new java.lang.String[] { "MetadataJson", }); + internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(2); + internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_Disconnect_descriptor, + new java.lang.String[] { }); + internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(3); + internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_UpdateEndpointMetadata_descriptor, + new java.lang.String[] { "MetadataJson", }); + internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(4); + internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_UpdateTrackMetadata_descriptor, + new java.lang.String[] { "TrackId", "MetadataJson", }); + internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(5); + internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_RenegotiateTracks_descriptor, + new java.lang.String[] { }); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(6); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor, + new java.lang.String[] { "Sdp", "TrackIdToMetadataJson", "TrackIdToBitrates", "MidToTrackId", }); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToMetadataJsonEntry_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToMetadataJsonEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToMetadataJsonEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToBitratesEntry_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor.getNestedTypes().get(1); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToBitratesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_TrackIdToBitratesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_MidToTrackIdEntry_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_descriptor.getNestedTypes().get(2); + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_MidToTrackIdEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_SdpOffer_MidToTrackIdEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(7); + internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_TrackBitrates_descriptor, + new java.lang.String[] { "TrackId", "VariantBitrates", }); + internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(8); + internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_DisableTrackVariant_descriptor, + new java.lang.String[] { "TrackId", "Variant", }); + internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(9); + internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_EnableTrackVariant_descriptor, + new java.lang.String[] { "TrackId", "Variant", }); + internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_descriptor = + internal_static_fishjam_media_events_peer_MediaEvent_descriptor.getNestedTypes().get(10); + internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_peer_MediaEvent_SetTargetTrackVariant_descriptor, + new java.lang.String[] { "TrackId", "Variant", }); + descriptor.resolveAllFeaturesImmutable(); + fishjam.media_events.Shared.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/PeerKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/PeerKt.kt new file mode 100644 index 00000000..0e210297 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/peer/PeerKt.kt @@ -0,0 +1,7 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/peer/peer.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package fishjam.media_events.peer; + diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/MediaEventKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/MediaEventKt.kt new file mode 100644 index 00000000..efcaec17 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/MediaEventKt.kt @@ -0,0 +1,2249 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/server/server.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package fishjam.media_events.server; + +@kotlin.jvm.JvmName("-initializemediaEvent") +public inline fun mediaEvent(block: fishjam.media_events.server.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent = + fishjam.media_events.server.MediaEventKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.newBuilder()).apply { block() }._build() +/** + * ``` + * Defines any type of message sent from Membrane RTC Engine to Peer + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent` + */ +public object MediaEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent = _builder.build() + + /** + * `.fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1;` + */ + public var endpointUpdated: fishjam.media_events.server.Server.MediaEvent.EndpointUpdated + @JvmName("getEndpointUpdated") + get() = _builder.getEndpointUpdated() + @JvmName("setEndpointUpdated") + set(value) { + _builder.setEndpointUpdated(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1;` + */ + public fun clearEndpointUpdated() { + _builder.clearEndpointUpdated() + } + /** + * `.fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1;` + * @return Whether the endpointUpdated field is set. + */ + public fun hasEndpointUpdated(): kotlin.Boolean { + return _builder.hasEndpointUpdated() + } + + /** + * `.fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2;` + */ + public var trackUpdated: fishjam.media_events.server.Server.MediaEvent.TrackUpdated + @JvmName("getTrackUpdated") + get() = _builder.getTrackUpdated() + @JvmName("setTrackUpdated") + set(value) { + _builder.setTrackUpdated(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2;` + */ + public fun clearTrackUpdated() { + _builder.clearTrackUpdated() + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2;` + * @return Whether the trackUpdated field is set. + */ + public fun hasTrackUpdated(): kotlin.Boolean { + return _builder.hasTrackUpdated() + } + + /** + * `.fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3;` + */ + public var tracksAdded: fishjam.media_events.server.Server.MediaEvent.TracksAdded + @JvmName("getTracksAdded") + get() = _builder.getTracksAdded() + @JvmName("setTracksAdded") + set(value) { + _builder.setTracksAdded(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3;` + */ + public fun clearTracksAdded() { + _builder.clearTracksAdded() + } + /** + * `.fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3;` + * @return Whether the tracksAdded field is set. + */ + public fun hasTracksAdded(): kotlin.Boolean { + return _builder.hasTracksAdded() + } + + /** + * `.fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4;` + */ + public var tracksRemoved: fishjam.media_events.server.Server.MediaEvent.TracksRemoved + @JvmName("getTracksRemoved") + get() = _builder.getTracksRemoved() + @JvmName("setTracksRemoved") + set(value) { + _builder.setTracksRemoved(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4;` + */ + public fun clearTracksRemoved() { + _builder.clearTracksRemoved() + } + /** + * `.fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4;` + * @return Whether the tracksRemoved field is set. + */ + public fun hasTracksRemoved(): kotlin.Boolean { + return _builder.hasTracksRemoved() + } + + /** + * `.fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5;` + */ + public var endpointAdded: fishjam.media_events.server.Server.MediaEvent.EndpointAdded + @JvmName("getEndpointAdded") + get() = _builder.getEndpointAdded() + @JvmName("setEndpointAdded") + set(value) { + _builder.setEndpointAdded(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5;` + */ + public fun clearEndpointAdded() { + _builder.clearEndpointAdded() + } + /** + * `.fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5;` + * @return Whether the endpointAdded field is set. + */ + public fun hasEndpointAdded(): kotlin.Boolean { + return _builder.hasEndpointAdded() + } + + /** + * `.fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6;` + */ + public var endpointRemoved: fishjam.media_events.server.Server.MediaEvent.EndpointRemoved + @JvmName("getEndpointRemoved") + get() = _builder.getEndpointRemoved() + @JvmName("setEndpointRemoved") + set(value) { + _builder.setEndpointRemoved(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6;` + */ + public fun clearEndpointRemoved() { + _builder.clearEndpointRemoved() + } + /** + * `.fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6;` + * @return Whether the endpointRemoved field is set. + */ + public fun hasEndpointRemoved(): kotlin.Boolean { + return _builder.hasEndpointRemoved() + } + + /** + * `.fishjam.media_events.server.MediaEvent.Connected connected = 7;` + */ + public var connected: fishjam.media_events.server.Server.MediaEvent.Connected + @JvmName("getConnected") + get() = _builder.getConnected() + @JvmName("setConnected") + set(value) { + _builder.setConnected(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.Connected connected = 7;` + */ + public fun clearConnected() { + _builder.clearConnected() + } + /** + * `.fishjam.media_events.server.MediaEvent.Connected connected = 7;` + * @return Whether the connected field is set. + */ + public fun hasConnected(): kotlin.Boolean { + return _builder.hasConnected() + } + + /** + * `.fishjam.media_events.server.MediaEvent.Error error = 8;` + */ + public var error: fishjam.media_events.server.Server.MediaEvent.Error + @JvmName("getError") + get() = _builder.getError() + @JvmName("setError") + set(value) { + _builder.setError(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.Error error = 8;` + */ + public fun clearError() { + _builder.clearError() + } + /** + * `.fishjam.media_events.server.MediaEvent.Error error = 8;` + * @return Whether the error field is set. + */ + public fun hasError(): kotlin.Boolean { + return _builder.hasError() + } + + /** + * `.fishjam.media_events.server.MediaEvent.OfferData offer_data = 9;` + */ + public var offerData: fishjam.media_events.server.Server.MediaEvent.OfferData + @JvmName("getOfferData") + get() = _builder.getOfferData() + @JvmName("setOfferData") + set(value) { + _builder.setOfferData(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.OfferData offer_data = 9;` + */ + public fun clearOfferData() { + _builder.clearOfferData() + } + /** + * `.fishjam.media_events.server.MediaEvent.OfferData offer_data = 9;` + * @return Whether the offerData field is set. + */ + public fun hasOfferData(): kotlin.Boolean { + return _builder.hasOfferData() + } + + /** + * `.fishjam.media_events.Candidate candidate = 10;` + */ + public var candidate: fishjam.media_events.Shared.Candidate + @JvmName("getCandidate") + get() = _builder.getCandidate() + @JvmName("setCandidate") + set(value) { + _builder.setCandidate(value) + } + /** + * `.fishjam.media_events.Candidate candidate = 10;` + */ + public fun clearCandidate() { + _builder.clearCandidate() + } + /** + * `.fishjam.media_events.Candidate candidate = 10;` + * @return Whether the candidate field is set. + */ + public fun hasCandidate(): kotlin.Boolean { + return _builder.hasCandidate() + } + + /** + * `.fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11;` + */ + public var sdpAnswer: fishjam.media_events.server.Server.MediaEvent.SdpAnswer + @JvmName("getSdpAnswer") + get() = _builder.getSdpAnswer() + @JvmName("setSdpAnswer") + set(value) { + _builder.setSdpAnswer(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11;` + */ + public fun clearSdpAnswer() { + _builder.clearSdpAnswer() + } + /** + * `.fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11;` + * @return Whether the sdpAnswer field is set. + */ + public fun hasSdpAnswer(): kotlin.Boolean { + return _builder.hasSdpAnswer() + } + + /** + * `.fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12;` + */ + public var vadNotification: fishjam.media_events.server.Server.MediaEvent.VadNotification + @JvmName("getVadNotification") + get() = _builder.getVadNotification() + @JvmName("setVadNotification") + set(value) { + _builder.setVadNotification(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12;` + */ + public fun clearVadNotification() { + _builder.clearVadNotification() + } + /** + * `.fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12;` + * @return Whether the vadNotification field is set. + */ + public fun hasVadNotification(): kotlin.Boolean { + return _builder.hasVadNotification() + } + + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13;` + */ + public var trackVariantSwitched: fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched + @JvmName("getTrackVariantSwitched") + get() = _builder.getTrackVariantSwitched() + @JvmName("setTrackVariantSwitched") + set(value) { + _builder.setTrackVariantSwitched(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13;` + */ + public fun clearTrackVariantSwitched() { + _builder.clearTrackVariantSwitched() + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13;` + * @return Whether the trackVariantSwitched field is set. + */ + public fun hasTrackVariantSwitched(): kotlin.Boolean { + return _builder.hasTrackVariantSwitched() + } + + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14;` + */ + public var trackVariantDisabled: fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled + @JvmName("getTrackVariantDisabled") + get() = _builder.getTrackVariantDisabled() + @JvmName("setTrackVariantDisabled") + set(value) { + _builder.setTrackVariantDisabled(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14;` + */ + public fun clearTrackVariantDisabled() { + _builder.clearTrackVariantDisabled() + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14;` + * @return Whether the trackVariantDisabled field is set. + */ + public fun hasTrackVariantDisabled(): kotlin.Boolean { + return _builder.hasTrackVariantDisabled() + } + + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15;` + */ + public var trackVariantEnabled: fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled + @JvmName("getTrackVariantEnabled") + get() = _builder.getTrackVariantEnabled() + @JvmName("setTrackVariantEnabled") + set(value) { + _builder.setTrackVariantEnabled(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15;` + */ + public fun clearTrackVariantEnabled() { + _builder.clearTrackVariantEnabled() + } + /** + * `.fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15;` + * @return Whether the trackVariantEnabled field is set. + */ + public fun hasTrackVariantEnabled(): kotlin.Boolean { + return _builder.hasTrackVariantEnabled() + } + public val contentCase: fishjam.media_events.server.Server.MediaEvent.ContentCase + @JvmName("getContentCase") + get() = _builder.getContentCase() + + public fun clearContent() { + _builder.clearContent() + } + } + @kotlin.jvm.JvmName("-initializetrack") + public inline fun track(block: fishjam.media_events.server.MediaEventKt.TrackKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Track = + fishjam.media_events.server.MediaEventKt.TrackKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.Track.newBuilder()).apply { block() }._build() + /** + * ``` + * SCHEMAS + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.Track` + */ + public object TrackKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.Track.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.Track.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.Track = _builder.build() + + /** + * `string metadata_json = 1;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 1;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + + /** + * `.fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2;` + */ + public var simulcastConfig: fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig + @JvmName("getSimulcastConfig") + get() = _builder.getSimulcastConfig() + @JvmName("setSimulcastConfig") + set(value) { + _builder.setSimulcastConfig(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2;` + */ + public fun clearSimulcastConfig() { + _builder.clearSimulcastConfig() + } + /** + * `.fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2;` + * @return Whether the simulcastConfig field is set. + */ + public fun hasSimulcastConfig(): kotlin.Boolean { + return _builder.hasSimulcastConfig() + } + public val TrackKt.Dsl.simulcastConfigOrNull: fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig? + get() = _builder.simulcastConfigOrNull + } + @kotlin.jvm.JvmName("-initializesimulcastConfig") + public inline fun simulcastConfig(block: fishjam.media_events.server.MediaEventKt.TrackKt.SimulcastConfigKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig = + fishjam.media_events.server.MediaEventKt.TrackKt.SimulcastConfigKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.newBuilder()).apply { block() }._build() + /** + * Protobuf type `fishjam.media_events.server.MediaEvent.Track.SimulcastConfig` + */ + public object SimulcastConfigKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig = _builder.build() + + /** + * `bool enabled = 1;` + */ + public var enabled: kotlin.Boolean + @JvmName("getEnabled") + get() = _builder.getEnabled() + @JvmName("setEnabled") + set(value) { + _builder.setEnabled(value) + } + /** + * `bool enabled = 1;` + */ + public fun clearEnabled() { + _builder.clearEnabled() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class EnabledVariantsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + */ + public val enabledVariants: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getEnabledVariantsList() + ) + /** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + * @param value The enabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addEnabledVariants") + public fun com.google.protobuf.kotlin.DslList.add(value: fishjam.media_events.Shared.Variant) { + _builder.addEnabledVariants(value) + }/** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + * @param value The enabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignEnabledVariants") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: fishjam.media_events.Shared.Variant) { + add(value) + }/** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + * @param values The enabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllEnabledVariants") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllEnabledVariants(values) + }/** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + * @param values The enabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllEnabledVariants") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + }/** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + * @param index The index to set the value at. + * @param value The enabledVariants to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setEnabledVariants") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: fishjam.media_events.Shared.Variant) { + _builder.setEnabledVariants(index, value) + }/** + * `repeated .fishjam.media_events.Variant enabled_variants = 2;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearEnabledVariants") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearEnabledVariants() + } + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class DisabledVariantsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + */ + public val disabledVariants: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getDisabledVariantsList() + ) + /** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + * @param value The disabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addDisabledVariants") + public fun com.google.protobuf.kotlin.DslList.add(value: fishjam.media_events.Shared.Variant) { + _builder.addDisabledVariants(value) + }/** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + * @param value The disabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignDisabledVariants") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: fishjam.media_events.Shared.Variant) { + add(value) + }/** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + * @param values The disabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllDisabledVariants") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllDisabledVariants(values) + }/** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + * @param values The disabledVariants to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllDisabledVariants") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + }/** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + * @param index The index to set the value at. + * @param value The disabledVariants to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setDisabledVariants") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: fishjam.media_events.Shared.Variant) { + _builder.setDisabledVariants(index, value) + }/** + * `repeated .fishjam.media_events.Variant disabled_variants = 3;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearDisabledVariants") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearDisabledVariants() + }} + } + } + @kotlin.jvm.JvmName("-initializeendpoint") + public inline fun endpoint(block: fishjam.media_events.server.MediaEventKt.EndpointKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Endpoint = + fishjam.media_events.server.MediaEventKt.EndpointKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.Endpoint.newBuilder()).apply { block() }._build() + /** + * Protobuf type `fishjam.media_events.server.MediaEvent.Endpoint` + */ + public object EndpointKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.Endpoint = _builder.build() + + /** + * `string endpoint_type = 2;` + */ + public var endpointType: kotlin.String + @JvmName("getEndpointType") + get() = _builder.getEndpointType() + @JvmName("setEndpointType") + set(value) { + _builder.setEndpointType(value) + } + /** + * `string endpoint_type = 2;` + */ + public fun clearEndpointType() { + _builder.clearEndpointType() + } + + /** + * `string metadata_json = 3;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 3;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class TrackIdToTrackProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `map track_id_to_track = 4;` + */ + public val trackIdToTrack: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getTrackIdToTrackMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getTrackIdToTrackMap() + ) + /** + * `map track_id_to_track = 4;` + */ + @JvmName("putTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: fishjam.media_events.server.Server.MediaEvent.Track) { + _builder.putTrackIdToTrack(key, value) + } + /** + * `map track_id_to_track = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setTrackIdToTrack") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: fishjam.media_events.server.Server.MediaEvent.Track) { + put(key, value) + } + /** + * `map track_id_to_track = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeTrackIdToTrack(key) + } + /** + * `map track_id_to_track = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllTrackIdToTrack(map) + } + /** + * `map track_id_to_track = 4;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearTrackIdToTrack() + } + } + } + @kotlin.jvm.JvmName("-initializeiceServer") + public inline fun iceServer(block: fishjam.media_events.server.MediaEventKt.IceServerKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.IceServer = + fishjam.media_events.server.MediaEventKt.IceServerKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.IceServer.newBuilder()).apply { block() }._build() + /** + * Protobuf type `fishjam.media_events.server.MediaEvent.IceServer` + */ + public object IceServerKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.IceServer.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.IceServer.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.IceServer = _builder.build() + + /** + * `string credential = 1;` + */ + public var credential: kotlin.String + @JvmName("getCredential") + get() = _builder.getCredential() + @JvmName("setCredential") + set(value) { + _builder.setCredential(value) + } + /** + * `string credential = 1;` + */ + public fun clearCredential() { + _builder.clearCredential() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class UrlsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string urls = 2;` + * @return A list containing the urls. + */ + public val urls: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getUrlsList() + ) + /** + * `repeated string urls = 2;` + * @param value The urls to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addUrls") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addUrls(value) + } + /** + * `repeated string urls = 2;` + * @param value The urls to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignUrls") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string urls = 2;` + * @param values The urls to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllUrls") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllUrls(values) + } + /** + * `repeated string urls = 2;` + * @param values The urls to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllUrls") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string urls = 2;` + * @param index The index to set the value at. + * @param value The urls to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setUrls") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setUrls(index, value) + }/** + * `repeated string urls = 2;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearUrls") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearUrls() + } + /** + * `string username = 3;` + */ + public var username: kotlin.String + @JvmName("getUsername") + get() = _builder.getUsername() + @JvmName("setUsername") + set(value) { + _builder.setUsername(value) + } + /** + * `string username = 3;` + */ + public fun clearUsername() { + _builder.clearUsername() + } + } + } + @kotlin.jvm.JvmName("-initializeendpointUpdated") + public inline fun endpointUpdated(block: fishjam.media_events.server.MediaEventKt.EndpointUpdatedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.EndpointUpdated = + fishjam.media_events.server.MediaEventKt.EndpointUpdatedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when metadata of one of the endpoints was updated + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.EndpointUpdated` + */ + public object EndpointUpdatedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.EndpointUpdated = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * `string metadata_json = 2;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 2;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + } + } + @kotlin.jvm.JvmName("-initializetrackUpdated") + public inline fun trackUpdated(block: fishjam.media_events.server.MediaEventKt.TrackUpdatedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackUpdated = + fishjam.media_events.server.MediaEventKt.TrackUpdatedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.TrackUpdated.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when metadata of one of the tracks was updated + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.TrackUpdated` + */ + public object TrackUpdatedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.TrackUpdated = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * `string track_id = 2;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 2;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `string metadata_json = 3;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 3;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + } + } + @kotlin.jvm.JvmName("-initializetracksAdded") + public inline fun tracksAdded(block: fishjam.media_events.server.MediaEventKt.TracksAddedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TracksAdded = + fishjam.media_events.server.MediaEventKt.TracksAddedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.TracksAdded.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to informs that one of the peers has added one or more tracks. + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.TracksAdded` + */ + public object TracksAddedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.TracksAdded = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class TrackIdToTrackProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `map track_id_to_track = 2;` + */ + public val trackIdToTrack: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getTrackIdToTrackMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getTrackIdToTrackMap() + ) + /** + * `map track_id_to_track = 2;` + */ + @JvmName("putTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: fishjam.media_events.server.Server.MediaEvent.Track) { + _builder.putTrackIdToTrack(key, value) + } + /** + * `map track_id_to_track = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setTrackIdToTrack") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: fishjam.media_events.server.Server.MediaEvent.Track) { + put(key, value) + } + /** + * `map track_id_to_track = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeTrackIdToTrack(key) + } + /** + * `map track_id_to_track = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllTrackIdToTrack(map) + } + /** + * `map track_id_to_track = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearTrackIdToTrack") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearTrackIdToTrack() + } + } + } + @kotlin.jvm.JvmName("-initializetracksRemoved") + public inline fun tracksRemoved(block: fishjam.media_events.server.MediaEventKt.TracksRemovedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TracksRemoved = + fishjam.media_events.server.MediaEventKt.TracksRemovedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.TracksRemoved.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to informs that one of the peers has removed one or more tracks. + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.TracksRemoved` + */ + public object TracksRemovedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.TracksRemoved = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class TrackIdsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string track_ids = 2;` + * @return A list containing the trackIds. + */ + public val trackIds: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getTrackIdsList() + ) + /** + * `repeated string track_ids = 2;` + * @param value The trackIds to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addTrackIds") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addTrackIds(value) + } + /** + * `repeated string track_ids = 2;` + * @param value The trackIds to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignTrackIds") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string track_ids = 2;` + * @param values The trackIds to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllTrackIds") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllTrackIds(values) + } + /** + * `repeated string track_ids = 2;` + * @param values The trackIds to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllTrackIds") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string track_ids = 2;` + * @param index The index to set the value at. + * @param value The trackIds to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setTrackIds") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setTrackIds(index, value) + }/** + * `repeated string track_ids = 2;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearTrackIds") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearTrackIds() + }} + } + @kotlin.jvm.JvmName("-initializeendpointAdded") + public inline fun endpointAdded(block: fishjam.media_events.server.MediaEventKt.EndpointAddedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.EndpointAdded = + fishjam.media_events.server.MediaEventKt.EndpointAddedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.EndpointAdded.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to all peers in the room after a new endpoint was added. + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.EndpointAdded` + */ + public object EndpointAddedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.EndpointAdded = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * `string metadata_json = 2;` + */ + public var metadataJson: kotlin.String + @JvmName("getMetadataJson") + get() = _builder.getMetadataJson() + @JvmName("setMetadataJson") + set(value) { + _builder.setMetadataJson(value) + } + /** + * `string metadata_json = 2;` + */ + public fun clearMetadataJson() { + _builder.clearMetadataJson() + } + } + } + @kotlin.jvm.JvmName("-initializeconnected") + public inline fun connected(block: fishjam.media_events.server.MediaEventKt.ConnectedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Connected = + fishjam.media_events.server.MediaEventKt.ConnectedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.Connected.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to the peer after connecting to the WebRTC Endpoint. + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.Connected` + */ + public object ConnectedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.Connected.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.Connected.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.Connected = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class EndpointIdToEndpointProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `map endpoint_id_to_endpoint = 2;` + */ + public val endpointIdToEndpoint: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getEndpointIdToEndpointMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getEndpointIdToEndpointMap() + ) + /** + * `map endpoint_id_to_endpoint = 2;` + */ + @JvmName("putEndpointIdToEndpoint") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: fishjam.media_events.server.Server.MediaEvent.Endpoint) { + _builder.putEndpointIdToEndpoint(key, value) + } + /** + * `map endpoint_id_to_endpoint = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setEndpointIdToEndpoint") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: fishjam.media_events.server.Server.MediaEvent.Endpoint) { + put(key, value) + } + /** + * `map endpoint_id_to_endpoint = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeEndpointIdToEndpoint") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeEndpointIdToEndpoint(key) + } + /** + * `map endpoint_id_to_endpoint = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllEndpointIdToEndpoint") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllEndpointIdToEndpoint(map) + } + /** + * `map endpoint_id_to_endpoint = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearEndpointIdToEndpoint") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearEndpointIdToEndpoint() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class IceServersProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + */ + public val iceServers: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getIceServersList() + ) + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + * @param value The iceServers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addIceServers") + public fun com.google.protobuf.kotlin.DslList.add(value: fishjam.media_events.server.Server.MediaEvent.IceServer) { + _builder.addIceServers(value) + } + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + * @param value The iceServers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignIceServers") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: fishjam.media_events.server.Server.MediaEvent.IceServer) { + add(value) + } + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + * @param values The iceServers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllIceServers") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllIceServers(values) + } + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + * @param values The iceServers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllIceServers") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + * @param index The index to set the value at. + * @param value The iceServers to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setIceServers") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: fishjam.media_events.server.Server.MediaEvent.IceServer) { + _builder.setIceServers(index, value) + } + /** + * `repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearIceServers") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearIceServers() + } + + } + } + @kotlin.jvm.JvmName("-initializeendpointRemoved") + public inline fun endpointRemoved(block: fishjam.media_events.server.MediaEventKt.EndpointRemovedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.EndpointRemoved = + fishjam.media_events.server.MediaEventKt.EndpointRemovedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to all remaining peers in the room after some endpoint was removed. + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.EndpointRemoved` + */ + public object EndpointRemovedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.EndpointRemoved = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + } + } + @kotlin.jvm.JvmName("-initializeerror") + public inline fun error(block: fishjam.media_events.server.MediaEventKt.ErrorKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Error = + fishjam.media_events.server.MediaEventKt.ErrorKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.Error.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to inform that an error occurred on the server providing a message to show + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.Error` + */ + public object ErrorKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.Error.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.Error.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.Error = _builder.build() + + /** + * `string message = 1;` + */ + public var message: kotlin.String + @JvmName("getMessage") + get() = _builder.getMessage() + @JvmName("setMessage") + set(value) { + _builder.setMessage(value) + } + /** + * `string message = 1;` + */ + public fun clearMessage() { + _builder.clearMessage() + } + } + } + @kotlin.jvm.JvmName("-initializeofferData") + public inline fun offerData(block: fishjam.media_events.server.MediaEventKt.OfferDataKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.OfferData = + fishjam.media_events.server.MediaEventKt.OfferDataKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.OfferData.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to inform about the number of audio and video tracks that will be sent from the engine to the peer + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.OfferData` + */ + public object OfferDataKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.OfferData.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.OfferData.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.OfferData = _builder.build() + + /** + * `.fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1;` + */ + public var tracksTypes: fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes + @JvmName("getTracksTypes") + get() = _builder.getTracksTypes() + @JvmName("setTracksTypes") + set(value) { + _builder.setTracksTypes(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1;` + */ + public fun clearTracksTypes() { + _builder.clearTracksTypes() + } + /** + * `.fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1;` + * @return Whether the tracksTypes field is set. + */ + public fun hasTracksTypes(): kotlin.Boolean { + return _builder.hasTracksTypes() + } + public val OfferDataKt.Dsl.tracksTypesOrNull: fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes? + get() = _builder.tracksTypesOrNull + } + @kotlin.jvm.JvmName("-initializetrackTypes") + public inline fun trackTypes(block: fishjam.media_events.server.MediaEventKt.OfferDataKt.TrackTypesKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes = + fishjam.media_events.server.MediaEventKt.OfferDataKt.TrackTypesKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.newBuilder()).apply { block() }._build() + /** + * Protobuf type `fishjam.media_events.server.MediaEvent.OfferData.TrackTypes` + */ + public object TrackTypesKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes = _builder.build() + + /** + * `int32 audio = 1;` + */ + public var audio: kotlin.Int + @JvmName("getAudio") + get() = _builder.getAudio() + @JvmName("setAudio") + set(value) { + _builder.setAudio(value) + } + /** + * `int32 audio = 1;` + */ + public fun clearAudio() { + _builder.clearAudio() + } + + /** + * `int32 video = 2;` + */ + public var video: kotlin.Int + @JvmName("getVideo") + get() = _builder.getVideo() + @JvmName("setVideo") + set(value) { + _builder.setVideo(value) + } + /** + * `int32 video = 2;` + */ + public fun clearVideo() { + _builder.clearVideo() + } + } + } + } + @kotlin.jvm.JvmName("-initializesdpAnswer") + public inline fun sdpAnswer(block: fishjam.media_events.server.MediaEventKt.SdpAnswerKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.SdpAnswer = + fishjam.media_events.server.MediaEventKt.SdpAnswerKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.SdpAnswer.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent after receiving `SdpOffer` from Peer + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.SdpAnswer` + */ + public object SdpAnswerKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.SdpAnswer = _builder.build() + + /** + * ``` + * The value of the `sessionDescription.sdp` + * ``` + * + * `string sdp = 1;` + */ + public var sdp: kotlin.String + @JvmName("getSdp") + get() = _builder.getSdp() + @JvmName("setSdp") + set(value) { + _builder.setSdp(value) + } + /** + * ``` + * The value of the `sessionDescription.sdp` + * ``` + * + * `string sdp = 1;` + */ + public fun clearSdp() { + _builder.clearSdp() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class MidToTrackIdProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `map mid_to_track_id = 2;` + */ + public val midToTrackId: com.google.protobuf.kotlin.DslMap + @kotlin.jvm.JvmSynthetic + @JvmName("getMidToTrackIdMap") + get() = com.google.protobuf.kotlin.DslMap( + _builder.getMidToTrackIdMap() + ) + /** + * `map mid_to_track_id = 2;` + */ + @JvmName("putMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .put(key: kotlin.String, value: kotlin.String) { + _builder.putMidToTrackId(key, value) + } + /** + * `map mid_to_track_id = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("setMidToTrackId") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslMap + .set(key: kotlin.String, value: kotlin.String) { + put(key, value) + } + /** + * `map mid_to_track_id = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("removeMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .remove(key: kotlin.String) { + _builder.removeMidToTrackId(key) + } + /** + * `map mid_to_track_id = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("putAllMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .putAll(map: kotlin.collections.Map) { + _builder.putAllMidToTrackId(map) + } + /** + * `map mid_to_track_id = 2;` + */ + @kotlin.jvm.JvmSynthetic + @JvmName("clearMidToTrackId") + public fun com.google.protobuf.kotlin.DslMap + .clear() { + _builder.clearMidToTrackId() + } + } + } + @kotlin.jvm.JvmName("-initializevadNotification") + public inline fun vadNotification(block: fishjam.media_events.server.MediaEventKt.VadNotificationKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.VadNotification = + fishjam.media_events.server.MediaEventKt.VadNotificationKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.VadNotification.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent to inform that the track denoted by `trackId` has changed their voice actiivty + * For this notification to work, the server must be configured to use VAD extension + * and the sender must support it. + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.VadNotification` + */ + public object VadNotificationKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.VadNotification = _builder.build() + + /** + * `string track_id = 1;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 1;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2;` + */ + public var status: fishjam.media_events.server.Server.MediaEvent.VadNotification.Status + @JvmName("getStatus") + get() = _builder.getStatus() + @JvmName("setStatus") + set(value) { + _builder.setStatus(value) + } + public var statusValue: kotlin.Int + @JvmName("getStatusValue") + get() = _builder.getStatusValue() + @JvmName("setStatusValue") + set(value) { + _builder.setStatusValue(value) + } + /** + * `.fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2;` + */ + public fun clearStatus() { + _builder.clearStatus() + } + } + } + @kotlin.jvm.JvmName("-initializetrackVariantSwitched") + public inline fun trackVariantSwitched(block: fishjam.media_events.server.MediaEventKt.TrackVariantSwitchedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched = + fishjam.media_events.server.MediaEventKt.TrackVariantSwitchedKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.newBuilder()).apply { block() }._build() + /** + * ``` + * Informs that track's variant has been changed + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.TrackVariantSwitched` + */ + public object TrackVariantSwitchedKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * `string track_id = 2;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 2;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.Variant variant = 3;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 3;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + } + } + @kotlin.jvm.JvmName("-initializetrackVariantDisabled") + public inline fun trackVariantDisabled(block: fishjam.media_events.server.MediaEventKt.TrackVariantDisabledKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled = + fishjam.media_events.server.MediaEventKt.TrackVariantDisabledKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when track's variant has been disabled + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.TrackVariantDisabled` + */ + public object TrackVariantDisabledKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * `string track_id = 2;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 2;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.Variant variant = 3;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 3;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + } + } + @kotlin.jvm.JvmName("-initializetrackVariantEnabled") + public inline fun trackVariantEnabled(block: fishjam.media_events.server.MediaEventKt.TrackVariantEnabledKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled = + fishjam.media_events.server.MediaEventKt.TrackVariantEnabledKt.Dsl._create(fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.newBuilder()).apply { block() }._build() + /** + * ``` + * Sent when track's variant has been enabled + * ``` + * + * Protobuf type `fishjam.media_events.server.MediaEvent.TrackVariantEnabled` + */ + public object TrackVariantEnabledKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled = _builder.build() + + /** + * `string endpoint_id = 1;` + */ + public var endpointId: kotlin.String + @JvmName("getEndpointId") + get() = _builder.getEndpointId() + @JvmName("setEndpointId") + set(value) { + _builder.setEndpointId(value) + } + /** + * `string endpoint_id = 1;` + */ + public fun clearEndpointId() { + _builder.clearEndpointId() + } + + /** + * `string track_id = 2;` + */ + public var trackId: kotlin.String + @JvmName("getTrackId") + get() = _builder.getTrackId() + @JvmName("setTrackId") + set(value) { + _builder.setTrackId(value) + } + /** + * `string track_id = 2;` + */ + public fun clearTrackId() { + _builder.clearTrackId() + } + + /** + * `.fishjam.media_events.Variant variant = 3;` + */ + public var variant: fishjam.media_events.Shared.Variant + @JvmName("getVariant") + get() = _builder.getVariant() + @JvmName("setVariant") + set(value) { + _builder.setVariant(value) + } + public var variantValue: kotlin.Int + @JvmName("getVariantValue") + get() = _builder.getVariantValue() + @JvmName("setVariantValue") + set(value) { + _builder.setVariantValue(value) + } + /** + * `.fishjam.media_events.Variant variant = 3;` + */ + public fun clearVariant() { + _builder.clearVariant() + } + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.copy(block: `fishjam.media_events.server`.MediaEventKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent = + `fishjam.media_events.server`.MediaEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.Track.copy(block: `fishjam.media_events.server`.MediaEventKt.TrackKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Track = + `fishjam.media_events.server`.MediaEventKt.TrackKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.copy(block: `fishjam.media_events.server`.MediaEventKt.TrackKt.SimulcastConfigKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig = + `fishjam.media_events.server`.MediaEventKt.TrackKt.SimulcastConfigKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder.simulcastConfigOrNull: fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig? + get() = if (hasSimulcastConfig()) getSimulcastConfig() else null + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.Endpoint.copy(block: `fishjam.media_events.server`.MediaEventKt.EndpointKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Endpoint = + `fishjam.media_events.server`.MediaEventKt.EndpointKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.IceServer.copy(block: `fishjam.media_events.server`.MediaEventKt.IceServerKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.IceServer = + `fishjam.media_events.server`.MediaEventKt.IceServerKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.copy(block: `fishjam.media_events.server`.MediaEventKt.EndpointUpdatedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.EndpointUpdated = + `fishjam.media_events.server`.MediaEventKt.EndpointUpdatedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.TrackUpdated.copy(block: `fishjam.media_events.server`.MediaEventKt.TrackUpdatedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackUpdated = + `fishjam.media_events.server`.MediaEventKt.TrackUpdatedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.TracksAdded.copy(block: `fishjam.media_events.server`.MediaEventKt.TracksAddedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TracksAdded = + `fishjam.media_events.server`.MediaEventKt.TracksAddedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.TracksRemoved.copy(block: `fishjam.media_events.server`.MediaEventKt.TracksRemovedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TracksRemoved = + `fishjam.media_events.server`.MediaEventKt.TracksRemovedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.EndpointAdded.copy(block: `fishjam.media_events.server`.MediaEventKt.EndpointAddedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.EndpointAdded = + `fishjam.media_events.server`.MediaEventKt.EndpointAddedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.Connected.copy(block: `fishjam.media_events.server`.MediaEventKt.ConnectedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Connected = + `fishjam.media_events.server`.MediaEventKt.ConnectedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.copy(block: `fishjam.media_events.server`.MediaEventKt.EndpointRemovedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.EndpointRemoved = + `fishjam.media_events.server`.MediaEventKt.EndpointRemovedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.Error.copy(block: `fishjam.media_events.server`.MediaEventKt.ErrorKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.Error = + `fishjam.media_events.server`.MediaEventKt.ErrorKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.OfferData.copy(block: `fishjam.media_events.server`.MediaEventKt.OfferDataKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.OfferData = + `fishjam.media_events.server`.MediaEventKt.OfferDataKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.copy(block: `fishjam.media_events.server`.MediaEventKt.OfferDataKt.TrackTypesKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes = + `fishjam.media_events.server`.MediaEventKt.OfferDataKt.TrackTypesKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder.tracksTypesOrNull: fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes? + get() = if (hasTracksTypes()) getTracksTypes() else null + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.SdpAnswer.copy(block: `fishjam.media_events.server`.MediaEventKt.SdpAnswerKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.SdpAnswer = + `fishjam.media_events.server`.MediaEventKt.SdpAnswerKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.VadNotification.copy(block: `fishjam.media_events.server`.MediaEventKt.VadNotificationKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.VadNotification = + `fishjam.media_events.server`.MediaEventKt.VadNotificationKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.copy(block: `fishjam.media_events.server`.MediaEventKt.TrackVariantSwitchedKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched = + `fishjam.media_events.server`.MediaEventKt.TrackVariantSwitchedKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.copy(block: `fishjam.media_events.server`.MediaEventKt.TrackVariantDisabledKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled = + `fishjam.media_events.server`.MediaEventKt.TrackVariantDisabledKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.copy(block: `fishjam.media_events.server`.MediaEventKt.TrackVariantEnabledKt.Dsl.() -> kotlin.Unit): fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled = + `fishjam.media_events.server`.MediaEventKt.TrackVariantEnabledKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.endpointUpdatedOrNull: fishjam.media_events.server.Server.MediaEvent.EndpointUpdated? + get() = if (hasEndpointUpdated()) getEndpointUpdated() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.trackUpdatedOrNull: fishjam.media_events.server.Server.MediaEvent.TrackUpdated? + get() = if (hasTrackUpdated()) getTrackUpdated() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.tracksAddedOrNull: fishjam.media_events.server.Server.MediaEvent.TracksAdded? + get() = if (hasTracksAdded()) getTracksAdded() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.tracksRemovedOrNull: fishjam.media_events.server.Server.MediaEvent.TracksRemoved? + get() = if (hasTracksRemoved()) getTracksRemoved() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.endpointAddedOrNull: fishjam.media_events.server.Server.MediaEvent.EndpointAdded? + get() = if (hasEndpointAdded()) getEndpointAdded() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.endpointRemovedOrNull: fishjam.media_events.server.Server.MediaEvent.EndpointRemoved? + get() = if (hasEndpointRemoved()) getEndpointRemoved() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.connectedOrNull: fishjam.media_events.server.Server.MediaEvent.Connected? + get() = if (hasConnected()) getConnected() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.errorOrNull: fishjam.media_events.server.Server.MediaEvent.Error? + get() = if (hasError()) getError() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.offerDataOrNull: fishjam.media_events.server.Server.MediaEvent.OfferData? + get() = if (hasOfferData()) getOfferData() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.candidateOrNull: fishjam.media_events.Shared.Candidate? + get() = if (hasCandidate()) getCandidate() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.sdpAnswerOrNull: fishjam.media_events.server.Server.MediaEvent.SdpAnswer? + get() = if (hasSdpAnswer()) getSdpAnswer() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.vadNotificationOrNull: fishjam.media_events.server.Server.MediaEvent.VadNotification? + get() = if (hasVadNotification()) getVadNotification() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.trackVariantSwitchedOrNull: fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched? + get() = if (hasTrackVariantSwitched()) getTrackVariantSwitched() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.trackVariantDisabledOrNull: fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled? + get() = if (hasTrackVariantDisabled()) getTrackVariantDisabled() else null + +public val fishjam.media_events.server.Server.MediaEventOrBuilder.trackVariantEnabledOrNull: fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled? + get() = if (hasTrackVariantEnabled()) getTrackVariantEnabled() else null + diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/Server.java b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/Server.java new file mode 100644 index 00000000..d763bd4b --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/Server.java @@ -0,0 +1,18828 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/server/server.proto +// Protobuf Java Version: 4.26.1 + +package fishjam.media_events.server; + +public final class Server { + private Server() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Server.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface MediaEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + * @return Whether the endpointUpdated field is set. + */ + boolean hasEndpointUpdated(); + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + * @return The endpointUpdated. + */ + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated getEndpointUpdated(); + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder getEndpointUpdatedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + * @return Whether the trackUpdated field is set. + */ + boolean hasTrackUpdated(); + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + * @return The trackUpdated. + */ + fishjam.media_events.server.Server.MediaEvent.TrackUpdated getTrackUpdated(); + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder getTrackUpdatedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + * @return Whether the tracksAdded field is set. + */ + boolean hasTracksAdded(); + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + * @return The tracksAdded. + */ + fishjam.media_events.server.Server.MediaEvent.TracksAdded getTracksAdded(); + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder getTracksAddedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + * @return Whether the tracksRemoved field is set. + */ + boolean hasTracksRemoved(); + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + * @return The tracksRemoved. + */ + fishjam.media_events.server.Server.MediaEvent.TracksRemoved getTracksRemoved(); + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder getTracksRemovedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + * @return Whether the endpointAdded field is set. + */ + boolean hasEndpointAdded(); + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + * @return The endpointAdded. + */ + fishjam.media_events.server.Server.MediaEvent.EndpointAdded getEndpointAdded(); + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder getEndpointAddedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + * @return Whether the endpointRemoved field is set. + */ + boolean hasEndpointRemoved(); + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + * @return The endpointRemoved. + */ + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved getEndpointRemoved(); + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder getEndpointRemovedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + * @return Whether the connected field is set. + */ + boolean hasConnected(); + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + * @return The connected. + */ + fishjam.media_events.server.Server.MediaEvent.Connected getConnected(); + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder getConnectedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + * @return The error. + */ + fishjam.media_events.server.Server.MediaEvent.Error getError(); + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder getErrorOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + * @return Whether the offerData field is set. + */ + boolean hasOfferData(); + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + * @return The offerData. + */ + fishjam.media_events.server.Server.MediaEvent.OfferData getOfferData(); + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder getOfferDataOrBuilder(); + + /** + * .fishjam.media_events.Candidate candidate = 10; + * @return Whether the candidate field is set. + */ + boolean hasCandidate(); + /** + * .fishjam.media_events.Candidate candidate = 10; + * @return The candidate. + */ + fishjam.media_events.Shared.Candidate getCandidate(); + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + fishjam.media_events.Shared.CandidateOrBuilder getCandidateOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + * @return Whether the sdpAnswer field is set. + */ + boolean hasSdpAnswer(); + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + * @return The sdpAnswer. + */ + fishjam.media_events.server.Server.MediaEvent.SdpAnswer getSdpAnswer(); + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder getSdpAnswerOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + * @return Whether the vadNotification field is set. + */ + boolean hasVadNotification(); + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + * @return The vadNotification. + */ + fishjam.media_events.server.Server.MediaEvent.VadNotification getVadNotification(); + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder getVadNotificationOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + * @return Whether the trackVariantSwitched field is set. + */ + boolean hasTrackVariantSwitched(); + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + * @return The trackVariantSwitched. + */ + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched getTrackVariantSwitched(); + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder getTrackVariantSwitchedOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + * @return Whether the trackVariantDisabled field is set. + */ + boolean hasTrackVariantDisabled(); + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + * @return The trackVariantDisabled. + */ + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled getTrackVariantDisabled(); + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder getTrackVariantDisabledOrBuilder(); + + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + * @return Whether the trackVariantEnabled field is set. + */ + boolean hasTrackVariantEnabled(); + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + * @return The trackVariantEnabled. + */ + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled getTrackVariantEnabled(); + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder getTrackVariantEnabledOrBuilder(); + + fishjam.media_events.server.Server.MediaEvent.ContentCase getContentCase(); + } + /** + *
+   * Defines any type of message sent from Membrane RTC Engine to Peer
+   * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent} + */ + public static final class MediaEvent extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent) + MediaEventOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + MediaEvent.class.getName()); + } + // Use MediaEvent.newBuilder() to construct. + private MediaEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MediaEvent() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.class, fishjam.media_events.server.Server.MediaEvent.Builder.class); + } + + public interface TrackOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.Track) + com.google.protobuf.MessageOrBuilder { + + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + * @return Whether the simulcastConfig field is set. + */ + boolean hasSimulcastConfig(); + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + * @return The simulcastConfig. + */ + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig getSimulcastConfig(); + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder getSimulcastConfigOrBuilder(); + } + /** + *
+     * SCHEMAS
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Track} + */ + public static final class Track extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.Track) + TrackOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Track.class.getName()); + } + // Use Track.newBuilder() to construct. + private Track(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Track() { + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Track.class, fishjam.media_events.server.Server.MediaEvent.Track.Builder.class); + } + + public interface SimulcastConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.Track.SimulcastConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * bool enabled = 1; + * @return The enabled. + */ + boolean getEnabled(); + + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return A list containing the enabledVariants. + */ + java.util.List getEnabledVariantsList(); + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return The count of enabledVariants. + */ + int getEnabledVariantsCount(); + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index of the element to return. + * @return The enabledVariants at the given index. + */ + fishjam.media_events.Shared.Variant getEnabledVariants(int index); + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return A list containing the enum numeric values on the wire for enabledVariants. + */ + java.util.List + getEnabledVariantsValueList(); + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enabledVariants at the given index. + */ + int getEnabledVariantsValue(int index); + + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return A list containing the disabledVariants. + */ + java.util.List getDisabledVariantsList(); + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return The count of disabledVariants. + */ + int getDisabledVariantsCount(); + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index of the element to return. + * @return The disabledVariants at the given index. + */ + fishjam.media_events.Shared.Variant getDisabledVariants(int index); + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return A list containing the enum numeric values on the wire for disabledVariants. + */ + java.util.List + getDisabledVariantsValueList(); + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledVariants at the given index. + */ + int getDisabledVariantsValue(int index); + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Track.SimulcastConfig} + */ + public static final class SimulcastConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.Track.SimulcastConfig) + SimulcastConfigOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + SimulcastConfig.class.getName()); + } + // Use SimulcastConfig.newBuilder() to construct. + private SimulcastConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SimulcastConfig() { + enabledVariants_ = java.util.Collections.emptyList(); + disabledVariants_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.class, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int ENABLED_VARIANTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List enabledVariants_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, fishjam.media_events.Shared.Variant> enabledVariants_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, fishjam.media_events.Shared.Variant>() { + public fishjam.media_events.Shared.Variant convert(java.lang.Integer from) { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(from); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + }; + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return A list containing the enabledVariants. + */ + @java.lang.Override + public java.util.List getEnabledVariantsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, fishjam.media_events.Shared.Variant>(enabledVariants_, enabledVariants_converter_); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return The count of enabledVariants. + */ + @java.lang.Override + public int getEnabledVariantsCount() { + return enabledVariants_.size(); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index of the element to return. + * @return The enabledVariants at the given index. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getEnabledVariants(int index) { + return enabledVariants_converter_.convert(enabledVariants_.get(index)); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return A list containing the enum numeric values on the wire for enabledVariants. + */ + @java.lang.Override + public java.util.List + getEnabledVariantsValueList() { + return enabledVariants_; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enabledVariants at the given index. + */ + @java.lang.Override + public int getEnabledVariantsValue(int index) { + return enabledVariants_.get(index); + } + private int enabledVariantsMemoizedSerializedSize; + + public static final int DISABLED_VARIANTS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List disabledVariants_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, fishjam.media_events.Shared.Variant> disabledVariants_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, fishjam.media_events.Shared.Variant>() { + public fishjam.media_events.Shared.Variant convert(java.lang.Integer from) { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(from); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + }; + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return A list containing the disabledVariants. + */ + @java.lang.Override + public java.util.List getDisabledVariantsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, fishjam.media_events.Shared.Variant>(disabledVariants_, disabledVariants_converter_); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return The count of disabledVariants. + */ + @java.lang.Override + public int getDisabledVariantsCount() { + return disabledVariants_.size(); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index of the element to return. + * @return The disabledVariants at the given index. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getDisabledVariants(int index) { + return disabledVariants_converter_.convert(disabledVariants_.get(index)); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return A list containing the enum numeric values on the wire for disabledVariants. + */ + @java.lang.Override + public java.util.List + getDisabledVariantsValueList() { + return disabledVariants_; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledVariants at the given index. + */ + @java.lang.Override + public int getDisabledVariantsValue(int index) { + return disabledVariants_.get(index); + } + private int disabledVariantsMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + if (getEnabledVariantsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(enabledVariantsMemoizedSerializedSize); + } + for (int i = 0; i < enabledVariants_.size(); i++) { + output.writeEnumNoTag(enabledVariants_.get(i)); + } + if (getDisabledVariantsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(disabledVariantsMemoizedSerializedSize); + } + for (int i = 0; i < disabledVariants_.size(); i++) { + output.writeEnumNoTag(disabledVariants_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enabled_); + } + { + int dataSize = 0; + for (int i = 0; i < enabledVariants_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(enabledVariants_.get(i)); + } + size += dataSize; + if (!getEnabledVariantsList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }enabledVariantsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < disabledVariants_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(disabledVariants_.get(i)); + } + size += dataSize; + if (!getDisabledVariantsList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }disabledVariantsMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig other = (fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig) obj; + + if (getEnabled() + != other.getEnabled()) return false; + if (!enabledVariants_.equals(other.enabledVariants_)) return false; + if (!disabledVariants_.equals(other.disabledVariants_)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnabled()); + if (getEnabledVariantsCount() > 0) { + hash = (37 * hash) + ENABLED_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + enabledVariants_.hashCode(); + } + if (getDisabledVariantsCount() > 0) { + hash = (37 * hash) + DISABLED_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + disabledVariants_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Track.SimulcastConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.Track.SimulcastConfig) + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.class, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + enabledVariants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + disabledVariants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig build() { + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig buildPartial() { + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig result = new fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig result) { + if (((bitField0_ & 0x00000002) != 0)) { + enabledVariants_ = java.util.Collections.unmodifiableList(enabledVariants_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.enabledVariants_ = enabledVariants_; + if (((bitField0_ & 0x00000004) != 0)) { + disabledVariants_ = java.util.Collections.unmodifiableList(disabledVariants_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.disabledVariants_ = disabledVariants_; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig other) { + if (other == fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + if (!other.enabledVariants_.isEmpty()) { + if (enabledVariants_.isEmpty()) { + enabledVariants_ = other.enabledVariants_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEnabledVariantsIsMutable(); + enabledVariants_.addAll(other.enabledVariants_); + } + onChanged(); + } + if (!other.disabledVariants_.isEmpty()) { + if (disabledVariants_.isEmpty()) { + disabledVariants_ = other.disabledVariants_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDisabledVariantsIsMutable(); + disabledVariants_.addAll(other.disabledVariants_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + int tmpRaw = input.readEnum(); + ensureEnabledVariantsIsMutable(); + enabledVariants_.add(tmpRaw); + break; + } // case 16 + case 18: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureEnabledVariantsIsMutable(); + enabledVariants_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 18 + case 24: { + int tmpRaw = input.readEnum(); + ensureDisabledVariantsIsMutable(); + disabledVariants_.add(tmpRaw); + break; + } // case 24 + case 26: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureDisabledVariantsIsMutable(); + disabledVariants_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean enabled_ ; + /** + * bool enabled = 1; + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * bool enabled = 1; + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool enabled = 1; + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + private java.util.List enabledVariants_ = + java.util.Collections.emptyList(); + private void ensureEnabledVariantsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + enabledVariants_ = new java.util.ArrayList(enabledVariants_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return A list containing the enabledVariants. + */ + public java.util.List getEnabledVariantsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, fishjam.media_events.Shared.Variant>(enabledVariants_, enabledVariants_converter_); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return The count of enabledVariants. + */ + public int getEnabledVariantsCount() { + return enabledVariants_.size(); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index of the element to return. + * @return The enabledVariants at the given index. + */ + public fishjam.media_events.Shared.Variant getEnabledVariants(int index) { + return enabledVariants_converter_.convert(enabledVariants_.get(index)); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index to set the value at. + * @param value The enabledVariants to set. + * @return This builder for chaining. + */ + public Builder setEnabledVariants( + int index, fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnabledVariantsIsMutable(); + enabledVariants_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param value The enabledVariants to add. + * @return This builder for chaining. + */ + public Builder addEnabledVariants(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnabledVariantsIsMutable(); + enabledVariants_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param values The enabledVariants to add. + * @return This builder for chaining. + */ + public Builder addAllEnabledVariants( + java.lang.Iterable values) { + ensureEnabledVariantsIsMutable(); + for (fishjam.media_events.Shared.Variant value : values) { + enabledVariants_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return This builder for chaining. + */ + public Builder clearEnabledVariants() { + enabledVariants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @return A list containing the enum numeric values on the wire for enabledVariants. + */ + public java.util.List + getEnabledVariantsValueList() { + return java.util.Collections.unmodifiableList(enabledVariants_); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enabledVariants at the given index. + */ + public int getEnabledVariantsValue(int index) { + return enabledVariants_.get(index); + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for enabledVariants to set. + * @return This builder for chaining. + */ + public Builder setEnabledVariantsValue( + int index, int value) { + ensureEnabledVariantsIsMutable(); + enabledVariants_.set(index, value); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param value The enum numeric value on the wire for enabledVariants to add. + * @return This builder for chaining. + */ + public Builder addEnabledVariantsValue(int value) { + ensureEnabledVariantsIsMutable(); + enabledVariants_.add(value); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant enabled_variants = 2; + * @param values The enum numeric values on the wire for enabledVariants to add. + * @return This builder for chaining. + */ + public Builder addAllEnabledVariantsValue( + java.lang.Iterable values) { + ensureEnabledVariantsIsMutable(); + for (int value : values) { + enabledVariants_.add(value); + } + onChanged(); + return this; + } + + private java.util.List disabledVariants_ = + java.util.Collections.emptyList(); + private void ensureDisabledVariantsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + disabledVariants_ = new java.util.ArrayList(disabledVariants_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return A list containing the disabledVariants. + */ + public java.util.List getDisabledVariantsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, fishjam.media_events.Shared.Variant>(disabledVariants_, disabledVariants_converter_); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return The count of disabledVariants. + */ + public int getDisabledVariantsCount() { + return disabledVariants_.size(); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index of the element to return. + * @return The disabledVariants at the given index. + */ + public fishjam.media_events.Shared.Variant getDisabledVariants(int index) { + return disabledVariants_converter_.convert(disabledVariants_.get(index)); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index to set the value at. + * @param value The disabledVariants to set. + * @return This builder for chaining. + */ + public Builder setDisabledVariants( + int index, fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisabledVariantsIsMutable(); + disabledVariants_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param value The disabledVariants to add. + * @return This builder for chaining. + */ + public Builder addDisabledVariants(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisabledVariantsIsMutable(); + disabledVariants_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param values The disabledVariants to add. + * @return This builder for chaining. + */ + public Builder addAllDisabledVariants( + java.lang.Iterable values) { + ensureDisabledVariantsIsMutable(); + for (fishjam.media_events.Shared.Variant value : values) { + disabledVariants_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return This builder for chaining. + */ + public Builder clearDisabledVariants() { + disabledVariants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @return A list containing the enum numeric values on the wire for disabledVariants. + */ + public java.util.List + getDisabledVariantsValueList() { + return java.util.Collections.unmodifiableList(disabledVariants_); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of disabledVariants at the given index. + */ + public int getDisabledVariantsValue(int index) { + return disabledVariants_.get(index); + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for disabledVariants to set. + * @return This builder for chaining. + */ + public Builder setDisabledVariantsValue( + int index, int value) { + ensureDisabledVariantsIsMutable(); + disabledVariants_.set(index, value); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param value The enum numeric value on the wire for disabledVariants to add. + * @return This builder for chaining. + */ + public Builder addDisabledVariantsValue(int value) { + ensureDisabledVariantsIsMutable(); + disabledVariants_.add(value); + onChanged(); + return this; + } + /** + * repeated .fishjam.media_events.Variant disabled_variants = 3; + * @param values The enum numeric values on the wire for disabledVariants to add. + * @return This builder for chaining. + */ + public Builder addAllDisabledVariantsValue( + java.lang.Iterable values) { + ensureDisabledVariantsIsMutable(); + for (int value : values) { + disabledVariants_.add(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.Track.SimulcastConfig) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.Track.SimulcastConfig) + private static final fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig(); + } + + public static fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SimulcastConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int METADATA_JSON_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIMULCAST_CONFIG_FIELD_NUMBER = 2; + private fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig simulcastConfig_; + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + * @return Whether the simulcastConfig field is set. + */ + @java.lang.Override + public boolean hasSimulcastConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + * @return The simulcastConfig. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig getSimulcastConfig() { + return simulcastConfig_ == null ? fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance() : simulcastConfig_; + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder getSimulcastConfigOrBuilder() { + return simulcastConfig_ == null ? fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance() : simulcastConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, metadataJson_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSimulcastConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, metadataJson_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSimulcastConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.Track)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.Track other = (fishjam.media_events.server.Server.MediaEvent.Track) obj; + + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (hasSimulcastConfig() != other.hasSimulcastConfig()) return false; + if (hasSimulcastConfig()) { + if (!getSimulcastConfig() + .equals(other.getSimulcastConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + if (hasSimulcastConfig()) { + hash = (37 * hash) + SIMULCAST_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSimulcastConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.Track parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.Track parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Track parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.Track prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * SCHEMAS
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Track} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.Track) + fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Track.class, fishjam.media_events.server.Server.MediaEvent.Track.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.Track.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getSimulcastConfigFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadataJson_ = ""; + simulcastConfig_ = null; + if (simulcastConfigBuilder_ != null) { + simulcastConfigBuilder_.dispose(); + simulcastConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.Track.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track build() { + fishjam.media_events.server.Server.MediaEvent.Track result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track buildPartial() { + fishjam.media_events.server.Server.MediaEvent.Track result = new fishjam.media_events.server.Server.MediaEvent.Track(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.Track result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadataJson_ = metadataJson_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.simulcastConfig_ = simulcastConfigBuilder_ == null + ? simulcastConfig_ + : simulcastConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.Track) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.Track)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.Track other) { + if (other == fishjam.media_events.server.Server.MediaEvent.Track.getDefaultInstance()) return this; + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSimulcastConfig()) { + mergeSimulcastConfig(other.getSimulcastConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getSimulcastConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 1; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 1; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 1; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string metadata_json = 1; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string metadata_json = 1; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig simulcastConfig_; + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder> simulcastConfigBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + * @return Whether the simulcastConfig field is set. + */ + public boolean hasSimulcastConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + * @return The simulcastConfig. + */ + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig getSimulcastConfig() { + if (simulcastConfigBuilder_ == null) { + return simulcastConfig_ == null ? fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance() : simulcastConfig_; + } else { + return simulcastConfigBuilder_.getMessage(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + public Builder setSimulcastConfig(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig value) { + if (simulcastConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + simulcastConfig_ = value; + } else { + simulcastConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + public Builder setSimulcastConfig( + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder builderForValue) { + if (simulcastConfigBuilder_ == null) { + simulcastConfig_ = builderForValue.build(); + } else { + simulcastConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + public Builder mergeSimulcastConfig(fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig value) { + if (simulcastConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + simulcastConfig_ != null && + simulcastConfig_ != fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance()) { + getSimulcastConfigBuilder().mergeFrom(value); + } else { + simulcastConfig_ = value; + } + } else { + simulcastConfigBuilder_.mergeFrom(value); + } + if (simulcastConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + public Builder clearSimulcastConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + simulcastConfig_ = null; + if (simulcastConfigBuilder_ != null) { + simulcastConfigBuilder_.dispose(); + simulcastConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder getSimulcastConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSimulcastConfigFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + public fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder getSimulcastConfigOrBuilder() { + if (simulcastConfigBuilder_ != null) { + return simulcastConfigBuilder_.getMessageOrBuilder(); + } else { + return simulcastConfig_ == null ? + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.getDefaultInstance() : simulcastConfig_; + } + } + /** + * .fishjam.media_events.server.MediaEvent.Track.SimulcastConfig simulcast_config = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder> + getSimulcastConfigFieldBuilder() { + if (simulcastConfigBuilder_ == null) { + simulcastConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfig.Builder, fishjam.media_events.server.Server.MediaEvent.Track.SimulcastConfigOrBuilder>( + getSimulcastConfig(), + getParentForChildren(), + isClean()); + simulcastConfig_ = null; + } + return simulcastConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.Track) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.Track) + private static final fishjam.media_events.server.Server.MediaEvent.Track DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.Track(); + } + + public static fishjam.media_events.server.Server.MediaEvent.Track getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Track parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EndpointOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_type = 2; + * @return The endpointType. + */ + java.lang.String getEndpointType(); + /** + * string endpoint_type = 2; + * @return The bytes for endpointType. + */ + com.google.protobuf.ByteString + getEndpointTypeBytes(); + + /** + * string metadata_json = 3; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 3; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + int getTrackIdToTrackCount(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + boolean containsTrackIdToTrack( + java.lang.String key); + /** + * Use {@link #getTrackIdToTrackMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTrackIdToTrack(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + java.util.Map + getTrackIdToTrackMap(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track defaultValue); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Endpoint} + */ + public static final class Endpoint extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Endpoint.class.getName()); + } + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Endpoint() { + endpointType_ = ""; + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetTrackIdToTrack(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Endpoint.class, fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder.class); + } + + public static final int ENDPOINT_TYPE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointType_ = ""; + /** + * string endpoint_type = 2; + * @return The endpointType. + */ + @java.lang.Override + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointType_ = s; + return s; + } + } + /** + * string endpoint_type = 2; + * @return The bytes for endpointType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_JSON_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 3; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 3; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_TO_TRACK_FIELD_NUMBER = 4; + private static final class TrackIdToTrackDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.Track> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Endpoint_TrackIdToTrackEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + fishjam.media_events.server.Server.MediaEvent.Track.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.Track> trackIdToTrack_; + private com.google.protobuf.MapField + internalGetTrackIdToTrack() { + if (trackIdToTrack_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrackIdToTrackDefaultEntryHolder.defaultEntry); + } + return trackIdToTrack_; + } + public int getTrackIdToTrackCount() { + return internalGetTrackIdToTrack().getMap().size(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public boolean containsTrackIdToTrack( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToTrack().getMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToTrackMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToTrack() { + return getTrackIdToTrackMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public java.util.Map getTrackIdToTrackMap() { + return internalGetTrackIdToTrack().getMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToTrack().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToTrack().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, endpointType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, metadataJson_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetTrackIdToTrack(), + TrackIdToTrackDefaultEntryHolder.defaultEntry, + 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, endpointType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, metadataJson_); + } + for (java.util.Map.Entry entry + : internalGetTrackIdToTrack().getMap().entrySet()) { + com.google.protobuf.MapEntry + trackIdToTrack__ = TrackIdToTrackDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, trackIdToTrack__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.Endpoint)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.Endpoint other = (fishjam.media_events.server.Server.MediaEvent.Endpoint) obj; + + if (!getEndpointType() + .equals(other.getEndpointType())) return false; + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!internalGetTrackIdToTrack().equals( + other.internalGetTrackIdToTrack())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEndpointType().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + if (!internalGetTrackIdToTrack().getMap().isEmpty()) { + hash = (37 * hash) + TRACK_ID_TO_TRACK_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrackIdToTrack().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Endpoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.Endpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Endpoint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.Endpoint) + fishjam.media_events.server.Server.MediaEvent.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetTrackIdToTrack(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableTrackIdToTrack(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Endpoint.class, fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.Endpoint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointType_ = ""; + metadataJson_ = ""; + internalGetMutableTrackIdToTrack().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint build() { + fishjam.media_events.server.Server.MediaEvent.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint buildPartial() { + fishjam.media_events.server.Server.MediaEvent.Endpoint result = new fishjam.media_events.server.Server.MediaEvent.Endpoint(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.Endpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointType_ = endpointType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataJson_ = metadataJson_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trackIdToTrack_ = internalGetTrackIdToTrack().build(TrackIdToTrackDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.Endpoint) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.Endpoint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.Endpoint other) { + if (other == fishjam.media_events.server.Server.MediaEvent.Endpoint.getDefaultInstance()) return this; + if (!other.getEndpointType().isEmpty()) { + endpointType_ = other.endpointType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableTrackIdToTrack().mergeFrom( + other.internalGetTrackIdToTrack()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + endpointType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: { + com.google.protobuf.MapEntry + trackIdToTrack__ = input.readMessage( + TrackIdToTrackDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTrackIdToTrack().ensureBuilderMap().put( + trackIdToTrack__.getKey(), trackIdToTrack__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointType_ = ""; + /** + * string endpoint_type = 2; + * @return The endpointType. + */ + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_type = 2; + * @return The bytes for endpointType. + */ + public com.google.protobuf.ByteString + getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_type = 2; + * @param value The endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_type = 2; + * @return This builder for chaining. + */ + public Builder clearEndpointType() { + endpointType_ = getDefaultInstance().getEndpointType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_type = 2; + * @param value The bytes for endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 3; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 3; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 3; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string metadata_json = 3; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string metadata_json = 3; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private static final class TrackIdToTrackConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track build(fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder val) { + if (val instanceof fishjam.media_events.server.Server.MediaEvent.Track) { return (fishjam.media_events.server.Server.MediaEvent.Track) val; } + return ((fishjam.media_events.server.Server.MediaEvent.Track.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return TrackIdToTrackDefaultEntryHolder.defaultEntry; + } + }; + private static final TrackIdToTrackConverter trackIdToTrackConverter = new TrackIdToTrackConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder, fishjam.media_events.server.Server.MediaEvent.Track, fishjam.media_events.server.Server.MediaEvent.Track.Builder> trackIdToTrack_; + private com.google.protobuf.MapFieldBuilder + internalGetTrackIdToTrack() { + if (trackIdToTrack_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(trackIdToTrackConverter); + } + return trackIdToTrack_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableTrackIdToTrack() { + if (trackIdToTrack_ == null) { + trackIdToTrack_ = new com.google.protobuf.MapFieldBuilder<>(trackIdToTrackConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return trackIdToTrack_; + } + public int getTrackIdToTrackCount() { + return internalGetTrackIdToTrack().ensureBuilderMap().size(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public boolean containsTrackIdToTrack( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToTrack().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToTrackMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToTrack() { + return getTrackIdToTrackMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public java.util.Map getTrackIdToTrackMap() { + return internalGetTrackIdToTrack().getImmutableMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableTrackIdToTrack().ensureBuilderMap(); + return map.containsKey(key) ? trackIdToTrackConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableTrackIdToTrack().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return trackIdToTrackConverter.build(map.get(key)); + } + public Builder clearTrackIdToTrack() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableTrackIdToTrack().clear(); + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + public Builder removeTrackIdToTrack( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableTrackIdToTrack().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTrackIdToTrack() { + bitField0_ |= 0x00000004; + return internalGetMutableTrackIdToTrack().ensureMessageMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + public Builder putTrackIdToTrack( + java.lang.String key, + fishjam.media_events.server.Server.MediaEvent.Track value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableTrackIdToTrack().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + public Builder putAllTrackIdToTrack( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableTrackIdToTrack().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 4; + */ + public fishjam.media_events.server.Server.MediaEvent.Track.Builder putTrackIdToTrackBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableTrackIdToTrack().ensureBuilderMap(); + fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = fishjam.media_events.server.Server.MediaEvent.Track.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof fishjam.media_events.server.Server.MediaEvent.Track) { + entry = ((fishjam.media_events.server.Server.MediaEvent.Track) entry).toBuilder(); + builderMap.put(key, entry); + } + return (fishjam.media_events.server.Server.MediaEvent.Track.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.Endpoint) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.Endpoint) + private static final fishjam.media_events.server.Server.MediaEvent.Endpoint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.Endpoint(); + } + + public static fishjam.media_events.server.Server.MediaEvent.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IceServerOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.IceServer) + com.google.protobuf.MessageOrBuilder { + + /** + * string credential = 1; + * @return The credential. + */ + java.lang.String getCredential(); + /** + * string credential = 1; + * @return The bytes for credential. + */ + com.google.protobuf.ByteString + getCredentialBytes(); + + /** + * repeated string urls = 2; + * @return A list containing the urls. + */ + java.util.List + getUrlsList(); + /** + * repeated string urls = 2; + * @return The count of urls. + */ + int getUrlsCount(); + /** + * repeated string urls = 2; + * @param index The index of the element to return. + * @return The urls at the given index. + */ + java.lang.String getUrls(int index); + /** + * repeated string urls = 2; + * @param index The index of the value to return. + * @return The bytes of the urls at the given index. + */ + com.google.protobuf.ByteString + getUrlsBytes(int index); + + /** + * string username = 3; + * @return The username. + */ + java.lang.String getUsername(); + /** + * string username = 3; + * @return The bytes for username. + */ + com.google.protobuf.ByteString + getUsernameBytes(); + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.IceServer} + */ + public static final class IceServer extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.IceServer) + IceServerOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + IceServer.class.getName()); + } + // Use IceServer.newBuilder() to construct. + private IceServer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private IceServer() { + credential_ = ""; + urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + username_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_IceServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_IceServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.IceServer.class, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder.class); + } + + public static final int CREDENTIAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object credential_ = ""; + /** + * string credential = 1; + * @return The credential. + */ + @java.lang.Override + public java.lang.String getCredential() { + java.lang.Object ref = credential_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + credential_ = s; + return s; + } + } + /** + * string credential = 1; + * @return The bytes for credential. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCredentialBytes() { + java.lang.Object ref = credential_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + credential_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URLS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string urls = 2; + * @return A list containing the urls. + */ + public com.google.protobuf.ProtocolStringList + getUrlsList() { + return urls_; + } + /** + * repeated string urls = 2; + * @return The count of urls. + */ + public int getUrlsCount() { + return urls_.size(); + } + /** + * repeated string urls = 2; + * @param index The index of the element to return. + * @return The urls at the given index. + */ + public java.lang.String getUrls(int index) { + return urls_.get(index); + } + /** + * repeated string urls = 2; + * @param index The index of the value to return. + * @return The bytes of the urls at the given index. + */ + public com.google.protobuf.ByteString + getUrlsBytes(int index) { + return urls_.getByteString(index); + } + + public static final int USERNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object username_ = ""; + /** + * string username = 3; + * @return The username. + */ + @java.lang.Override + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } + } + /** + * string username = 3; + * @return The bytes for username. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(credential_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, credential_); + } + for (int i = 0; i < urls_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, urls_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, username_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(credential_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, credential_); + } + { + int dataSize = 0; + for (int i = 0; i < urls_.size(); i++) { + dataSize += computeStringSizeNoTag(urls_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrlsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, username_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.IceServer)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.IceServer other = (fishjam.media_events.server.Server.MediaEvent.IceServer) obj; + + if (!getCredential() + .equals(other.getCredential())) return false; + if (!getUrlsList() + .equals(other.getUrlsList())) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getCredential().hashCode(); + if (getUrlsCount() > 0) { + hash = (37 * hash) + URLS_FIELD_NUMBER; + hash = (53 * hash) + getUrlsList().hashCode(); + } + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.IceServer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.IceServer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.IceServer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.IceServer) + fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_IceServer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_IceServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.IceServer.class, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.IceServer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + credential_ = ""; + urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + username_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_IceServer_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.IceServer getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.IceServer.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.IceServer build() { + fishjam.media_events.server.Server.MediaEvent.IceServer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.IceServer buildPartial() { + fishjam.media_events.server.Server.MediaEvent.IceServer result = new fishjam.media_events.server.Server.MediaEvent.IceServer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.IceServer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.credential_ = credential_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + urls_.makeImmutable(); + result.urls_ = urls_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.username_ = username_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.IceServer) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.IceServer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.IceServer other) { + if (other == fishjam.media_events.server.Server.MediaEvent.IceServer.getDefaultInstance()) return this; + if (!other.getCredential().isEmpty()) { + credential_ = other.credential_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.urls_.isEmpty()) { + if (urls_.isEmpty()) { + urls_ = other.urls_; + bitField0_ |= 0x00000002; + } else { + ensureUrlsIsMutable(); + urls_.addAll(other.urls_); + } + onChanged(); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + credential_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrlsIsMutable(); + urls_.add(s); + break; + } // case 18 + case 26: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object credential_ = ""; + /** + * string credential = 1; + * @return The credential. + */ + public java.lang.String getCredential() { + java.lang.Object ref = credential_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + credential_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string credential = 1; + * @return The bytes for credential. + */ + public com.google.protobuf.ByteString + getCredentialBytes() { + java.lang.Object ref = credential_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + credential_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string credential = 1; + * @param value The credential to set. + * @return This builder for chaining. + */ + public Builder setCredential( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + credential_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string credential = 1; + * @return This builder for chaining. + */ + public Builder clearCredential() { + credential_ = getDefaultInstance().getCredential(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string credential = 1; + * @param value The bytes for credential to set. + * @return This builder for chaining. + */ + public Builder setCredentialBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + credential_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUrlsIsMutable() { + if (!urls_.isModifiable()) { + urls_ = new com.google.protobuf.LazyStringArrayList(urls_); + } + bitField0_ |= 0x00000002; + } + /** + * repeated string urls = 2; + * @return A list containing the urls. + */ + public com.google.protobuf.ProtocolStringList + getUrlsList() { + urls_.makeImmutable(); + return urls_; + } + /** + * repeated string urls = 2; + * @return The count of urls. + */ + public int getUrlsCount() { + return urls_.size(); + } + /** + * repeated string urls = 2; + * @param index The index of the element to return. + * @return The urls at the given index. + */ + public java.lang.String getUrls(int index) { + return urls_.get(index); + } + /** + * repeated string urls = 2; + * @param index The index of the value to return. + * @return The bytes of the urls at the given index. + */ + public com.google.protobuf.ByteString + getUrlsBytes(int index) { + return urls_.getByteString(index); + } + /** + * repeated string urls = 2; + * @param index The index to set the value at. + * @param value The urls to set. + * @return This builder for chaining. + */ + public Builder setUrls( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUrlsIsMutable(); + urls_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string urls = 2; + * @param value The urls to add. + * @return This builder for chaining. + */ + public Builder addUrls( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUrlsIsMutable(); + urls_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string urls = 2; + * @param values The urls to add. + * @return This builder for chaining. + */ + public Builder addAllUrls( + java.lang.Iterable values) { + ensureUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, urls_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string urls = 2; + * @return This builder for chaining. + */ + public Builder clearUrls() { + urls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + * repeated string urls = 2; + * @param value The bytes of the urls to add. + * @return This builder for chaining. + */ + public Builder addUrlsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUrlsIsMutable(); + urls_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + * string username = 3; + * @return The username. + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string username = 3; + * @return The bytes for username. + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string username = 3; + * @param value The username to set. + * @return This builder for chaining. + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string username = 3; + * @return This builder for chaining. + */ + public Builder clearUsername() { + username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string username = 3; + * @param value The bytes for username to set. + * @return This builder for chaining. + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + username_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.IceServer) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.IceServer) + private static final fishjam.media_events.server.Server.MediaEvent.IceServer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.IceServer(); + } + + public static fishjam.media_events.server.Server.MediaEvent.IceServer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IceServer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.IceServer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EndpointUpdatedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.EndpointUpdated) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + } + /** + *
+     * Sent when metadata of one of the endpoints was updated
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.EndpointUpdated} + */ + public static final class EndpointUpdated extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.EndpointUpdated) + EndpointUpdatedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + EndpointUpdated.class.getName()); + } + // Use EndpointUpdated.newBuilder() to construct. + private EndpointUpdated(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EndpointUpdated() { + endpointId_ = ""; + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.class, fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_JSON_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, metadataJson_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, metadataJson_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.EndpointUpdated)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated other = (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.EndpointUpdated prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when metadata of one of the endpoints was updated
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.EndpointUpdated} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.EndpointUpdated) + fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.class, fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + metadataJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated build() { + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated buildPartial() { + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated result = new fishjam.media_events.server.Server.MediaEvent.EndpointUpdated(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.EndpointUpdated result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataJson_ = metadataJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.EndpointUpdated)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.EndpointUpdated other) { + if (other == fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 2; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string metadata_json = 2; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string metadata_json = 2; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.EndpointUpdated) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.EndpointUpdated) + private static final fishjam.media_events.server.Server.MediaEvent.EndpointUpdated DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.EndpointUpdated(); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointUpdated getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointUpdated parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TrackUpdatedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.TrackUpdated) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * string track_id = 2; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * string metadata_json = 3; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 3; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + } + /** + *
+     * Sent when metadata of one of the tracks was updated
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackUpdated} + */ + public static final class TrackUpdated extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.TrackUpdated) + TrackUpdatedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TrackUpdated.class.getName()); + } + // Use TrackUpdated.newBuilder() to construct. + private TrackUpdated(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TrackUpdated() { + endpointId_ = ""; + trackId_ = ""; + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackUpdated.class, fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_JSON_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 3; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 3; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, trackId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, metadataJson_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, trackId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, metadataJson_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.TrackUpdated)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.TrackUpdated other = (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.TrackUpdated prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when metadata of one of the tracks was updated
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackUpdated} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.TrackUpdated) + fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackUpdated.class, fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.TrackUpdated.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + trackId_ = ""; + metadataJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated build() { + fishjam.media_events.server.Server.MediaEvent.TrackUpdated result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated buildPartial() { + fishjam.media_events.server.Server.MediaEvent.TrackUpdated result = new fishjam.media_events.server.Server.MediaEvent.TrackUpdated(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.TrackUpdated result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadataJson_ = metadataJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.TrackUpdated) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.TrackUpdated)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.TrackUpdated other) { + if (other == fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 2; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string track_id = 2; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string track_id = 2; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 3; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 3; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 3; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string metadata_json = 3; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string metadata_json = 3; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.TrackUpdated) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.TrackUpdated) + private static final fishjam.media_events.server.Server.MediaEvent.TrackUpdated DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.TrackUpdated(); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackUpdated getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackUpdated parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TracksAddedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.TracksAdded) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + int getTrackIdToTrackCount(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + boolean containsTrackIdToTrack( + java.lang.String key); + /** + * Use {@link #getTrackIdToTrackMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getTrackIdToTrack(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + java.util.Map + getTrackIdToTrackMap(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track defaultValue); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrThrow( + java.lang.String key); + } + /** + *
+     * Sent to informs that one of the peers has added one or more tracks.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TracksAdded} + */ + public static final class TracksAdded extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.TracksAdded) + TracksAddedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TracksAdded.class.getName()); + } + // Use TracksAdded.newBuilder() to construct. + private TracksAdded(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TracksAdded() { + endpointId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetTrackIdToTrack(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TracksAdded.class, fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_TO_TRACK_FIELD_NUMBER = 2; + private static final class TrackIdToTrackDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.Track> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_TrackIdToTrackEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + fishjam.media_events.server.Server.MediaEvent.Track.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.Track> trackIdToTrack_; + private com.google.protobuf.MapField + internalGetTrackIdToTrack() { + if (trackIdToTrack_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TrackIdToTrackDefaultEntryHolder.defaultEntry); + } + return trackIdToTrack_; + } + public int getTrackIdToTrackCount() { + return internalGetTrackIdToTrack().getMap().size(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public boolean containsTrackIdToTrack( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToTrack().getMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToTrackMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToTrack() { + return getTrackIdToTrackMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public java.util.Map getTrackIdToTrackMap() { + return internalGetTrackIdToTrack().getMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToTrack().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetTrackIdToTrack().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetTrackIdToTrack(), + TrackIdToTrackDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + for (java.util.Map.Entry entry + : internalGetTrackIdToTrack().getMap().entrySet()) { + com.google.protobuf.MapEntry + trackIdToTrack__ = TrackIdToTrackDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, trackIdToTrack__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.TracksAdded)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.TracksAdded other = (fishjam.media_events.server.Server.MediaEvent.TracksAdded) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!internalGetTrackIdToTrack().equals( + other.internalGetTrackIdToTrack())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + if (!internalGetTrackIdToTrack().getMap().isEmpty()) { + hash = (37 * hash) + TRACK_ID_TO_TRACK_FIELD_NUMBER; + hash = (53 * hash) + internalGetTrackIdToTrack().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.TracksAdded prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to informs that one of the peers has added one or more tracks.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TracksAdded} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.TracksAdded) + fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetTrackIdToTrack(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableTrackIdToTrack(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TracksAdded.class, fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.TracksAdded.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + internalGetMutableTrackIdToTrack().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAdded getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAdded build() { + fishjam.media_events.server.Server.MediaEvent.TracksAdded result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAdded buildPartial() { + fishjam.media_events.server.Server.MediaEvent.TracksAdded result = new fishjam.media_events.server.Server.MediaEvent.TracksAdded(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.TracksAdded result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackIdToTrack_ = internalGetTrackIdToTrack().build(TrackIdToTrackDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.TracksAdded) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.TracksAdded)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.TracksAdded other) { + if (other == fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableTrackIdToTrack().mergeFrom( + other.internalGetTrackIdToTrack()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + trackIdToTrack__ = input.readMessage( + TrackIdToTrackDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTrackIdToTrack().ensureBuilderMap().put( + trackIdToTrack__.getKey(), trackIdToTrack__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private static final class TrackIdToTrackConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track build(fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder val) { + if (val instanceof fishjam.media_events.server.Server.MediaEvent.Track) { return (fishjam.media_events.server.Server.MediaEvent.Track) val; } + return ((fishjam.media_events.server.Server.MediaEvent.Track.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return TrackIdToTrackDefaultEntryHolder.defaultEntry; + } + }; + private static final TrackIdToTrackConverter trackIdToTrackConverter = new TrackIdToTrackConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder, fishjam.media_events.server.Server.MediaEvent.Track, fishjam.media_events.server.Server.MediaEvent.Track.Builder> trackIdToTrack_; + private com.google.protobuf.MapFieldBuilder + internalGetTrackIdToTrack() { + if (trackIdToTrack_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(trackIdToTrackConverter); + } + return trackIdToTrack_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableTrackIdToTrack() { + if (trackIdToTrack_ == null) { + trackIdToTrack_ = new com.google.protobuf.MapFieldBuilder<>(trackIdToTrackConverter); + } + bitField0_ |= 0x00000002; + onChanged(); + return trackIdToTrack_; + } + public int getTrackIdToTrackCount() { + return internalGetTrackIdToTrack().ensureBuilderMap().size(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public boolean containsTrackIdToTrack( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetTrackIdToTrack().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getTrackIdToTrackMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTrackIdToTrack() { + return getTrackIdToTrackMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public java.util.Map getTrackIdToTrackMap() { + return internalGetTrackIdToTrack().getImmutableMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Track defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableTrackIdToTrack().ensureBuilderMap(); + return map.containsKey(key) ? trackIdToTrackConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Track getTrackIdToTrackOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableTrackIdToTrack().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return trackIdToTrackConverter.build(map.get(key)); + } + public Builder clearTrackIdToTrack() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableTrackIdToTrack().clear(); + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + public Builder removeTrackIdToTrack( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableTrackIdToTrack().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableTrackIdToTrack() { + bitField0_ |= 0x00000002; + return internalGetMutableTrackIdToTrack().ensureMessageMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + public Builder putTrackIdToTrack( + java.lang.String key, + fishjam.media_events.server.Server.MediaEvent.Track value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableTrackIdToTrack().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + public Builder putAllTrackIdToTrack( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableTrackIdToTrack().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Track> track_id_to_track = 2; + */ + public fishjam.media_events.server.Server.MediaEvent.Track.Builder putTrackIdToTrackBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableTrackIdToTrack().ensureBuilderMap(); + fishjam.media_events.server.Server.MediaEvent.TrackOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = fishjam.media_events.server.Server.MediaEvent.Track.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof fishjam.media_events.server.Server.MediaEvent.Track) { + entry = ((fishjam.media_events.server.Server.MediaEvent.Track) entry).toBuilder(); + builderMap.put(key, entry); + } + return (fishjam.media_events.server.Server.MediaEvent.Track.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.TracksAdded) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.TracksAdded) + private static final fishjam.media_events.server.Server.MediaEvent.TracksAdded DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.TracksAdded(); + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksAdded getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TracksAdded parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAdded getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TracksRemovedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.TracksRemoved) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * repeated string track_ids = 2; + * @return A list containing the trackIds. + */ + java.util.List + getTrackIdsList(); + /** + * repeated string track_ids = 2; + * @return The count of trackIds. + */ + int getTrackIdsCount(); + /** + * repeated string track_ids = 2; + * @param index The index of the element to return. + * @return The trackIds at the given index. + */ + java.lang.String getTrackIds(int index); + /** + * repeated string track_ids = 2; + * @param index The index of the value to return. + * @return The bytes of the trackIds at the given index. + */ + com.google.protobuf.ByteString + getTrackIdsBytes(int index); + } + /** + *
+     * Sent to informs that one of the peers has removed one or more tracks.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TracksRemoved} + */ + public static final class TracksRemoved extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.TracksRemoved) + TracksRemovedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TracksRemoved.class.getName()); + } + // Use TracksRemoved.newBuilder() to construct. + private TracksRemoved(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TracksRemoved() { + endpointId_ = ""; + trackIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TracksRemoved.class, fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList trackIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string track_ids = 2; + * @return A list containing the trackIds. + */ + public com.google.protobuf.ProtocolStringList + getTrackIdsList() { + return trackIds_; + } + /** + * repeated string track_ids = 2; + * @return The count of trackIds. + */ + public int getTrackIdsCount() { + return trackIds_.size(); + } + /** + * repeated string track_ids = 2; + * @param index The index of the element to return. + * @return The trackIds at the given index. + */ + public java.lang.String getTrackIds(int index) { + return trackIds_.get(index); + } + /** + * repeated string track_ids = 2; + * @param index The index of the value to return. + * @return The bytes of the trackIds at the given index. + */ + public com.google.protobuf.ByteString + getTrackIdsBytes(int index) { + return trackIds_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + for (int i = 0; i < trackIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, trackIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + { + int dataSize = 0; + for (int i = 0; i < trackIds_.size(); i++) { + dataSize += computeStringSizeNoTag(trackIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getTrackIdsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.TracksRemoved)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.TracksRemoved other = (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getTrackIdsList() + .equals(other.getTrackIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + if (getTrackIdsCount() > 0) { + hash = (37 * hash) + TRACK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTrackIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.TracksRemoved prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to informs that one of the peers has removed one or more tracks.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TracksRemoved} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.TracksRemoved) + fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TracksRemoved.class, fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.TracksRemoved.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + trackIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved build() { + fishjam.media_events.server.Server.MediaEvent.TracksRemoved result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved buildPartial() { + fishjam.media_events.server.Server.MediaEvent.TracksRemoved result = new fishjam.media_events.server.Server.MediaEvent.TracksRemoved(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.TracksRemoved result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + trackIds_.makeImmutable(); + result.trackIds_ = trackIds_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.TracksRemoved) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.TracksRemoved)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.TracksRemoved other) { + if (other == fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.trackIds_.isEmpty()) { + if (trackIds_.isEmpty()) { + trackIds_ = other.trackIds_; + bitField0_ |= 0x00000002; + } else { + ensureTrackIdsIsMutable(); + trackIds_.addAll(other.trackIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTrackIdsIsMutable(); + trackIds_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList trackIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTrackIdsIsMutable() { + if (!trackIds_.isModifiable()) { + trackIds_ = new com.google.protobuf.LazyStringArrayList(trackIds_); + } + bitField0_ |= 0x00000002; + } + /** + * repeated string track_ids = 2; + * @return A list containing the trackIds. + */ + public com.google.protobuf.ProtocolStringList + getTrackIdsList() { + trackIds_.makeImmutable(); + return trackIds_; + } + /** + * repeated string track_ids = 2; + * @return The count of trackIds. + */ + public int getTrackIdsCount() { + return trackIds_.size(); + } + /** + * repeated string track_ids = 2; + * @param index The index of the element to return. + * @return The trackIds at the given index. + */ + public java.lang.String getTrackIds(int index) { + return trackIds_.get(index); + } + /** + * repeated string track_ids = 2; + * @param index The index of the value to return. + * @return The bytes of the trackIds at the given index. + */ + public com.google.protobuf.ByteString + getTrackIdsBytes(int index) { + return trackIds_.getByteString(index); + } + /** + * repeated string track_ids = 2; + * @param index The index to set the value at. + * @param value The trackIds to set. + * @return This builder for chaining. + */ + public Builder setTrackIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTrackIdsIsMutable(); + trackIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string track_ids = 2; + * @param value The trackIds to add. + * @return This builder for chaining. + */ + public Builder addTrackIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTrackIdsIsMutable(); + trackIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string track_ids = 2; + * @param values The trackIds to add. + * @return This builder for chaining. + */ + public Builder addAllTrackIds( + java.lang.Iterable values) { + ensureTrackIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, trackIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * repeated string track_ids = 2; + * @return This builder for chaining. + */ + public Builder clearTrackIds() { + trackIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + * repeated string track_ids = 2; + * @param value The bytes of the trackIds to add. + * @return This builder for chaining. + */ + public Builder addTrackIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTrackIdsIsMutable(); + trackIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.TracksRemoved) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.TracksRemoved) + private static final fishjam.media_events.server.Server.MediaEvent.TracksRemoved DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.TracksRemoved(); + } + + public static fishjam.media_events.server.Server.MediaEvent.TracksRemoved getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TracksRemoved parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EndpointAddedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.EndpointAdded) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + java.lang.String getMetadataJson(); + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + com.google.protobuf.ByteString + getMetadataJsonBytes(); + } + /** + *
+     * Sent to all peers in the room after a new endpoint was added.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.EndpointAdded} + */ + public static final class EndpointAdded extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.EndpointAdded) + EndpointAddedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + EndpointAdded.class.getName()); + } + // Use EndpointAdded.newBuilder() to construct. + private EndpointAdded(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EndpointAdded() { + endpointId_ = ""; + metadataJson_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.EndpointAdded.class, fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_JSON_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + @java.lang.Override + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } + } + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, metadataJson_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(metadataJson_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, metadataJson_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.EndpointAdded)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.EndpointAdded other = (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getMetadataJson() + .equals(other.getMetadataJson())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + METADATA_JSON_FIELD_NUMBER; + hash = (53 * hash) + getMetadataJson().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.EndpointAdded prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to all peers in the room after a new endpoint was added.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.EndpointAdded} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.EndpointAdded) + fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.EndpointAdded.class, fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.EndpointAdded.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + metadataJson_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded build() { + fishjam.media_events.server.Server.MediaEvent.EndpointAdded result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded buildPartial() { + fishjam.media_events.server.Server.MediaEvent.EndpointAdded result = new fishjam.media_events.server.Server.MediaEvent.EndpointAdded(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.EndpointAdded result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metadataJson_ = metadataJson_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.EndpointAdded) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.EndpointAdded)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.EndpointAdded other) { + if (other == fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMetadataJson().isEmpty()) { + metadataJson_ = other.metadataJson_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + metadataJson_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object metadataJson_ = ""; + /** + * string metadata_json = 2; + * @return The metadataJson. + */ + public java.lang.String getMetadataJson() { + java.lang.Object ref = metadataJson_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metadataJson_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string metadata_json = 2; + * @return The bytes for metadataJson. + */ + public com.google.protobuf.ByteString + getMetadataJsonBytes() { + java.lang.Object ref = metadataJson_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metadataJson_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string metadata_json = 2; + * @param value The metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJson( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string metadata_json = 2; + * @return This builder for chaining. + */ + public Builder clearMetadataJson() { + metadataJson_ = getDefaultInstance().getMetadataJson(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string metadata_json = 2; + * @param value The bytes for metadataJson to set. + * @return This builder for chaining. + */ + public Builder setMetadataJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + metadataJson_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.EndpointAdded) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.EndpointAdded) + private static final fishjam.media_events.server.Server.MediaEvent.EndpointAdded DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.EndpointAdded(); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointAdded getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointAdded parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConnectedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.Connected) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + int getEndpointIdToEndpointCount(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + boolean containsEndpointIdToEndpoint( + java.lang.String key); + /** + * Use {@link #getEndpointIdToEndpointMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getEndpointIdToEndpoint(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + java.util.Map + getEndpointIdToEndpointMap(); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Endpoint getEndpointIdToEndpointOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Endpoint defaultValue); + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + fishjam.media_events.server.Server.MediaEvent.Endpoint getEndpointIdToEndpointOrThrow( + java.lang.String key); + + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + java.util.List + getIceServersList(); + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + fishjam.media_events.server.Server.MediaEvent.IceServer getIceServers(int index); + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + int getIceServersCount(); + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + java.util.List + getIceServersOrBuilderList(); + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder getIceServersOrBuilder( + int index); + } + /** + *
+     * Sent to the peer after connecting to the WebRTC Endpoint.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Connected} + */ + public static final class Connected extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.Connected) + ConnectedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Connected.class.getName()); + } + // Use Connected.newBuilder() to construct. + private Connected(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Connected() { + endpointId_ = ""; + iceServers_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetEndpointIdToEndpoint(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Connected_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Connected.class, fishjam.media_events.server.Server.MediaEvent.Connected.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_ID_TO_ENDPOINT_FIELD_NUMBER = 2; + private static final class EndpointIdToEndpointDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.Endpoint> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Connected_EndpointIdToEndpointEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + fishjam.media_events.server.Server.MediaEvent.Endpoint.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.Endpoint> endpointIdToEndpoint_; + private com.google.protobuf.MapField + internalGetEndpointIdToEndpoint() { + if (endpointIdToEndpoint_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EndpointIdToEndpointDefaultEntryHolder.defaultEntry); + } + return endpointIdToEndpoint_; + } + public int getEndpointIdToEndpointCount() { + return internalGetEndpointIdToEndpoint().getMap().size(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public boolean containsEndpointIdToEndpoint( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetEndpointIdToEndpoint().getMap().containsKey(key); + } + /** + * Use {@link #getEndpointIdToEndpointMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEndpointIdToEndpoint() { + return getEndpointIdToEndpointMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public java.util.Map getEndpointIdToEndpointMap() { + return internalGetEndpointIdToEndpoint().getMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Endpoint getEndpointIdToEndpointOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Endpoint defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetEndpointIdToEndpoint().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint getEndpointIdToEndpointOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetEndpointIdToEndpoint().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ICE_SERVERS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List iceServers_; + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + @java.lang.Override + public java.util.List getIceServersList() { + return iceServers_; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + @java.lang.Override + public java.util.List + getIceServersOrBuilderList() { + return iceServers_; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + @java.lang.Override + public int getIceServersCount() { + return iceServers_.size(); + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.IceServer getIceServers(int index) { + return iceServers_.get(index); + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder getIceServersOrBuilder( + int index) { + return iceServers_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetEndpointIdToEndpoint(), + EndpointIdToEndpointDefaultEntryHolder.defaultEntry, + 2); + for (int i = 0; i < iceServers_.size(); i++) { + output.writeMessage(3, iceServers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + for (java.util.Map.Entry entry + : internalGetEndpointIdToEndpoint().getMap().entrySet()) { + com.google.protobuf.MapEntry + endpointIdToEndpoint__ = EndpointIdToEndpointDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, endpointIdToEndpoint__); + } + for (int i = 0; i < iceServers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, iceServers_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.Connected)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.Connected other = (fishjam.media_events.server.Server.MediaEvent.Connected) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!internalGetEndpointIdToEndpoint().equals( + other.internalGetEndpointIdToEndpoint())) return false; + if (!getIceServersList() + .equals(other.getIceServersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + if (!internalGetEndpointIdToEndpoint().getMap().isEmpty()) { + hash = (37 * hash) + ENDPOINT_ID_TO_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + internalGetEndpointIdToEndpoint().hashCode(); + } + if (getIceServersCount() > 0) { + hash = (37 * hash) + ICE_SERVERS_FIELD_NUMBER; + hash = (53 * hash) + getIceServersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.Connected parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.Connected parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Connected parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.Connected prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to the peer after connecting to the WebRTC Endpoint.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Connected} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.Connected) + fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetEndpointIdToEndpoint(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableEndpointIdToEndpoint(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Connected_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Connected.class, fishjam.media_events.server.Server.MediaEvent.Connected.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.Connected.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + internalGetMutableEndpointIdToEndpoint().clear(); + if (iceServersBuilder_ == null) { + iceServers_ = java.util.Collections.emptyList(); + } else { + iceServers_ = null; + iceServersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Connected getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Connected build() { + fishjam.media_events.server.Server.MediaEvent.Connected result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Connected buildPartial() { + fishjam.media_events.server.Server.MediaEvent.Connected result = new fishjam.media_events.server.Server.MediaEvent.Connected(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(fishjam.media_events.server.Server.MediaEvent.Connected result) { + if (iceServersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + iceServers_ = java.util.Collections.unmodifiableList(iceServers_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.iceServers_ = iceServers_; + } else { + result.iceServers_ = iceServersBuilder_.build(); + } + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.Connected result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointIdToEndpoint_ = internalGetEndpointIdToEndpoint().build(EndpointIdToEndpointDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.Connected) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.Connected)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.Connected other) { + if (other == fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableEndpointIdToEndpoint().mergeFrom( + other.internalGetEndpointIdToEndpoint()); + bitField0_ |= 0x00000002; + if (iceServersBuilder_ == null) { + if (!other.iceServers_.isEmpty()) { + if (iceServers_.isEmpty()) { + iceServers_ = other.iceServers_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureIceServersIsMutable(); + iceServers_.addAll(other.iceServers_); + } + onChanged(); + } + } else { + if (!other.iceServers_.isEmpty()) { + if (iceServersBuilder_.isEmpty()) { + iceServersBuilder_.dispose(); + iceServersBuilder_ = null; + iceServers_ = other.iceServers_; + bitField0_ = (bitField0_ & ~0x00000004); + iceServersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getIceServersFieldBuilder() : null; + } else { + iceServersBuilder_.addAllMessages(other.iceServers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + endpointIdToEndpoint__ = input.readMessage( + EndpointIdToEndpointDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableEndpointIdToEndpoint().ensureBuilderMap().put( + endpointIdToEndpoint__.getKey(), endpointIdToEndpoint__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + fishjam.media_events.server.Server.MediaEvent.IceServer m = + input.readMessage( + fishjam.media_events.server.Server.MediaEvent.IceServer.parser(), + extensionRegistry); + if (iceServersBuilder_ == null) { + ensureIceServersIsMutable(); + iceServers_.add(m); + } else { + iceServersBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private static final class EndpointIdToEndpointConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint build(fishjam.media_events.server.Server.MediaEvent.EndpointOrBuilder val) { + if (val instanceof fishjam.media_events.server.Server.MediaEvent.Endpoint) { return (fishjam.media_events.server.Server.MediaEvent.Endpoint) val; } + return ((fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return EndpointIdToEndpointDefaultEntryHolder.defaultEntry; + } + }; + private static final EndpointIdToEndpointConverter endpointIdToEndpointConverter = new EndpointIdToEndpointConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, fishjam.media_events.server.Server.MediaEvent.EndpointOrBuilder, fishjam.media_events.server.Server.MediaEvent.Endpoint, fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder> endpointIdToEndpoint_; + private com.google.protobuf.MapFieldBuilder + internalGetEndpointIdToEndpoint() { + if (endpointIdToEndpoint_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(endpointIdToEndpointConverter); + } + return endpointIdToEndpoint_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableEndpointIdToEndpoint() { + if (endpointIdToEndpoint_ == null) { + endpointIdToEndpoint_ = new com.google.protobuf.MapFieldBuilder<>(endpointIdToEndpointConverter); + } + bitField0_ |= 0x00000002; + onChanged(); + return endpointIdToEndpoint_; + } + public int getEndpointIdToEndpointCount() { + return internalGetEndpointIdToEndpoint().ensureBuilderMap().size(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public boolean containsEndpointIdToEndpoint( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetEndpointIdToEndpoint().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getEndpointIdToEndpointMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEndpointIdToEndpoint() { + return getEndpointIdToEndpointMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public java.util.Map getEndpointIdToEndpointMap() { + return internalGetEndpointIdToEndpoint().getImmutableMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Endpoint getEndpointIdToEndpointOrDefault( + java.lang.String key, + /* nullable */ +fishjam.media_events.server.Server.MediaEvent.Endpoint defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableEndpointIdToEndpoint().ensureBuilderMap(); + return map.containsKey(key) ? endpointIdToEndpointConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Endpoint getEndpointIdToEndpointOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableEndpointIdToEndpoint().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return endpointIdToEndpointConverter.build(map.get(key)); + } + public Builder clearEndpointIdToEndpoint() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableEndpointIdToEndpoint().clear(); + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + public Builder removeEndpointIdToEndpoint( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableEndpointIdToEndpoint().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableEndpointIdToEndpoint() { + bitField0_ |= 0x00000002; + return internalGetMutableEndpointIdToEndpoint().ensureMessageMap(); + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + public Builder putEndpointIdToEndpoint( + java.lang.String key, + fishjam.media_events.server.Server.MediaEvent.Endpoint value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableEndpointIdToEndpoint().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + public Builder putAllEndpointIdToEndpoint( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableEndpointIdToEndpoint().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, .fishjam.media_events.server.MediaEvent.Endpoint> endpoint_id_to_endpoint = 2; + */ + public fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder putEndpointIdToEndpointBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableEndpointIdToEndpoint().ensureBuilderMap(); + fishjam.media_events.server.Server.MediaEvent.EndpointOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = fishjam.media_events.server.Server.MediaEvent.Endpoint.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof fishjam.media_events.server.Server.MediaEvent.Endpoint) { + entry = ((fishjam.media_events.server.Server.MediaEvent.Endpoint) entry).toBuilder(); + builderMap.put(key, entry); + } + return (fishjam.media_events.server.Server.MediaEvent.Endpoint.Builder) entry; + } + + private java.util.List iceServers_ = + java.util.Collections.emptyList(); + private void ensureIceServersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + iceServers_ = new java.util.ArrayList(iceServers_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.IceServer, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder, fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder> iceServersBuilder_; + + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public java.util.List getIceServersList() { + if (iceServersBuilder_ == null) { + return java.util.Collections.unmodifiableList(iceServers_); + } else { + return iceServersBuilder_.getMessageList(); + } + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public int getIceServersCount() { + if (iceServersBuilder_ == null) { + return iceServers_.size(); + } else { + return iceServersBuilder_.getCount(); + } + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public fishjam.media_events.server.Server.MediaEvent.IceServer getIceServers(int index) { + if (iceServersBuilder_ == null) { + return iceServers_.get(index); + } else { + return iceServersBuilder_.getMessage(index); + } + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder setIceServers( + int index, fishjam.media_events.server.Server.MediaEvent.IceServer value) { + if (iceServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIceServersIsMutable(); + iceServers_.set(index, value); + onChanged(); + } else { + iceServersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder setIceServers( + int index, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder builderForValue) { + if (iceServersBuilder_ == null) { + ensureIceServersIsMutable(); + iceServers_.set(index, builderForValue.build()); + onChanged(); + } else { + iceServersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder addIceServers(fishjam.media_events.server.Server.MediaEvent.IceServer value) { + if (iceServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIceServersIsMutable(); + iceServers_.add(value); + onChanged(); + } else { + iceServersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder addIceServers( + int index, fishjam.media_events.server.Server.MediaEvent.IceServer value) { + if (iceServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIceServersIsMutable(); + iceServers_.add(index, value); + onChanged(); + } else { + iceServersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder addIceServers( + fishjam.media_events.server.Server.MediaEvent.IceServer.Builder builderForValue) { + if (iceServersBuilder_ == null) { + ensureIceServersIsMutable(); + iceServers_.add(builderForValue.build()); + onChanged(); + } else { + iceServersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder addIceServers( + int index, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder builderForValue) { + if (iceServersBuilder_ == null) { + ensureIceServersIsMutable(); + iceServers_.add(index, builderForValue.build()); + onChanged(); + } else { + iceServersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder addAllIceServers( + java.lang.Iterable values) { + if (iceServersBuilder_ == null) { + ensureIceServersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, iceServers_); + onChanged(); + } else { + iceServersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder clearIceServers() { + if (iceServersBuilder_ == null) { + iceServers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + iceServersBuilder_.clear(); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public Builder removeIceServers(int index) { + if (iceServersBuilder_ == null) { + ensureIceServersIsMutable(); + iceServers_.remove(index); + onChanged(); + } else { + iceServersBuilder_.remove(index); + } + return this; + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public fishjam.media_events.server.Server.MediaEvent.IceServer.Builder getIceServersBuilder( + int index) { + return getIceServersFieldBuilder().getBuilder(index); + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder getIceServersOrBuilder( + int index) { + if (iceServersBuilder_ == null) { + return iceServers_.get(index); } else { + return iceServersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public java.util.List + getIceServersOrBuilderList() { + if (iceServersBuilder_ != null) { + return iceServersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(iceServers_); + } + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public fishjam.media_events.server.Server.MediaEvent.IceServer.Builder addIceServersBuilder() { + return getIceServersFieldBuilder().addBuilder( + fishjam.media_events.server.Server.MediaEvent.IceServer.getDefaultInstance()); + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public fishjam.media_events.server.Server.MediaEvent.IceServer.Builder addIceServersBuilder( + int index) { + return getIceServersFieldBuilder().addBuilder( + index, fishjam.media_events.server.Server.MediaEvent.IceServer.getDefaultInstance()); + } + /** + * repeated .fishjam.media_events.server.MediaEvent.IceServer ice_servers = 3; + */ + public java.util.List + getIceServersBuilderList() { + return getIceServersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.IceServer, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder, fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder> + getIceServersFieldBuilder() { + if (iceServersBuilder_ == null) { + iceServersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.IceServer, fishjam.media_events.server.Server.MediaEvent.IceServer.Builder, fishjam.media_events.server.Server.MediaEvent.IceServerOrBuilder>( + iceServers_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + iceServers_ = null; + } + return iceServersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.Connected) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.Connected) + private static final fishjam.media_events.server.Server.MediaEvent.Connected DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.Connected(); + } + + public static fishjam.media_events.server.Server.MediaEvent.Connected getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Connected parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Connected getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EndpointRemovedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.EndpointRemoved) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + } + /** + *
+     * Sent to all remaining peers in the room after some endpoint was removed.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.EndpointRemoved} + */ + public static final class EndpointRemoved extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.EndpointRemoved) + EndpointRemovedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + EndpointRemoved.class.getName()); + } + // Use EndpointRemoved.newBuilder() to construct. + private EndpointRemoved(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private EndpointRemoved() { + endpointId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.class, fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.EndpointRemoved)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved other = (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.EndpointRemoved prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to all remaining peers in the room after some endpoint was removed.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.EndpointRemoved} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.EndpointRemoved) + fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.class, fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved build() { + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved buildPartial() { + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved result = new fishjam.media_events.server.Server.MediaEvent.EndpointRemoved(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.EndpointRemoved result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.EndpointRemoved)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.EndpointRemoved other) { + if (other == fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.EndpointRemoved) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.EndpointRemoved) + private static final fishjam.media_events.server.Server.MediaEvent.EndpointRemoved DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.EndpointRemoved(); + } + + public static fishjam.media_events.server.Server.MediaEvent.EndpointRemoved getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EndpointRemoved parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.Error) + com.google.protobuf.MessageOrBuilder { + + /** + * string message = 1; + * @return The message. + */ + java.lang.String getMessage(); + /** + * string message = 1; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + } + /** + *
+     * Sent to inform that an error occurred on the server providing a message to show
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Error} + */ + public static final class Error extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.Error) + ErrorOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Error.class.getName()); + } + // Use Error.newBuilder() to construct. + private Error(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Error() { + message_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Error.class, fishjam.media_events.server.Server.MediaEvent.Error.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * string message = 1; + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + * string message = 1; + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, message_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.Error)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.Error other = (fishjam.media_events.server.Server.MediaEvent.Error) obj; + + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.Error parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.Error parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.Error parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.Error prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to inform that an error occurred on the server providing a message to show
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.Error} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.Error) + fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.Error.class, fishjam.media_events.server.Server.MediaEvent.Error.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.Error.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_Error_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Error getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Error build() { + fishjam.media_events.server.Server.MediaEvent.Error result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Error buildPartial() { + fishjam.media_events.server.Server.MediaEvent.Error result = new fishjam.media_events.server.Server.MediaEvent.Error(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.Error result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.message_ = message_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.Error) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.Error)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.Error other) { + if (other == fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object message_ = ""; + /** + * string message = 1; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string message = 1; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string message = 1; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string message = 1; + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string message = 1; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.Error) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.Error) + private static final fishjam.media_events.server.Server.MediaEvent.Error DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.Error(); + } + + public static fishjam.media_events.server.Server.MediaEvent.Error getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Error parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Error getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface OfferDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.OfferData) + com.google.protobuf.MessageOrBuilder { + + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + * @return Whether the tracksTypes field is set. + */ + boolean hasTracksTypes(); + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + * @return The tracksTypes. + */ + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes getTracksTypes(); + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder getTracksTypesOrBuilder(); + } + /** + *
+     * Sent to inform about the number of audio and video tracks that will be sent from the engine to the peer
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.OfferData} + */ + public static final class OfferData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.OfferData) + OfferDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + OfferData.class.getName()); + } + // Use OfferData.newBuilder() to construct. + private OfferData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private OfferData() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.OfferData.class, fishjam.media_events.server.Server.MediaEvent.OfferData.Builder.class); + } + + public interface TrackTypesOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.OfferData.TrackTypes) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 audio = 1; + * @return The audio. + */ + int getAudio(); + + /** + * int32 video = 2; + * @return The video. + */ + int getVideo(); + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.OfferData.TrackTypes} + */ + public static final class TrackTypes extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.OfferData.TrackTypes) + TrackTypesOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TrackTypes.class.getName()); + } + // Use TrackTypes.newBuilder() to construct. + private TrackTypes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TrackTypes() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.class, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder.class); + } + + public static final int AUDIO_FIELD_NUMBER = 1; + private int audio_ = 0; + /** + * int32 audio = 1; + * @return The audio. + */ + @java.lang.Override + public int getAudio() { + return audio_; + } + + public static final int VIDEO_FIELD_NUMBER = 2; + private int video_ = 0; + /** + * int32 video = 2; + * @return The video. + */ + @java.lang.Override + public int getVideo() { + return video_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (audio_ != 0) { + output.writeInt32(1, audio_); + } + if (video_ != 0) { + output.writeInt32(2, video_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (audio_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, audio_); + } + if (video_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, video_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes other = (fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes) obj; + + if (getAudio() + != other.getAudio()) return false; + if (getVideo() + != other.getVideo()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUDIO_FIELD_NUMBER; + hash = (53 * hash) + getAudio(); + hash = (37 * hash) + VIDEO_FIELD_NUMBER; + hash = (53 * hash) + getVideo(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code fishjam.media_events.server.MediaEvent.OfferData.TrackTypes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.OfferData.TrackTypes) + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.class, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + audio_ = 0; + video_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes build() { + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes buildPartial() { + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes result = new fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.audio_ = audio_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.video_ = video_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes other) { + if (other == fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance()) return this; + if (other.getAudio() != 0) { + setAudio(other.getAudio()); + } + if (other.getVideo() != 0) { + setVideo(other.getVideo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + audio_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + video_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int audio_ ; + /** + * int32 audio = 1; + * @return The audio. + */ + @java.lang.Override + public int getAudio() { + return audio_; + } + /** + * int32 audio = 1; + * @param value The audio to set. + * @return This builder for chaining. + */ + public Builder setAudio(int value) { + + audio_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 audio = 1; + * @return This builder for chaining. + */ + public Builder clearAudio() { + bitField0_ = (bitField0_ & ~0x00000001); + audio_ = 0; + onChanged(); + return this; + } + + private int video_ ; + /** + * int32 video = 2; + * @return The video. + */ + @java.lang.Override + public int getVideo() { + return video_; + } + /** + * int32 video = 2; + * @param value The video to set. + * @return This builder for chaining. + */ + public Builder setVideo(int value) { + + video_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 video = 2; + * @return This builder for chaining. + */ + public Builder clearVideo() { + bitField0_ = (bitField0_ & ~0x00000002); + video_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.OfferData.TrackTypes) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.OfferData.TrackTypes) + private static final fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes(); + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackTypes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int TRACKS_TYPES_FIELD_NUMBER = 1; + private fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes tracksTypes_; + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + * @return Whether the tracksTypes field is set. + */ + @java.lang.Override + public boolean hasTracksTypes() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + * @return The tracksTypes. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes getTracksTypes() { + return tracksTypes_ == null ? fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance() : tracksTypes_; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder getTracksTypesOrBuilder() { + return tracksTypes_ == null ? fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance() : tracksTypes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTracksTypes()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTracksTypes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.OfferData)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.OfferData other = (fishjam.media_events.server.Server.MediaEvent.OfferData) obj; + + if (hasTracksTypes() != other.hasTracksTypes()) return false; + if (hasTracksTypes()) { + if (!getTracksTypes() + .equals(other.getTracksTypes())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTracksTypes()) { + hash = (37 * hash) + TRACKS_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTracksTypes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.OfferData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.OfferData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to inform about the number of audio and video tracks that will be sent from the engine to the peer
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.OfferData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.OfferData) + fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.OfferData.class, fishjam.media_events.server.Server.MediaEvent.OfferData.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.OfferData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getTracksTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tracksTypes_ = null; + if (tracksTypesBuilder_ != null) { + tracksTypesBuilder_.dispose(); + tracksTypesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData build() { + fishjam.media_events.server.Server.MediaEvent.OfferData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData buildPartial() { + fishjam.media_events.server.Server.MediaEvent.OfferData result = new fishjam.media_events.server.Server.MediaEvent.OfferData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.OfferData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tracksTypes_ = tracksTypesBuilder_ == null + ? tracksTypes_ + : tracksTypesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.OfferData) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.OfferData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.OfferData other) { + if (other == fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance()) return this; + if (other.hasTracksTypes()) { + mergeTracksTypes(other.getTracksTypes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getTracksTypesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes tracksTypes_; + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder> tracksTypesBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + * @return Whether the tracksTypes field is set. + */ + public boolean hasTracksTypes() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + * @return The tracksTypes. + */ + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes getTracksTypes() { + if (tracksTypesBuilder_ == null) { + return tracksTypes_ == null ? fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance() : tracksTypes_; + } else { + return tracksTypesBuilder_.getMessage(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + public Builder setTracksTypes(fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes value) { + if (tracksTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tracksTypes_ = value; + } else { + tracksTypesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + public Builder setTracksTypes( + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder builderForValue) { + if (tracksTypesBuilder_ == null) { + tracksTypes_ = builderForValue.build(); + } else { + tracksTypesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + public Builder mergeTracksTypes(fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes value) { + if (tracksTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + tracksTypes_ != null && + tracksTypes_ != fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance()) { + getTracksTypesBuilder().mergeFrom(value); + } else { + tracksTypes_ = value; + } + } else { + tracksTypesBuilder_.mergeFrom(value); + } + if (tracksTypes_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + public Builder clearTracksTypes() { + bitField0_ = (bitField0_ & ~0x00000001); + tracksTypes_ = null; + if (tracksTypesBuilder_ != null) { + tracksTypesBuilder_.dispose(); + tracksTypesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder getTracksTypesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTracksTypesFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + public fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder getTracksTypesOrBuilder() { + if (tracksTypesBuilder_ != null) { + return tracksTypesBuilder_.getMessageOrBuilder(); + } else { + return tracksTypes_ == null ? + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.getDefaultInstance() : tracksTypes_; + } + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData.TrackTypes tracks_types = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder> + getTracksTypesFieldBuilder() { + if (tracksTypesBuilder_ == null) { + tracksTypesBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypes.Builder, fishjam.media_events.server.Server.MediaEvent.OfferData.TrackTypesOrBuilder>( + getTracksTypes(), + getParentForChildren(), + isClean()); + tracksTypes_ = null; + } + return tracksTypesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.OfferData) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.OfferData) + private static final fishjam.media_events.server.Server.MediaEvent.OfferData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.OfferData(); + } + + public static fishjam.media_events.server.Server.MediaEvent.OfferData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OfferData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SdpAnswerOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.SdpAnswer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The sdp. + */ + java.lang.String getSdp(); + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The bytes for sdp. + */ + com.google.protobuf.ByteString + getSdpBytes(); + + /** + * map<string, string> mid_to_track_id = 2; + */ + int getMidToTrackIdCount(); + /** + * map<string, string> mid_to_track_id = 2; + */ + boolean containsMidToTrackId( + java.lang.String key); + /** + * Use {@link #getMidToTrackIdMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMidToTrackId(); + /** + * map<string, string> mid_to_track_id = 2; + */ + java.util.Map + getMidToTrackIdMap(); + /** + * map<string, string> mid_to_track_id = 2; + */ + /* nullable */ +java.lang.String getMidToTrackIdOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> mid_to_track_id = 2; + */ + java.lang.String getMidToTrackIdOrThrow( + java.lang.String key); + } + /** + *
+     * Sent after receiving `SdpOffer` from Peer
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.SdpAnswer} + */ + public static final class SdpAnswer extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.SdpAnswer) + SdpAnswerOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + SdpAnswer.class.getName()); + } + // Use SdpAnswer.newBuilder() to construct. + private SdpAnswer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SdpAnswer() { + sdp_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMidToTrackId(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.SdpAnswer.class, fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder.class); + } + + public static final int SDP_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object sdp_ = ""; + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The sdp. + */ + @java.lang.Override + public java.lang.String getSdp() { + java.lang.Object ref = sdp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdp_ = s; + return s; + } + } + /** + *
+       * The value of the `sessionDescription.sdp`
+       * 
+ * + * string sdp = 1; + * @return The bytes for sdp. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSdpBytes() { + java.lang.Object ref = sdp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sdp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MID_TO_TRACK_ID_FIELD_NUMBER = 2; + private static final class MidToTrackIdDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_MidToTrackIdEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> midToTrackId_; + private com.google.protobuf.MapField + internalGetMidToTrackId() { + if (midToTrackId_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MidToTrackIdDefaultEntryHolder.defaultEntry); + } + return midToTrackId_; + } + public int getMidToTrackIdCount() { + return internalGetMidToTrackId().getMap().size(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public boolean containsMidToTrackId( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMidToTrackId().getMap().containsKey(key); + } + /** + * Use {@link #getMidToTrackIdMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMidToTrackId() { + return getMidToTrackIdMap(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public java.util.Map getMidToTrackIdMap() { + return internalGetMidToTrackId().getMap(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMidToTrackIdOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public java.lang.String getMidToTrackIdOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdp_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sdp_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetMidToTrackId(), + MidToTrackIdDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sdp_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sdp_); + } + for (java.util.Map.Entry entry + : internalGetMidToTrackId().getMap().entrySet()) { + com.google.protobuf.MapEntry + midToTrackId__ = MidToTrackIdDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, midToTrackId__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.SdpAnswer)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.SdpAnswer other = (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) obj; + + if (!getSdp() + .equals(other.getSdp())) return false; + if (!internalGetMidToTrackId().equals( + other.internalGetMidToTrackId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SDP_FIELD_NUMBER; + hash = (53 * hash) + getSdp().hashCode(); + if (!internalGetMidToTrackId().getMap().isEmpty()) { + hash = (37 * hash) + MID_TO_TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + internalGetMidToTrackId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.SdpAnswer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent after receiving `SdpOffer` from Peer
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.SdpAnswer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.SdpAnswer) + fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMidToTrackId(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableMidToTrackId(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.SdpAnswer.class, fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.SdpAnswer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sdp_ = ""; + internalGetMutableMidToTrackId().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer build() { + fishjam.media_events.server.Server.MediaEvent.SdpAnswer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer buildPartial() { + fishjam.media_events.server.Server.MediaEvent.SdpAnswer result = new fishjam.media_events.server.Server.MediaEvent.SdpAnswer(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.SdpAnswer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sdp_ = sdp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.midToTrackId_ = internalGetMidToTrackId(); + result.midToTrackId_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.SdpAnswer) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.SdpAnswer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.SdpAnswer other) { + if (other == fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance()) return this; + if (!other.getSdp().isEmpty()) { + sdp_ = other.sdp_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableMidToTrackId().mergeFrom( + other.internalGetMidToTrackId()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sdp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + midToTrackId__ = input.readMessage( + MidToTrackIdDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMidToTrackId().getMutableMap().put( + midToTrackId__.getKey(), midToTrackId__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object sdp_ = ""; + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @return The sdp. + */ + public java.lang.String getSdp() { + java.lang.Object ref = sdp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sdp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @return The bytes for sdp. + */ + public com.google.protobuf.ByteString + getSdpBytes() { + java.lang.Object ref = sdp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sdp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @param value The sdp to set. + * @return This builder for chaining. + */ + public Builder setSdp( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sdp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @return This builder for chaining. + */ + public Builder clearSdp() { + sdp_ = getDefaultInstance().getSdp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+         * The value of the `sessionDescription.sdp`
+         * 
+ * + * string sdp = 1; + * @param value The bytes for sdp to set. + * @return This builder for chaining. + */ + public Builder setSdpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sdp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> midToTrackId_; + private com.google.protobuf.MapField + internalGetMidToTrackId() { + if (midToTrackId_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MidToTrackIdDefaultEntryHolder.defaultEntry); + } + return midToTrackId_; + } + private com.google.protobuf.MapField + internalGetMutableMidToTrackId() { + if (midToTrackId_ == null) { + midToTrackId_ = com.google.protobuf.MapField.newMapField( + MidToTrackIdDefaultEntryHolder.defaultEntry); + } + if (!midToTrackId_.isMutable()) { + midToTrackId_ = midToTrackId_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return midToTrackId_; + } + public int getMidToTrackIdCount() { + return internalGetMidToTrackId().getMap().size(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public boolean containsMidToTrackId( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMidToTrackId().getMap().containsKey(key); + } + /** + * Use {@link #getMidToTrackIdMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMidToTrackId() { + return getMidToTrackIdMap(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public java.util.Map getMidToTrackIdMap() { + return internalGetMidToTrackId().getMap(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getMidToTrackIdOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> mid_to_track_id = 2; + */ + @java.lang.Override + public java.lang.String getMidToTrackIdOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMidToTrackId().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearMidToTrackId() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableMidToTrackId().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> mid_to_track_id = 2; + */ + public Builder removeMidToTrackId( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMidToTrackId().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMidToTrackId() { + bitField0_ |= 0x00000002; + return internalGetMutableMidToTrackId().getMutableMap(); + } + /** + * map<string, string> mid_to_track_id = 2; + */ + public Builder putMidToTrackId( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableMidToTrackId().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * map<string, string> mid_to_track_id = 2; + */ + public Builder putAllMidToTrackId( + java.util.Map values) { + internalGetMutableMidToTrackId().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.SdpAnswer) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.SdpAnswer) + private static final fishjam.media_events.server.Server.MediaEvent.SdpAnswer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.SdpAnswer(); + } + + public static fishjam.media_events.server.Server.MediaEvent.SdpAnswer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SdpAnswer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VadNotificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.VadNotification) + com.google.protobuf.MessageOrBuilder { + + /** + * string track_id = 1; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return The status. + */ + fishjam.media_events.server.Server.MediaEvent.VadNotification.Status getStatus(); + } + /** + *
+     * Sent to inform that the track denoted by `trackId` has changed their voice actiivty
+     * For this notification to work, the server must be configured to use VAD extension
+     * and the sender must support it.
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.VadNotification} + */ + public static final class VadNotification extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.VadNotification) + VadNotificationOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + VadNotification.class.getName()); + } + // Use VadNotification.newBuilder() to construct. + private VadNotification(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private VadNotification() { + trackId_ = ""; + status_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_VadNotification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_VadNotification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.VadNotification.class, fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder.class); + } + + /** + * Protobuf enum {@code fishjam.media_events.server.MediaEvent.VadNotification.Status} + */ + public enum Status + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED(0), + /** + * STATUS_SILENCE = 1; + */ + STATUS_SILENCE(1), + /** + * STATUS_SPEECH = 2; + */ + STATUS_SPEECH(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + Status.class.getName()); + } + /** + * STATUS_UNSPECIFIED = 0; + */ + public static final int STATUS_UNSPECIFIED_VALUE = 0; + /** + * STATUS_SILENCE = 1; + */ + public static final int STATUS_SILENCE_VALUE = 1; + /** + * STATUS_SPEECH = 2; + */ + public static final int STATUS_SPEECH_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: return STATUS_UNSPECIFIED; + case 1: return STATUS_SILENCE; + case 2: return STATUS_SPEECH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Status> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDescriptor().getEnumTypes().get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:fishjam.media_events.server.MediaEvent.VadNotification.Status) + } + + public static final int TRACK_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_ = 0; + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return The status. + */ + @java.lang.Override public fishjam.media_events.server.Server.MediaEvent.VadNotification.Status getStatus() { + fishjam.media_events.server.Server.MediaEvent.VadNotification.Status result = fishjam.media_events.server.Server.MediaEvent.VadNotification.Status.forNumber(status_); + return result == null ? fishjam.media_events.server.Server.MediaEvent.VadNotification.Status.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, trackId_); + } + if (status_ != fishjam.media_events.server.Server.MediaEvent.VadNotification.Status.STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(2, status_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, trackId_); + } + if (status_ != fishjam.media_events.server.Server.MediaEvent.VadNotification.Status.STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, status_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.VadNotification)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.VadNotification other = (fishjam.media_events.server.Server.MediaEvent.VadNotification) obj; + + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (status_ != other.status_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.VadNotification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.VadNotification prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent to inform that the track denoted by `trackId` has changed their voice actiivty
+       * For this notification to work, the server must be configured to use VAD extension
+       * and the sender must support it.
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.VadNotification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.VadNotification) + fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_VadNotification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_VadNotification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.VadNotification.class, fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.VadNotification.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + status_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_VadNotification_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification build() { + fishjam.media_events.server.Server.MediaEvent.VadNotification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification buildPartial() { + fishjam.media_events.server.Server.MediaEvent.VadNotification result = new fishjam.media_events.server.Server.MediaEvent.VadNotification(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.VadNotification result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = status_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.VadNotification) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.VadNotification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.VadNotification other) { + if (other == fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + status_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 1; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 1; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 1; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string track_id = 1; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string track_id = 1; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int status_ = 0; + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return The status. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification.Status getStatus() { + fishjam.media_events.server.Server.MediaEvent.VadNotification.Status result = fishjam.media_events.server.Server.MediaEvent.VadNotification.Status.forNumber(status_); + return result == null ? fishjam.media_events.server.Server.MediaEvent.VadNotification.Status.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(fishjam.media_events.server.Server.MediaEvent.VadNotification.Status value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification.Status status = 2; + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.VadNotification) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.VadNotification) + private static final fishjam.media_events.server.Server.MediaEvent.VadNotification DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.VadNotification(); + } + + public static fishjam.media_events.server.Server.MediaEvent.VadNotification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VadNotification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TrackVariantSwitchedOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.TrackVariantSwitched) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * string track_id = 2; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + } + /** + *
+     * Informs that track's variant has been changed
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackVariantSwitched} + */ + public static final class TrackVariantSwitched extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.TrackVariantSwitched) + TrackVariantSwitchedOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TrackVariantSwitched.class.getName()); + } + // Use TrackVariantSwitched.newBuilder() to construct. + private TrackVariantSwitched(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TrackVariantSwitched() { + endpointId_ = ""; + trackId_ = ""; + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.class, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_FIELD_NUMBER = 3; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(3, variant_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, variant_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched other = (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (variant_ != other.variant_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Informs that track's variant has been changed
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackVariantSwitched} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.TrackVariantSwitched) + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.class, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + trackId_ = ""; + variant_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched build() { + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched buildPartial() { + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched result = new fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.variant_ = variant_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched other) { + if (other == fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 2; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string track_id = 2; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string track_id = 2; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000004); + variant_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.TrackVariantSwitched) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.TrackVariantSwitched) + private static final fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched(); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackVariantSwitched parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TrackVariantDisabledOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.TrackVariantDisabled) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * string track_id = 2; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + } + /** + *
+     * Sent when track's variant has been disabled
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackVariantDisabled} + */ + public static final class TrackVariantDisabled extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.TrackVariantDisabled) + TrackVariantDisabledOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TrackVariantDisabled.class.getName()); + } + // Use TrackVariantDisabled.newBuilder() to construct. + private TrackVariantDisabled(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TrackVariantDisabled() { + endpointId_ = ""; + trackId_ = ""; + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.class, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_FIELD_NUMBER = 3; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(3, variant_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, variant_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled other = (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (variant_ != other.variant_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when track's variant has been disabled
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackVariantDisabled} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.TrackVariantDisabled) + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.class, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + trackId_ = ""; + variant_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled build() { + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled buildPartial() { + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled result = new fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.variant_ = variant_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled other) { + if (other == fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 2; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string track_id = 2; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string track_id = 2; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000004); + variant_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.TrackVariantDisabled) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.TrackVariantDisabled) + private static final fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled(); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackVariantDisabled parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TrackVariantEnabledOrBuilder extends + // @@protoc_insertion_point(interface_extends:fishjam.media_events.server.MediaEvent.TrackVariantEnabled) + com.google.protobuf.MessageOrBuilder { + + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + java.lang.String getEndpointId(); + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + com.google.protobuf.ByteString + getEndpointIdBytes(); + + /** + * string track_id = 2; + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString + getTrackIdBytes(); + + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + int getVariantValue(); + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + fishjam.media_events.Shared.Variant getVariant(); + } + /** + *
+     * Sent when track's variant has been enabled
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackVariantEnabled} + */ + public static final class TrackVariantEnabled extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:fishjam.media_events.server.MediaEvent.TrackVariantEnabled) + TrackVariantEnabledOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 26, + /* patch= */ 1, + /* suffix= */ "", + TrackVariantEnabled.class.getName()); + } + // Use TrackVariantEnabled.newBuilder() to construct. + private TrackVariantEnabled(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private TrackVariantEnabled() { + endpointId_ = ""; + trackId_ = ""; + variant_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.class, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRACK_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANT_FIELD_NUMBER = 3; + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + @java.lang.Override public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + output.writeEnum(3, variant_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endpointId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, endpointId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, trackId_); + } + if (variant_ != fishjam.media_events.Shared.Variant.VARIANT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, variant_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled other = (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) obj; + + if (!getEndpointId() + .equals(other.getEndpointId())) return false; + if (!getTrackId() + .equals(other.getTrackId())) return false; + if (variant_ != other.variant_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + variant_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Sent when track's variant has been enabled
+       * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent.TrackVariantEnabled} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent.TrackVariantEnabled) + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.class, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpointId_ = ""; + trackId_ = ""; + variant_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled build() { + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled buildPartial() { + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled result = new fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.variant_ = variant_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled other) { + if (other == fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance()) return this; + if (!other.getEndpointId().isEmpty()) { + endpointId_ = other.endpointId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.variant_ != 0) { + setVariantValue(other.getVariantValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + endpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + variant_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object endpointId_ = ""; + /** + * string endpoint_id = 1; + * @return The endpointId. + */ + public java.lang.String getEndpointId() { + java.lang.Object ref = endpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string endpoint_id = 1; + * @return The bytes for endpointId. + */ + public com.google.protobuf.ByteString + getEndpointIdBytes() { + java.lang.Object ref = endpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + endpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string endpoint_id = 1; + * @param value The endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @return This builder for chaining. + */ + public Builder clearEndpointId() { + endpointId_ = getDefaultInstance().getEndpointId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string endpoint_id = 1; + * @param value The bytes for endpointId to set. + * @return This builder for chaining. + */ + public Builder setEndpointIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + endpointId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object trackId_ = ""; + /** + * string track_id = 2; + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string track_id = 2; + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString + getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string track_id = 2; + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string track_id = 2; + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string track_id = 2; + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int variant_ = 0; + /** + * .fishjam.media_events.Variant variant = 3; + * @return The enum numeric value on the wire for variant. + */ + @java.lang.Override public int getVariantValue() { + return variant_; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @param value The enum numeric value on the wire for variant to set. + * @return This builder for chaining. + */ + public Builder setVariantValue(int value) { + variant_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return The variant. + */ + @java.lang.Override + public fishjam.media_events.Shared.Variant getVariant() { + fishjam.media_events.Shared.Variant result = fishjam.media_events.Shared.Variant.forNumber(variant_); + return result == null ? fishjam.media_events.Shared.Variant.UNRECOGNIZED : result; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(fishjam.media_events.Shared.Variant value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + variant_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .fishjam.media_events.Variant variant = 3; + * @return This builder for chaining. + */ + public Builder clearVariant() { + bitField0_ = (bitField0_ & ~0x00000004); + variant_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent.TrackVariantEnabled) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent.TrackVariantEnabled) + private static final fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled(); + } + + public static fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackVariantEnabled parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int contentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object content_; + public enum ContentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENDPOINT_UPDATED(1), + TRACK_UPDATED(2), + TRACKS_ADDED(3), + TRACKS_REMOVED(4), + ENDPOINT_ADDED(5), + ENDPOINT_REMOVED(6), + CONNECTED(7), + ERROR(8), + OFFER_DATA(9), + CANDIDATE(10), + SDP_ANSWER(11), + VAD_NOTIFICATION(12), + TRACK_VARIANT_SWITCHED(13), + TRACK_VARIANT_DISABLED(14), + TRACK_VARIANT_ENABLED(15), + CONTENT_NOT_SET(0); + private final int value; + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 1: return ENDPOINT_UPDATED; + case 2: return TRACK_UPDATED; + case 3: return TRACKS_ADDED; + case 4: return TRACKS_REMOVED; + case 5: return ENDPOINT_ADDED; + case 6: return ENDPOINT_REMOVED; + case 7: return CONNECTED; + case 8: return ERROR; + case 9: return OFFER_DATA; + case 10: return CANDIDATE; + case 11: return SDP_ANSWER; + case 12: return VAD_NOTIFICATION; + case 13: return TRACK_VARIANT_SWITCHED; + case 14: return TRACK_VARIANT_DISABLED; + case 15: return TRACK_VARIANT_ENABLED; + case 0: return CONTENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); + } + + public static final int ENDPOINT_UPDATED_FIELD_NUMBER = 1; + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + * @return Whether the endpointUpdated field is set. + */ + @java.lang.Override + public boolean hasEndpointUpdated() { + return contentCase_ == 1; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + * @return The endpointUpdated. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated getEndpointUpdated() { + if (contentCase_ == 1) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder getEndpointUpdatedOrBuilder() { + if (contentCase_ == 1) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } + + public static final int TRACK_UPDATED_FIELD_NUMBER = 2; + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + * @return Whether the trackUpdated field is set. + */ + @java.lang.Override + public boolean hasTrackUpdated() { + return contentCase_ == 2; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + * @return The trackUpdated. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated getTrackUpdated() { + if (contentCase_ == 2) { + return (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder getTrackUpdatedOrBuilder() { + if (contentCase_ == 2) { + return (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } + + public static final int TRACKS_ADDED_FIELD_NUMBER = 3; + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + * @return Whether the tracksAdded field is set. + */ + @java.lang.Override + public boolean hasTracksAdded() { + return contentCase_ == 3; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + * @return The tracksAdded. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAdded getTracksAdded() { + if (contentCase_ == 3) { + return (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder getTracksAddedOrBuilder() { + if (contentCase_ == 3) { + return (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } + + public static final int TRACKS_REMOVED_FIELD_NUMBER = 4; + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + * @return Whether the tracksRemoved field is set. + */ + @java.lang.Override + public boolean hasTracksRemoved() { + return contentCase_ == 4; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + * @return The tracksRemoved. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved getTracksRemoved() { + if (contentCase_ == 4) { + return (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder getTracksRemovedOrBuilder() { + if (contentCase_ == 4) { + return (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } + + public static final int ENDPOINT_ADDED_FIELD_NUMBER = 5; + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + * @return Whether the endpointAdded field is set. + */ + @java.lang.Override + public boolean hasEndpointAdded() { + return contentCase_ == 5; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + * @return The endpointAdded. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded getEndpointAdded() { + if (contentCase_ == 5) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder getEndpointAddedOrBuilder() { + if (contentCase_ == 5) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } + + public static final int ENDPOINT_REMOVED_FIELD_NUMBER = 6; + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + * @return Whether the endpointRemoved field is set. + */ + @java.lang.Override + public boolean hasEndpointRemoved() { + return contentCase_ == 6; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + * @return The endpointRemoved. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved getEndpointRemoved() { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder getEndpointRemovedOrBuilder() { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } + + public static final int CONNECTED_FIELD_NUMBER = 7; + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + * @return Whether the connected field is set. + */ + @java.lang.Override + public boolean hasConnected() { + return contentCase_ == 7; + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + * @return The connected. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Connected getConnected() { + if (contentCase_ == 7) { + return (fishjam.media_events.server.Server.MediaEvent.Connected) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder getConnectedOrBuilder() { + if (contentCase_ == 7) { + return (fishjam.media_events.server.Server.MediaEvent.Connected) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 8; + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return contentCase_ == 8; + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + * @return The error. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Error getError() { + if (contentCase_ == 8) { + return (fishjam.media_events.server.Server.MediaEvent.Error) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder getErrorOrBuilder() { + if (contentCase_ == 8) { + return (fishjam.media_events.server.Server.MediaEvent.Error) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } + + public static final int OFFER_DATA_FIELD_NUMBER = 9; + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + * @return Whether the offerData field is set. + */ + @java.lang.Override + public boolean hasOfferData() { + return contentCase_ == 9; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + * @return The offerData. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData getOfferData() { + if (contentCase_ == 9) { + return (fishjam.media_events.server.Server.MediaEvent.OfferData) content_; + } + return fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder getOfferDataOrBuilder() { + if (contentCase_ == 9) { + return (fishjam.media_events.server.Server.MediaEvent.OfferData) content_; + } + return fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } + + public static final int CANDIDATE_FIELD_NUMBER = 10; + /** + * .fishjam.media_events.Candidate candidate = 10; + * @return Whether the candidate field is set. + */ + @java.lang.Override + public boolean hasCandidate() { + return contentCase_ == 10; + } + /** + * .fishjam.media_events.Candidate candidate = 10; + * @return The candidate. + */ + @java.lang.Override + public fishjam.media_events.Shared.Candidate getCandidate() { + if (contentCase_ == 10) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + @java.lang.Override + public fishjam.media_events.Shared.CandidateOrBuilder getCandidateOrBuilder() { + if (contentCase_ == 10) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + + public static final int SDP_ANSWER_FIELD_NUMBER = 11; + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + * @return Whether the sdpAnswer field is set. + */ + @java.lang.Override + public boolean hasSdpAnswer() { + return contentCase_ == 11; + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + * @return The sdpAnswer. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer getSdpAnswer() { + if (contentCase_ == 11) { + return (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_; + } + return fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder getSdpAnswerOrBuilder() { + if (contentCase_ == 11) { + return (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_; + } + return fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } + + public static final int VAD_NOTIFICATION_FIELD_NUMBER = 12; + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + * @return Whether the vadNotification field is set. + */ + @java.lang.Override + public boolean hasVadNotification() { + return contentCase_ == 12; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + * @return The vadNotification. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification getVadNotification() { + if (contentCase_ == 12) { + return (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_; + } + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder getVadNotificationOrBuilder() { + if (contentCase_ == 12) { + return (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_; + } + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } + + public static final int TRACK_VARIANT_SWITCHED_FIELD_NUMBER = 13; + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + * @return Whether the trackVariantSwitched field is set. + */ + @java.lang.Override + public boolean hasTrackVariantSwitched() { + return contentCase_ == 13; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + * @return The trackVariantSwitched. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched getTrackVariantSwitched() { + if (contentCase_ == 13) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder getTrackVariantSwitchedOrBuilder() { + if (contentCase_ == 13) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } + + public static final int TRACK_VARIANT_DISABLED_FIELD_NUMBER = 14; + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + * @return Whether the trackVariantDisabled field is set. + */ + @java.lang.Override + public boolean hasTrackVariantDisabled() { + return contentCase_ == 14; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + * @return The trackVariantDisabled. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled getTrackVariantDisabled() { + if (contentCase_ == 14) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder getTrackVariantDisabledOrBuilder() { + if (contentCase_ == 14) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } + + public static final int TRACK_VARIANT_ENABLED_FIELD_NUMBER = 15; + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + * @return Whether the trackVariantEnabled field is set. + */ + @java.lang.Override + public boolean hasTrackVariantEnabled() { + return contentCase_ == 15; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + * @return The trackVariantEnabled. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled getTrackVariantEnabled() { + if (contentCase_ == 15) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder getTrackVariantEnabledOrBuilder() { + if (contentCase_ == 15) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (contentCase_ == 1) { + output.writeMessage(1, (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_); + } + if (contentCase_ == 2) { + output.writeMessage(2, (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_); + } + if (contentCase_ == 3) { + output.writeMessage(3, (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_); + } + if (contentCase_ == 4) { + output.writeMessage(4, (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_); + } + if (contentCase_ == 5) { + output.writeMessage(5, (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_); + } + if (contentCase_ == 6) { + output.writeMessage(6, (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_); + } + if (contentCase_ == 7) { + output.writeMessage(7, (fishjam.media_events.server.Server.MediaEvent.Connected) content_); + } + if (contentCase_ == 8) { + output.writeMessage(8, (fishjam.media_events.server.Server.MediaEvent.Error) content_); + } + if (contentCase_ == 9) { + output.writeMessage(9, (fishjam.media_events.server.Server.MediaEvent.OfferData) content_); + } + if (contentCase_ == 10) { + output.writeMessage(10, (fishjam.media_events.Shared.Candidate) content_); + } + if (contentCase_ == 11) { + output.writeMessage(11, (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_); + } + if (contentCase_ == 12) { + output.writeMessage(12, (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_); + } + if (contentCase_ == 13) { + output.writeMessage(13, (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_); + } + if (contentCase_ == 14) { + output.writeMessage(14, (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_); + } + if (contentCase_ == 15) { + output.writeMessage(15, (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contentCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_); + } + if (contentCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_); + } + if (contentCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_); + } + if (contentCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_); + } + if (contentCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_); + } + if (contentCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (fishjam.media_events.server.Server.MediaEvent.Connected) content_); + } + if (contentCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (fishjam.media_events.server.Server.MediaEvent.Error) content_); + } + if (contentCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (fishjam.media_events.server.Server.MediaEvent.OfferData) content_); + } + if (contentCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (fishjam.media_events.Shared.Candidate) content_); + } + if (contentCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_); + } + if (contentCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_); + } + if (contentCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_); + } + if (contentCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_); + } + if (contentCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof fishjam.media_events.server.Server.MediaEvent)) { + return super.equals(obj); + } + fishjam.media_events.server.Server.MediaEvent other = (fishjam.media_events.server.Server.MediaEvent) obj; + + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getEndpointUpdated() + .equals(other.getEndpointUpdated())) return false; + break; + case 2: + if (!getTrackUpdated() + .equals(other.getTrackUpdated())) return false; + break; + case 3: + if (!getTracksAdded() + .equals(other.getTracksAdded())) return false; + break; + case 4: + if (!getTracksRemoved() + .equals(other.getTracksRemoved())) return false; + break; + case 5: + if (!getEndpointAdded() + .equals(other.getEndpointAdded())) return false; + break; + case 6: + if (!getEndpointRemoved() + .equals(other.getEndpointRemoved())) return false; + break; + case 7: + if (!getConnected() + .equals(other.getConnected())) return false; + break; + case 8: + if (!getError() + .equals(other.getError())) return false; + break; + case 9: + if (!getOfferData() + .equals(other.getOfferData())) return false; + break; + case 10: + if (!getCandidate() + .equals(other.getCandidate())) return false; + break; + case 11: + if (!getSdpAnswer() + .equals(other.getSdpAnswer())) return false; + break; + case 12: + if (!getVadNotification() + .equals(other.getVadNotification())) return false; + break; + case 13: + if (!getTrackVariantSwitched() + .equals(other.getTrackVariantSwitched())) return false; + break; + case 14: + if (!getTrackVariantDisabled() + .equals(other.getTrackVariantDisabled())) return false; + break; + case 15: + if (!getTrackVariantEnabled() + .equals(other.getTrackVariantEnabled())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (contentCase_) { + case 1: + hash = (37 * hash) + ENDPOINT_UPDATED_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUpdated().hashCode(); + break; + case 2: + hash = (37 * hash) + TRACK_UPDATED_FIELD_NUMBER; + hash = (53 * hash) + getTrackUpdated().hashCode(); + break; + case 3: + hash = (37 * hash) + TRACKS_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getTracksAdded().hashCode(); + break; + case 4: + hash = (37 * hash) + TRACKS_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getTracksRemoved().hashCode(); + break; + case 5: + hash = (37 * hash) + ENDPOINT_ADDED_FIELD_NUMBER; + hash = (53 * hash) + getEndpointAdded().hashCode(); + break; + case 6: + hash = (37 * hash) + ENDPOINT_REMOVED_FIELD_NUMBER; + hash = (53 * hash) + getEndpointRemoved().hashCode(); + break; + case 7: + hash = (37 * hash) + CONNECTED_FIELD_NUMBER; + hash = (53 * hash) + getConnected().hashCode(); + break; + case 8: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 9: + hash = (37 * hash) + OFFER_DATA_FIELD_NUMBER; + hash = (53 * hash) + getOfferData().hashCode(); + break; + case 10: + hash = (37 * hash) + CANDIDATE_FIELD_NUMBER; + hash = (53 * hash) + getCandidate().hashCode(); + break; + case 11: + hash = (37 * hash) + SDP_ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getSdpAnswer().hashCode(); + break; + case 12: + hash = (37 * hash) + VAD_NOTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getVadNotification().hashCode(); + break; + case 13: + hash = (37 * hash) + TRACK_VARIANT_SWITCHED_FIELD_NUMBER; + hash = (53 * hash) + getTrackVariantSwitched().hashCode(); + break; + case 14: + hash = (37 * hash) + TRACK_VARIANT_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + getTrackVariantDisabled().hashCode(); + break; + case 15: + hash = (37 * hash) + TRACK_VARIANT_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + getTrackVariantEnabled().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static fishjam.media_events.server.Server.MediaEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static fishjam.media_events.server.Server.MediaEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static fishjam.media_events.server.Server.MediaEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(fishjam.media_events.server.Server.MediaEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Defines any type of message sent from Membrane RTC Engine to Peer
+     * 
+ * + * Protobuf type {@code fishjam.media_events.server.MediaEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:fishjam.media_events.server.MediaEvent) + fishjam.media_events.server.Server.MediaEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + fishjam.media_events.server.Server.MediaEvent.class, fishjam.media_events.server.Server.MediaEvent.Builder.class); + } + + // Construct using fishjam.media_events.server.Server.MediaEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (endpointUpdatedBuilder_ != null) { + endpointUpdatedBuilder_.clear(); + } + if (trackUpdatedBuilder_ != null) { + trackUpdatedBuilder_.clear(); + } + if (tracksAddedBuilder_ != null) { + tracksAddedBuilder_.clear(); + } + if (tracksRemovedBuilder_ != null) { + tracksRemovedBuilder_.clear(); + } + if (endpointAddedBuilder_ != null) { + endpointAddedBuilder_.clear(); + } + if (endpointRemovedBuilder_ != null) { + endpointRemovedBuilder_.clear(); + } + if (connectedBuilder_ != null) { + connectedBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (offerDataBuilder_ != null) { + offerDataBuilder_.clear(); + } + if (candidateBuilder_ != null) { + candidateBuilder_.clear(); + } + if (sdpAnswerBuilder_ != null) { + sdpAnswerBuilder_.clear(); + } + if (vadNotificationBuilder_ != null) { + vadNotificationBuilder_.clear(); + } + if (trackVariantSwitchedBuilder_ != null) { + trackVariantSwitchedBuilder_.clear(); + } + if (trackVariantDisabledBuilder_ != null) { + trackVariantDisabledBuilder_.clear(); + } + if (trackVariantEnabledBuilder_ != null) { + trackVariantEnabledBuilder_.clear(); + } + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return fishjam.media_events.server.Server.internal_static_fishjam_media_events_server_MediaEvent_descriptor; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent getDefaultInstanceForType() { + return fishjam.media_events.server.Server.MediaEvent.getDefaultInstance(); + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent build() { + fishjam.media_events.server.Server.MediaEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent buildPartial() { + fishjam.media_events.server.Server.MediaEvent result = new fishjam.media_events.server.Server.MediaEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(fishjam.media_events.server.Server.MediaEvent result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(fishjam.media_events.server.Server.MediaEvent result) { + result.contentCase_ = contentCase_; + result.content_ = this.content_; + if (contentCase_ == 1 && + endpointUpdatedBuilder_ != null) { + result.content_ = endpointUpdatedBuilder_.build(); + } + if (contentCase_ == 2 && + trackUpdatedBuilder_ != null) { + result.content_ = trackUpdatedBuilder_.build(); + } + if (contentCase_ == 3 && + tracksAddedBuilder_ != null) { + result.content_ = tracksAddedBuilder_.build(); + } + if (contentCase_ == 4 && + tracksRemovedBuilder_ != null) { + result.content_ = tracksRemovedBuilder_.build(); + } + if (contentCase_ == 5 && + endpointAddedBuilder_ != null) { + result.content_ = endpointAddedBuilder_.build(); + } + if (contentCase_ == 6 && + endpointRemovedBuilder_ != null) { + result.content_ = endpointRemovedBuilder_.build(); + } + if (contentCase_ == 7 && + connectedBuilder_ != null) { + result.content_ = connectedBuilder_.build(); + } + if (contentCase_ == 8 && + errorBuilder_ != null) { + result.content_ = errorBuilder_.build(); + } + if (contentCase_ == 9 && + offerDataBuilder_ != null) { + result.content_ = offerDataBuilder_.build(); + } + if (contentCase_ == 10 && + candidateBuilder_ != null) { + result.content_ = candidateBuilder_.build(); + } + if (contentCase_ == 11 && + sdpAnswerBuilder_ != null) { + result.content_ = sdpAnswerBuilder_.build(); + } + if (contentCase_ == 12 && + vadNotificationBuilder_ != null) { + result.content_ = vadNotificationBuilder_.build(); + } + if (contentCase_ == 13 && + trackVariantSwitchedBuilder_ != null) { + result.content_ = trackVariantSwitchedBuilder_.build(); + } + if (contentCase_ == 14 && + trackVariantDisabledBuilder_ != null) { + result.content_ = trackVariantDisabledBuilder_.build(); + } + if (contentCase_ == 15 && + trackVariantEnabledBuilder_ != null) { + result.content_ = trackVariantEnabledBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof fishjam.media_events.server.Server.MediaEvent) { + return mergeFrom((fishjam.media_events.server.Server.MediaEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(fishjam.media_events.server.Server.MediaEvent other) { + if (other == fishjam.media_events.server.Server.MediaEvent.getDefaultInstance()) return this; + switch (other.getContentCase()) { + case ENDPOINT_UPDATED: { + mergeEndpointUpdated(other.getEndpointUpdated()); + break; + } + case TRACK_UPDATED: { + mergeTrackUpdated(other.getTrackUpdated()); + break; + } + case TRACKS_ADDED: { + mergeTracksAdded(other.getTracksAdded()); + break; + } + case TRACKS_REMOVED: { + mergeTracksRemoved(other.getTracksRemoved()); + break; + } + case ENDPOINT_ADDED: { + mergeEndpointAdded(other.getEndpointAdded()); + break; + } + case ENDPOINT_REMOVED: { + mergeEndpointRemoved(other.getEndpointRemoved()); + break; + } + case CONNECTED: { + mergeConnected(other.getConnected()); + break; + } + case ERROR: { + mergeError(other.getError()); + break; + } + case OFFER_DATA: { + mergeOfferData(other.getOfferData()); + break; + } + case CANDIDATE: { + mergeCandidate(other.getCandidate()); + break; + } + case SDP_ANSWER: { + mergeSdpAnswer(other.getSdpAnswer()); + break; + } + case VAD_NOTIFICATION: { + mergeVadNotification(other.getVadNotification()); + break; + } + case TRACK_VARIANT_SWITCHED: { + mergeTrackVariantSwitched(other.getTrackVariantSwitched()); + break; + } + case TRACK_VARIANT_DISABLED: { + mergeTrackVariantDisabled(other.getTrackVariantDisabled()); + break; + } + case TRACK_VARIANT_ENABLED: { + mergeTrackVariantEnabled(other.getTrackVariantEnabled()); + break; + } + case CONTENT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getEndpointUpdatedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 1; + break; + } // case 10 + case 18: { + input.readMessage( + getTrackUpdatedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 2; + break; + } // case 18 + case 26: { + input.readMessage( + getTracksAddedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getTracksRemovedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getEndpointAddedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getEndpointRemovedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getConnectedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getErrorFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getOfferDataFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getCandidateFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getSdpAnswerFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getVadNotificationFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getTrackVariantSwitchedFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getTrackVariantDisabledFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getTrackVariantEnabledFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 15; + break; + } // case 122 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int contentCase_ = 0; + private java.lang.Object content_; + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated, fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder> endpointUpdatedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + * @return Whether the endpointUpdated field is set. + */ + @java.lang.Override + public boolean hasEndpointUpdated() { + return contentCase_ == 1; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + * @return The endpointUpdated. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated getEndpointUpdated() { + if (endpointUpdatedBuilder_ == null) { + if (contentCase_ == 1) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } else { + if (contentCase_ == 1) { + return endpointUpdatedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + public Builder setEndpointUpdated(fishjam.media_events.server.Server.MediaEvent.EndpointUpdated value) { + if (endpointUpdatedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + endpointUpdatedBuilder_.setMessage(value); + } + contentCase_ = 1; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + public Builder setEndpointUpdated( + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder builderForValue) { + if (endpointUpdatedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + endpointUpdatedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 1; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + public Builder mergeEndpointUpdated(fishjam.media_events.server.Server.MediaEvent.EndpointUpdated value) { + if (endpointUpdatedBuilder_ == null) { + if (contentCase_ == 1 && + content_ != fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.newBuilder((fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 1) { + endpointUpdatedBuilder_.mergeFrom(value); + } else { + endpointUpdatedBuilder_.setMessage(value); + } + } + contentCase_ = 1; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + public Builder clearEndpointUpdated() { + if (endpointUpdatedBuilder_ == null) { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + } + endpointUpdatedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder getEndpointUpdatedBuilder() { + return getEndpointUpdatedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder getEndpointUpdatedOrBuilder() { + if ((contentCase_ == 1) && (endpointUpdatedBuilder_ != null)) { + return endpointUpdatedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 1) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointUpdated endpoint_updated = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated, fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder> + getEndpointUpdatedFieldBuilder() { + if (endpointUpdatedBuilder_ == null) { + if (!(contentCase_ == 1)) { + content_ = fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.getDefaultInstance(); + } + endpointUpdatedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointUpdated, fishjam.media_events.server.Server.MediaEvent.EndpointUpdated.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointUpdatedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.EndpointUpdated) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 1; + onChanged(); + return endpointUpdatedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackUpdated, fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder, fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder> trackUpdatedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + * @return Whether the trackUpdated field is set. + */ + @java.lang.Override + public boolean hasTrackUpdated() { + return contentCase_ == 2; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + * @return The trackUpdated. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated getTrackUpdated() { + if (trackUpdatedBuilder_ == null) { + if (contentCase_ == 2) { + return (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } else { + if (contentCase_ == 2) { + return trackUpdatedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + public Builder setTrackUpdated(fishjam.media_events.server.Server.MediaEvent.TrackUpdated value) { + if (trackUpdatedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + trackUpdatedBuilder_.setMessage(value); + } + contentCase_ = 2; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + public Builder setTrackUpdated( + fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder builderForValue) { + if (trackUpdatedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + trackUpdatedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 2; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + public Builder mergeTrackUpdated(fishjam.media_events.server.Server.MediaEvent.TrackUpdated value) { + if (trackUpdatedBuilder_ == null) { + if (contentCase_ == 2 && + content_ != fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackUpdated.newBuilder((fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 2) { + trackUpdatedBuilder_.mergeFrom(value); + } else { + trackUpdatedBuilder_.setMessage(value); + } + } + contentCase_ = 2; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + public Builder clearTrackUpdated() { + if (trackUpdatedBuilder_ == null) { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + } + trackUpdatedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + public fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder getTrackUpdatedBuilder() { + return getTrackUpdatedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder getTrackUpdatedOrBuilder() { + if ((contentCase_ == 2) && (trackUpdatedBuilder_ != null)) { + return trackUpdatedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 2) { + return (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackUpdated track_updated = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackUpdated, fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder, fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder> + getTrackUpdatedFieldBuilder() { + if (trackUpdatedBuilder_ == null) { + if (!(contentCase_ == 2)) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackUpdated.getDefaultInstance(); + } + trackUpdatedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackUpdated, fishjam.media_events.server.Server.MediaEvent.TrackUpdated.Builder, fishjam.media_events.server.Server.MediaEvent.TrackUpdatedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.TrackUpdated) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 2; + onChanged(); + return trackUpdatedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TracksAdded, fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder, fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder> tracksAddedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + * @return Whether the tracksAdded field is set. + */ + @java.lang.Override + public boolean hasTracksAdded() { + return contentCase_ == 3; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + * @return The tracksAdded. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAdded getTracksAdded() { + if (tracksAddedBuilder_ == null) { + if (contentCase_ == 3) { + return (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } else { + if (contentCase_ == 3) { + return tracksAddedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + public Builder setTracksAdded(fishjam.media_events.server.Server.MediaEvent.TracksAdded value) { + if (tracksAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + tracksAddedBuilder_.setMessage(value); + } + contentCase_ = 3; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + public Builder setTracksAdded( + fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder builderForValue) { + if (tracksAddedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + tracksAddedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 3; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + public Builder mergeTracksAdded(fishjam.media_events.server.Server.MediaEvent.TracksAdded value) { + if (tracksAddedBuilder_ == null) { + if (contentCase_ == 3 && + content_ != fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.TracksAdded.newBuilder((fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 3) { + tracksAddedBuilder_.mergeFrom(value); + } else { + tracksAddedBuilder_.setMessage(value); + } + } + contentCase_ = 3; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + public Builder clearTracksAdded() { + if (tracksAddedBuilder_ == null) { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + } + tracksAddedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + public fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder getTracksAddedBuilder() { + return getTracksAddedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder getTracksAddedOrBuilder() { + if ((contentCase_ == 3) && (tracksAddedBuilder_ != null)) { + return tracksAddedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 3) { + return (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TracksAdded tracks_added = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TracksAdded, fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder, fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder> + getTracksAddedFieldBuilder() { + if (tracksAddedBuilder_ == null) { + if (!(contentCase_ == 3)) { + content_ = fishjam.media_events.server.Server.MediaEvent.TracksAdded.getDefaultInstance(); + } + tracksAddedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TracksAdded, fishjam.media_events.server.Server.MediaEvent.TracksAdded.Builder, fishjam.media_events.server.Server.MediaEvent.TracksAddedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.TracksAdded) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 3; + onChanged(); + return tracksAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TracksRemoved, fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder, fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder> tracksRemovedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + * @return Whether the tracksRemoved field is set. + */ + @java.lang.Override + public boolean hasTracksRemoved() { + return contentCase_ == 4; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + * @return The tracksRemoved. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved getTracksRemoved() { + if (tracksRemovedBuilder_ == null) { + if (contentCase_ == 4) { + return (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } else { + if (contentCase_ == 4) { + return tracksRemovedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + public Builder setTracksRemoved(fishjam.media_events.server.Server.MediaEvent.TracksRemoved value) { + if (tracksRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + tracksRemovedBuilder_.setMessage(value); + } + contentCase_ = 4; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + public Builder setTracksRemoved( + fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder builderForValue) { + if (tracksRemovedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + tracksRemovedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 4; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + public Builder mergeTracksRemoved(fishjam.media_events.server.Server.MediaEvent.TracksRemoved value) { + if (tracksRemovedBuilder_ == null) { + if (contentCase_ == 4 && + content_ != fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.TracksRemoved.newBuilder((fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 4) { + tracksRemovedBuilder_.mergeFrom(value); + } else { + tracksRemovedBuilder_.setMessage(value); + } + } + contentCase_ = 4; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + public Builder clearTracksRemoved() { + if (tracksRemovedBuilder_ == null) { + if (contentCase_ == 4) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 4) { + contentCase_ = 0; + content_ = null; + } + tracksRemovedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + public fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder getTracksRemovedBuilder() { + return getTracksRemovedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder getTracksRemovedOrBuilder() { + if ((contentCase_ == 4) && (tracksRemovedBuilder_ != null)) { + return tracksRemovedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 4) { + return (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TracksRemoved tracks_removed = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TracksRemoved, fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder, fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder> + getTracksRemovedFieldBuilder() { + if (tracksRemovedBuilder_ == null) { + if (!(contentCase_ == 4)) { + content_ = fishjam.media_events.server.Server.MediaEvent.TracksRemoved.getDefaultInstance(); + } + tracksRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TracksRemoved, fishjam.media_events.server.Server.MediaEvent.TracksRemoved.Builder, fishjam.media_events.server.Server.MediaEvent.TracksRemovedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.TracksRemoved) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 4; + onChanged(); + return tracksRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointAdded, fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder> endpointAddedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + * @return Whether the endpointAdded field is set. + */ + @java.lang.Override + public boolean hasEndpointAdded() { + return contentCase_ == 5; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + * @return The endpointAdded. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded getEndpointAdded() { + if (endpointAddedBuilder_ == null) { + if (contentCase_ == 5) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } else { + if (contentCase_ == 5) { + return endpointAddedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + public Builder setEndpointAdded(fishjam.media_events.server.Server.MediaEvent.EndpointAdded value) { + if (endpointAddedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + endpointAddedBuilder_.setMessage(value); + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + public Builder setEndpointAdded( + fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder builderForValue) { + if (endpointAddedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + endpointAddedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + public Builder mergeEndpointAdded(fishjam.media_events.server.Server.MediaEvent.EndpointAdded value) { + if (endpointAddedBuilder_ == null) { + if (contentCase_ == 5 && + content_ != fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.EndpointAdded.newBuilder((fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 5) { + endpointAddedBuilder_.mergeFrom(value); + } else { + endpointAddedBuilder_.setMessage(value); + } + } + contentCase_ = 5; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + public Builder clearEndpointAdded() { + if (endpointAddedBuilder_ == null) { + if (contentCase_ == 5) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 5) { + contentCase_ = 0; + content_ = null; + } + endpointAddedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + public fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder getEndpointAddedBuilder() { + return getEndpointAddedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder getEndpointAddedOrBuilder() { + if ((contentCase_ == 5) && (endpointAddedBuilder_ != null)) { + return endpointAddedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 5) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointAdded endpoint_added = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointAdded, fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder> + getEndpointAddedFieldBuilder() { + if (endpointAddedBuilder_ == null) { + if (!(contentCase_ == 5)) { + content_ = fishjam.media_events.server.Server.MediaEvent.EndpointAdded.getDefaultInstance(); + } + endpointAddedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointAdded, fishjam.media_events.server.Server.MediaEvent.EndpointAdded.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointAddedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.EndpointAdded) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 5; + onChanged(); + return endpointAddedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved, fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder> endpointRemovedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + * @return Whether the endpointRemoved field is set. + */ + @java.lang.Override + public boolean hasEndpointRemoved() { + return contentCase_ == 6; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + * @return The endpointRemoved. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved getEndpointRemoved() { + if (endpointRemovedBuilder_ == null) { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } else { + if (contentCase_ == 6) { + return endpointRemovedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + public Builder setEndpointRemoved(fishjam.media_events.server.Server.MediaEvent.EndpointRemoved value) { + if (endpointRemovedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + endpointRemovedBuilder_.setMessage(value); + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + public Builder setEndpointRemoved( + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder builderForValue) { + if (endpointRemovedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + endpointRemovedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + public Builder mergeEndpointRemoved(fishjam.media_events.server.Server.MediaEvent.EndpointRemoved value) { + if (endpointRemovedBuilder_ == null) { + if (contentCase_ == 6 && + content_ != fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.newBuilder((fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 6) { + endpointRemovedBuilder_.mergeFrom(value); + } else { + endpointRemovedBuilder_.setMessage(value); + } + } + contentCase_ = 6; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + public Builder clearEndpointRemoved() { + if (endpointRemovedBuilder_ == null) { + if (contentCase_ == 6) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 6) { + contentCase_ = 0; + content_ = null; + } + endpointRemovedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + public fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder getEndpointRemovedBuilder() { + return getEndpointRemovedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder getEndpointRemovedOrBuilder() { + if ((contentCase_ == 6) && (endpointRemovedBuilder_ != null)) { + return endpointRemovedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 6) { + return (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_; + } + return fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.EndpointRemoved endpoint_removed = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved, fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder> + getEndpointRemovedFieldBuilder() { + if (endpointRemovedBuilder_ == null) { + if (!(contentCase_ == 6)) { + content_ = fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.getDefaultInstance(); + } + endpointRemovedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.EndpointRemoved, fishjam.media_events.server.Server.MediaEvent.EndpointRemoved.Builder, fishjam.media_events.server.Server.MediaEvent.EndpointRemovedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.EndpointRemoved) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 6; + onChanged(); + return endpointRemovedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Connected, fishjam.media_events.server.Server.MediaEvent.Connected.Builder, fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder> connectedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + * @return Whether the connected field is set. + */ + @java.lang.Override + public boolean hasConnected() { + return contentCase_ == 7; + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + * @return The connected. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Connected getConnected() { + if (connectedBuilder_ == null) { + if (contentCase_ == 7) { + return (fishjam.media_events.server.Server.MediaEvent.Connected) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } else { + if (contentCase_ == 7) { + return connectedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + public Builder setConnected(fishjam.media_events.server.Server.MediaEvent.Connected value) { + if (connectedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + connectedBuilder_.setMessage(value); + } + contentCase_ = 7; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + public Builder setConnected( + fishjam.media_events.server.Server.MediaEvent.Connected.Builder builderForValue) { + if (connectedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + connectedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 7; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + public Builder mergeConnected(fishjam.media_events.server.Server.MediaEvent.Connected value) { + if (connectedBuilder_ == null) { + if (contentCase_ == 7 && + content_ != fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.Connected.newBuilder((fishjam.media_events.server.Server.MediaEvent.Connected) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 7) { + connectedBuilder_.mergeFrom(value); + } else { + connectedBuilder_.setMessage(value); + } + } + contentCase_ = 7; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + public Builder clearConnected() { + if (connectedBuilder_ == null) { + if (contentCase_ == 7) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 7) { + contentCase_ = 0; + content_ = null; + } + connectedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + public fishjam.media_events.server.Server.MediaEvent.Connected.Builder getConnectedBuilder() { + return getConnectedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder getConnectedOrBuilder() { + if ((contentCase_ == 7) && (connectedBuilder_ != null)) { + return connectedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 7) { + return (fishjam.media_events.server.Server.MediaEvent.Connected) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.Connected connected = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Connected, fishjam.media_events.server.Server.MediaEvent.Connected.Builder, fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder> + getConnectedFieldBuilder() { + if (connectedBuilder_ == null) { + if (!(contentCase_ == 7)) { + content_ = fishjam.media_events.server.Server.MediaEvent.Connected.getDefaultInstance(); + } + connectedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Connected, fishjam.media_events.server.Server.MediaEvent.Connected.Builder, fishjam.media_events.server.Server.MediaEvent.ConnectedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.Connected) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 7; + onChanged(); + return connectedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Error, fishjam.media_events.server.Server.MediaEvent.Error.Builder, fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder> errorBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return contentCase_ == 8; + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + * @return The error. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.Error getError() { + if (errorBuilder_ == null) { + if (contentCase_ == 8) { + return (fishjam.media_events.server.Server.MediaEvent.Error) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } else { + if (contentCase_ == 8) { + return errorBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + public Builder setError(fishjam.media_events.server.Server.MediaEvent.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + contentCase_ = 8; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + public Builder setError( + fishjam.media_events.server.Server.MediaEvent.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 8; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + public Builder mergeError(fishjam.media_events.server.Server.MediaEvent.Error value) { + if (errorBuilder_ == null) { + if (contentCase_ == 8 && + content_ != fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.Error.newBuilder((fishjam.media_events.server.Server.MediaEvent.Error) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 8) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + contentCase_ = 8; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (contentCase_ == 8) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 8) { + contentCase_ = 0; + content_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + public fishjam.media_events.server.Server.MediaEvent.Error.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder getErrorOrBuilder() { + if ((contentCase_ == 8) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 8) { + return (fishjam.media_events.server.Server.MediaEvent.Error) content_; + } + return fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.Error error = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Error, fishjam.media_events.server.Server.MediaEvent.Error.Builder, fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(contentCase_ == 8)) { + content_ = fishjam.media_events.server.Server.MediaEvent.Error.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.Error, fishjam.media_events.server.Server.MediaEvent.Error.Builder, fishjam.media_events.server.Server.MediaEvent.ErrorOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.Error) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 8; + onChanged(); + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.OfferData, fishjam.media_events.server.Server.MediaEvent.OfferData.Builder, fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder> offerDataBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + * @return Whether the offerData field is set. + */ + @java.lang.Override + public boolean hasOfferData() { + return contentCase_ == 9; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + * @return The offerData. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferData getOfferData() { + if (offerDataBuilder_ == null) { + if (contentCase_ == 9) { + return (fishjam.media_events.server.Server.MediaEvent.OfferData) content_; + } + return fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } else { + if (contentCase_ == 9) { + return offerDataBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + public Builder setOfferData(fishjam.media_events.server.Server.MediaEvent.OfferData value) { + if (offerDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + offerDataBuilder_.setMessage(value); + } + contentCase_ = 9; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + public Builder setOfferData( + fishjam.media_events.server.Server.MediaEvent.OfferData.Builder builderForValue) { + if (offerDataBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + offerDataBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 9; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + public Builder mergeOfferData(fishjam.media_events.server.Server.MediaEvent.OfferData value) { + if (offerDataBuilder_ == null) { + if (contentCase_ == 9 && + content_ != fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.OfferData.newBuilder((fishjam.media_events.server.Server.MediaEvent.OfferData) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 9) { + offerDataBuilder_.mergeFrom(value); + } else { + offerDataBuilder_.setMessage(value); + } + } + contentCase_ = 9; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + public Builder clearOfferData() { + if (offerDataBuilder_ == null) { + if (contentCase_ == 9) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 9) { + contentCase_ = 0; + content_ = null; + } + offerDataBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + public fishjam.media_events.server.Server.MediaEvent.OfferData.Builder getOfferDataBuilder() { + return getOfferDataFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder getOfferDataOrBuilder() { + if ((contentCase_ == 9) && (offerDataBuilder_ != null)) { + return offerDataBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 9) { + return (fishjam.media_events.server.Server.MediaEvent.OfferData) content_; + } + return fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.OfferData offer_data = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.OfferData, fishjam.media_events.server.Server.MediaEvent.OfferData.Builder, fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder> + getOfferDataFieldBuilder() { + if (offerDataBuilder_ == null) { + if (!(contentCase_ == 9)) { + content_ = fishjam.media_events.server.Server.MediaEvent.OfferData.getDefaultInstance(); + } + offerDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.OfferData, fishjam.media_events.server.Server.MediaEvent.OfferData.Builder, fishjam.media_events.server.Server.MediaEvent.OfferDataOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.OfferData) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 9; + onChanged(); + return offerDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.Shared.Candidate, fishjam.media_events.Shared.Candidate.Builder, fishjam.media_events.Shared.CandidateOrBuilder> candidateBuilder_; + /** + * .fishjam.media_events.Candidate candidate = 10; + * @return Whether the candidate field is set. + */ + @java.lang.Override + public boolean hasCandidate() { + return contentCase_ == 10; + } + /** + * .fishjam.media_events.Candidate candidate = 10; + * @return The candidate. + */ + @java.lang.Override + public fishjam.media_events.Shared.Candidate getCandidate() { + if (candidateBuilder_ == null) { + if (contentCase_ == 10) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } else { + if (contentCase_ == 10) { + return candidateBuilder_.getMessage(); + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + public Builder setCandidate(fishjam.media_events.Shared.Candidate value) { + if (candidateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + candidateBuilder_.setMessage(value); + } + contentCase_ = 10; + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + public Builder setCandidate( + fishjam.media_events.Shared.Candidate.Builder builderForValue) { + if (candidateBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + candidateBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 10; + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + public Builder mergeCandidate(fishjam.media_events.Shared.Candidate value) { + if (candidateBuilder_ == null) { + if (contentCase_ == 10 && + content_ != fishjam.media_events.Shared.Candidate.getDefaultInstance()) { + content_ = fishjam.media_events.Shared.Candidate.newBuilder((fishjam.media_events.Shared.Candidate) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 10) { + candidateBuilder_.mergeFrom(value); + } else { + candidateBuilder_.setMessage(value); + } + } + contentCase_ = 10; + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + public Builder clearCandidate() { + if (candidateBuilder_ == null) { + if (contentCase_ == 10) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 10) { + contentCase_ = 0; + content_ = null; + } + candidateBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + public fishjam.media_events.Shared.Candidate.Builder getCandidateBuilder() { + return getCandidateFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + @java.lang.Override + public fishjam.media_events.Shared.CandidateOrBuilder getCandidateOrBuilder() { + if ((contentCase_ == 10) && (candidateBuilder_ != null)) { + return candidateBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 10) { + return (fishjam.media_events.Shared.Candidate) content_; + } + return fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.Candidate candidate = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.Shared.Candidate, fishjam.media_events.Shared.Candidate.Builder, fishjam.media_events.Shared.CandidateOrBuilder> + getCandidateFieldBuilder() { + if (candidateBuilder_ == null) { + if (!(contentCase_ == 10)) { + content_ = fishjam.media_events.Shared.Candidate.getDefaultInstance(); + } + candidateBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.Shared.Candidate, fishjam.media_events.Shared.Candidate.Builder, fishjam.media_events.Shared.CandidateOrBuilder>( + (fishjam.media_events.Shared.Candidate) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 10; + onChanged(); + return candidateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.SdpAnswer, fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder, fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder> sdpAnswerBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + * @return Whether the sdpAnswer field is set. + */ + @java.lang.Override + public boolean hasSdpAnswer() { + return contentCase_ == 11; + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + * @return The sdpAnswer. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer getSdpAnswer() { + if (sdpAnswerBuilder_ == null) { + if (contentCase_ == 11) { + return (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_; + } + return fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } else { + if (contentCase_ == 11) { + return sdpAnswerBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + public Builder setSdpAnswer(fishjam.media_events.server.Server.MediaEvent.SdpAnswer value) { + if (sdpAnswerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + sdpAnswerBuilder_.setMessage(value); + } + contentCase_ = 11; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + public Builder setSdpAnswer( + fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder builderForValue) { + if (sdpAnswerBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + sdpAnswerBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 11; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + public Builder mergeSdpAnswer(fishjam.media_events.server.Server.MediaEvent.SdpAnswer value) { + if (sdpAnswerBuilder_ == null) { + if (contentCase_ == 11 && + content_ != fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.SdpAnswer.newBuilder((fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 11) { + sdpAnswerBuilder_.mergeFrom(value); + } else { + sdpAnswerBuilder_.setMessage(value); + } + } + contentCase_ = 11; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + public Builder clearSdpAnswer() { + if (sdpAnswerBuilder_ == null) { + if (contentCase_ == 11) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 11) { + contentCase_ = 0; + content_ = null; + } + sdpAnswerBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + public fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder getSdpAnswerBuilder() { + return getSdpAnswerFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder getSdpAnswerOrBuilder() { + if ((contentCase_ == 11) && (sdpAnswerBuilder_ != null)) { + return sdpAnswerBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 11) { + return (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_; + } + return fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.SdpAnswer sdp_answer = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.SdpAnswer, fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder, fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder> + getSdpAnswerFieldBuilder() { + if (sdpAnswerBuilder_ == null) { + if (!(contentCase_ == 11)) { + content_ = fishjam.media_events.server.Server.MediaEvent.SdpAnswer.getDefaultInstance(); + } + sdpAnswerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.SdpAnswer, fishjam.media_events.server.Server.MediaEvent.SdpAnswer.Builder, fishjam.media_events.server.Server.MediaEvent.SdpAnswerOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.SdpAnswer) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 11; + onChanged(); + return sdpAnswerBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.VadNotification, fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder, fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder> vadNotificationBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + * @return Whether the vadNotification field is set. + */ + @java.lang.Override + public boolean hasVadNotification() { + return contentCase_ == 12; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + * @return The vadNotification. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotification getVadNotification() { + if (vadNotificationBuilder_ == null) { + if (contentCase_ == 12) { + return (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_; + } + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } else { + if (contentCase_ == 12) { + return vadNotificationBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + public Builder setVadNotification(fishjam.media_events.server.Server.MediaEvent.VadNotification value) { + if (vadNotificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + vadNotificationBuilder_.setMessage(value); + } + contentCase_ = 12; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + public Builder setVadNotification( + fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder builderForValue) { + if (vadNotificationBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + vadNotificationBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 12; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + public Builder mergeVadNotification(fishjam.media_events.server.Server.MediaEvent.VadNotification value) { + if (vadNotificationBuilder_ == null) { + if (contentCase_ == 12 && + content_ != fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.VadNotification.newBuilder((fishjam.media_events.server.Server.MediaEvent.VadNotification) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 12) { + vadNotificationBuilder_.mergeFrom(value); + } else { + vadNotificationBuilder_.setMessage(value); + } + } + contentCase_ = 12; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + public Builder clearVadNotification() { + if (vadNotificationBuilder_ == null) { + if (contentCase_ == 12) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 12) { + contentCase_ = 0; + content_ = null; + } + vadNotificationBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + public fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder getVadNotificationBuilder() { + return getVadNotificationFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder getVadNotificationOrBuilder() { + if ((contentCase_ == 12) && (vadNotificationBuilder_ != null)) { + return vadNotificationBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 12) { + return (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_; + } + return fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.VadNotification vad_notification = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.VadNotification, fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder, fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder> + getVadNotificationFieldBuilder() { + if (vadNotificationBuilder_ == null) { + if (!(contentCase_ == 12)) { + content_ = fishjam.media_events.server.Server.MediaEvent.VadNotification.getDefaultInstance(); + } + vadNotificationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.VadNotification, fishjam.media_events.server.Server.MediaEvent.VadNotification.Builder, fishjam.media_events.server.Server.MediaEvent.VadNotificationOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.VadNotification) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 12; + onChanged(); + return vadNotificationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder> trackVariantSwitchedBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + * @return Whether the trackVariantSwitched field is set. + */ + @java.lang.Override + public boolean hasTrackVariantSwitched() { + return contentCase_ == 13; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + * @return The trackVariantSwitched. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched getTrackVariantSwitched() { + if (trackVariantSwitchedBuilder_ == null) { + if (contentCase_ == 13) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } else { + if (contentCase_ == 13) { + return trackVariantSwitchedBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + public Builder setTrackVariantSwitched(fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched value) { + if (trackVariantSwitchedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + trackVariantSwitchedBuilder_.setMessage(value); + } + contentCase_ = 13; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + public Builder setTrackVariantSwitched( + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder builderForValue) { + if (trackVariantSwitchedBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + trackVariantSwitchedBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 13; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + public Builder mergeTrackVariantSwitched(fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched value) { + if (trackVariantSwitchedBuilder_ == null) { + if (contentCase_ == 13 && + content_ != fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.newBuilder((fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 13) { + trackVariantSwitchedBuilder_.mergeFrom(value); + } else { + trackVariantSwitchedBuilder_.setMessage(value); + } + } + contentCase_ = 13; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + public Builder clearTrackVariantSwitched() { + if (trackVariantSwitchedBuilder_ == null) { + if (contentCase_ == 13) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 13) { + contentCase_ = 0; + content_ = null; + } + trackVariantSwitchedBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder getTrackVariantSwitchedBuilder() { + return getTrackVariantSwitchedFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder getTrackVariantSwitchedOrBuilder() { + if ((contentCase_ == 13) && (trackVariantSwitchedBuilder_ != null)) { + return trackVariantSwitchedBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 13) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantSwitched track_variant_switched = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder> + getTrackVariantSwitchedFieldBuilder() { + if (trackVariantSwitchedBuilder_ == null) { + if (!(contentCase_ == 13)) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.getDefaultInstance(); + } + trackVariantSwitchedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitchedOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.TrackVariantSwitched) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 13; + onChanged(); + return trackVariantSwitchedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder> trackVariantDisabledBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + * @return Whether the trackVariantDisabled field is set. + */ + @java.lang.Override + public boolean hasTrackVariantDisabled() { + return contentCase_ == 14; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + * @return The trackVariantDisabled. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled getTrackVariantDisabled() { + if (trackVariantDisabledBuilder_ == null) { + if (contentCase_ == 14) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } else { + if (contentCase_ == 14) { + return trackVariantDisabledBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + public Builder setTrackVariantDisabled(fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled value) { + if (trackVariantDisabledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + trackVariantDisabledBuilder_.setMessage(value); + } + contentCase_ = 14; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + public Builder setTrackVariantDisabled( + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder builderForValue) { + if (trackVariantDisabledBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + trackVariantDisabledBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 14; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + public Builder mergeTrackVariantDisabled(fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled value) { + if (trackVariantDisabledBuilder_ == null) { + if (contentCase_ == 14 && + content_ != fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.newBuilder((fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 14) { + trackVariantDisabledBuilder_.mergeFrom(value); + } else { + trackVariantDisabledBuilder_.setMessage(value); + } + } + contentCase_ = 14; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + public Builder clearTrackVariantDisabled() { + if (trackVariantDisabledBuilder_ == null) { + if (contentCase_ == 14) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 14) { + contentCase_ = 0; + content_ = null; + } + trackVariantDisabledBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder getTrackVariantDisabledBuilder() { + return getTrackVariantDisabledFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder getTrackVariantDisabledOrBuilder() { + if ((contentCase_ == 14) && (trackVariantDisabledBuilder_ != null)) { + return trackVariantDisabledBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 14) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantDisabled track_variant_disabled = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder> + getTrackVariantDisabledFieldBuilder() { + if (trackVariantDisabledBuilder_ == null) { + if (!(contentCase_ == 14)) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.getDefaultInstance(); + } + trackVariantDisabledBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabledOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.TrackVariantDisabled) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 14; + onChanged(); + return trackVariantDisabledBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder> trackVariantEnabledBuilder_; + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + * @return Whether the trackVariantEnabled field is set. + */ + @java.lang.Override + public boolean hasTrackVariantEnabled() { + return contentCase_ == 15; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + * @return The trackVariantEnabled. + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled getTrackVariantEnabled() { + if (trackVariantEnabledBuilder_ == null) { + if (contentCase_ == 15) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } else { + if (contentCase_ == 15) { + return trackVariantEnabledBuilder_.getMessage(); + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + public Builder setTrackVariantEnabled(fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled value) { + if (trackVariantEnabledBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + trackVariantEnabledBuilder_.setMessage(value); + } + contentCase_ = 15; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + public Builder setTrackVariantEnabled( + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder builderForValue) { + if (trackVariantEnabledBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + trackVariantEnabledBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 15; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + public Builder mergeTrackVariantEnabled(fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled value) { + if (trackVariantEnabledBuilder_ == null) { + if (contentCase_ == 15 && + content_ != fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance()) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.newBuilder((fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 15) { + trackVariantEnabledBuilder_.mergeFrom(value); + } else { + trackVariantEnabledBuilder_.setMessage(value); + } + } + contentCase_ = 15; + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + public Builder clearTrackVariantEnabled() { + if (trackVariantEnabledBuilder_ == null) { + if (contentCase_ == 15) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 15) { + contentCase_ = 0; + content_ = null; + } + trackVariantEnabledBuilder_.clear(); + } + return this; + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder getTrackVariantEnabledBuilder() { + return getTrackVariantEnabledFieldBuilder().getBuilder(); + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder getTrackVariantEnabledOrBuilder() { + if ((contentCase_ == 15) && (trackVariantEnabledBuilder_ != null)) { + return trackVariantEnabledBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 15) { + return (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_; + } + return fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } + } + /** + * .fishjam.media_events.server.MediaEvent.TrackVariantEnabled track_variant_enabled = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder> + getTrackVariantEnabledFieldBuilder() { + if (trackVariantEnabledBuilder_ == null) { + if (!(contentCase_ == 15)) { + content_ = fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.getDefaultInstance(); + } + trackVariantEnabledBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled.Builder, fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabledOrBuilder>( + (fishjam.media_events.server.Server.MediaEvent.TrackVariantEnabled) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 15; + onChanged(); + return trackVariantEnabledBuilder_; + } + + // @@protoc_insertion_point(builder_scope:fishjam.media_events.server.MediaEvent) + } + + // @@protoc_insertion_point(class_scope:fishjam.media_events.server.MediaEvent) + private static final fishjam.media_events.server.Server.MediaEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new fishjam.media_events.server.Server.MediaEvent(); + } + + public static fishjam.media_events.server.Server.MediaEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MediaEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public fishjam.media_events.server.Server.MediaEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Track_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_TrackIdToTrackEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_TrackIdToTrackEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_IceServer_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_IceServer_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_TrackIdToTrackEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_TrackIdToTrackEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Connected_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Connected_EndpointIdToEndpointEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Connected_EndpointIdToEndpointEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_Error_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_Error_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_OfferData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_MidToTrackIdEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_MidToTrackIdEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_VadNotification_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_VadNotification_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n(fishjam/media_events/server/server.pro" + + "to\022\033fishjam.media_events.server\032!fishjam" + + "/media_events/shared.proto\"\332\033\n\nMediaEven" + + "t\022S\n\020endpoint_updated\030\001 \001(\01327.fishjam.me" + + "dia_events.server.MediaEvent.EndpointUpd" + + "atedH\000\022M\n\rtrack_updated\030\002 \001(\01324.fishjam." + + "media_events.server.MediaEvent.TrackUpda" + + "tedH\000\022K\n\014tracks_added\030\003 \001(\01323.fishjam.me" + + "dia_events.server.MediaEvent.TracksAdded" + + "H\000\022O\n\016tracks_removed\030\004 \001(\01325.fishjam.med" + + "ia_events.server.MediaEvent.TracksRemove" + + "dH\000\022O\n\016endpoint_added\030\005 \001(\01325.fishjam.me" + + "dia_events.server.MediaEvent.EndpointAdd" + + "edH\000\022S\n\020endpoint_removed\030\006 \001(\01327.fishjam" + + ".media_events.server.MediaEvent.Endpoint" + + "RemovedH\000\022F\n\tconnected\030\007 \001(\01321.fishjam.m" + + "edia_events.server.MediaEvent.ConnectedH" + + "\000\022>\n\005error\030\010 \001(\0132-.fishjam.media_events." + + "server.MediaEvent.ErrorH\000\022G\n\noffer_data\030" + + "\t \001(\01321.fishjam.media_events.server.Medi" + + "aEvent.OfferDataH\000\0224\n\tcandidate\030\n \001(\0132\037." + + "fishjam.media_events.CandidateH\000\022G\n\nsdp_" + + "answer\030\013 \001(\01321.fishjam.media_events.serv" + + "er.MediaEvent.SdpAnswerH\000\022S\n\020vad_notific" + + "ation\030\014 \001(\01327.fishjam.media_events.serve" + + "r.MediaEvent.VadNotificationH\000\022^\n\026track_" + + "variant_switched\030\r \001(\0132<.fishjam.media_e" + + "vents.server.MediaEvent.TrackVariantSwit" + + "chedH\000\022^\n\026track_variant_disabled\030\016 \001(\0132<" + + ".fishjam.media_events.server.MediaEvent." + + "TrackVariantDisabledH\000\022\\\n\025track_variant_" + + "enabled\030\017 \001(\0132;.fishjam.media_events.ser" + + "ver.MediaEvent.TrackVariantEnabledH\000\032\217\002\n" + + "\005Track\022\025\n\rmetadata_json\030\001 \001(\t\022W\n\020simulca" + + "st_config\030\002 \001(\0132=.fishjam.media_events.s" + + "erver.MediaEvent.Track.SimulcastConfig\032\225" + + "\001\n\017SimulcastConfig\022\017\n\007enabled\030\001 \001(\010\0227\n\020e" + + "nabled_variants\030\002 \003(\0162\035.fishjam.media_ev" + + "ents.Variant\0228\n\021disabled_variants\030\003 \003(\0162" + + "\035.fishjam.media_events.Variant\032\377\001\n\010Endpo" + + "int\022\025\n\rendpoint_type\030\002 \001(\t\022\025\n\rmetadata_j" + + "son\030\003 \001(\t\022_\n\021track_id_to_track\030\004 \003(\0132D.f" + + "ishjam.media_events.server.MediaEvent.En" + + "dpoint.TrackIdToTrackEntry\032d\n\023TrackIdToT" + + "rackEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-." + + "fishjam.media_events.server.MediaEvent.T" + + "rack:\0028\001\032?\n\tIceServer\022\022\n\ncredential\030\001 \001(" + + "\t\022\014\n\004urls\030\002 \003(\t\022\020\n\010username\030\003 \001(\t\032=\n\017End" + + "pointUpdated\022\023\n\013endpoint_id\030\001 \001(\t\022\025\n\rmet" + + "adata_json\030\002 \001(\t\032L\n\014TrackUpdated\022\023\n\013endp" + + "oint_id\030\001 \001(\t\022\020\n\010track_id\030\002 \001(\t\022\025\n\rmetad" + + "ata_json\030\003 \001(\t\032\354\001\n\013TracksAdded\022\023\n\013endpoi" + + "nt_id\030\001 \001(\t\022b\n\021track_id_to_track\030\002 \003(\0132G" + + ".fishjam.media_events.server.MediaEvent." + + "TracksAdded.TrackIdToTrackEntry\032d\n\023Track" + + "IdToTrackEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001" + + "(\0132-.fishjam.media_events.server.MediaEv" + + "ent.Track:\0028\001\0327\n\rTracksRemoved\022\023\n\013endpoi" + + "nt_id\030\001 \001(\t\022\021\n\ttrack_ids\030\002 \003(\t\032;\n\rEndpoi" + + "ntAdded\022\023\n\013endpoint_id\030\001 \001(\t\022\025\n\rmetadata" + + "_json\030\002 \001(\t\032\305\002\n\tConnected\022\023\n\013endpoint_id" + + "\030\001 \001(\t\022l\n\027endpoint_id_to_endpoint\030\002 \003(\0132" + + "K.fishjam.media_events.server.MediaEvent" + + ".Connected.EndpointIdToEndpointEntry\022F\n\013" + + "ice_servers\030\003 \003(\01321.fishjam.media_events" + + ".server.MediaEvent.IceServer\032m\n\031Endpoint" + + "IdToEndpointEntry\022\013\n\003key\030\001 \001(\t\022?\n\005value\030" + + "\002 \001(\01320.fishjam.media_events.server.Medi" + + "aEvent.Endpoint:\0028\001\032&\n\017EndpointRemoved\022\023" + + "\n\013endpoint_id\030\001 \001(\t\032\030\n\005Error\022\017\n\007message\030" + + "\001 \001(\t\032\213\001\n\tOfferData\022R\n\014tracks_types\030\001 \001(" + + "\0132<.fishjam.media_events.server.MediaEve" + + "nt.OfferData.TrackTypes\032*\n\nTrackTypes\022\r\n" + + "\005audio\030\001 \001(\005\022\r\n\005video\030\002 \001(\005\032\253\001\n\tSdpAnswe" + + "r\022\013\n\003sdp\030\001 \001(\t\022\\\n\017mid_to_track_id\030\002 \003(\0132" + + "C.fishjam.media_events.server.MediaEvent" + + ".SdpAnswer.MidToTrackIdEntry\0323\n\021MidToTra" + + "ckIdEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\032\274\001\n\017VadNotification\022\020\n\010track_id\030\001 \001(\t\022" + + "N\n\006status\030\002 \001(\0162>.fishjam.media_events.s" + + "erver.MediaEvent.VadNotification.Status\"" + + "G\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020\000\022\022\n\016STA" + + "TUS_SILENCE\020\001\022\021\n\rSTATUS_SPEECH\020\002\032m\n\024Trac" + + "kVariantSwitched\022\023\n\013endpoint_id\030\001 \001(\t\022\020\n" + + "\010track_id\030\002 \001(\t\022.\n\007variant\030\003 \001(\0162\035.fishj" + + "am.media_events.Variant\032m\n\024TrackVariantD" + + "isabled\022\023\n\013endpoint_id\030\001 \001(\t\022\020\n\010track_id" + + "\030\002 \001(\t\022.\n\007variant\030\003 \001(\0162\035.fishjam.media_" + + "events.Variant\032l\n\023TrackVariantEnabled\022\023\n" + + "\013endpoint_id\030\001 \001(\t\022\020\n\010track_id\030\002 \001(\t\022.\n\007" + + "variant\030\003 \001(\0162\035.fishjam.media_events.Var" + + "iantB\t\n\007contentb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + fishjam.media_events.Shared.getDescriptor(), + }); + internal_static_fishjam_media_events_server_MediaEvent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_descriptor, + new java.lang.String[] { "EndpointUpdated", "TrackUpdated", "TracksAdded", "TracksRemoved", "EndpointAdded", "EndpointRemoved", "Connected", "Error", "OfferData", "Candidate", "SdpAnswer", "VadNotification", "TrackVariantSwitched", "TrackVariantDisabled", "TrackVariantEnabled", "Content", }); + internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_Track_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor, + new java.lang.String[] { "MetadataJson", "SimulcastConfig", }); + internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_Track_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Track_SimulcastConfig_descriptor, + new java.lang.String[] { "Enabled", "EnabledVariants", "DisabledVariants", }); + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(1); + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor, + new java.lang.String[] { "EndpointType", "MetadataJson", "TrackIdToTrack", }); + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_TrackIdToTrackEntry_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_TrackIdToTrackEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Endpoint_TrackIdToTrackEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_server_MediaEvent_IceServer_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(2); + internal_static_fishjam_media_events_server_MediaEvent_IceServer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_IceServer_descriptor, + new java.lang.String[] { "Credential", "Urls", "Username", }); + internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(3); + internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_EndpointUpdated_descriptor, + new java.lang.String[] { "EndpointId", "MetadataJson", }); + internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(4); + internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TrackUpdated_descriptor, + new java.lang.String[] { "EndpointId", "TrackId", "MetadataJson", }); + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(5); + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor, + new java.lang.String[] { "EndpointId", "TrackIdToTrack", }); + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_TrackIdToTrackEntry_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_TrackIdToTrackEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TracksAdded_TrackIdToTrackEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(6); + internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TracksRemoved_descriptor, + new java.lang.String[] { "EndpointId", "TrackIds", }); + internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(7); + internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_EndpointAdded_descriptor, + new java.lang.String[] { "EndpointId", "MetadataJson", }); + internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(8); + internal_static_fishjam_media_events_server_MediaEvent_Connected_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor, + new java.lang.String[] { "EndpointId", "EndpointIdToEndpoint", "IceServers", }); + internal_static_fishjam_media_events_server_MediaEvent_Connected_EndpointIdToEndpointEntry_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_Connected_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_Connected_EndpointIdToEndpointEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Connected_EndpointIdToEndpointEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(9); + internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_EndpointRemoved_descriptor, + new java.lang.String[] { "EndpointId", }); + internal_static_fishjam_media_events_server_MediaEvent_Error_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(10); + internal_static_fishjam_media_events_server_MediaEvent_Error_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_Error_descriptor, + new java.lang.String[] { "Message", }); + internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(11); + internal_static_fishjam_media_events_server_MediaEvent_OfferData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor, + new java.lang.String[] { "TracksTypes", }); + internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_OfferData_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_OfferData_TrackTypes_descriptor, + new java.lang.String[] { "Audio", "Video", }); + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(12); + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor, + new java.lang.String[] { "Sdp", "MidToTrackId", }); + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_MidToTrackIdEntry_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_descriptor.getNestedTypes().get(0); + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_MidToTrackIdEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_SdpAnswer_MidToTrackIdEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_fishjam_media_events_server_MediaEvent_VadNotification_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(13); + internal_static_fishjam_media_events_server_MediaEvent_VadNotification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_VadNotification_descriptor, + new java.lang.String[] { "TrackId", "Status", }); + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(14); + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantSwitched_descriptor, + new java.lang.String[] { "EndpointId", "TrackId", "Variant", }); + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(15); + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantDisabled_descriptor, + new java.lang.String[] { "EndpointId", "TrackId", "Variant", }); + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_descriptor = + internal_static_fishjam_media_events_server_MediaEvent_descriptor.getNestedTypes().get(16); + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_fishjam_media_events_server_MediaEvent_TrackVariantEnabled_descriptor, + new java.lang.String[] { "EndpointId", "TrackId", "Variant", }); + descriptor.resolveAllFeaturesImmutable(); + fishjam.media_events.Shared.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/ServerKt.kt b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/ServerKt.kt new file mode 100644 index 00000000..b0d02db0 --- /dev/null +++ b/packages/android-client/FishjamClient/src/main/java/fishjam/media_events/server/ServerKt.kt @@ -0,0 +1,7 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fishjam/media_events/server/server.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package fishjam.media_events.server; + diff --git a/packages/android-client/FishjamClient/src/test/java/com/fishjamcloud/test/client/EndpointConnectionManagerTest.kt b/packages/android-client/FishjamClient/src/test/java/com/fishjamcloud/test/client/EndpointConnectionManagerTest.kt index 77f12cb2..5cc1c1a7 100644 --- a/packages/android-client/FishjamClient/src/test/java/com/fishjamcloud/test/client/EndpointConnectionManagerTest.kt +++ b/packages/android-client/FishjamClient/src/test/java/com/fishjamcloud/test/client/EndpointConnectionManagerTest.kt @@ -14,6 +14,7 @@ import com.fishjamcloud.client.utils.setLocalDescription import com.fishjamcloud.client.webrtc.PeerConnectionFactoryWrapper import com.fishjamcloud.client.webrtc.PeerConnectionListener import com.fishjamcloud.client.webrtc.PeerConnectionManager +import fishjam.media_events.server.Server import io.mockk.coEvery import io.mockk.every import io.mockk.mockk @@ -69,7 +70,12 @@ class EndpointConnectionManagerTest { @Test fun createsOffer() = runTest { - val offer = manager.getSdpOffer(emptyList(), emptyMap(), emptyList()) + val offer = + manager.getSdpOffer( + Server.MediaEvent.OfferData.TrackTypes + .getDefaultInstance(), + listOf() + ) Assert.assertNotNull(offer) Assert.assertEquals("test_description", offer.description) @@ -80,7 +86,11 @@ class EndpointConnectionManagerTest { fun addsAudioTrack() = runTest { val audioTrack = LocalAudioTrack(mockk(relaxed = true), "endpoint-id", mockk(relaxed = true), mockk(relaxed = true)) - manager.getSdpOffer(emptyList(), emptyMap(), listOf(audioTrack)) + manager.getSdpOffer( + Server.MediaEvent.OfferData.TrackTypes + .getDefaultInstance(), + listOf(audioTrack) + ) verify(exactly = 1) { endpointConnectionMock.addTransceiver( @@ -111,8 +121,11 @@ class EndpointConnectionManagerTest { mockk(relaxed = true), VideoParameters.presetFHD169 ) - - manager.getSdpOffer(emptyList(), emptyMap(), listOf(videoTrack)) + manager.getSdpOffer( + Server.MediaEvent.OfferData.TrackTypes + .getDefaultInstance(), + listOf(videoTrack) + ) verify(exactly = 1) { endpointConnectionMock.addTransceiver( @@ -153,7 +166,11 @@ class EndpointConnectionManagerTest { videoParameters ) - manager.getSdpOffer(emptyList(), emptyMap(), listOf(videoTrack)) + manager.getSdpOffer( + Server.MediaEvent.OfferData.TrackTypes + .getDefaultInstance(), + listOf(videoTrack) + ) verify(exactly = 1) { endpointConnectionMock.addTransceiver( @@ -220,7 +237,11 @@ class EndpointConnectionManagerTest { } } ) - manager.getSdpOffer(emptyList(), emptyMap(), emptyList()) + manager.getSdpOffer( + Server.MediaEvent.OfferData.TrackTypes + .getDefaultInstance(), + listOf() + ) Assert.assertNull("layers have no maxBitrateBps", h.maxBitrateBps) manager.setTrackBandwidth("track_id", TrackBandwidthLimit.BandwidthLimit(1000)) Assert.assertEquals("h layer has correct maxBitrateBps", 780190, h.maxBitrateBps) diff --git a/packages/android-client/build.gradle b/packages/android-client/build.gradle index 6480853e..8489f196 100644 --- a/packages/android-client/build.gradle +++ b/packages/android-client/build.gradle @@ -32,4 +32,5 @@ plugins { id 'org.jetbrains.kotlin.android' version '1.8.0' apply false id 'org.jetbrains.dokka' version '1.8.10' id 'org.jmailen.kotlinter' version "3.14.0" apply false + id 'com.google.protobuf' version "0.9.4" apply false } diff --git a/packages/ios-client/Sources/FishjamClient/FishjamClientInternal.swift b/packages/ios-client/Sources/FishjamClient/FishjamClientInternal.swift index 6070993c..49970ba7 100644 --- a/packages/ios-client/Sources/FishjamClient/FishjamClientInternal.swift +++ b/packages/ios-client/Sources/FishjamClient/FishjamClientInternal.swift @@ -86,11 +86,6 @@ class FishjamClientInternal { func join() { commandsQueue.addCommand( Command(commandName: .JOIN, clientStateAfterCommand: .JOINED) { - self.localEndpoint = self.localEndpoint.copyWith( - metadata: [ - "peer": self.config?.peerMetadata.toDict() as Any, // TODO: Remove after FCE-834 - "server": [:], - ].toMetadata()) self.rtcEngineCommunication.connect(metadata: self.config?.peerMetadata ?? [:].toMetadata()) }) } @@ -294,11 +289,6 @@ class FishjamClientInternal { func updatePeerMetadata(metadata: Metadata) { rtcEngineCommunication.updateEndpointMetadata(metadata: metadata) - localEndpoint = localEndpoint.copyWith( - metadata: [ - "peer": self.config?.peerMetadata.toDict() as Any, // TODO: Remove after FCE-834 - "server": [:], - ].toMetadata()) } func updateTrackMetadata(trackId: String, metadata: Metadata) { @@ -345,14 +335,15 @@ class FishjamClientInternal { self.webSocket?.write(data: peerMessage) } - private func receiveEvent(event: SerializedMediaEvent) { - rtcEngineCommunication.onEvent(serializedEvent: event) + private func receiveEvent(event: Fishjam_MediaEvents_Server_MediaEvent) { + rtcEngineCommunication.onEvent(event: event) } func websocketDidConnect() { let authRequest = Fishjam_PeerMessage.with({ $0.authRequest = Fishjam_PeerMessage.AuthRequest.with({ $0.token = self.config?.token ?? "" + $0.sdkVersion = "mobile-0.6.0" }) }) @@ -369,8 +360,8 @@ class FishjamClientInternal { isAuthenticated = true commandsQueue.finishCommand() join() - } else if case .mediaEvent(_) = peerMessage.content { - receiveEvent(event: peerMessage.mediaEvent.data) + } else if case .serverMediaEvent(_) = peerMessage.content { + receiveEvent(event: peerMessage.serverMediaEvent) } else { sdkLogger.error("Received unexpected websocket message: \(peerMessage)") } @@ -505,6 +496,9 @@ extension FishjamClientInternal: PeerConnectionListener { sdkLogger.error("Invalid rtcEngineId in onAddTrack: \(trackId)") return } + + guard track.endpointId != localEndpoint.id else { return } + let trackId = track.id let endpointId = track.endpointId let rtcEngineId = track.rtcEngineId @@ -542,15 +536,40 @@ extension FishjamClientInternal: PeerConnectionListener { } extension FishjamClientInternal: RTCEngineListener { - func onSendMediaEvent(event: SerializedMediaEvent) { + + func onSendMediaEvent(event: Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content) { if !isAuthenticated { sdkLogger.error("Tried to send media event: \(event) before authentication") return } + let mediaEvent = Fishjam_PeerMessage.with({ - $0.mediaEvent = Fishjam_PeerMessage.MediaEvent.with({ - $0.data = event + $0.peerMediaEvent = Fishjam_MediaEvents_Peer_MediaEvent.with({ + switch event { + case .connect(let connect): + $0.connect = connect + case .disconnect(let disconnect): + $0.disconnect = disconnect + case .updateEndpointMetadata(let updateEndpointMetadata): + $0.updateEndpointMetadata = updateEndpointMetadata + case .updateTrackMetadata(let updateTrackMetadata): + $0.updateTrackMetadata = updateTrackMetadata + case .renegotiateTracks(let renegotiateTracks): + $0.renegotiateTracks = renegotiateTracks + case .candidate(let candidate): + $0.candidate = candidate + case .sdpOffer(let sdpOffer): + $0.sdpOffer = sdpOffer + case .trackBitrates(let trackBitrates): + $0.trackBitrates = trackBitrates + case .enableTrackVariant(let variant): + $0.enableTrackVariant = variant + case .disableTrackVariant(let variant): + $0.disableTrackVariant = variant + case .setTargetTrackVariant(let variant): + $0.setTargetTrackVariant = variant + } }) }) @@ -560,19 +579,33 @@ extension FishjamClientInternal: RTCEngineListener { sendEvent(peerMessage: serialzedData) } - func onConnected(endpointId: String, otherEndpoints: [EventEndpoint]) { + func onConnected( + endpointId: String, endpointIdToEndpoint: [String: Fishjam_MediaEvents_Server_MediaEvent.Endpoint], + iceServers: [Fishjam_MediaEvents_Server_MediaEvent.IceServer] + ) { localEndpoint = localEndpoint.copyWith(id: endpointId) - for eventEndpoint in otherEndpoints { - var endpoint = Endpoint( - id: eventEndpoint.id, - metadata: eventEndpoint.metadata ?? Metadata()) - for (trackId, track) in eventEndpoint.tracks { - let track = Track( - mediaTrack: nil, endpointId: eventEndpoint.id, rtcEngineId: trackId, metadata: track.metadata) - endpoint = endpoint.addOrReplaceTrack(track) - listener.onTrackAdded(track: track) + peerConnectionManager.setupIceServers(iceServers: iceServers) + + for (eventEndpointId, eventEndpoint) in endpointIdToEndpoint { + if eventEndpointId == endpointId { + localEndpoint = localEndpoint.copyWith(metadata: try? AnyJson(from: eventEndpoint.metadataJson)) + } else { + var endpoint = Endpoint( + id: eventEndpointId, + metadata: (try? AnyJson(from: eventEndpoint.metadataJson)) ?? Metadata()) + + for (trackId, track) in eventEndpoint.trackIDToTrack { + let track = Track( + mediaTrack: nil, + endpointId: eventEndpointId, + rtcEngineId: trackId, + metadata: (try? AnyJson(from: track.metadataJson)) ?? Metadata() + ) + endpoint = endpoint.addOrReplaceTrack(track) + listener.onTrackAdded(track: track) + } + remoteEndpointsMap[eventEndpointId] = endpoint } - remoteEndpointsMap[eventEndpoint.id] = endpoint } listener.onJoined(peerID: endpointId, peersInRoom: remoteEndpointsMap) @@ -595,9 +628,8 @@ extension FishjamClientInternal: RTCEngineListener { } func onEndpointAdded(endpointId: String, metadata: Metadata?) { - if endpointId == localEndpoint.id { - return - } + guard endpointId != localEndpoint.id else { return } + let endpoint = Endpoint(id: endpointId, metadata: metadata ?? Metadata()) remoteEndpointsMap[endpoint.id] = endpoint @@ -606,10 +638,11 @@ extension FishjamClientInternal: RTCEngineListener { } func onEndpointRemoved(endpointId: String) { - if endpointId == localEndpoint.id { + guard endpointId != localEndpoint.id else { listener.onDisconnected() return } + guard let endpoint = remoteEndpointsMap.removeValue(forKey: endpointId) else { sdkLogger.error("Failed to process EndpointLeft event: Endpoint not found: \(endpointId)") return @@ -623,27 +656,33 @@ extension FishjamClientInternal: RTCEngineListener { } func onEndpointUpdated(endpointId: String, metadata: Metadata?) { + guard endpointId != localEndpoint.id else { + localEndpoint = localEndpoint.copyWith(metadata: metadata) + listener.onPeerUpdated(endpoint: localEndpoint) + return + } + guard let endpoint = remoteEndpointsMap[endpointId] else { sdkLogger.error("Failed to process EndpointUpdated event: Endpoint not found: $endpointId") return } remoteEndpointsMap[endpoint.id] = endpoint.copyWith(metadata: metadata) - listener.onPeerUpdated(endpoint: endpoint) } - func onOfferData(integratedTurnServers: [OfferDataEvent.TurnServer], tracksTypes: [String: Int]) { + func onOfferData(tracksTypes: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes) { let localTracks = localEndpoint.tracks.map { $1 } peerConnectionManager.getSdpOffer( - integratedTurnServers: integratedTurnServers, tracksTypes: tracksTypes, localTracks: localTracks - ) { sdp, midToTrackId, error in + tracksTypes: tracksTypes, + localTracks: localTracks + ) { sdp, midToTrackId, trackIdToBitrates, error in if let err = error { sdkLogger.error("Failed to create sdp offer: \(err)") return } - if let sdp = sdp, let midToTrackId = midToTrackId { + if let sdp = sdp, let midToTrackId = midToTrackId, let trackIdToBitrates = trackIdToBitrates { self.rtcEngineCommunication.sdpOffer( sdp: sdp, trackIdToTrackMetadata: self.localEndpoint.tracks.reduce(into: [String: Metadata]()) { @@ -651,13 +690,14 @@ extension FishjamClientInternal: RTCEngineListener { let (_, trackData) = trackEntry result[trackData.webrtcId] = trackData.metadata }, - midToTrackId: midToTrackId + midToTrackId: midToTrackId, + trackIdToBitrates: trackIdToBitrates ) } } } - func onSdpAnswer(type: String, sdp: String, midToTrackId: [String: String]) { + func onSdpAnswer(sdp: String, midToTrackId: [String: String]) { peerConnectionManager.onSdpAnswer(sdp: sdp, midToTrackId: midToTrackId) localEndpoint.tracks.values.forEach { track in @@ -692,8 +732,8 @@ extension FishjamClientInternal: RTCEngineListener { peerConnectionManager.onRemoteCandidate(candidate: iceCandidate) } - func onTracksAdded(endpointId: String, tracks: [String: TrackData]) { - if localEndpoint.id == endpointId { return } + func onTracksAdded(endpointId: String, trackIdToTracks: [String: Fishjam_MediaEvents_Server_MediaEvent.Track]) { + guard localEndpoint.id != endpointId else { return } guard let endpoint = remoteEndpointsMap[endpointId] else { sdkLogger.error("Failed to process TracksAdded event: Endpoint not found: \(endpointId)") @@ -702,13 +742,17 @@ extension FishjamClientInternal: RTCEngineListener { var updatedTracks: [String: Track] = endpoint.tracks - for (trackId, trackData) in tracks { + for (trackId, trackData) in trackIdToTracks { var track = endpoint.tracks.values.first(where: { track in track.rtcEngineId == trackId }) if track != nil { - track!.metadata = trackData.metadata + track!.metadata = (try? AnyJson(from: trackData.metadataJson)) ?? Metadata() } else { track = Track( - mediaTrack: nil, endpointId: endpointId, rtcEngineId: trackId, metadata: trackData.metadata) + mediaTrack: nil, + endpointId: endpointId, + rtcEngineId: trackId, + metadata: (try? AnyJson(from: trackData.metadataJson)) ?? Metadata() + ) listener.onTrackAdded(track: track!) } updatedTracks[track!.id] = track @@ -720,7 +764,7 @@ extension FishjamClientInternal: RTCEngineListener { } func onTracksRemoved(endpointId: String, trackIds: [String]) { - if localEndpoint.id == endpointId { return } + guard localEndpoint.id != endpointId else { return } guard var endpoint = remoteEndpointsMap[endpointId] else { sdkLogger.error("Failed to process onTracksRemoved event: Endpoint not found: \(endpointId)") @@ -769,18 +813,14 @@ extension FishjamClientInternal: RTCEngineListener { track.setEncoding(encoding: encodingEnum, encodingReason: encodingReasonEnum) } - func onVadNotification(trackId: String, status: String) { + func onVadNotification(trackId: String, status: Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status) { guard let track = getTrackWithRtcEngineId(trackId: trackId) as? RemoteAudioTrack else { sdkLogger.error("Invalid trackId in onVadNotification: \(trackId)") return } - guard let vadStatus = VadStatus(rawValue: status) else { - sdkLogger.error("Invalid vad status in onVadNotification: \(status)") - return - } - if track.vadStatus != vadStatus { - track.vadStatus = vadStatus + if track.vadStatus != status { + track.vadStatus = status listener.onTrackUpdated(track: track) } diff --git a/packages/ios-client/Sources/FishjamClient/events/Event.swift b/packages/ios-client/Sources/FishjamClient/events/Event.swift deleted file mode 100644 index 74931a59..00000000 --- a/packages/ios-client/Sources/FishjamClient/events/Event.swift +++ /dev/null @@ -1,468 +0,0 @@ -import Foundation - -/// Protocol for outgoing `MembraneRTC` events -public protocol SendableEvent { - func serialize() -> Payload -} - -/// Available types of incoming media events. -public enum ReceivableEventType: String, Codable { - case Connected = "connected" - case EndpointAdded = "endpointAdded" - case EndpointRemoved = "endpointRemoved" - case EndpointUpdated = "endpointUpdated" - case Custom = "custom" - case OfferData = "offerData" - case Candidate = "candidate" - case TracksAdded = "tracksAdded" - case TracksRemoved = "tracksRemoved" - case TrackUpdated = "trackUpdated" - case SdpAnswer = "sdpAnswer" - case EncodingSwitched = "encodingSwitched" - case VadNotification = "vadNotification" - case BandwidthEstimation = "bandwidthEstimation" -} - -/// Protocol for incoming `MembraneRTC` events -public protocol ReceivableEvent { - var type: ReceivableEventType { get } -} - -internal struct ReceivableEventBase: Decodable { - let type: ReceivableEventType -} - -public enum Events { - internal static func decodeEvent(from data: Data) -> T? { - do { - return try JSONDecoder().decode(T.self, from: data) - } catch { - sdkLogger.error("failed to decode an event: \(error)") - return nil - } - } - - /* - Deserialization of incoming events is quite specific. - - Each incoming event is of given format: - ``` - { - "type": "(dedicated event name)", - "data": "arbitrary event's payload object" - } - ``` - - It is quite problematic as we have to decode each event twice. Once to get the event's type, - and when we know the type we can decode the event's data payload (due to static typing - we need to explicitly call decode with generic parameter). - - A subset of events are embeded inside of one specific event of type "custom". - In this case the "data" payload contains a whole new event on its own: - ``` - { - "type": "custom", - "data": { - "type": "(dedicated event name)", - "data": "arbitrary event's payload object" - } - } - ``` - - This time we are basically performing the deserialization 3 times: - - to recognize "custom" type - - to recognize the nested event's type - - to finally deserialize the payload into an explicit event - */ - public static func deserialize(payload: String) -> ReceivableEvent? { - let data = payload.data(using: .utf8)! - - guard let base: ReceivableEventBase = decodeEvent(from: data) else { - sdkLogger.error("Failed to decode ReceivableEventBase") - return nil - } - - switch base.type { - case .Connected: - let event: ConnectedEvent? = decodeEvent(from: data) - - return event - - case .EndpointAdded: - let event: EndpointAddedEvent? = decodeEvent(from: data) - - return event - - case .EndpointRemoved: - let event: EndpointRemovedEvent? = decodeEvent(from: data) - - return event - - case .EndpointUpdated: - let event: EndpointUpdatedEvent? = decodeEvent(from: data) - - return event - - case .TracksAdded: - let event: TracksAddedEvent? = decodeEvent(from: data) - - return event - - case .TracksRemoved: - let event: TracksRemovedEvent? = decodeEvent(from: data) - - return event - - case .TrackUpdated: - let event: TracksUpdatedEvent? = decodeEvent(from: data) - - return event - - case .Custom: - guard let baseEvent: BaseCustomEvent = decodeEvent(from: data) else { - return nil - } - - switch baseEvent.data.type { - case .OfferData: - guard let event: CustomEvent = decodeEvent(from: data) else { - return nil - } - - return event.data - - case .Candidate: - guard let event: CustomEvent = decodeEvent(from: data) else { - return nil - } - - return event.data - - case .SdpAnswer: - guard let event: CustomEvent = decodeEvent(from: data) else { - return nil - } - - return event.data - - case .EncodingSwitched: - guard let event: CustomEvent = decodeEvent(from: data) else { - return nil - } - - return event.data - - case .VadNotification: - guard let event: CustomEvent = decodeEvent(from: data) else { - return nil - } - - return event.data - - case .BandwidthEstimation: - guard let event: CustomEvent = decodeEvent(from: data) else { - return nil - } - - return event.data - - default: - sdkLogger.warning("Unhandled custom event parsing for \(baseEvent.data.type)") - - return nil - } - default: - return nil - } - } -} - -/* - Sendable events - */ -struct ConnectEvent: SendableEvent { - let metadata: Metadata? - - func serialize() -> Payload { - return .init([ - "type": "connect", - "data": ["metadata": metadata], - ]) - } -} - -struct DisconnectEvent: SendableEvent { - func serialize() -> Payload { - .init([ - "type": "disconnect" - ]) - } -} - -struct SdpOfferEvent: SendableEvent { - let sdp: String - let trackIdToTrackMetadata: [String: Metadata?] - let midToTrackId: [String: String] - - func serialize() -> Payload { - return .init([ - "type": "custom", - "data": [ - "type": "sdpOffer", - "data": [ - "sdpOffer": [ - "type": "offer", - "sdp": sdp, - ], - "trackIdToTrackMetadata": trackIdToTrackMetadata, - "midToTrackId": midToTrackId, - ] as [String: Any], - ] as [String: Any], - ]) - } -} - -struct LocalCandidateEvent: SendableEvent { - let candidate: String - let sdpMLineIndex: Int32 - let sdpMid: Int32? - let usernameFragment: String? - - func serialize() -> Payload { - return .init([ - "type": "custom", - "data": [ - "type": "candidate", - "data": [ - "candidate": candidate, - "sdpMLineIndex": sdpMLineIndex, - "sdpMid": sdpMid, - "usernameFragment": usernameFragment, - ] as [String: Any], - ] as [String: Any], - ]) - } -} - -struct RenegotiateTracksEvent: SendableEvent { - func serialize() -> Payload { - return .init([ - "type": "custom", - "data": [ - "type": "renegotiateTracks" - ], - ]) - } -} - -struct SelectEncodingEvent: SendableEvent { - let trackId: String - let encoding: String - - func serialize() -> Payload { - return .init([ - "type": "custom", - "data": [ - "type": "setTargetTrackVariant", - "data": [ - "trackId": trackId, - "variant": encoding, - ], - ] as [String: Any], - ]) - } -} - -struct UpdateEndpointMetadata: SendableEvent { - let metadata: Metadata? - - func serialize() -> Payload { - return .init([ - "type": "updatePeerMetadata", - "data": ["metadata": metadata], - ]) - } -} - -struct UpdateTrackMetadata: SendableEvent { - let trackId: String - let trackMetadata: Metadata? - - func serialize() -> Payload { - return .init([ - "type": "updateTrackMetadata", - "data": ["trackId": trackId, "trackMetadata": trackMetadata!] as [String: Any], - ]) - } -} - -/* - Receivable events - */ -struct EventEndpoint: Codable { - let id: String - let type: String - let metadata: Metadata? - let tracks: [String: TrackData] -} - -struct ConnectedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let id: String - let otherEndpoints: [EventEndpoint] - } - - let type: ReceivableEventType - let data: Data -} - -struct EndpointAddedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let id: String - let metadata: Metadata? - let tracks: [String: TrackData]? - } - - let type: ReceivableEventType - let data: Data -} - -struct EndpointRemovedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let id: String - } - - let type: ReceivableEventType - let data: Data -} - -struct EndpointUpdatedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let endpointId: String - let metadata: Metadata? - } - - let type: ReceivableEventType - let data: Data -} - -struct OfferDataEvent: ReceivableEvent, Codable { - struct TurnServer: Codable { - let username: String - let password: String - let serverAddr: String - let serverPort: UInt32 - let transport: String - } - - struct Data: Codable { - let integratedTurnServers: [TurnServer] - let tracksTypes: [String: Int] - } - - let type: ReceivableEventType - let data: Data -} - -public struct TracksAddedEvent: ReceivableEvent, Codable { - public struct Data: Codable { - let endpointId: String - let tracks: [String: TrackData] - } - - public let type: ReceivableEventType - public let data: Data -} - -struct TracksRemovedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let endpointId: String - let trackIds: [String] - } - - let type: ReceivableEventType - let data: Data -} - -struct TracksUpdatedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let endpointId: String - let trackId: String - let metadata: Metadata? - } - - let type: ReceivableEventType - let data: Data -} - -struct SdpAnswerEvent: ReceivableEvent, Codable { - struct Data: Codable { - let type: String - let sdp: String - let midToTrackId: [String: String] - } - - let type: ReceivableEventType - let data: Data -} - -struct RemoteCandidateEvent: ReceivableEvent, Codable { - struct Data: Codable { - let candidate: String - let sdpMLineIndex: Int32 - let sdpMid: Int32? - let usernameFragment: String? - } - - let type: ReceivableEventType - let data: Data -} - -struct EncodingSwitchedEvent: ReceivableEvent, Codable { - struct Data: Codable { - let endpointId: String - let trackId: String - let encoding: String - let reason: String - } - - let type: ReceivableEventType - let data: Data -} - -struct VadNotificationEvent: ReceivableEvent, Codable { - struct Data: Codable { - let trackId: String - let status: String - } - - let type: ReceivableEventType - let data: Data -} - -struct BandwidthEstimationEvent: ReceivableEvent, Codable { - struct Data: Codable { - let estimation: Double - } - - let type: ReceivableEventType - let data: Data -} - -// This is kinda strange as we can't dynamically decode json strings to structs -// e.g. to [String: Any] type -// Therefore we need to preform a 2-phase decoding, meaning that we need to extract types first -// and then based on them statically decode embedded events -struct BaseCustomEvent: ReceivableEvent, Codable { - struct Data: Codable { - let type: ReceivableEventType - } - - let type: ReceivableEventType - let data: Data -} - -struct CustomEvent: ReceivableEvent, Codable { - let type: ReceivableEventType - let data: EventType -} diff --git a/packages/ios-client/Sources/FishjamClient/media/Tracks/RemoteAudioTrack.swift b/packages/ios-client/Sources/FishjamClient/media/Tracks/RemoteAudioTrack.swift index 67e21e3a..48419299 100644 --- a/packages/ios-client/Sources/FishjamClient/media/Tracks/RemoteAudioTrack.swift +++ b/packages/ios-client/Sources/FishjamClient/media/Tracks/RemoteAudioTrack.swift @@ -11,9 +11,9 @@ public class RemoteAudioTrack: Track { super.init(mediaTrack: audioTrack, endpointId: endpointId, rtcEngineId: rtcEngineId, metadata: metadata, id: id) } - private var _vadStatus: VadStatus = VadStatus.silence + private var _vadStatus: Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status = .silence - internal(set) public var vadStatus: VadStatus { + internal(set) public var vadStatus: Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status { get { return _vadStatus } set { _vadStatus = newValue diff --git a/packages/ios-client/Sources/FishjamClient/models/VadStatus.swift b/packages/ios-client/Sources/FishjamClient/models/VadStatus.swift deleted file mode 100644 index 8766f542..00000000 --- a/packages/ios-client/Sources/FishjamClient/models/VadStatus.swift +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Type describing Voice Activity Detection statuses. - * - * - speech - voice activity has been detected - * - silence - lack of voice activity has been detected - */ -public enum VadStatus: String { - case speech - case silence -} diff --git a/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/peer/peer.pb.swift b/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/peer/peer.pb.swift new file mode 100644 index 00000000..61fca1c1 --- /dev/null +++ b/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/peer/peer.pb.swift @@ -0,0 +1,983 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: fishjam/media_events/peer/peer.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// Defines any type of message sent from Peer to Membrane RTC Engine +public struct Fishjam_MediaEvents_Peer_MediaEvent { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var content: Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content? = nil + + public var connect: Fishjam_MediaEvents_Peer_MediaEvent.Connect { + get { + if case .connect(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.Connect() + } + set {content = .connect(newValue)} + } + + public var disconnect: Fishjam_MediaEvents_Peer_MediaEvent.Disconnect { + get { + if case .disconnect(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.Disconnect() + } + set {content = .disconnect(newValue)} + } + + public var updateEndpointMetadata: Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata { + get { + if case .updateEndpointMetadata(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata() + } + set {content = .updateEndpointMetadata(newValue)} + } + + public var updateTrackMetadata: Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata { + get { + if case .updateTrackMetadata(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata() + } + set {content = .updateTrackMetadata(newValue)} + } + + public var renegotiateTracks: Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks { + get { + if case .renegotiateTracks(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks() + } + set {content = .renegotiateTracks(newValue)} + } + + public var candidate: Fishjam_MediaEvents_Candidate { + get { + if case .candidate(let v)? = content {return v} + return Fishjam_MediaEvents_Candidate() + } + set {content = .candidate(newValue)} + } + + public var sdpOffer: Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer { + get { + if case .sdpOffer(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer() + } + set {content = .sdpOffer(newValue)} + } + + public var trackBitrates: Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates { + get { + if case .trackBitrates(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates() + } + set {content = .trackBitrates(newValue)} + } + + public var enableTrackVariant: Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant { + get { + if case .enableTrackVariant(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant() + } + set {content = .enableTrackVariant(newValue)} + } + + public var disableTrackVariant: Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant { + get { + if case .disableTrackVariant(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant() + } + set {content = .disableTrackVariant(newValue)} + } + + public var setTargetTrackVariant: Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant { + get { + if case .setTargetTrackVariant(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant() + } + set {content = .setTargetTrackVariant(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Content: Equatable { + case connect(Fishjam_MediaEvents_Peer_MediaEvent.Connect) + case disconnect(Fishjam_MediaEvents_Peer_MediaEvent.Disconnect) + case updateEndpointMetadata(Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata) + case updateTrackMetadata(Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata) + case renegotiateTracks(Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks) + case candidate(Fishjam_MediaEvents_Candidate) + case sdpOffer(Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer) + case trackBitrates(Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates) + case enableTrackVariant(Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant) + case disableTrackVariant(Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant) + case setTargetTrackVariant(Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant) + + #if !swift(>=4.1) + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content, rhs: Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.connect, .connect): return { + guard case .connect(let l) = lhs, case .connect(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.disconnect, .disconnect): return { + guard case .disconnect(let l) = lhs, case .disconnect(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.updateEndpointMetadata, .updateEndpointMetadata): return { + guard case .updateEndpointMetadata(let l) = lhs, case .updateEndpointMetadata(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.updateTrackMetadata, .updateTrackMetadata): return { + guard case .updateTrackMetadata(let l) = lhs, case .updateTrackMetadata(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.renegotiateTracks, .renegotiateTracks): return { + guard case .renegotiateTracks(let l) = lhs, case .renegotiateTracks(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.candidate, .candidate): return { + guard case .candidate(let l) = lhs, case .candidate(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.sdpOffer, .sdpOffer): return { + guard case .sdpOffer(let l) = lhs, case .sdpOffer(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.trackBitrates, .trackBitrates): return { + guard case .trackBitrates(let l) = lhs, case .trackBitrates(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.enableTrackVariant, .enableTrackVariant): return { + guard case .enableTrackVariant(let l) = lhs, case .enableTrackVariant(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.disableTrackVariant, .disableTrackVariant): return { + guard case .disableTrackVariant(let l) = lhs, case .disableTrackVariant(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.setTargetTrackVariant, .setTargetTrackVariant): return { + guard case .setTargetTrackVariant(let l) = lhs, case .setTargetTrackVariant(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + public struct VariantBitrate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var bitrate: Int32 = 0 + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when a peer wants to join WebRTC Endpoint. + public struct Connect { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var metadataJson: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when a peer disconnects from WebRTC Endpoint. + public struct Disconnect { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when a peer wants to update its metadata + public struct UpdateEndpointMetadata { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var metadataJson: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when a peer wants to update its track's metadata + public struct UpdateTrackMetadata { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var trackID: String = String() + + public var metadataJson: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when peer wants to renegatiate connection due to adding a track or removing a track + public struct RenegotiateTracks { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent as a response to `offerData` media event during renegotiation + /// Maps contain only information about current peer's `sendonly` tracks. + /// The "mid" is an identifier used to associate an RTP packet with an MLine from the SDP offer/answer. + public struct SdpOffer { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The value of the `sessionDescription.sdp` + public var sdp: String = String() + + public var trackIDToMetadataJson: Dictionary = [:] + + /// Maps track_id to its bitrate. The track_id in the TrackBitrates message is ignored (we use the map key), so it can be ommited. + public var trackIDToBitrates: Dictionary = [:] + + public var midToTrackID: Dictionary = [:] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when Peer wants to update its track's bitrate + public struct TrackBitrates { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var trackID: String = String() + + /// Bitrate of each variant. For non-simulcast tracks use VARIANT_UNSPECIFIED. + public var variantBitrates: [Fishjam_MediaEvents_Peer_MediaEvent.VariantBitrate] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when client disables one of the track variants + public struct DisableTrackVariant { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var trackID: String = String() + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when client enables one of the track variants + public struct EnableTrackVariant { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var trackID: String = String() + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public struct SetTargetTrackVariant { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var trackID: String = String() + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public init() {} +} + +#if swift(>=5.5) && canImport(_Concurrency) +extension Fishjam_MediaEvents_Peer_MediaEvent: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.VariantBitrate: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.Connect: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.Disconnect: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant: @unchecked Sendable {} +extension Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "fishjam.media_events.peer" + +extension Fishjam_MediaEvents_Peer_MediaEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".MediaEvent" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "connect"), + 2: .same(proto: "disconnect"), + 3: .standard(proto: "update_endpoint_metadata"), + 4: .standard(proto: "update_track_metadata"), + 5: .standard(proto: "renegotiate_tracks"), + 6: .same(proto: "candidate"), + 7: .standard(proto: "sdp_offer"), + 8: .standard(proto: "track_bitrates"), + 9: .standard(proto: "enable_track_variant"), + 10: .standard(proto: "disable_track_variant"), + 11: .standard(proto: "set_target_track_variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.Connect? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .connect(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .connect(v) + } + }() + case 2: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.Disconnect? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .disconnect(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .disconnect(v) + } + }() + case 3: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .updateEndpointMetadata(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .updateEndpointMetadata(v) + } + }() + case 4: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .updateTrackMetadata(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .updateTrackMetadata(v) + } + }() + case 5: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .renegotiateTracks(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .renegotiateTracks(v) + } + }() + case 6: try { + var v: Fishjam_MediaEvents_Candidate? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .candidate(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .candidate(v) + } + }() + case 7: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .sdpOffer(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .sdpOffer(v) + } + }() + case 8: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .trackBitrates(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .trackBitrates(v) + } + }() + case 9: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .enableTrackVariant(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .enableTrackVariant(v) + } + }() + case 10: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .disableTrackVariant(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .disableTrackVariant(v) + } + }() + case 11: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .setTargetTrackVariant(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .setTargetTrackVariant(v) + } + }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + switch self.content { + case .connect?: try { + guard case .connect(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .disconnect?: try { + guard case .disconnect(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + }() + case .updateEndpointMetadata?: try { + guard case .updateEndpointMetadata(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + }() + case .updateTrackMetadata?: try { + guard case .updateTrackMetadata(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + }() + case .renegotiateTracks?: try { + guard case .renegotiateTracks(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + }() + case .candidate?: try { + guard case .candidate(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + }() + case .sdpOffer?: try { + guard case .sdpOffer(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + }() + case .trackBitrates?: try { + guard case .trackBitrates(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + }() + case .enableTrackVariant?: try { + guard case .enableTrackVariant(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + }() + case .disableTrackVariant?: try { + guard case .disableTrackVariant(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + }() + case .setTargetTrackVariant?: try { + guard case .setTargetTrackVariant(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent, rhs: Fishjam_MediaEvents_Peer_MediaEvent) -> Bool { + if lhs.content != rhs.content {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.VariantBitrate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".VariantBitrate" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "variant"), + 2: .same(proto: "bitrate"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.bitrate) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 1) + } + if self.bitrate != 0 { + try visitor.visitSingularInt32Field(value: self.bitrate, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.VariantBitrate, rhs: Fishjam_MediaEvents_Peer_MediaEvent.VariantBitrate) -> Bool { + if lhs.variant != rhs.variant {return false} + if lhs.bitrate != rhs.bitrate {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.Connect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".Connect" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "metadata_json"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.Connect, rhs: Fishjam_MediaEvents_Peer_MediaEvent.Connect) -> Bool { + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.Disconnect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".Disconnect" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.Disconnect, rhs: Fishjam_MediaEvents_Peer_MediaEvent.Disconnect) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".UpdateEndpointMetadata" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "metadata_json"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata, rhs: Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata) -> Bool { + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".UpdateTrackMetadata" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "track_id"), + 2: .standard(proto: "metadata_json"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 1) + } + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata, rhs: Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata) -> Bool { + if lhs.trackID != rhs.trackID {return false} + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".RenegotiateTracks" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks, rhs: Fishjam_MediaEvents_Peer_MediaEvent.RenegotiateTracks) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".SdpOffer" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "sdp"), + 2: .standard(proto: "track_id_to_metadata_json"), + 3: .standard(proto: "track_id_to_bitrates"), + 4: .standard(proto: "mid_to_track_id"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.sdp) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.trackIDToMetadataJson) }() + case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.trackIDToBitrates) }() + case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.midToTrackID) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.sdp.isEmpty { + try visitor.visitSingularStringField(value: self.sdp, fieldNumber: 1) + } + if !self.trackIDToMetadataJson.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.trackIDToMetadataJson, fieldNumber: 2) + } + if !self.trackIDToBitrates.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.trackIDToBitrates, fieldNumber: 3) + } + if !self.midToTrackID.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.midToTrackID, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer, rhs: Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer) -> Bool { + if lhs.sdp != rhs.sdp {return false} + if lhs.trackIDToMetadataJson != rhs.trackIDToMetadataJson {return false} + if lhs.trackIDToBitrates != rhs.trackIDToBitrates {return false} + if lhs.midToTrackID != rhs.midToTrackID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".TrackBitrates" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "track_id"), + 2: .standard(proto: "variant_bitrates"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 2: try { try decoder.decodeRepeatedMessageField(value: &self.variantBitrates) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 1) + } + if !self.variantBitrates.isEmpty { + try visitor.visitRepeatedMessageField(value: self.variantBitrates, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates, rhs: Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates) -> Bool { + if lhs.trackID != rhs.trackID {return false} + if lhs.variantBitrates != rhs.variantBitrates {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".DisableTrackVariant" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "track_id"), + 2: .same(proto: "variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 1) + } + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant, rhs: Fishjam_MediaEvents_Peer_MediaEvent.DisableTrackVariant) -> Bool { + if lhs.trackID != rhs.trackID {return false} + if lhs.variant != rhs.variant {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".EnableTrackVariant" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "track_id"), + 2: .same(proto: "variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 1) + } + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant, rhs: Fishjam_MediaEvents_Peer_MediaEvent.EnableTrackVariant) -> Bool { + if lhs.trackID != rhs.trackID {return false} + if lhs.variant != rhs.variant {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Peer_MediaEvent.protoMessageName + ".SetTargetTrackVariant" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "track_id"), + 2: .same(proto: "variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 1) + } + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant, rhs: Fishjam_MediaEvents_Peer_MediaEvent.SetTargetTrackVariant) -> Bool { + if lhs.trackID != rhs.trackID {return false} + if lhs.variant != rhs.variant {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/server/server.pb.swift b/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/server/server.pb.swift new file mode 100644 index 00000000..41ef3cd0 --- /dev/null +++ b/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/server/server.pb.swift @@ -0,0 +1,1700 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: fishjam/media_events/server/server.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// Defines any type of message sent from Membrane RTC Engine to Peer +public struct Fishjam_MediaEvents_Server_MediaEvent { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var content: Fishjam_MediaEvents_Server_MediaEvent.OneOf_Content? = nil + + public var endpointUpdated: Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated { + get { + if case .endpointUpdated(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated() + } + set {content = .endpointUpdated(newValue)} + } + + public var trackUpdated: Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated { + get { + if case .trackUpdated(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated() + } + set {content = .trackUpdated(newValue)} + } + + public var tracksAdded: Fishjam_MediaEvents_Server_MediaEvent.TracksAdded { + get { + if case .tracksAdded(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.TracksAdded() + } + set {content = .tracksAdded(newValue)} + } + + public var tracksRemoved: Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved { + get { + if case .tracksRemoved(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved() + } + set {content = .tracksRemoved(newValue)} + } + + public var endpointAdded: Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded { + get { + if case .endpointAdded(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded() + } + set {content = .endpointAdded(newValue)} + } + + public var endpointRemoved: Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved { + get { + if case .endpointRemoved(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved() + } + set {content = .endpointRemoved(newValue)} + } + + public var connected: Fishjam_MediaEvents_Server_MediaEvent.Connected { + get { + if case .connected(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.Connected() + } + set {content = .connected(newValue)} + } + + public var error: Fishjam_MediaEvents_Server_MediaEvent.Error { + get { + if case .error(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.Error() + } + set {content = .error(newValue)} + } + + public var offerData: Fishjam_MediaEvents_Server_MediaEvent.OfferData { + get { + if case .offerData(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.OfferData() + } + set {content = .offerData(newValue)} + } + + public var candidate: Fishjam_MediaEvents_Candidate { + get { + if case .candidate(let v)? = content {return v} + return Fishjam_MediaEvents_Candidate() + } + set {content = .candidate(newValue)} + } + + public var sdpAnswer: Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer { + get { + if case .sdpAnswer(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer() + } + set {content = .sdpAnswer(newValue)} + } + + public var vadNotification: Fishjam_MediaEvents_Server_MediaEvent.VadNotification { + get { + if case .vadNotification(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.VadNotification() + } + set {content = .vadNotification(newValue)} + } + + public var trackVariantSwitched: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched { + get { + if case .trackVariantSwitched(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched() + } + set {content = .trackVariantSwitched(newValue)} + } + + public var trackVariantDisabled: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled { + get { + if case .trackVariantDisabled(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled() + } + set {content = .trackVariantDisabled(newValue)} + } + + public var trackVariantEnabled: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled { + get { + if case .trackVariantEnabled(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled() + } + set {content = .trackVariantEnabled(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Content: Equatable { + case endpointUpdated(Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated) + case trackUpdated(Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated) + case tracksAdded(Fishjam_MediaEvents_Server_MediaEvent.TracksAdded) + case tracksRemoved(Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved) + case endpointAdded(Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded) + case endpointRemoved(Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved) + case connected(Fishjam_MediaEvents_Server_MediaEvent.Connected) + case error(Fishjam_MediaEvents_Server_MediaEvent.Error) + case offerData(Fishjam_MediaEvents_Server_MediaEvent.OfferData) + case candidate(Fishjam_MediaEvents_Candidate) + case sdpAnswer(Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer) + case vadNotification(Fishjam_MediaEvents_Server_MediaEvent.VadNotification) + case trackVariantSwitched(Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched) + case trackVariantDisabled(Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled) + case trackVariantEnabled(Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled) + + #if !swift(>=4.1) + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.OneOf_Content, rhs: Fishjam_MediaEvents_Server_MediaEvent.OneOf_Content) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.endpointUpdated, .endpointUpdated): return { + guard case .endpointUpdated(let l) = lhs, case .endpointUpdated(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.trackUpdated, .trackUpdated): return { + guard case .trackUpdated(let l) = lhs, case .trackUpdated(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.tracksAdded, .tracksAdded): return { + guard case .tracksAdded(let l) = lhs, case .tracksAdded(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.tracksRemoved, .tracksRemoved): return { + guard case .tracksRemoved(let l) = lhs, case .tracksRemoved(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.endpointAdded, .endpointAdded): return { + guard case .endpointAdded(let l) = lhs, case .endpointAdded(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.endpointRemoved, .endpointRemoved): return { + guard case .endpointRemoved(let l) = lhs, case .endpointRemoved(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.connected, .connected): return { + guard case .connected(let l) = lhs, case .connected(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.error, .error): return { + guard case .error(let l) = lhs, case .error(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.offerData, .offerData): return { + guard case .offerData(let l) = lhs, case .offerData(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.candidate, .candidate): return { + guard case .candidate(let l) = lhs, case .candidate(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.sdpAnswer, .sdpAnswer): return { + guard case .sdpAnswer(let l) = lhs, case .sdpAnswer(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.vadNotification, .vadNotification): return { + guard case .vadNotification(let l) = lhs, case .vadNotification(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.trackVariantSwitched, .trackVariantSwitched): return { + guard case .trackVariantSwitched(let l) = lhs, case .trackVariantSwitched(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.trackVariantDisabled, .trackVariantDisabled): return { + guard case .trackVariantDisabled(let l) = lhs, case .trackVariantDisabled(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.trackVariantEnabled, .trackVariantEnabled): return { + guard case .trackVariantEnabled(let l) = lhs, case .trackVariantEnabled(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + + /// SCHEMAS + public struct Track { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var metadataJson: String = String() + + public var simulcastConfig: Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig { + get {return _simulcastConfig ?? Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig()} + set {_simulcastConfig = newValue} + } + /// Returns true if `simulcastConfig` has been explicitly set. + public var hasSimulcastConfig: Bool {return self._simulcastConfig != nil} + /// Clears the value of `simulcastConfig`. Subsequent reads from it will return its default value. + public mutating func clearSimulcastConfig() {self._simulcastConfig = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public struct SimulcastConfig { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var enabled: Bool = false + + public var enabledVariants: [Fishjam_MediaEvents_Variant] = [] + + public var disabledVariants: [Fishjam_MediaEvents_Variant] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public init() {} + + fileprivate var _simulcastConfig: Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig? = nil + } + + public struct Endpoint { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointType: String = String() + + public var metadataJson: String = String() + + public var trackIDToTrack: Dictionary = [:] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public struct IceServer { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var credential: String = String() + + public var urls: [String] = [] + + public var username: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when metadata of one of the endpoints was updated + public struct EndpointUpdated { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var metadataJson: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when metadata of one of the tracks was updated + public struct TrackUpdated { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var trackID: String = String() + + public var metadataJson: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to informs that one of the peers has added one or more tracks. + public struct TracksAdded { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var trackIDToTrack: Dictionary = [:] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to informs that one of the peers has removed one or more tracks. + public struct TracksRemoved { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var trackIds: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to all peers in the room after a new endpoint was added. + public struct EndpointAdded { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var metadataJson: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to the peer after connecting to the WebRTC Endpoint. + public struct Connected { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var endpointIDToEndpoint: Dictionary = [:] + + public var iceServers: [Fishjam_MediaEvents_Server_MediaEvent.IceServer] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to all remaining peers in the room after some endpoint was removed. + public struct EndpointRemoved { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to inform that an error occurred on the server providing a message to show + public struct Error { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var message: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to inform about the number of audio and video tracks that will be sent from the engine to the peer + public struct OfferData { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var tracksTypes: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes { + get {return _tracksTypes ?? Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes()} + set {_tracksTypes = newValue} + } + /// Returns true if `tracksTypes` has been explicitly set. + public var hasTracksTypes: Bool {return self._tracksTypes != nil} + /// Clears the value of `tracksTypes`. Subsequent reads from it will return its default value. + public mutating func clearTracksTypes() {self._tracksTypes = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public struct TrackTypes { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var audio: Int32 = 0 + + public var video: Int32 = 0 + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public init() {} + + fileprivate var _tracksTypes: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes? = nil + } + + /// Sent after receiving `SdpOffer` from Peer + public struct SdpAnswer { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The value of the `sessionDescription.sdp` + public var sdp: String = String() + + public var midToTrackID: Dictionary = [:] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent to inform that the track denoted by `trackId` has changed their voice actiivty + /// For this notification to work, the server must be configured to use VAD extension + /// and the sender must support it. + public struct VadNotification { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var trackID: String = String() + + public var status: Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum Status: SwiftProtobuf.Enum { + public typealias RawValue = Int + case unspecified // = 0 + case silence // = 1 + case speech // = 2 + case UNRECOGNIZED(Int) + + public init() { + self = .unspecified + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .unspecified + case 1: self = .silence + case 2: self = .speech + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .unspecified: return 0 + case .silence: return 1 + case .speech: return 2 + case .UNRECOGNIZED(let i): return i + } + } + + } + + public init() {} + } + + /// Informs that track's variant has been changed + public struct TrackVariantSwitched { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var trackID: String = String() + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when track's variant has been disabled + public struct TrackVariantDisabled { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var trackID: String = String() + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + /// Sent when track's variant has been enabled + public struct TrackVariantEnabled { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var endpointID: String = String() + + public var trackID: String = String() + + public var variant: Fishjam_MediaEvents_Variant = .unspecified + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public init() {} +} + +#if swift(>=4.2) + +extension Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status] = [ + .unspecified, + .silence, + .speech, + ] +} + +#endif // swift(>=4.2) + +#if swift(>=5.5) && canImport(_Concurrency) +extension Fishjam_MediaEvents_Server_MediaEvent: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.OneOf_Content: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.Track: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.Endpoint: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.IceServer: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.TracksAdded: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.Connected: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.Error: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.OfferData: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.VadNotification: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled: @unchecked Sendable {} +extension Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "fishjam.media_events.server" + +extension Fishjam_MediaEvents_Server_MediaEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".MediaEvent" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_updated"), + 2: .standard(proto: "track_updated"), + 3: .standard(proto: "tracks_added"), + 4: .standard(proto: "tracks_removed"), + 5: .standard(proto: "endpoint_added"), + 6: .standard(proto: "endpoint_removed"), + 7: .same(proto: "connected"), + 8: .same(proto: "error"), + 9: .standard(proto: "offer_data"), + 10: .same(proto: "candidate"), + 11: .standard(proto: "sdp_answer"), + 12: .standard(proto: "vad_notification"), + 13: .standard(proto: "track_variant_switched"), + 14: .standard(proto: "track_variant_disabled"), + 15: .standard(proto: "track_variant_enabled"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .endpointUpdated(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .endpointUpdated(v) + } + }() + case 2: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .trackUpdated(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .trackUpdated(v) + } + }() + case 3: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.TracksAdded? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .tracksAdded(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .tracksAdded(v) + } + }() + case 4: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .tracksRemoved(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .tracksRemoved(v) + } + }() + case 5: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .endpointAdded(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .endpointAdded(v) + } + }() + case 6: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .endpointRemoved(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .endpointRemoved(v) + } + }() + case 7: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.Connected? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .connected(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .connected(v) + } + }() + case 8: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.Error? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .error(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .error(v) + } + }() + case 9: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.OfferData? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .offerData(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .offerData(v) + } + }() + case 10: try { + var v: Fishjam_MediaEvents_Candidate? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .candidate(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .candidate(v) + } + }() + case 11: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .sdpAnswer(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .sdpAnswer(v) + } + }() + case 12: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.VadNotification? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .vadNotification(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .vadNotification(v) + } + }() + case 13: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .trackVariantSwitched(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .trackVariantSwitched(v) + } + }() + case 14: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .trackVariantDisabled(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .trackVariantDisabled(v) + } + }() + case 15: try { + var v: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .trackVariantEnabled(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .trackVariantEnabled(v) + } + }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + switch self.content { + case .endpointUpdated?: try { + guard case .endpointUpdated(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + }() + case .trackUpdated?: try { + guard case .trackUpdated(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + }() + case .tracksAdded?: try { + guard case .tracksAdded(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + }() + case .tracksRemoved?: try { + guard case .tracksRemoved(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + }() + case .endpointAdded?: try { + guard case .endpointAdded(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + }() + case .endpointRemoved?: try { + guard case .endpointRemoved(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + }() + case .connected?: try { + guard case .connected(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + }() + case .error?: try { + guard case .error(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + }() + case .offerData?: try { + guard case .offerData(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + }() + case .candidate?: try { + guard case .candidate(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + }() + case .sdpAnswer?: try { + guard case .sdpAnswer(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + }() + case .vadNotification?: try { + guard case .vadNotification(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + }() + case .trackVariantSwitched?: try { + guard case .trackVariantSwitched(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + }() + case .trackVariantDisabled?: try { + guard case .trackVariantDisabled(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 14) + }() + case .trackVariantEnabled?: try { + guard case .trackVariantEnabled(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + }() + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent, rhs: Fishjam_MediaEvents_Server_MediaEvent) -> Bool { + if lhs.content != rhs.content {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.Track: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".Track" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "metadata_json"), + 2: .standard(proto: "simulcast_config"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._simulcastConfig) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 1) + } + try { if let v = self._simulcastConfig { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.Track, rhs: Fishjam_MediaEvents_Server_MediaEvent.Track) -> Bool { + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs._simulcastConfig != rhs._simulcastConfig {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.Track.protoMessageName + ".SimulcastConfig" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "enabled"), + 2: .standard(proto: "enabled_variants"), + 3: .standard(proto: "disabled_variants"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self.enabled) }() + case 2: try { try decoder.decodeRepeatedEnumField(value: &self.enabledVariants) }() + case 3: try { try decoder.decodeRepeatedEnumField(value: &self.disabledVariants) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.enabled != false { + try visitor.visitSingularBoolField(value: self.enabled, fieldNumber: 1) + } + if !self.enabledVariants.isEmpty { + try visitor.visitPackedEnumField(value: self.enabledVariants, fieldNumber: 2) + } + if !self.disabledVariants.isEmpty { + try visitor.visitPackedEnumField(value: self.disabledVariants, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig, rhs: Fishjam_MediaEvents_Server_MediaEvent.Track.SimulcastConfig) -> Bool { + if lhs.enabled != rhs.enabled {return false} + if lhs.enabledVariants != rhs.enabledVariants {return false} + if lhs.disabledVariants != rhs.disabledVariants {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.Endpoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".Endpoint" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 2: .standard(proto: "endpoint_type"), + 3: .standard(proto: "metadata_json"), + 4: .standard(proto: "track_id_to_track"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 2: try { try decoder.decodeSingularStringField(value: &self.endpointType) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.trackIDToTrack) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointType.isEmpty { + try visitor.visitSingularStringField(value: self.endpointType, fieldNumber: 2) + } + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 3) + } + if !self.trackIDToTrack.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.trackIDToTrack, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.Endpoint, rhs: Fishjam_MediaEvents_Server_MediaEvent.Endpoint) -> Bool { + if lhs.endpointType != rhs.endpointType {return false} + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.trackIDToTrack != rhs.trackIDToTrack {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.IceServer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".IceServer" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "credential"), + 2: .same(proto: "urls"), + 3: .same(proto: "username"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.credential) }() + case 2: try { try decoder.decodeRepeatedStringField(value: &self.urls) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.username) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.credential.isEmpty { + try visitor.visitSingularStringField(value: self.credential, fieldNumber: 1) + } + if !self.urls.isEmpty { + try visitor.visitRepeatedStringField(value: self.urls, fieldNumber: 2) + } + if !self.username.isEmpty { + try visitor.visitSingularStringField(value: self.username, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.IceServer, rhs: Fishjam_MediaEvents_Server_MediaEvent.IceServer) -> Bool { + if lhs.credential != rhs.credential {return false} + if lhs.urls != rhs.urls {return false} + if lhs.username != rhs.username {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".EndpointUpdated" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "metadata_json"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated, rhs: Fishjam_MediaEvents_Server_MediaEvent.EndpointUpdated) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".TrackUpdated" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "track_id"), + 3: .standard(proto: "metadata_json"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 2) + } + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated, rhs: Fishjam_MediaEvents_Server_MediaEvent.TrackUpdated) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.trackID != rhs.trackID {return false} + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.TracksAdded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".TracksAdded" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "track_id_to_track"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.trackIDToTrack) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.trackIDToTrack.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.trackIDToTrack, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.TracksAdded, rhs: Fishjam_MediaEvents_Server_MediaEvent.TracksAdded) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.trackIDToTrack != rhs.trackIDToTrack {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".TracksRemoved" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "track_ids"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeRepeatedStringField(value: &self.trackIds) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.trackIds.isEmpty { + try visitor.visitRepeatedStringField(value: self.trackIds, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved, rhs: Fishjam_MediaEvents_Server_MediaEvent.TracksRemoved) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.trackIds != rhs.trackIds {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".EndpointAdded" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "metadata_json"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.metadataJson) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.metadataJson.isEmpty { + try visitor.visitSingularStringField(value: self.metadataJson, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded, rhs: Fishjam_MediaEvents_Server_MediaEvent.EndpointAdded) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.metadataJson != rhs.metadataJson {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.Connected: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".Connected" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "endpoint_id_to_endpoint"), + 3: .standard(proto: "ice_servers"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.endpointIDToEndpoint) }() + case 3: try { try decoder.decodeRepeatedMessageField(value: &self.iceServers) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.endpointIDToEndpoint.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.endpointIDToEndpoint, fieldNumber: 2) + } + if !self.iceServers.isEmpty { + try visitor.visitRepeatedMessageField(value: self.iceServers, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.Connected, rhs: Fishjam_MediaEvents_Server_MediaEvent.Connected) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.endpointIDToEndpoint != rhs.endpointIDToEndpoint {return false} + if lhs.iceServers != rhs.iceServers {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".EndpointRemoved" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved, rhs: Fishjam_MediaEvents_Server_MediaEvent.EndpointRemoved) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.Error: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".Error" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "message"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.message) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.message.isEmpty { + try visitor.visitSingularStringField(value: self.message, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.Error, rhs: Fishjam_MediaEvents_Server_MediaEvent.Error) -> Bool { + if lhs.message != rhs.message {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.OfferData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".OfferData" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "tracks_types"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._tracksTypes) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._tracksTypes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.OfferData, rhs: Fishjam_MediaEvents_Server_MediaEvent.OfferData) -> Bool { + if lhs._tracksTypes != rhs._tracksTypes {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.OfferData.protoMessageName + ".TrackTypes" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "audio"), + 2: .same(proto: "video"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self.audio) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.video) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.audio != 0 { + try visitor.visitSingularInt32Field(value: self.audio, fieldNumber: 1) + } + if self.video != 0 { + try visitor.visitSingularInt32Field(value: self.video, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes, rhs: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes) -> Bool { + if lhs.audio != rhs.audio {return false} + if lhs.video != rhs.video {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".SdpAnswer" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "sdp"), + 2: .standard(proto: "mid_to_track_id"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.sdp) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.midToTrackID) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.sdp.isEmpty { + try visitor.visitSingularStringField(value: self.sdp, fieldNumber: 1) + } + if !self.midToTrackID.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.midToTrackID, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer, rhs: Fishjam_MediaEvents_Server_MediaEvent.SdpAnswer) -> Bool { + if lhs.sdp != rhs.sdp {return false} + if lhs.midToTrackID != rhs.midToTrackID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.VadNotification: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".VadNotification" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "track_id"), + 2: .same(proto: "status"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self.status) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 1) + } + if self.status != .unspecified { + try visitor.visitSingularEnumField(value: self.status, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.VadNotification, rhs: Fishjam_MediaEvents_Server_MediaEvent.VadNotification) -> Bool { + if lhs.trackID != rhs.trackID {return false} + if lhs.status != rhs.status {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "STATUS_UNSPECIFIED"), + 1: .same(proto: "STATUS_SILENCE"), + 2: .same(proto: "STATUS_SPEECH"), + ] +} + +extension Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".TrackVariantSwitched" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "track_id"), + 3: .same(proto: "variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 3: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 2) + } + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched, rhs: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantSwitched) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.trackID != rhs.trackID {return false} + if lhs.variant != rhs.variant {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".TrackVariantDisabled" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "track_id"), + 3: .same(proto: "variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 3: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 2) + } + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled, rhs: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantDisabled) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.trackID != rhs.trackID {return false} + if lhs.variant != rhs.variant {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_MediaEvents_Server_MediaEvent.protoMessageName + ".TrackVariantEnabled" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "track_id"), + 3: .same(proto: "variant"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.endpointID) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.trackID) }() + case 3: try { try decoder.decodeSingularEnumField(value: &self.variant) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.endpointID.isEmpty { + try visitor.visitSingularStringField(value: self.endpointID, fieldNumber: 1) + } + if !self.trackID.isEmpty { + try visitor.visitSingularStringField(value: self.trackID, fieldNumber: 2) + } + if self.variant != .unspecified { + try visitor.visitSingularEnumField(value: self.variant, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled, rhs: Fishjam_MediaEvents_Server_MediaEvent.TrackVariantEnabled) -> Bool { + if lhs.endpointID != rhs.endpointID {return false} + if lhs.trackID != rhs.trackID {return false} + if lhs.variant != rhs.variant {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/shared.pb.swift b/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/shared.pb.swift new file mode 100644 index 00000000..d3fb11c1 --- /dev/null +++ b/packages/ios-client/Sources/FishjamClient/protos/fishjam/media_events/shared.pb.swift @@ -0,0 +1,156 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: fishjam/media_events/shared.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public enum Fishjam_MediaEvents_Variant: SwiftProtobuf.Enum { + public typealias RawValue = Int + case unspecified // = 0 + case low // = 1 + case medium // = 2 + case high // = 3 + case UNRECOGNIZED(Int) + + public init() { + self = .unspecified + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .unspecified + case 1: self = .low + case 2: self = .medium + case 3: self = .high + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .unspecified: return 0 + case .low: return 1 + case .medium: return 2 + case .high: return 3 + case .UNRECOGNIZED(let i): return i + } + } + +} + +#if swift(>=4.2) + +extension Fishjam_MediaEvents_Variant: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Fishjam_MediaEvents_Variant] = [ + .unspecified, + .low, + .medium, + .high, + ] +} + +#endif // swift(>=4.2) + +/// Contains information about an ICE candidate which will be sent to the peer/server +public struct Fishjam_MediaEvents_Candidate { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var candidate: String = String() + + public var sdpMLineIndex: Int32 = 0 + + public var sdpMid: String = String() + + public var usernameFragment: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} +} + +#if swift(>=5.5) && canImport(_Concurrency) +extension Fishjam_MediaEvents_Variant: @unchecked Sendable {} +extension Fishjam_MediaEvents_Candidate: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "fishjam.media_events" + +extension Fishjam_MediaEvents_Variant: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "VARIANT_UNSPECIFIED"), + 1: .same(proto: "VARIANT_LOW"), + 2: .same(proto: "VARIANT_MEDIUM"), + 3: .same(proto: "VARIANT_HIGH"), + ] +} + +extension Fishjam_MediaEvents_Candidate: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = _protobuf_package + ".Candidate" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "candidate"), + 2: .standard(proto: "sdp_m_line_index"), + 3: .standard(proto: "sdp_mid"), + 4: .standard(proto: "username_fragment"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.candidate) }() + case 2: try { try decoder.decodeSingularInt32Field(value: &self.sdpMLineIndex) }() + case 3: try { try decoder.decodeSingularStringField(value: &self.sdpMid) }() + case 4: try { try decoder.decodeSingularStringField(value: &self.usernameFragment) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.candidate.isEmpty { + try visitor.visitSingularStringField(value: self.candidate, fieldNumber: 1) + } + if self.sdpMLineIndex != 0 { + try visitor.visitSingularInt32Field(value: self.sdpMLineIndex, fieldNumber: 2) + } + if !self.sdpMid.isEmpty { + try visitor.visitSingularStringField(value: self.sdpMid, fieldNumber: 3) + } + if !self.usernameFragment.isEmpty { + try visitor.visitSingularStringField(value: self.usernameFragment, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Fishjam_MediaEvents_Candidate, rhs: Fishjam_MediaEvents_Candidate) -> Bool { + if lhs.candidate != rhs.candidate {return false} + if lhs.sdpMLineIndex != rhs.sdpMLineIndex {return false} + if lhs.sdpMid != rhs.sdpMid {return false} + if lhs.usernameFragment != rhs.usernameFragment {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/packages/ios-client/Sources/FishjamClient/protos/fishjam/peer_notifications.pb.swift b/packages/ios-client/Sources/FishjamClient/protos/fishjam/peer_notifications.pb.swift index 9f11cdf4..956a7cda 100644 --- a/packages/ios-client/Sources/FishjamClient/protos/fishjam/peer_notifications.pb.swift +++ b/packages/ios-client/Sources/FishjamClient/protos/fishjam/peer_notifications.pb.swift @@ -21,14 +21,14 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// Defines any type of message sent between FJ and a peer -struct Fishjam_PeerMessage { +public struct Fishjam_PeerMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var content: Fishjam_PeerMessage.OneOf_Content? = nil + public var content: Fishjam_PeerMessage.OneOf_Content? = nil - var authenticated: Fishjam_PeerMessage.Authenticated { + public var authenticated: Fishjam_PeerMessage.Authenticated { get { if case .authenticated(let v)? = content {return v} return Fishjam_PeerMessage.Authenticated() @@ -36,7 +36,7 @@ struct Fishjam_PeerMessage { set {content = .authenticated(newValue)} } - var authRequest: Fishjam_PeerMessage.AuthRequest { + public var authRequest: Fishjam_PeerMessage.AuthRequest { get { if case .authRequest(let v)? = content {return v} return Fishjam_PeerMessage.AuthRequest() @@ -44,7 +44,7 @@ struct Fishjam_PeerMessage { set {content = .authRequest(newValue)} } - var mediaEvent: Fishjam_PeerMessage.MediaEvent { + public var mediaEvent: Fishjam_PeerMessage.MediaEvent { get { if case .mediaEvent(let v)? = content {return v} return Fishjam_PeerMessage.MediaEvent() @@ -52,7 +52,7 @@ struct Fishjam_PeerMessage { set {content = .mediaEvent(newValue)} } - var rtcStatsReport: Fishjam_PeerMessage.RTCStatsReport { + public var rtcStatsReport: Fishjam_PeerMessage.RTCStatsReport { get { if case .rtcStatsReport(let v)? = content {return v} return Fishjam_PeerMessage.RTCStatsReport() @@ -60,16 +60,34 @@ struct Fishjam_PeerMessage { set {content = .rtcStatsReport(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var peerMediaEvent: Fishjam_MediaEvents_Peer_MediaEvent { + get { + if case .peerMediaEvent(let v)? = content {return v} + return Fishjam_MediaEvents_Peer_MediaEvent() + } + set {content = .peerMediaEvent(newValue)} + } + + public var serverMediaEvent: Fishjam_MediaEvents_Server_MediaEvent { + get { + if case .serverMediaEvent(let v)? = content {return v} + return Fishjam_MediaEvents_Server_MediaEvent() + } + set {content = .serverMediaEvent(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Content: Equatable { + public enum OneOf_Content: Equatable { case authenticated(Fishjam_PeerMessage.Authenticated) case authRequest(Fishjam_PeerMessage.AuthRequest) case mediaEvent(Fishjam_PeerMessage.MediaEvent) case rtcStatsReport(Fishjam_PeerMessage.RTCStatsReport) + case peerMediaEvent(Fishjam_MediaEvents_Peer_MediaEvent) + case serverMediaEvent(Fishjam_MediaEvents_Server_MediaEvent) #if !swift(>=4.1) - static func ==(lhs: Fishjam_PeerMessage.OneOf_Content, rhs: Fishjam_PeerMessage.OneOf_Content) -> Bool { + public static func ==(lhs: Fishjam_PeerMessage.OneOf_Content, rhs: Fishjam_PeerMessage.OneOf_Content) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -90,6 +108,14 @@ struct Fishjam_PeerMessage { guard case .rtcStatsReport(let l) = lhs, case .rtcStatsReport(let r) = rhs else { preconditionFailure() } return l == r }() + case (.peerMediaEvent, .peerMediaEvent): return { + guard case .peerMediaEvent(let l) = lhs, case .peerMediaEvent(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.serverMediaEvent, .serverMediaEvent): return { + guard case .serverMediaEvent(let l) = lhs, case .serverMediaEvent(let r) = rhs else { preconditionFailure() } + return l == r + }() default: return false } } @@ -97,57 +123,59 @@ struct Fishjam_PeerMessage { } /// Response sent by FJ, confirming successfull authentication - struct Authenticated { + public struct Authenticated { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Request sent by peer, to authenticate to FJ server - struct AuthRequest { + public struct AuthRequest { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var token: String = String() + public var token: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var sdkVersion: String = String() - init() {} + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} } - /// Any type of WebRTC messages passed betweend FJ and peer - struct MediaEvent { + /// PeerConnection stats sent by peer + /// https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types + public struct RTCStatsReport { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var data: String = String() + public var data: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - /// PeerConnection stats sent by peer - /// https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_types - struct RTCStatsReport { + /// Any type of WebRTC messages passed betweend FJ and peer + public struct MediaEvent { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var data: String = String() + public var data: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - init() {} + public init() {} } #if swift(>=5.5) && canImport(_Concurrency) @@ -155,8 +183,8 @@ extension Fishjam_PeerMessage: @unchecked Sendable {} extension Fishjam_PeerMessage.OneOf_Content: @unchecked Sendable {} extension Fishjam_PeerMessage.Authenticated: @unchecked Sendable {} extension Fishjam_PeerMessage.AuthRequest: @unchecked Sendable {} -extension Fishjam_PeerMessage.MediaEvent: @unchecked Sendable {} extension Fishjam_PeerMessage.RTCStatsReport: @unchecked Sendable {} +extension Fishjam_PeerMessage.MediaEvent: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. @@ -164,15 +192,17 @@ extension Fishjam_PeerMessage.RTCStatsReport: @unchecked Sendable {} fileprivate let _protobuf_package = "fishjam" extension Fishjam_PeerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".PeerMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".PeerMessage" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "authenticated"), 2: .standard(proto: "auth_request"), 3: .standard(proto: "media_event"), 4: .standard(proto: "rtc_stats_report"), + 5: .standard(proto: "peer_media_event"), + 6: .standard(proto: "server_media_event"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -230,12 +260,38 @@ extension Fishjam_PeerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl self.content = .rtcStatsReport(v) } }() + case 5: try { + var v: Fishjam_MediaEvents_Peer_MediaEvent? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .peerMediaEvent(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .peerMediaEvent(v) + } + }() + case 6: try { + var v: Fishjam_MediaEvents_Server_MediaEvent? + var hadOneofValue = false + if let current = self.content { + hadOneofValue = true + if case .serverMediaEvent(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.content = .serverMediaEvent(v) + } + }() default: break } } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -257,12 +313,20 @@ extension Fishjam_PeerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl guard case .rtcStatsReport(let v)? = self.content else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 4) }() + case .peerMediaEvent?: try { + guard case .peerMediaEvent(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + }() + case .serverMediaEvent?: try { + guard case .serverMediaEvent(let v)? = self.content else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + }() case nil: break } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_PeerMessage, rhs: Fishjam_PeerMessage) -> Bool { + public static func ==(lhs: Fishjam_PeerMessage, rhs: Fishjam_PeerMessage) -> Bool { if lhs.content != rhs.content {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -270,63 +334,69 @@ extension Fishjam_PeerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImpl } extension Fishjam_PeerMessage.Authenticated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".Authenticated" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() + public static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".Authenticated" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let _ = try decoder.nextFieldNumber() { } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_PeerMessage.Authenticated, rhs: Fishjam_PeerMessage.Authenticated) -> Bool { + public static func ==(lhs: Fishjam_PeerMessage.Authenticated, rhs: Fishjam_PeerMessage.Authenticated) -> Bool { if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Fishjam_PeerMessage.AuthRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".AuthRequest" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".AuthRequest" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "token"), + 2: .standard(proto: "sdk_version"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.token) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.sdkVersion) }() default: break } } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.token.isEmpty { try visitor.visitSingularStringField(value: self.token, fieldNumber: 1) } + if !self.sdkVersion.isEmpty { + try visitor.visitSingularStringField(value: self.sdkVersion, fieldNumber: 2) + } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_PeerMessage.AuthRequest, rhs: Fishjam_PeerMessage.AuthRequest) -> Bool { + public static func ==(lhs: Fishjam_PeerMessage.AuthRequest, rhs: Fishjam_PeerMessage.AuthRequest) -> Bool { if lhs.token != rhs.token {return false} + if lhs.sdkVersion != rhs.sdkVersion {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Fishjam_PeerMessage.MediaEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".MediaEvent" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ +extension Fishjam_PeerMessage.RTCStatsReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".RTCStatsReport" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "data"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -338,27 +408,27 @@ extension Fishjam_PeerMessage.MediaEvent: SwiftProtobuf.Message, SwiftProtobuf._ } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.data.isEmpty { try visitor.visitSingularStringField(value: self.data, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_PeerMessage.MediaEvent, rhs: Fishjam_PeerMessage.MediaEvent) -> Bool { + public static func ==(lhs: Fishjam_PeerMessage.RTCStatsReport, rhs: Fishjam_PeerMessage.RTCStatsReport) -> Bool { if lhs.data != rhs.data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Fishjam_PeerMessage.RTCStatsReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".RTCStatsReport" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ +extension Fishjam_PeerMessage.MediaEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Fishjam_PeerMessage.protoMessageName + ".MediaEvent" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "data"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -370,14 +440,14 @@ extension Fishjam_PeerMessage.RTCStatsReport: SwiftProtobuf.Message, SwiftProtob } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.data.isEmpty { try visitor.visitSingularStringField(value: self.data, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_PeerMessage.RTCStatsReport, rhs: Fishjam_PeerMessage.RTCStatsReport) -> Bool { + public static func ==(lhs: Fishjam_PeerMessage.MediaEvent, rhs: Fishjam_PeerMessage.MediaEvent) -> Bool { if lhs.data != rhs.data {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true diff --git a/packages/ios-client/Sources/FishjamClient/protos/fishjam/server_notifications.pb.swift b/packages/ios-client/Sources/FishjamClient/protos/fishjam/server_notifications.pb.swift index fdc24212..6af1a2e3 100644 --- a/packages/ios-client/Sources/FishjamClient/protos/fishjam/server_notifications.pb.swift +++ b/packages/ios-client/Sources/FishjamClient/protos/fishjam/server_notifications.pb.swift @@ -20,15 +20,15 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } -/// Defines any type of message passed between FJ and server client -struct Fishjam_ServerMessage { +/// Defines any type of message passed between FJ and server peer +public struct Fishjam_ServerMessage { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var content: Fishjam_ServerMessage.OneOf_Content? = nil + public var content: Fishjam_ServerMessage.OneOf_Content? = nil - var roomCrashed: Fishjam_ServerMessage.RoomCrashed { + public var roomCrashed: Fishjam_ServerMessage.RoomCrashed { get { if case .roomCrashed(let v)? = content {return v} return Fishjam_ServerMessage.RoomCrashed() @@ -36,7 +36,7 @@ struct Fishjam_ServerMessage { set {content = .roomCrashed(newValue)} } - var peerConnected: Fishjam_ServerMessage.PeerConnected { + public var peerConnected: Fishjam_ServerMessage.PeerConnected { get { if case .peerConnected(let v)? = content {return v} return Fishjam_ServerMessage.PeerConnected() @@ -44,7 +44,7 @@ struct Fishjam_ServerMessage { set {content = .peerConnected(newValue)} } - var peerDisconnected: Fishjam_ServerMessage.PeerDisconnected { + public var peerDisconnected: Fishjam_ServerMessage.PeerDisconnected { get { if case .peerDisconnected(let v)? = content {return v} return Fishjam_ServerMessage.PeerDisconnected() @@ -52,7 +52,7 @@ struct Fishjam_ServerMessage { set {content = .peerDisconnected(newValue)} } - var peerCrashed: Fishjam_ServerMessage.PeerCrashed { + public var peerCrashed: Fishjam_ServerMessage.PeerCrashed { get { if case .peerCrashed(let v)? = content {return v} return Fishjam_ServerMessage.PeerCrashed() @@ -60,7 +60,7 @@ struct Fishjam_ServerMessage { set {content = .peerCrashed(newValue)} } - var componentCrashed: Fishjam_ServerMessage.ComponentCrashed { + public var componentCrashed: Fishjam_ServerMessage.ComponentCrashed { get { if case .componentCrashed(let v)? = content {return v} return Fishjam_ServerMessage.ComponentCrashed() @@ -68,7 +68,7 @@ struct Fishjam_ServerMessage { set {content = .componentCrashed(newValue)} } - var authenticated: Fishjam_ServerMessage.Authenticated { + public var authenticated: Fishjam_ServerMessage.Authenticated { get { if case .authenticated(let v)? = content {return v} return Fishjam_ServerMessage.Authenticated() @@ -76,7 +76,7 @@ struct Fishjam_ServerMessage { set {content = .authenticated(newValue)} } - var authRequest: Fishjam_ServerMessage.AuthRequest { + public var authRequest: Fishjam_ServerMessage.AuthRequest { get { if case .authRequest(let v)? = content {return v} return Fishjam_ServerMessage.AuthRequest() @@ -84,7 +84,7 @@ struct Fishjam_ServerMessage { set {content = .authRequest(newValue)} } - var subscribeRequest: Fishjam_ServerMessage.SubscribeRequest { + public var subscribeRequest: Fishjam_ServerMessage.SubscribeRequest { get { if case .subscribeRequest(let v)? = content {return v} return Fishjam_ServerMessage.SubscribeRequest() @@ -92,7 +92,7 @@ struct Fishjam_ServerMessage { set {content = .subscribeRequest(newValue)} } - var subscribeResponse: Fishjam_ServerMessage.SubscribeResponse { + public var subscribeResponse: Fishjam_ServerMessage.SubscribeResponse { get { if case .subscribeResponse(let v)? = content {return v} return Fishjam_ServerMessage.SubscribeResponse() @@ -100,7 +100,7 @@ struct Fishjam_ServerMessage { set {content = .subscribeResponse(newValue)} } - var roomCreated: Fishjam_ServerMessage.RoomCreated { + public var roomCreated: Fishjam_ServerMessage.RoomCreated { get { if case .roomCreated(let v)? = content {return v} return Fishjam_ServerMessage.RoomCreated() @@ -108,7 +108,7 @@ struct Fishjam_ServerMessage { set {content = .roomCreated(newValue)} } - var roomDeleted: Fishjam_ServerMessage.RoomDeleted { + public var roomDeleted: Fishjam_ServerMessage.RoomDeleted { get { if case .roomDeleted(let v)? = content {return v} return Fishjam_ServerMessage.RoomDeleted() @@ -116,7 +116,7 @@ struct Fishjam_ServerMessage { set {content = .roomDeleted(newValue)} } - var metricsReport: Fishjam_ServerMessage.MetricsReport { + public var metricsReport: Fishjam_ServerMessage.MetricsReport { get { if case .metricsReport(let v)? = content {return v} return Fishjam_ServerMessage.MetricsReport() @@ -124,7 +124,7 @@ struct Fishjam_ServerMessage { set {content = .metricsReport(newValue)} } - var hlsPlayable: Fishjam_ServerMessage.HlsPlayable { + public var hlsPlayable: Fishjam_ServerMessage.HlsPlayable { get { if case .hlsPlayable(let v)? = content {return v} return Fishjam_ServerMessage.HlsPlayable() @@ -132,7 +132,7 @@ struct Fishjam_ServerMessage { set {content = .hlsPlayable(newValue)} } - var hlsUploaded: Fishjam_ServerMessage.HlsUploaded { + public var hlsUploaded: Fishjam_ServerMessage.HlsUploaded { get { if case .hlsUploaded(let v)? = content {return v} return Fishjam_ServerMessage.HlsUploaded() @@ -140,7 +140,7 @@ struct Fishjam_ServerMessage { set {content = .hlsUploaded(newValue)} } - var hlsUploadCrashed: Fishjam_ServerMessage.HlsUploadCrashed { + public var hlsUploadCrashed: Fishjam_ServerMessage.HlsUploadCrashed { get { if case .hlsUploadCrashed(let v)? = content {return v} return Fishjam_ServerMessage.HlsUploadCrashed() @@ -148,7 +148,7 @@ struct Fishjam_ServerMessage { set {content = .hlsUploadCrashed(newValue)} } - var peerMetadataUpdated: Fishjam_ServerMessage.PeerMetadataUpdated { + public var peerMetadataUpdated: Fishjam_ServerMessage.PeerMetadataUpdated { get { if case .peerMetadataUpdated(let v)? = content {return v} return Fishjam_ServerMessage.PeerMetadataUpdated() @@ -156,7 +156,7 @@ struct Fishjam_ServerMessage { set {content = .peerMetadataUpdated(newValue)} } - var trackAdded: Fishjam_ServerMessage.TrackAdded { + public var trackAdded: Fishjam_ServerMessage.TrackAdded { get { if case .trackAdded(let v)? = content {return v} return Fishjam_ServerMessage.TrackAdded() @@ -164,7 +164,7 @@ struct Fishjam_ServerMessage { set {content = .trackAdded(newValue)} } - var trackRemoved: Fishjam_ServerMessage.TrackRemoved { + public var trackRemoved: Fishjam_ServerMessage.TrackRemoved { get { if case .trackRemoved(let v)? = content {return v} return Fishjam_ServerMessage.TrackRemoved() @@ -172,7 +172,7 @@ struct Fishjam_ServerMessage { set {content = .trackRemoved(newValue)} } - var trackMetadataUpdated: Fishjam_ServerMessage.TrackMetadataUpdated { + public var trackMetadataUpdated: Fishjam_ServerMessage.TrackMetadataUpdated { get { if case .trackMetadataUpdated(let v)? = content {return v} return Fishjam_ServerMessage.TrackMetadataUpdated() @@ -180,7 +180,7 @@ struct Fishjam_ServerMessage { set {content = .trackMetadataUpdated(newValue)} } - var peerAdded: Fishjam_ServerMessage.PeerAdded { + public var peerAdded: Fishjam_ServerMessage.PeerAdded { get { if case .peerAdded(let v)? = content {return v} return Fishjam_ServerMessage.PeerAdded() @@ -188,7 +188,7 @@ struct Fishjam_ServerMessage { set {content = .peerAdded(newValue)} } - var peerDeleted: Fishjam_ServerMessage.PeerDeleted { + public var peerDeleted: Fishjam_ServerMessage.PeerDeleted { get { if case .peerDeleted(let v)? = content {return v} return Fishjam_ServerMessage.PeerDeleted() @@ -196,9 +196,9 @@ struct Fishjam_ServerMessage { set {content = .peerDeleted(newValue)} } - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Content: Equatable { + public enum OneOf_Content: Equatable { case roomCrashed(Fishjam_ServerMessage.RoomCrashed) case peerConnected(Fishjam_ServerMessage.PeerConnected) case peerDisconnected(Fishjam_ServerMessage.PeerDisconnected) @@ -222,7 +222,7 @@ struct Fishjam_ServerMessage { case peerDeleted(Fishjam_ServerMessage.PeerDeleted) #if !swift(>=4.1) - static func ==(lhs: Fishjam_ServerMessage.OneOf_Content, rhs: Fishjam_ServerMessage.OneOf_Content) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.OneOf_Content, rhs: Fishjam_ServerMessage.OneOf_Content) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -317,19 +317,19 @@ struct Fishjam_ServerMessage { #endif } - /// Defines message groups for which client can subscribe - enum EventType: SwiftProtobuf.Enum { - typealias RawValue = Int + /// Defines message groups for which peer can subscribe + public enum EventType: SwiftProtobuf.Enum { + public typealias RawValue = Int case unspecified // = 0 case serverNotification // = 1 case metrics // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .unspecified } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unspecified case 1: self = .serverNotification @@ -338,7 +338,7 @@ struct Fishjam_ServerMessage { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unspecified: return 0 case .serverNotification: return 1 @@ -350,18 +350,18 @@ struct Fishjam_ServerMessage { } /// Defines types of tracks being published by peers and component - enum TrackType: SwiftProtobuf.Enum { - typealias RawValue = Int + public enum TrackType: SwiftProtobuf.Enum { + public typealias RawValue = Int case unspecified // = 0 case video // = 1 case audio // = 2 case UNRECOGNIZED(Int) - init() { + public init() { self = .unspecified } - init?(rawValue: Int) { + public init?(rawValue: Int) { switch rawValue { case 0: self = .unspecified case 1: self = .video @@ -370,7 +370,7 @@ struct Fishjam_ServerMessage { } } - var rawValue: Int { + public var rawValue: Int { switch self { case .unspecified: return 0 case .video: return 1 @@ -382,285 +382,285 @@ struct Fishjam_ServerMessage { } /// Notification sent when a room crashes - struct RoomCrashed { + public struct RoomCrashed { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a peer is added - struct PeerAdded { + public struct PeerAdded { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var peerID: String = String() + public var peerID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a peer is removed - struct PeerDeleted { + public struct PeerDeleted { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var peerID: String = String() + public var peerID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a peer connects - struct PeerConnected { + public struct PeerConnected { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var peerID: String = String() + public var peerID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a peer disconnects from FJ - struct PeerDisconnected { + public struct PeerDisconnected { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var peerID: String = String() + public var peerID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a peer crashes - struct PeerCrashed { + public struct PeerCrashed { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var peerID: String = String() + public var peerID: String = String() - var reason: String = String() + public var reason: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a component crashes - struct ComponentCrashed { + public struct ComponentCrashed { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var componentID: String = String() + public var componentID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Response sent by FJ, confirming successfull authentication - struct Authenticated { + public struct Authenticated { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - /// Request sent by client, to authenticate to FJ server - struct AuthRequest { + /// Request sent by peer, to authenticate to FJ server + public struct AuthRequest { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var token: String = String() + public var token: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } - /// Request sent by client to subsribe for certain message type - struct SubscribeRequest { + /// Request sent by peer to subsribe for certain message type + public struct SubscribeRequest { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var eventType: Fishjam_ServerMessage.EventType = .unspecified + public var eventType: Fishjam_ServerMessage.EventType = .unspecified - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Response sent by FJ, confirming subscription for message type - struct SubscribeResponse { + public struct SubscribeResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var eventType: Fishjam_ServerMessage.EventType = .unspecified + public var eventType: Fishjam_ServerMessage.EventType = .unspecified - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a room is created - struct RoomCreated { + public struct RoomCreated { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when a room is deleted - struct RoomDeleted { + public struct RoomDeleted { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Message containing WebRTC metrics from FJ - struct MetricsReport { + public struct MetricsReport { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var metrics: String = String() + public var metrics: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when the HLS stream becomes available in a room - struct HlsPlayable { + public struct HlsPlayable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var componentID: String = String() + public var componentID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when the HLS recording is successfully uploded to AWS S3 - struct HlsUploaded { + public struct HlsUploaded { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when the upload of HLS recording to AWS S3 fails - struct HlsUploadCrashed { + public struct HlsUploadCrashed { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when peer updates its metadata - struct PeerMetadataUpdated { + public struct PeerMetadataUpdated { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var peerID: String = String() + public var peerID: String = String() - var metadata: String = String() + public var metadata: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Describes a media track - struct Track { + public struct Track { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var id: String = String() + public var id: String = String() - var type: Fishjam_ServerMessage.TrackType = .unspecified + public var type: Fishjam_ServerMessage.TrackType = .unspecified - var metadata: String = String() + public var metadata: String = String() - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - init() {} + public init() {} } /// Notification sent when peer or component adds new track - struct TrackAdded { + public struct TrackAdded { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var endpointInfo: Fishjam_ServerMessage.TrackAdded.OneOf_EndpointInfo? = nil + public var endpointInfo: Fishjam_ServerMessage.TrackAdded.OneOf_EndpointInfo? = nil - var peerID: String { + public var peerID: String { get { if case .peerID(let v)? = endpointInfo {return v} return String() @@ -668,7 +668,7 @@ struct Fishjam_ServerMessage { set {endpointInfo = .peerID(newValue)} } - var componentID: String { + public var componentID: String { get { if case .componentID(let v)? = endpointInfo {return v} return String() @@ -676,23 +676,23 @@ struct Fishjam_ServerMessage { set {endpointInfo = .componentID(newValue)} } - var track: Fishjam_ServerMessage.Track { + public var track: Fishjam_ServerMessage.Track { get {return _track ?? Fishjam_ServerMessage.Track()} set {_track = newValue} } /// Returns true if `track` has been explicitly set. - var hasTrack: Bool {return self._track != nil} + public var hasTrack: Bool {return self._track != nil} /// Clears the value of `track`. Subsequent reads from it will return its default value. - mutating func clearTrack() {self._track = nil} + public mutating func clearTrack() {self._track = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_EndpointInfo: Equatable { + public enum OneOf_EndpointInfo: Equatable { case peerID(String) case componentID(String) #if !swift(>=4.1) - static func ==(lhs: Fishjam_ServerMessage.TrackAdded.OneOf_EndpointInfo, rhs: Fishjam_ServerMessage.TrackAdded.OneOf_EndpointInfo) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.TrackAdded.OneOf_EndpointInfo, rhs: Fishjam_ServerMessage.TrackAdded.OneOf_EndpointInfo) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -711,22 +711,22 @@ struct Fishjam_ServerMessage { #endif } - init() {} + public init() {} fileprivate var _track: Fishjam_ServerMessage.Track? = nil } /// Notification sent when a track is removed - struct TrackRemoved { + public struct TrackRemoved { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var endpointInfo: Fishjam_ServerMessage.TrackRemoved.OneOf_EndpointInfo? = nil + public var endpointInfo: Fishjam_ServerMessage.TrackRemoved.OneOf_EndpointInfo? = nil - var peerID: String { + public var peerID: String { get { if case .peerID(let v)? = endpointInfo {return v} return String() @@ -734,7 +734,7 @@ struct Fishjam_ServerMessage { set {endpointInfo = .peerID(newValue)} } - var componentID: String { + public var componentID: String { get { if case .componentID(let v)? = endpointInfo {return v} return String() @@ -742,23 +742,23 @@ struct Fishjam_ServerMessage { set {endpointInfo = .componentID(newValue)} } - var track: Fishjam_ServerMessage.Track { + public var track: Fishjam_ServerMessage.Track { get {return _track ?? Fishjam_ServerMessage.Track()} set {_track = newValue} } /// Returns true if `track` has been explicitly set. - var hasTrack: Bool {return self._track != nil} + public var hasTrack: Bool {return self._track != nil} /// Clears the value of `track`. Subsequent reads from it will return its default value. - mutating func clearTrack() {self._track = nil} + public mutating func clearTrack() {self._track = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_EndpointInfo: Equatable { + public enum OneOf_EndpointInfo: Equatable { case peerID(String) case componentID(String) #if !swift(>=4.1) - static func ==(lhs: Fishjam_ServerMessage.TrackRemoved.OneOf_EndpointInfo, rhs: Fishjam_ServerMessage.TrackRemoved.OneOf_EndpointInfo) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.TrackRemoved.OneOf_EndpointInfo, rhs: Fishjam_ServerMessage.TrackRemoved.OneOf_EndpointInfo) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -777,22 +777,22 @@ struct Fishjam_ServerMessage { #endif } - init() {} + public init() {} fileprivate var _track: Fishjam_ServerMessage.Track? = nil } /// Notification sent when metadata of a multimedia track is updated - struct TrackMetadataUpdated { + public struct TrackMetadataUpdated { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var roomID: String = String() + public var roomID: String = String() - var endpointInfo: Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo? = nil + public var endpointInfo: Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo? = nil - var peerID: String { + public var peerID: String { get { if case .peerID(let v)? = endpointInfo {return v} return String() @@ -800,7 +800,7 @@ struct Fishjam_ServerMessage { set {endpointInfo = .peerID(newValue)} } - var componentID: String { + public var componentID: String { get { if case .componentID(let v)? = endpointInfo {return v} return String() @@ -808,23 +808,23 @@ struct Fishjam_ServerMessage { set {endpointInfo = .componentID(newValue)} } - var track: Fishjam_ServerMessage.Track { + public var track: Fishjam_ServerMessage.Track { get {return _track ?? Fishjam_ServerMessage.Track()} set {_track = newValue} } /// Returns true if `track` has been explicitly set. - var hasTrack: Bool {return self._track != nil} + public var hasTrack: Bool {return self._track != nil} /// Clears the value of `track`. Subsequent reads from it will return its default value. - mutating func clearTrack() {self._track = nil} + public mutating func clearTrack() {self._track = nil} - var unknownFields = SwiftProtobuf.UnknownStorage() + public var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_EndpointInfo: Equatable { + public enum OneOf_EndpointInfo: Equatable { case peerID(String) case componentID(String) #if !swift(>=4.1) - static func ==(lhs: Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo, rhs: Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo, rhs: Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo) -> Bool { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 @@ -843,19 +843,19 @@ struct Fishjam_ServerMessage { #endif } - init() {} + public init() {} fileprivate var _track: Fishjam_ServerMessage.Track? = nil } - init() {} + public init() {} } #if swift(>=4.2) extension Fishjam_ServerMessage.EventType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Fishjam_ServerMessage.EventType] = [ + public static let allCases: [Fishjam_ServerMessage.EventType] = [ .unspecified, .serverNotification, .metrics, @@ -864,7 +864,7 @@ extension Fishjam_ServerMessage.EventType: CaseIterable { extension Fishjam_ServerMessage.TrackType: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - static let allCases: [Fishjam_ServerMessage.TrackType] = [ + public static let allCases: [Fishjam_ServerMessage.TrackType] = [ .unspecified, .video, .audio, @@ -910,8 +910,8 @@ extension Fishjam_ServerMessage.TrackMetadataUpdated.OneOf_EndpointInfo: @unchec fileprivate let _protobuf_package = "fishjam" extension Fishjam_ServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ServerMessage" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = _protobuf_package + ".ServerMessage" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_crashed"), 2: .standard(proto: "peer_connected"), 3: .standard(proto: "peer_disconnected"), @@ -935,7 +935,7 @@ extension Fishjam_ServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageIm 21: .standard(proto: "peer_deleted"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1219,7 +1219,7 @@ extension Fishjam_ServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -1314,7 +1314,7 @@ extension Fishjam_ServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageIm try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage, rhs: Fishjam_ServerMessage) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage, rhs: Fishjam_ServerMessage) -> Bool { if lhs.content != rhs.content {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1322,7 +1322,7 @@ extension Fishjam_ServerMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } extension Fishjam_ServerMessage.EventType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "EVENT_TYPE_UNSPECIFIED"), 1: .same(proto: "EVENT_TYPE_SERVER_NOTIFICATION"), 2: .same(proto: "EVENT_TYPE_METRICS"), @@ -1330,7 +1330,7 @@ extension Fishjam_ServerMessage.EventType: SwiftProtobuf._ProtoNameProviding { } extension Fishjam_ServerMessage.TrackType: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 0: .same(proto: "TRACK_TYPE_UNSPECIFIED"), 1: .same(proto: "TRACK_TYPE_VIDEO"), 2: .same(proto: "TRACK_TYPE_AUDIO"), @@ -1338,12 +1338,12 @@ extension Fishjam_ServerMessage.TrackType: SwiftProtobuf._ProtoNameProviding { } extension Fishjam_ServerMessage.RoomCrashed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".RoomCrashed" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".RoomCrashed" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1355,14 +1355,14 @@ extension Fishjam_ServerMessage.RoomCrashed: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.RoomCrashed, rhs: Fishjam_ServerMessage.RoomCrashed) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.RoomCrashed, rhs: Fishjam_ServerMessage.RoomCrashed) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1370,13 +1370,13 @@ extension Fishjam_ServerMessage.RoomCrashed: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.PeerAdded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerAdded" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerAdded" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1389,7 +1389,7 @@ extension Fishjam_ServerMessage.PeerAdded: SwiftProtobuf.Message, SwiftProtobuf. } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1399,7 +1399,7 @@ extension Fishjam_ServerMessage.PeerAdded: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.PeerAdded, rhs: Fishjam_ServerMessage.PeerAdded) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.PeerAdded, rhs: Fishjam_ServerMessage.PeerAdded) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.peerID != rhs.peerID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1408,13 +1408,13 @@ extension Fishjam_ServerMessage.PeerAdded: SwiftProtobuf.Message, SwiftProtobuf. } extension Fishjam_ServerMessage.PeerDeleted: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerDeleted" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerDeleted" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1427,7 +1427,7 @@ extension Fishjam_ServerMessage.PeerDeleted: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1437,7 +1437,7 @@ extension Fishjam_ServerMessage.PeerDeleted: SwiftProtobuf.Message, SwiftProtobu try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.PeerDeleted, rhs: Fishjam_ServerMessage.PeerDeleted) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.PeerDeleted, rhs: Fishjam_ServerMessage.PeerDeleted) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.peerID != rhs.peerID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1446,13 +1446,13 @@ extension Fishjam_ServerMessage.PeerDeleted: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.PeerConnected: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerConnected" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerConnected" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1465,7 +1465,7 @@ extension Fishjam_ServerMessage.PeerConnected: SwiftProtobuf.Message, SwiftProto } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1475,7 +1475,7 @@ extension Fishjam_ServerMessage.PeerConnected: SwiftProtobuf.Message, SwiftProto try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.PeerConnected, rhs: Fishjam_ServerMessage.PeerConnected) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.PeerConnected, rhs: Fishjam_ServerMessage.PeerConnected) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.peerID != rhs.peerID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1484,13 +1484,13 @@ extension Fishjam_ServerMessage.PeerConnected: SwiftProtobuf.Message, SwiftProto } extension Fishjam_ServerMessage.PeerDisconnected: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerDisconnected" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerDisconnected" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1503,7 +1503,7 @@ extension Fishjam_ServerMessage.PeerDisconnected: SwiftProtobuf.Message, SwiftPr } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1513,7 +1513,7 @@ extension Fishjam_ServerMessage.PeerDisconnected: SwiftProtobuf.Message, SwiftPr try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.PeerDisconnected, rhs: Fishjam_ServerMessage.PeerDisconnected) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.PeerDisconnected, rhs: Fishjam_ServerMessage.PeerDisconnected) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.peerID != rhs.peerID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1522,14 +1522,14 @@ extension Fishjam_ServerMessage.PeerDisconnected: SwiftProtobuf.Message, SwiftPr } extension Fishjam_ServerMessage.PeerCrashed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerCrashed" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerCrashed" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), 3: .same(proto: "reason"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1543,7 +1543,7 @@ extension Fishjam_ServerMessage.PeerCrashed: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1556,7 +1556,7 @@ extension Fishjam_ServerMessage.PeerCrashed: SwiftProtobuf.Message, SwiftProtobu try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.PeerCrashed, rhs: Fishjam_ServerMessage.PeerCrashed) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.PeerCrashed, rhs: Fishjam_ServerMessage.PeerCrashed) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.peerID != rhs.peerID {return false} if lhs.reason != rhs.reason {return false} @@ -1566,13 +1566,13 @@ extension Fishjam_ServerMessage.PeerCrashed: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.ComponentCrashed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".ComponentCrashed" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".ComponentCrashed" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "component_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1585,7 +1585,7 @@ extension Fishjam_ServerMessage.ComponentCrashed: SwiftProtobuf.Message, SwiftPr } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1595,7 +1595,7 @@ extension Fishjam_ServerMessage.ComponentCrashed: SwiftProtobuf.Message, SwiftPr try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.ComponentCrashed, rhs: Fishjam_ServerMessage.ComponentCrashed) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.ComponentCrashed, rhs: Fishjam_ServerMessage.ComponentCrashed) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.componentID != rhs.componentID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1604,31 +1604,31 @@ extension Fishjam_ServerMessage.ComponentCrashed: SwiftProtobuf.Message, SwiftPr } extension Fishjam_ServerMessage.Authenticated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".Authenticated" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".Authenticated" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let _ = try decoder.nextFieldNumber() { } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.Authenticated, rhs: Fishjam_ServerMessage.Authenticated) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.Authenticated, rhs: Fishjam_ServerMessage.Authenticated) -> Bool { if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Fishjam_ServerMessage.AuthRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".AuthRequest" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".AuthRequest" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "token"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1640,14 +1640,14 @@ extension Fishjam_ServerMessage.AuthRequest: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.token.isEmpty { try visitor.visitSingularStringField(value: self.token, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.AuthRequest, rhs: Fishjam_ServerMessage.AuthRequest) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.AuthRequest, rhs: Fishjam_ServerMessage.AuthRequest) -> Bool { if lhs.token != rhs.token {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1655,12 +1655,12 @@ extension Fishjam_ServerMessage.AuthRequest: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.SubscribeRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".SubscribeRequest" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".SubscribeRequest" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "event_type"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1672,14 +1672,14 @@ extension Fishjam_ServerMessage.SubscribeRequest: SwiftProtobuf.Message, SwiftPr } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.eventType != .unspecified { try visitor.visitSingularEnumField(value: self.eventType, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.SubscribeRequest, rhs: Fishjam_ServerMessage.SubscribeRequest) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.SubscribeRequest, rhs: Fishjam_ServerMessage.SubscribeRequest) -> Bool { if lhs.eventType != rhs.eventType {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1687,12 +1687,12 @@ extension Fishjam_ServerMessage.SubscribeRequest: SwiftProtobuf.Message, SwiftPr } extension Fishjam_ServerMessage.SubscribeResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".SubscribeResponse" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".SubscribeResponse" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "event_type"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1704,14 +1704,14 @@ extension Fishjam_ServerMessage.SubscribeResponse: SwiftProtobuf.Message, SwiftP } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if self.eventType != .unspecified { try visitor.visitSingularEnumField(value: self.eventType, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.SubscribeResponse, rhs: Fishjam_ServerMessage.SubscribeResponse) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.SubscribeResponse, rhs: Fishjam_ServerMessage.SubscribeResponse) -> Bool { if lhs.eventType != rhs.eventType {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1719,12 +1719,12 @@ extension Fishjam_ServerMessage.SubscribeResponse: SwiftProtobuf.Message, SwiftP } extension Fishjam_ServerMessage.RoomCreated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".RoomCreated" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".RoomCreated" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1736,14 +1736,14 @@ extension Fishjam_ServerMessage.RoomCreated: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.RoomCreated, rhs: Fishjam_ServerMessage.RoomCreated) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.RoomCreated, rhs: Fishjam_ServerMessage.RoomCreated) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1751,12 +1751,12 @@ extension Fishjam_ServerMessage.RoomCreated: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.RoomDeleted: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".RoomDeleted" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".RoomDeleted" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1768,14 +1768,14 @@ extension Fishjam_ServerMessage.RoomDeleted: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.RoomDeleted, rhs: Fishjam_ServerMessage.RoomDeleted) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.RoomDeleted, rhs: Fishjam_ServerMessage.RoomDeleted) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1783,12 +1783,12 @@ extension Fishjam_ServerMessage.RoomDeleted: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.MetricsReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".MetricsReport" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".MetricsReport" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "metrics"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1800,14 +1800,14 @@ extension Fishjam_ServerMessage.MetricsReport: SwiftProtobuf.Message, SwiftProto } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.metrics.isEmpty { try visitor.visitSingularStringField(value: self.metrics, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.MetricsReport, rhs: Fishjam_ServerMessage.MetricsReport) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.MetricsReport, rhs: Fishjam_ServerMessage.MetricsReport) -> Bool { if lhs.metrics != rhs.metrics {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1815,13 +1815,13 @@ extension Fishjam_ServerMessage.MetricsReport: SwiftProtobuf.Message, SwiftProto } extension Fishjam_ServerMessage.HlsPlayable: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".HlsPlayable" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".HlsPlayable" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "component_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1834,7 +1834,7 @@ extension Fishjam_ServerMessage.HlsPlayable: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1844,7 +1844,7 @@ extension Fishjam_ServerMessage.HlsPlayable: SwiftProtobuf.Message, SwiftProtobu try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.HlsPlayable, rhs: Fishjam_ServerMessage.HlsPlayable) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.HlsPlayable, rhs: Fishjam_ServerMessage.HlsPlayable) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.componentID != rhs.componentID {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -1853,12 +1853,12 @@ extension Fishjam_ServerMessage.HlsPlayable: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.HlsUploaded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".HlsUploaded" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".HlsUploaded" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1870,14 +1870,14 @@ extension Fishjam_ServerMessage.HlsUploaded: SwiftProtobuf.Message, SwiftProtobu } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.HlsUploaded, rhs: Fishjam_ServerMessage.HlsUploaded) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.HlsUploaded, rhs: Fishjam_ServerMessage.HlsUploaded) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1885,12 +1885,12 @@ extension Fishjam_ServerMessage.HlsUploaded: SwiftProtobuf.Message, SwiftProtobu } extension Fishjam_ServerMessage.HlsUploadCrashed: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".HlsUploadCrashed" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".HlsUploadCrashed" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1902,14 +1902,14 @@ extension Fishjam_ServerMessage.HlsUploadCrashed: SwiftProtobuf.Message, SwiftPr } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.HlsUploadCrashed, rhs: Fishjam_ServerMessage.HlsUploadCrashed) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.HlsUploadCrashed, rhs: Fishjam_ServerMessage.HlsUploadCrashed) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true @@ -1917,14 +1917,14 @@ extension Fishjam_ServerMessage.HlsUploadCrashed: SwiftProtobuf.Message, SwiftPr } extension Fishjam_ServerMessage.PeerMetadataUpdated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerMetadataUpdated" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".PeerMetadataUpdated" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), 3: .same(proto: "metadata"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1938,7 +1938,7 @@ extension Fishjam_ServerMessage.PeerMetadataUpdated: SwiftProtobuf.Message, Swif } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.roomID.isEmpty { try visitor.visitSingularStringField(value: self.roomID, fieldNumber: 1) } @@ -1951,7 +1951,7 @@ extension Fishjam_ServerMessage.PeerMetadataUpdated: SwiftProtobuf.Message, Swif try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.PeerMetadataUpdated, rhs: Fishjam_ServerMessage.PeerMetadataUpdated) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.PeerMetadataUpdated, rhs: Fishjam_ServerMessage.PeerMetadataUpdated) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.peerID != rhs.peerID {return false} if lhs.metadata != rhs.metadata {return false} @@ -1961,14 +1961,14 @@ extension Fishjam_ServerMessage.PeerMetadataUpdated: SwiftProtobuf.Message, Swif } extension Fishjam_ServerMessage.Track: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".Track" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".Track" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "id"), 2: .same(proto: "type"), 3: .same(proto: "metadata"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -1982,7 +1982,7 @@ extension Fishjam_ServerMessage.Track: SwiftProtobuf.Message, SwiftProtobuf._Mes } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } @@ -1995,7 +1995,7 @@ extension Fishjam_ServerMessage.Track: SwiftProtobuf.Message, SwiftProtobuf._Mes try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.Track, rhs: Fishjam_ServerMessage.Track) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.Track, rhs: Fishjam_ServerMessage.Track) -> Bool { if lhs.id != rhs.id {return false} if lhs.type != rhs.type {return false} if lhs.metadata != rhs.metadata {return false} @@ -2005,15 +2005,15 @@ extension Fishjam_ServerMessage.Track: SwiftProtobuf.Message, SwiftProtobuf._Mes } extension Fishjam_ServerMessage.TrackAdded: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".TrackAdded" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".TrackAdded" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), 3: .standard(proto: "component_id"), 4: .same(proto: "track"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2042,7 +2042,7 @@ extension Fishjam_ServerMessage.TrackAdded: SwiftProtobuf.Message, SwiftProtobuf } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -2067,7 +2067,7 @@ extension Fishjam_ServerMessage.TrackAdded: SwiftProtobuf.Message, SwiftProtobuf try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.TrackAdded, rhs: Fishjam_ServerMessage.TrackAdded) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.TrackAdded, rhs: Fishjam_ServerMessage.TrackAdded) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.endpointInfo != rhs.endpointInfo {return false} if lhs._track != rhs._track {return false} @@ -2077,15 +2077,15 @@ extension Fishjam_ServerMessage.TrackAdded: SwiftProtobuf.Message, SwiftProtobuf } extension Fishjam_ServerMessage.TrackRemoved: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".TrackRemoved" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".TrackRemoved" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), 3: .standard(proto: "component_id"), 4: .same(proto: "track"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2114,7 +2114,7 @@ extension Fishjam_ServerMessage.TrackRemoved: SwiftProtobuf.Message, SwiftProtob } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -2139,7 +2139,7 @@ extension Fishjam_ServerMessage.TrackRemoved: SwiftProtobuf.Message, SwiftProtob try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.TrackRemoved, rhs: Fishjam_ServerMessage.TrackRemoved) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.TrackRemoved, rhs: Fishjam_ServerMessage.TrackRemoved) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.endpointInfo != rhs.endpointInfo {return false} if lhs._track != rhs._track {return false} @@ -2149,15 +2149,15 @@ extension Fishjam_ServerMessage.TrackRemoved: SwiftProtobuf.Message, SwiftProtob } extension Fishjam_ServerMessage.TrackMetadataUpdated: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".TrackMetadataUpdated" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + public static let protoMessageName: String = Fishjam_ServerMessage.protoMessageName + ".TrackMetadataUpdated" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "room_id"), 2: .standard(proto: "peer_id"), 3: .standard(proto: "component_id"), 4: .same(proto: "track"), ] - mutating func decodeMessage(decoder: inout D) throws { + public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are @@ -2186,7 +2186,7 @@ extension Fishjam_ServerMessage.TrackMetadataUpdated: SwiftProtobuf.Message, Swi } } - func traverse(visitor: inout V) throws { + public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and @@ -2211,7 +2211,7 @@ extension Fishjam_ServerMessage.TrackMetadataUpdated: SwiftProtobuf.Message, Swi try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Fishjam_ServerMessage.TrackMetadataUpdated, rhs: Fishjam_ServerMessage.TrackMetadataUpdated) -> Bool { + public static func ==(lhs: Fishjam_ServerMessage.TrackMetadataUpdated, rhs: Fishjam_ServerMessage.TrackMetadataUpdated) -> Bool { if lhs.roomID != rhs.roomID {return false} if lhs.endpointInfo != rhs.endpointInfo {return false} if lhs._track != rhs._track {return false} diff --git a/packages/ios-client/Sources/FishjamClient/utils/AnyJson.swift b/packages/ios-client/Sources/FishjamClient/utils/AnyJson.swift index 8376cfca..aba3a249 100644 --- a/packages/ios-client/Sources/FishjamClient/utils/AnyJson.swift +++ b/packages/ios-client/Sources/FishjamClient/utils/AnyJson.swift @@ -16,6 +16,12 @@ public struct AnyJson: Codable { // MARK: Decoding + public init(from string: String) throws { + let data = Data(string.utf8) + let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] ?? [:] + self.store = json + } + public init(from decoder: Decoder) throws { var container = try decoder.container(keyedBy: JSONCodingKey.self) self.store = try Self.decodeDictionary(from: &container) diff --git a/packages/ios-client/Sources/FishjamClient/utils/types.swift b/packages/ios-client/Sources/FishjamClient/utils/types.swift index 40e04daf..bcbaa2d3 100644 --- a/packages/ios-client/Sources/FishjamClient/utils/types.swift +++ b/packages/ios-client/Sources/FishjamClient/utils/types.swift @@ -1,3 +1,5 @@ +import SwiftProtobuf + public typealias Metadata = AnyJson public typealias Payload = AnyJson public typealias SerializedMediaEvent = String @@ -21,3 +23,31 @@ extension AnyJson { return res } } + +public struct JsonEncodingError: Error {} + +extension Encodable { + + public func toJsonString() throws -> String { + guard let json = String(data: try JSONEncoder().encode(self), encoding: .utf8) else { + throw JsonEncodingError() + } + return json + + } + + var toJsonStringOrEmpty: String { + do { + return try toJsonString() + } catch { + sdkLogger.log(level: .error, "Unable to encode metadata") + return "{}" + } + } +} + +extension [String: Metadata] { + public func toDictionaryJson() -> [String: String] { + return mapValues(\.toJsonStringOrEmpty) + } +} diff --git a/packages/ios-client/Sources/FishjamClient/webrtc/PeerConnectionManager.swift b/packages/ios-client/Sources/FishjamClient/webrtc/PeerConnectionManager.swift index 037be793..29986907 100644 --- a/packages/ios-client/Sources/FishjamClient/webrtc/PeerConnectionManager.swift +++ b/packages/ios-client/Sources/FishjamClient/webrtc/PeerConnectionManager.swift @@ -176,13 +176,6 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { config.candidateNetworkPolicy = .all config.tcpCandidatePolicy = .disabled - // if ice servers are not empty that probably means we are using turn servers - if iceServers.count > 0 { - config.iceServers = iceServers - } else { - config.iceServers = [Self.defaultIceServer()] - } - guard let peerConnection = peerConnectionFactory.createPeerConnection( config, constraints: Self.mediaConstraints) @@ -200,26 +193,6 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { peerConnection.enforceSendOnlyDirection() } - /// Parses a list of turn servers and sets them up as `iceServers` that can be used for `RTCPeerConnection` ceration. - private func setTurnServers(_ turnServers: [OfferDataEvent.TurnServer]) { - let isExWebrtc = turnServers.isEmpty - - let servers: [RTCIceServer] = turnServers.map { server in - let url = "turn:\(server.serverAddr):\(server.serverPort)?transport=\(server.transport)" - - return RTCIceServer( - urlStrings: [url], - username: server.username, - credential: server.password - ) - } - - iceServers = servers - config = RTCConfiguration() - config?.iceServers = servers - config?.iceTransportPolicy = isExWebrtc ? .all : .relay - } - public func close() { if let pc = connection { pc.close() @@ -231,31 +204,18 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { } } - // Default ICE server when no turn servers are specified - private static func defaultIceServer() -> RTCIceServer { - let iceUrls = [ - "stun:stun.l.google.com:19302", - "stun:stun.l.google.com:5349", - ] - - return RTCIceServer(urlStrings: iceUrls) - } - /// On each `OfferData` we receive an information about an amount of audio/video /// tracks that we have to receive. For each type of track we need a proper transceiver that /// will be used for receiving the media. So each time when we don't have an appropriate amount of audio/video /// transceiers just create the missing ones and set their directions to `recvOnly` which is the only direction /// acceptable by the `Membrane RTC Engine`. - private func addNecessaryTransceivers(_ tracksTypes: [String: Int]) { + private func addNecessaryTransceivers(_ tracksTypes: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes) { guard let pc = connection else { return } - let necessaryAudio = tracksTypes["audio"] ?? 0 - let necessaryVideo = tracksTypes["video"] ?? 0 - - var lackingAudio: Int = necessaryAudio - var lackingVideo: Int = necessaryVideo + var lackingAudio = tracksTypes.audio + var lackingVideo = tracksTypes.video pc.transceivers.filter { $0.direction == .recvOnly @@ -308,6 +268,22 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { return mapping } + private func getTrackIdToBitrates(localTracks: [Track]) -> [String: Int32] { + guard let pc = connection else { + return [:] + } + + var mapping: [String: Int32] = [:] + pc.transceivers.forEach { transceiver in + guard let trackId: String = transceiver.sender.track?.trackId else { + return + } + mapping[trackId] = 1_500_000 // TODO(FCE-953): Change with simulcast + } + + return mapping + } + public func setTrackEncoding(trackId: String, encoding: TrackEncoding, enabled: Bool) { guard let pc = connection else { sdkLogger.error("\(#function): Peer connection not yet established") @@ -380,28 +356,25 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { } public func getSdpOffer( - integratedTurnServers: [OfferDataEvent.TurnServer], - tracksTypes: [String: Int], + tracksTypes: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes, localTracks: [Track], - onCompletion: @escaping (_ sdp: String?, _ midToTrackId: [String: String]?, _ error: Error?) -> Void + onCompletion: @escaping ( + _ sdp: String?, _ midToTrackId: [String: String]?, _ trackIdToBitrates: [String: Int32]?, _ error: Error? + ) -> Void ) { - let isExWebrtc = integratedTurnServers.isEmpty - setTurnServers(integratedTurnServers) - var needsRestart = true + config = RTCConfiguration() + config?.iceServers = [] + config?.iceTransportPolicy = .all + if connection == nil { setupPeerConnection(localTracks: localTracks) - needsRestart = false } guard let pc = connection else { return } - if needsRestart && !isExWebrtc { - pc.restartIce() - } - addNecessaryTransceivers(tracksTypes) pc.offer( @@ -409,7 +382,7 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { completionHandler: { offer, error in guard let offer = offer else { if let err = error { - onCompletion(nil, nil, err) + onCompletion(nil, nil, nil, err) } return } @@ -418,10 +391,14 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { offer, completionHandler: { error in guard let err = error else { - onCompletion(offer.sdp, self.getMidToTrackId(localTracks: localTracks), nil) + onCompletion( + offer.sdp, + self.getMidToTrackId(localTracks: localTracks), + self.getTrackIdToBitrates(localTracks: localTracks), + nil) return } - onCompletion(nil, nil, err) + onCompletion(nil, nil, nil, err) }) }) } @@ -457,12 +434,19 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { return newSdpAnswer } + public func setupIceServers(iceServers: [Fishjam_MediaEvents_Server_MediaEvent.IceServer]) { + self.iceServers = iceServers.map { + RTCIceServer(urlStrings: $0.urls, username: $0.username, credential: $0.credential) + } + } + public func onSdpAnswer(sdp: String, midToTrackId: [String: String]) { guard let pc = connection else { return } self.midToTrackId = midToTrackId + let description = RTCSessionDescription(type: .answer, sdp: sdp) pc.setRemoteDescription( @@ -516,7 +500,8 @@ internal class PeerConnectionManager: NSObject, RTCPeerConnectionDelegate { public func peerConnection( _: RTCPeerConnection, didStartReceivingOn transceiver: RTCRtpTransceiver ) { - guard let trackId = midToTrackId[transceiver.mid] + guard + let trackId = midToTrackId[transceiver.mid] else { sdkLogger.error( "\(pcLogPrefix) started receiving on a transceiver with an unknown 'mid' parameter" diff --git a/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineCommunication.swift b/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineCommunication.swift index ae7efa2e..c0e55240 100644 --- a/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineCommunication.swift +++ b/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineCommunication.swift @@ -17,150 +17,167 @@ internal class RTCEngineCommunication { } func connect(metadata: Metadata) { - sendEvent(event: ConnectEvent(metadata: metadata)) + var connect = Fishjam_MediaEvents_Peer_MediaEvent.Connect() + connect.metadataJson = metadata.toJsonStringOrEmpty + sendEvent(event: .connect(connect)) } func disconnect() { - sendEvent(event: DisconnectEvent()) + sendEvent(event: .disconnect(.init())) } func updateEndpointMetadata(metadata: Metadata) { - sendEvent(event: UpdateEndpointMetadata(metadata: metadata)) + var updateEndpointMetadata = Fishjam_MediaEvents_Peer_MediaEvent.UpdateEndpointMetadata() + updateEndpointMetadata.metadataJson = metadata.toJsonStringOrEmpty + sendEvent(event: .updateEndpointMetadata(updateEndpointMetadata)) } func updateTrackMetadata(trackId: String, trackMetadata: Metadata) { - sendEvent(event: UpdateTrackMetadata(trackId: trackId, trackMetadata: trackMetadata)) + var updateTrackMetadata = Fishjam_MediaEvents_Peer_MediaEvent.UpdateTrackMetadata() + updateTrackMetadata.metadataJson = trackMetadata.toJsonStringOrEmpty + updateTrackMetadata.trackID = trackId + sendEvent(event: .updateTrackMetadata(updateTrackMetadata)) } func setTargetTrackEncoding(trackId: String, encoding: TrackEncoding) { - sendEvent(event: SelectEncodingEvent(trackId: trackId, encoding: encoding.description)) + //TODO(FCE-953): This will be useful after simulcast is enabled } func renegotiateTracks() { - sendEvent(event: RenegotiateTracksEvent()) + sendEvent(event: .renegotiateTracks(.init())) } func localCandidate(sdp: String, sdpMLineIndex: Int32, sdpMid: Int32, usernameFragment: String) { - sendEvent( - event: LocalCandidateEvent( - candidate: sdp, sdpMLineIndex: sdpMLineIndex, sdpMid: sdpMid, usernameFragment: usernameFragment)) + var candidate = Fishjam_MediaEvents_Candidate() + candidate.candidate = sdp + candidate.sdpMLineIndex = sdpMLineIndex + candidate.sdpMid = String(sdpMid) + candidate.usernameFragment = usernameFragment + + sendEvent(event: .candidate(candidate)) } - func sdpOffer(sdp: String, trackIdToTrackMetadata: [String: Metadata], midToTrackId: [String: String]) { - sendEvent( - event: SdpOfferEvent(sdp: sdp, trackIdToTrackMetadata: trackIdToTrackMetadata, midToTrackId: midToTrackId)) + func sdpOffer( + sdp: String, trackIdToTrackMetadata: [String: Metadata], midToTrackId: [String: String], + trackIdToBitrates: [String: Int32] + ) { + var sdpOffer = Fishjam_MediaEvents_Peer_MediaEvent.SdpOffer() + + sdpOffer.sdp = sdp + sdpOffer.trackIDToMetadataJson = trackIdToTrackMetadata.toDictionaryJson() + sdpOffer.midToTrackID = midToTrackId + sdpOffer.trackIDToBitrates = Dictionary( + uniqueKeysWithValues: + trackIdToBitrates.map { key, value in + var trackBitrates = Fishjam_MediaEvents_Peer_MediaEvent.TrackBitrates() + trackBitrates.trackID = key + var bitrate = Fishjam_MediaEvents_Peer_MediaEvent.VariantBitrate() + bitrate.variant = .unspecified // TODO(FCE-953): + bitrate.bitrate = value + trackBitrates.variantBitrates = [bitrate] + + return (key, trackBitrates) + }) + + sendEvent(event: .sdpOffer(sdpOffer)) } - private func sendEvent(event: SendableEvent) { - guard let data = try? JSONEncoder().encode(event.serialize()), - let dataPayload = String(data: data, encoding: .utf8) - else { - return - } + private func sendEvent(event: Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content) { for listener in listeners { - listener.onSendMediaEvent(event: dataPayload) + listener.onSendMediaEvent(event: event) } } - func onEvent(serializedEvent: SerializedMediaEvent) { - guard let event = Events.deserialize(payload: serializedEvent) else { - sdkLogger.error("Failed to decode event \(serializedEvent)") - return - } - switch event.type { - case .Connected: - let connected = event as! ConnectedEvent + func onEvent(event: Fishjam_MediaEvents_Server_MediaEvent) { + guard let content = event.content else { return } + + switch content { + case .connected(let connected): for listener in listeners { - listener.onConnected(endpointId: connected.data.id, otherEndpoints: connected.data.otherEndpoints) + listener.onConnected( + endpointId: connected.endpointID, + endpointIdToEndpoint: connected.endpointIDToEndpoint, + iceServers: connected.iceServers + ) } - case .EndpointAdded: - let endpointAdded = event as! EndpointAddedEvent + case .endpointAdded(let endpointAdded): for listener in listeners { listener.onEndpointAdded( - endpointId: endpointAdded.data.id, - metadata: endpointAdded.data.metadata) + endpointId: endpointAdded.endpointID, + metadata: (try? AnyJson(from: endpointAdded.metadataJson)) ?? Metadata()) } - case .EndpointRemoved: - let endpointRemoved = event as! EndpointRemovedEvent + case .endpointRemoved(let endpointRemoved): for listener in listeners { - listener.onEndpointRemoved(endpointId: endpointRemoved.data.id) + listener.onEndpointRemoved(endpointId: endpointRemoved.endpointID) } - case .EndpointUpdated: - let endpointUpdated = event as! EndpointUpdatedEvent + case .endpointUpdated(let endpointUpdated): for listener in listeners { - listener.onEndpointUpdated( - endpointId: endpointUpdated.data.endpointId, metadata: endpointUpdated.data.metadata ?? AnyJson()) + endpointId: endpointUpdated.endpointID, + metadata: (try? AnyJson(from: endpointUpdated.metadataJson)) ?? Metadata() + ) } - case .OfferData: - let offerData = event as! OfferDataEvent + case .offerData(let offerData): for listener in listeners { listener.onOfferData( - integratedTurnServers: offerData.data.integratedTurnServers, tracksTypes: offerData.data.tracksTypes + tracksTypes: offerData.tracksTypes ) } - case .Candidate: - let candidate = event as! RemoteCandidateEvent + case .candidate(let candidate): for listener in listeners { - let sdpMid = candidate.data.sdpMid.map(String.init) - listener.onRemoteCandidate( - candidate: candidate.data.candidate, sdpMLineIndex: candidate.data.sdpMLineIndex, - sdpMid: sdpMid) + candidate: candidate.candidate, + sdpMLineIndex: candidate.sdpMLineIndex, + sdpMid: candidate.sdpMid + ) } - case .TracksAdded: - let tracksAdded = event as! TracksAddedEvent + case .tracksAdded(let tracksAdded): for listener in listeners { - listener.onTracksAdded( - endpointId: tracksAdded.data.endpointId, tracks: tracksAdded.data.tracks) + endpointId: tracksAdded.endpointID, + trackIdToTracks: tracksAdded.trackIDToTrack + ) } - case .TracksRemoved: - let tracksRemoved = event as! TracksRemovedEvent + case .tracksRemoved(let tracksRemoved): for listener in listeners { listener.onTracksRemoved( - endpointId: tracksRemoved.data.endpointId, trackIds: tracksRemoved.data.trackIds) + endpointId: tracksRemoved.endpointID, + trackIds: tracksRemoved.trackIds + ) } - case .TrackUpdated: - let tracksUpdated = event as! TracksUpdatedEvent + case .trackUpdated(let tracksUpdated): for listener in listeners { listener.onTrackUpdated( - endpointId: tracksUpdated.data.endpointId, trackId: tracksUpdated.data.trackId, - metadata: tracksUpdated.data.metadata ?? AnyJson()) + endpointId: tracksUpdated.endpointID, + trackId: tracksUpdated.trackID, + metadata: (try? AnyJson(from: tracksUpdated.metadataJson)) ?? Metadata() + ) } - case .SdpAnswer: - let sdpAnswer = event as! SdpAnswerEvent + case .sdpAnswer(let sdpAnswer): for listener in listeners { listener.onSdpAnswer( - type: sdpAnswer.data.type, sdp: sdpAnswer.data.sdp, midToTrackId: sdpAnswer.data.midToTrackId) - } - case .EncodingSwitched: - let encodingSwitched = event as! EncodingSwitchedEvent - for listener in listeners { - - listener.onTrackEncodingChanged( - endpointId: encodingSwitched.data.endpointId, trackId: encodingSwitched.data.trackId, - encoding: encodingSwitched.data.encoding, encodingReason: encodingSwitched.data.reason) + sdp: sdpAnswer.sdp, + midToTrackId: sdpAnswer.midToTrackID + ) } - case .VadNotification: - let vadNotification = event as! VadNotificationEvent + case .vadNotification(let vadNotification): for listener in listeners { - listener.onVadNotification(trackId: vadNotification.data.trackId, status: vadNotification.data.status) + listener.onVadNotification( + trackId: vadNotification.trackID, + status: vadNotification.status + ) } - case .BandwidthEstimation: - let bandwidthEstimation = event as! BandwidthEstimationEvent - for listener in listeners { + case .error(let error): + sdkLogger.error("Failed to handle event. Message: \(error.message)") - listener.onBandwidthEstimation(estimation: Int(bandwidthEstimation.data.estimation)) - } - default: - sdkLogger.error("Failed to handle ReceivableEvent of type \(event.type)") - return + case .trackVariantSwitched(_): break // TODO(FCE-953): Add with simulcast + case .trackVariantDisabled(_): break // TODO(FCE-953): Add with simulcast + case .trackVariantEnabled(_): break // TODO(FCE-953): Add with simulcast } } } diff --git a/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineListener.swift b/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineListener.swift index b4f01549..1eb989b4 100644 --- a/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineListener.swift +++ b/packages/ios-client/Sources/FishjamClient/webrtc/RTCEngineListener.swift @@ -1,16 +1,18 @@ internal protocol RTCEngineListener: AnyObject { - func onSendMediaEvent(event: SerializedMediaEvent) - func onConnected(endpointId: String, otherEndpoints: [EventEndpoint]) + func onSendMediaEvent(event: Fishjam_MediaEvents_Peer_MediaEvent.OneOf_Content) + func onConnected( + endpointId: String, endpointIdToEndpoint: [String: Fishjam_MediaEvents_Server_MediaEvent.Endpoint], + iceServers: [Fishjam_MediaEvents_Server_MediaEvent.IceServer]) func onEndpointAdded(endpointId: String, metadata: Metadata?) func onEndpointRemoved(endpointId: String) func onEndpointUpdated(endpointId: String, metadata: Metadata?) - func onOfferData(integratedTurnServers: [OfferDataEvent.TurnServer], tracksTypes: [String: Int]) - func onSdpAnswer(type: String, sdp: String, midToTrackId: [String: String]) + func onOfferData(tracksTypes: Fishjam_MediaEvents_Server_MediaEvent.OfferData.TrackTypes) + func onSdpAnswer(sdp: String, midToTrackId: [String: String]) func onRemoteCandidate(candidate: String, sdpMLineIndex: Int32, sdpMid: String?) - func onTracksAdded(endpointId: String, tracks: [String: TrackData]) + func onTracksAdded(endpointId: String, trackIdToTracks: [String: Fishjam_MediaEvents_Server_MediaEvent.Track]) func onTracksRemoved(endpointId: String, trackIds: [String]) func onTrackUpdated(endpointId: String, trackId: String, metadata: Metadata) func onTrackEncodingChanged(endpointId: String, trackId: String, encoding: String, encodingReason: String) - func onVadNotification(trackId: String, status: String) + func onVadNotification(trackId: String, status: Fishjam_MediaEvents_Server_MediaEvent.VadNotification.Status) func onBandwidthEstimation(estimation: Int) } diff --git a/packages/react-native-client/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt b/packages/react-native-client/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt index a762cdc1..da2668a6 100644 --- a/packages/react-native-client/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt +++ b/packages/react-native-client/android/src/main/java/io/fishjam/reactnative/RNFishjamClient.kt @@ -30,6 +30,7 @@ import com.twilio.audioswitch.AudioDevice import expo.modules.kotlin.AppContext import expo.modules.kotlin.Promise import expo.modules.kotlin.exception.CodedException +import fishjam.media_events.server.Server import io.fishjam.reactnative.extensions.toLocalCamera import io.fishjam.reactnative.foregroundService.ForegroundServiceManager import io.fishjam.reactnative.managers.LocalCameraTracksChangedListenersManager @@ -452,7 +453,11 @@ class RNFishjamClient( "id" to track.id(), "type" to "Audio", "metadata" to track.metadata, - "vadStatus" to track.vadStatus.value + "vadStatus" to + when (track.vadStatus) { + Server.MediaEvent.VadNotification.Status.STATUS_SPEECH -> "speech" + else -> "silence" + } ) is LocalVideoTrack -> diff --git a/packages/react-native-client/ios/RNFishjamClient.swift b/packages/react-native-client/ios/RNFishjamClient.swift index 4374cfd2..859a1729 100644 --- a/packages/react-native-client/ios/RNFishjamClient.swift +++ b/packages/react-native-client/ios/RNFishjamClient.swift @@ -516,7 +516,7 @@ class RNFishjamClient: FishjamClientListener { "id": track.id, "type": "Audio", "metadata": track.metadata.toDict(), - "vadStatus": track.vadStatus.rawValue, + "vadStatus": track.vadStatus == .speech ? "speech" : "silence", ] case let track as LocalCameraTrack: diff --git a/packages/react-native-client/plugin/src/withFishjamAndroid.ts b/packages/react-native-client/plugin/src/withFishjamAndroid.ts index fa856f81..61c31556 100644 --- a/packages/react-native-client/plugin/src/withFishjamAndroid.ts +++ b/packages/react-native-client/plugin/src/withFishjamAndroid.ts @@ -2,8 +2,8 @@ import { ConfigPlugin, withAndroidManifest } from '@expo/config-plugins'; import { getMainApplicationOrThrow } from '@expo/config-plugins/build/android/Manifest'; import { FishjamPluginOptions } from './types'; -const withFishjamForegroundService: ConfigPlugin = (config) => { - return withAndroidManifest(config, async (configuration) => { +const withFishjamForegroundService: ConfigPlugin = (config) => + withAndroidManifest(config, async (configuration) => { const mainApplication = getMainApplicationOrThrow(configuration.modResults); mainApplication.service = mainApplication.service || []; @@ -27,7 +27,6 @@ const withFishjamForegroundService: ConfigPlugin = (config) => { return configuration; }); -}; export const withFishjamAndroid: ConfigPlugin = ( config, diff --git a/packages/react-native-client/plugin/src/withFishjamIos.ts b/packages/react-native-client/plugin/src/withFishjamIos.ts index 83b5a0b1..e2a457b8 100644 --- a/packages/react-native-client/plugin/src/withFishjamIos.ts +++ b/packages/react-native-client/plugin/src/withFishjamIos.ts @@ -88,25 +88,21 @@ const withAppGroupPermissions: ConfigPlugin = (config) => { * Adds constants to Info.plist * In other to dynamically retreive extension's bundleId and group name we need to store it in Info.plist. */ -const withInfoPlistConstants: ConfigPlugin = (config) => { - return withInfoPlist(config, (configuration) => { +const withInfoPlistConstants: ConfigPlugin = (config) => + withInfoPlist(config, (configuration) => { const bundleIdentifier = configuration.ios?.bundleIdentifier || ''; configuration.modResults['AppGroupName'] = `group.${bundleIdentifier}`; configuration.modResults['ScreenShareExtensionBundleId'] = `${bundleIdentifier}.${SBE_TARGET_NAME}`; return configuration; }); -}; /** * Updates and copies required extension files. * Our extension needs to be properly setup inside the Xcode project. In order to do that we need to copy the files and update the pbxproj. */ -const withFishjamSBE: ConfigPlugin = ( - config, - options, -) => { - return withXcodeProject(config, async (props) => { +const withFishjamSBE: ConfigPlugin = (config, options) => + withXcodeProject(config, async (props) => { const appName = props.modRequest.projectName || ''; const iosPath = props.modRequest.platformProjectRoot; const bundleIdentifier = props.ios?.bundleIdentifier; @@ -261,7 +257,6 @@ const withFishjamSBE: ConfigPlugin = ( return props; }); -}; /** * Applies screen sharing plugin if enabled. In order for screensharing to work, we need to copy extension files to your iOS project. diff --git a/packages/react-native-client/src/components/FishjamRoom/parsePeersToTracks.ts b/packages/react-native-client/src/components/FishjamRoom/parsePeersToTracks.ts index bf9e7daa..06daf29d 100644 --- a/packages/react-native-client/src/components/FishjamRoom/parsePeersToTracks.ts +++ b/packages/react-native-client/src/components/FishjamRoom/parsePeersToTracks.ts @@ -39,9 +39,7 @@ const createGridTracksFromPeer = (peer: PeerWithTracks): GridTrack[] => { export const parsePeersToTracks = ( localPeer: PeerWithTracks | null, remotePeers: PeerWithTracks[], -): GridTrack[] => { - return [ - ...(localPeer ? createGridTracksFromPeer(localPeer) : []), - ...remotePeers.flatMap(createGridTracksFromPeer), - ]; -}; +): GridTrack[] => [ + ...(localPeer ? createGridTracksFromPeer(localPeer) : []), + ...remotePeers.flatMap(createGridTracksFromPeer), +]; diff --git a/packages/react-native-client/src/hooks/internal/useFishjamEventState.ts b/packages/react-native-client/src/hooks/internal/useFishjamEventState.ts index e3cf4e55..a492861c 100644 --- a/packages/react-native-client/src/hooks/internal/useFishjamEventState.ts +++ b/packages/react-native-client/src/hooks/internal/useFishjamEventState.ts @@ -4,10 +4,14 @@ import { ReceivableEvents } from '../../RNFishjamClientModule'; export function useFishjamEventState( eventName: keyof typeof ReceivableEvents, - defaultValue: StateType, + defaultValue: EventType, transform?: (eventValue: EventType) => StateType, ) { - const [value, setValue] = useState(defaultValue); + const [value, setValue] = useState( + transform + ? transform(defaultValue) + : (defaultValue as unknown as StateType), + ); const onEvent = useCallback( (newValue: EventType) => { diff --git a/packages/react-native-client/src/hooks/usePeers.ts b/packages/react-native-client/src/hooks/usePeers.ts index f665cfbc..8e389c0f 100644 --- a/packages/react-native-client/src/hooks/usePeers.ts +++ b/packages/react-native-client/src/hooks/usePeers.ts @@ -111,6 +111,7 @@ function getPeerWithDistinguishedTracks< peer: Peer, ): PeerWithTracks { const { tracks: peerTracks } = peer; + const distinguishedTracks: DistinguishedTracks = {}; for (const track of peerTracks) { diff --git a/protos b/protos index 8c149b2d..0bcb4209 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit 8c149b2dd68257edadc0a1e8048fb15c67b22125 +Subproject commit 0bcb420955d0441a355c49be0a492d9b827fbbe8 diff --git a/scripts/compile_protos.mk b/scripts/compile_protos.mk index f3f3ed37..66a09cc1 100644 --- a/scripts/compile_protos.mk +++ b/scripts/compile_protos.mk @@ -69,7 +69,6 @@ compile_ios: $(PROTOC) $(PROTOC_GEN_SWIFT) sync @echo "Compiling proto files for iOS" @for proto in $(PROTO_FILES); do \ echo "Compiling iOS: $$proto"; \ - $(PROTOC) -I=$(PROTOS_PATH) -I=$(PROTOC_BASE_PATH)/include --plugin=$(PROTOC_GEN_SWIFT) --swift_out=$(IOS_OUT) $$proto; \ + $(PROTOC) -I=$(PROTOS_PATH) -I=$(PROTOC_BASE_PATH)/include --plugin=$(PROTOC_GEN_SWIFT) --swift_out=$(IOS_OUT) --swift_opt=Visibility=public $$proto; \ done @echo "DONE for iOS" - \ No newline at end of file