From 5f335b7551ab52c57a0f2c608f7cdfaf16c0d3d1 Mon Sep 17 00:00:00 2001 From: Sina Madani Date: Thu, 5 Sep 2024 16:48:52 +0100 Subject: [PATCH] Video KDocs throws clauses --- .../kotlin/com/vonage/client/kt/Account.kt | 2 +- .../com/vonage/client/kt/Application.kt | 2 +- .../kotlin/com/vonage/client/kt/Conversion.kt | 2 +- .../kotlin/com/vonage/client/kt/Messages.kt | 2 +- .../com/vonage/client/kt/NumberInsight.kt | 2 +- .../vonage/client/kt/NumberVerification.kt | 2 +- .../kotlin/com/vonage/client/kt/Numbers.kt | 2 +- .../kotlin/com/vonage/client/kt/Redact.kt | 2 +- .../kotlin/com/vonage/client/kt/SimSwap.kt | 2 +- src/main/kotlin/com/vonage/client/kt/Sms.kt | 2 +- .../com/vonage/client/kt/Subaccounts.kt | 2 +- src/main/kotlin/com/vonage/client/kt/Users.kt | 2 +- .../kotlin/com/vonage/client/kt/Verify.kt | 2 +- .../com/vonage/client/kt/VerifyLegacy.kt | 2 +- src/main/kotlin/com/vonage/client/kt/Video.kt | 82 ++++++++++++++++++- src/main/kotlin/com/vonage/client/kt/Voice.kt | 2 +- 16 files changed, 93 insertions(+), 19 deletions(-) diff --git a/src/main/kotlin/com/vonage/client/kt/Account.kt b/src/main/kotlin/com/vonage/client/kt/Account.kt index 9202b23..1c3fb4d 100644 --- a/src/main/kotlin/com/vonage/client/kt/Account.kt +++ b/src/main/kotlin/com/vonage/client/kt/Account.kt @@ -20,7 +20,7 @@ import com.vonage.client.account.* /** * Implementation of the [Account API](https://developer.vonage.com/en/api/account). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class Account internal constructor(private val client: AccountClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Application.kt b/src/main/kotlin/com/vonage/client/kt/Application.kt index ec04026..ef0aa44 100644 --- a/src/main/kotlin/com/vonage/client/kt/Application.kt +++ b/src/main/kotlin/com/vonage/client/kt/Application.kt @@ -27,7 +27,7 @@ import java.util.* /** * Implementation of the [Application API](https://developer.vonage.com/en/api/application.v2). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class Application internal constructor(private val client: ApplicationClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Conversion.kt b/src/main/kotlin/com/vonage/client/kt/Conversion.kt index 6cd0983..fb3996b 100644 --- a/src/main/kotlin/com/vonage/client/kt/Conversion.kt +++ b/src/main/kotlin/com/vonage/client/kt/Conversion.kt @@ -22,7 +22,7 @@ import java.util.* /** * Implementation of the [Conversion API](https://developer.vonage.com/en/api/Conversion). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class Conversion internal constructor(private val client: ConversionClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Messages.kt b/src/main/kotlin/com/vonage/client/kt/Messages.kt index c86e125..554d1e4 100644 --- a/src/main/kotlin/com/vonage/client/kt/Messages.kt +++ b/src/main/kotlin/com/vonage/client/kt/Messages.kt @@ -26,7 +26,7 @@ import java.util.UUID /** * Implementation of the [Messages API](https://developer.vonage.com/en/api/messages-olympus). * - * Authentication method: JWT (recommended), API key & secret (limited functionality). + * *Authentication method:* JWT (recommended), API key & secret (limited functionality). */ class Messages internal constructor(private val client: MessagesClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/NumberInsight.kt b/src/main/kotlin/com/vonage/client/kt/NumberInsight.kt index b0fe45f..adc8a14 100644 --- a/src/main/kotlin/com/vonage/client/kt/NumberInsight.kt +++ b/src/main/kotlin/com/vonage/client/kt/NumberInsight.kt @@ -20,7 +20,7 @@ import com.vonage.client.insight.* /** * Implementation of the [Number Insight API](https://developer.vonage.com/en/api/number-insight). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class NumberInsight internal constructor(private val client: InsightClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/NumberVerification.kt b/src/main/kotlin/com/vonage/client/kt/NumberVerification.kt index fd7888a..b2635ff 100644 --- a/src/main/kotlin/com/vonage/client/kt/NumberVerification.kt +++ b/src/main/kotlin/com/vonage/client/kt/NumberVerification.kt @@ -23,7 +23,7 @@ import java.net.URI /** * Implementation of the [Number Verification API](https://developer.vonage.com/en/api/camara/number-verification). * - * Authentication method: JWT. + * *Authentication method:* JWT. */ class NumberVerification internal constructor(private val client: NumberVerificationClient) { private var redirectUri: URI? = null diff --git a/src/main/kotlin/com/vonage/client/kt/Numbers.kt b/src/main/kotlin/com/vonage/client/kt/Numbers.kt index 7c3d0d4..88dbb51 100644 --- a/src/main/kotlin/com/vonage/client/kt/Numbers.kt +++ b/src/main/kotlin/com/vonage/client/kt/Numbers.kt @@ -20,7 +20,7 @@ import com.vonage.client.numbers.* /** * Implementation of the [Numbers API](https://developer.vonage.com/en/api/numbers). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class Numbers internal constructor(private val client: NumbersClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Redact.kt b/src/main/kotlin/com/vonage/client/kt/Redact.kt index 4479eb5..864e164 100644 --- a/src/main/kotlin/com/vonage/client/kt/Redact.kt +++ b/src/main/kotlin/com/vonage/client/kt/Redact.kt @@ -20,7 +20,7 @@ import com.vonage.client.redact.* /** * Implementation of the [Redact API](https://developer.vonage.com/en/api/redact). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class Redact internal constructor(private val client: RedactClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/SimSwap.kt b/src/main/kotlin/com/vonage/client/kt/SimSwap.kt index dbe58a2..926f0a2 100644 --- a/src/main/kotlin/com/vonage/client/kt/SimSwap.kt +++ b/src/main/kotlin/com/vonage/client/kt/SimSwap.kt @@ -23,7 +23,7 @@ import java.time.Instant /** * Implementation of the [Sim Swap API](https://developer.vonage.com/en/api/camara/sim-swap). * - * Authentication method: JWT. + * *Authentication method:* JWT. */ class SimSwap internal constructor(private val client: SimSwapClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Sms.kt b/src/main/kotlin/com/vonage/client/kt/Sms.kt index a761216..31a03c7 100644 --- a/src/main/kotlin/com/vonage/client/kt/Sms.kt +++ b/src/main/kotlin/com/vonage/client/kt/Sms.kt @@ -21,7 +21,7 @@ import com.vonage.client.sms.messages.* /** * Implementation of the [SMS API](https://developer.vonage.com/en/api/sms). * - * Authentication method: API key & secret or signature secret. + * *Authentication method:* API key & secret or signature secret. */ class Sms internal constructor(private val client: SmsClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Subaccounts.kt b/src/main/kotlin/com/vonage/client/kt/Subaccounts.kt index 351cc2c..5fe8b89 100644 --- a/src/main/kotlin/com/vonage/client/kt/Subaccounts.kt +++ b/src/main/kotlin/com/vonage/client/kt/Subaccounts.kt @@ -22,7 +22,7 @@ import java.time.Instant /** * Implementation of the [Subaccounts API](https://developer.vonage.com/en/api/subaccounts). * - * Authentication method: API key & secret. + * *Authentication method:* API key & secret. */ class Subaccounts internal constructor(private val client: SubaccountsClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Users.kt b/src/main/kotlin/com/vonage/client/kt/Users.kt index d244382..adc5772 100644 --- a/src/main/kotlin/com/vonage/client/kt/Users.kt +++ b/src/main/kotlin/com/vonage/client/kt/Users.kt @@ -20,7 +20,7 @@ import com.vonage.client.users.* /** * Implementation of the [Users API](https://developer.vonage.com/en/api/application.v2#User). * - * Authentication method: JWT. + * *Authentication method:* JWT. */ class Users internal constructor(private val client: UsersClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Verify.kt b/src/main/kotlin/com/vonage/client/kt/Verify.kt index 92b1a5a..1abf91b 100644 --- a/src/main/kotlin/com/vonage/client/kt/Verify.kt +++ b/src/main/kotlin/com/vonage/client/kt/Verify.kt @@ -21,7 +21,7 @@ import java.util.* /** * Implementation of the [Verify v2 API](https://developer.vonage.com/en/api/verify.v2). * - * Authentication method: JWT (recommended) and API key & secret (limited functionality). + * *Authentication method:* JWT (recommended) and API key & secret (limited functionality). */ class Verify(private val client: Verify2Client) { diff --git a/src/main/kotlin/com/vonage/client/kt/VerifyLegacy.kt b/src/main/kotlin/com/vonage/client/kt/VerifyLegacy.kt index c243658..9e04c43 100644 --- a/src/main/kotlin/com/vonage/client/kt/VerifyLegacy.kt +++ b/src/main/kotlin/com/vonage/client/kt/VerifyLegacy.kt @@ -20,7 +20,7 @@ import com.vonage.client.verify.* /** * Implementation of the [Verify v1 API](https://developer.vonage.com/en/api/verify). * - * Authentication method: API key & secret or signature secret. + * *Authentication method:* API key & secret or signature secret. */ class VerifyLegacy internal constructor(private val client: VerifyClient) { diff --git a/src/main/kotlin/com/vonage/client/kt/Video.kt b/src/main/kotlin/com/vonage/client/kt/Video.kt index fccf327..a39da72 100644 --- a/src/main/kotlin/com/vonage/client/kt/Video.kt +++ b/src/main/kotlin/com/vonage/client/kt/Video.kt @@ -21,7 +21,7 @@ import java.util.* /** * Implementation of the [Video API](https://developer.vonage.com/en/api/video). * - * Authentication method: JWT. + * *Authentication method:* JWT. */ class Video(private val client: VideoClient) { @@ -31,6 +31,8 @@ class Video(private val client: VideoClient) { * @param properties (OPTIONAL) A lambda function to set the parameters of the session. * * @return The created session metadata. + * + * @throws [VideoResponseException] If the session could not be created. */ fun createSession(properties: CreateSessionRequest.Builder.() -> Unit = {}): CreateSessionResponse = client.createSession(CreateSessionRequest.builder().apply(properties).build()) @@ -69,11 +71,15 @@ class Video(private val client: VideoClient) { * Retrieves the stream details. * * @return The stream metadata. + * + * @throws [VideoResponseException] If the stream details could not be retrieved. */ fun info(): GetStreamResponse = client.getStream(this@ExistingSession.id, id) /** * Mute the stream. + * + * @throws [VideoResponseException] If the stream could not be muted. */ fun mute(): Unit = client.muteStream(this@ExistingSession.id, id) @@ -81,6 +87,8 @@ class Video(private val client: VideoClient) { * Update the stream's video layout. * * @param layoutClasses The layout class names to apply to the stream. + * + * @throws [VideoResponseException] If the stream layout could not be updated. */ fun setLayout(vararg layoutClasses: String): Unit = client.setStreamLayout(this@ExistingSession.id, @@ -106,6 +114,8 @@ class Video(private val client: VideoClient) { /** * Force the client to disconnect from the session. + * + * @throws [VideoResponseException] If the client could not be disconnected. */ fun disconnect(): Unit = client.forceDisconnect(this@ExistingSession.id, id) @@ -114,6 +124,8 @@ class Video(private val client: VideoClient) { * * @param type Type of data that is being sent to the client. This cannot exceed 128 bytes. * @param data Payload that is being sent to the client. This cannot exceed 8kb. + * + * @throws [VideoResponseException] If the signal could not be sent. */ fun signal(type: String, data: String): Unit = client.signal(this@ExistingSession.id, id, signalRequest(type, data)) @@ -124,6 +136,8 @@ class Video(private val client: VideoClient) { * * @param digits The string of DTMF digits to send. This can include 0-9, '*', '#', and 'p'. * A 'p' indicates a pause of 500ms (if you need to add a delay in sending the digits). + * + * @throws [VideoResponseException] If the DTMF tones could not be sent. */ fun sendDtmf(digits: String): Unit = client.sendDtmf(this@ExistingSession.id, id, digits) } @@ -142,6 +156,8 @@ class Video(private val client: VideoClient) { * property is set to true. When the active property is set to false, it is ignored. * * @return The updated project details. + * + * @throws [VideoResponseException] If the streams could not be muted. */ fun muteStreams(active: Boolean = true, vararg excludedStreamIds: String): ProjectDetails = client.muteSession(id, active, @@ -153,6 +169,8 @@ class Video(private val client: VideoClient) { * Video stream. The layout classes define how the stream is displayed in the layout of a broadcast stream. * * @return A list of streams and their layouts for this session. + * + * @throws [VideoResponseException] If the streams could not be retrieved. */ fun listStreams(): List = client.listStreams(id) @@ -163,6 +181,8 @@ class Video(private val client: VideoClient) { * @param offset (OPTIONAL) Index of the first Archive to return (used for pagination). * * @return A list of Archives. + * + * @throws [VideoResponseException] If the archives could not be retrieved. */ fun listArchives(count: Int = 1000, offset: Int = 0): List = client.listArchives(listCompositionsFilter(count, offset, id)) @@ -174,6 +194,8 @@ class Video(private val client: VideoClient) { * @param offset (OPTIONAL) Index of the first Broadcast to return (used for pagination). * * @return A list of Broadcasts. + * + * @throws [VideoResponseException] If the broadcasts could not be retrieved. */ fun listBroadcasts(count: Int = 1000, offset: Int = 0): List = client.listBroadcasts(listCompositionsFilter(count, offset, id)) @@ -183,6 +205,8 @@ class Video(private val client: VideoClient) { * * @param type Type of data that is being sent to the clients. This cannot exceed 128 bytes. * @param data Payload that is being sent to the clients. This cannot exceed 8kb. + * + * @throws [VideoResponseException] If the signal could not be sent. */ fun signalAll(type: String, data: String): Unit = client.signalAll(id, signalRequest(type, data)) @@ -193,6 +217,8 @@ class Video(private val client: VideoClient) { * * @param digits The string of DTMF digits to send. This can include 0-9, '*', '#', and 'p'. * A 'p' indicates a pause of 500ms (if you need to add a delay in sending the digits). + * + * @throws [VideoResponseException] If the DTMF tones could not be sent. */ fun sendDtmf(digits: String): Unit = client.sendDtmf(id, digits) @@ -206,7 +232,9 @@ class Video(private val client: VideoClient) { * @param token A valid Vonage JWT with role set to Moderator. * @param properties (OPTIONAL) A lambda function to set the parameters of the audio captioning session. * - * @return Unique ID of the audio captioning session + * @return Unique ID of the audio captioning session. + * + * @throws [VideoResponseException] If the captions could not be started. */ fun startCaptions(token: String, properties: CaptionsRequest.Builder.() -> Unit = {}): UUID = client.startCaptions(CaptionsRequest.builder() @@ -217,6 +245,8 @@ class Video(private val client: VideoClient) { * Stop Live Captions for the session. * * @param captionsId The unique ID of the audio captioning session. + * + * @throws [VideoResponseException] If the captions could not be stopped. */ fun stopCaptions(captionsId: String): Unit = client.stopCaptions(captionsId) @@ -236,6 +266,8 @@ class Video(private val client: VideoClient) { * You need to provide a token and a SIP URI to establish the connection. * * @return Details of the SIP connection. + * + * @throws [VideoResponseException] If the SIP connection could not be established. */ fun sipDial(properties: SipDialRequest.Builder.() -> Unit): SipDialResponse = client.sipDial(SipDialRequest.builder().sessionId(id).apply(properties).build()) @@ -246,6 +278,8 @@ class Video(private val client: VideoClient) { * @param properties A lambda function to set the parameters of the WebSocket connection. * * @return Details of the WebSocket connection. + * + * @throws [VideoResponseException] If the WebSocket connection could not be established. */ fun connectToWebsocket(properties: ConnectRequest.Builder.() -> Unit): ConnectResponse = client.connectToWebsocket(ConnectRequest.builder().sessionId(id).apply(properties).build()) @@ -256,6 +290,8 @@ class Video(private val client: VideoClient) { * @param properties A lambda function to set the parameters of the Experience Composer. * * @return Details of the created Experience Composer. + * + * @throws [VideoResponseException] If the Experience Composer could not be created. */ fun startRender(properties: RenderRequest.Builder.() -> Unit): RenderResponse = client.startRender(RenderRequest.builder().sessionId(id).apply(properties).build()) @@ -266,6 +302,8 @@ class Video(private val client: VideoClient) { * @param properties (OPTIONAL) A lambda function to set the parameters of the Archive. * * @return Details of the created Archive. + * + * @throws [VideoResponseException] If the Archive could not be created. */ fun createArchive(properties: Archive.Builder.() -> Unit = {}): Archive = client.createArchive(Archive.builder(id).apply(properties).build()) @@ -283,6 +321,8 @@ class Video(private val client: VideoClient) { * for details of required and optional parameters. * * @return Details of the created broadcast. + * + * @throws [VideoResponseException] If the broadcast could not be started. */ fun startBroadcast(properties: Broadcast.Builder.() -> Unit): Broadcast = client.createBroadcast(Broadcast.builder(id).apply(properties).build()) @@ -293,6 +333,8 @@ class Video(private val client: VideoClient) { * @param options (OPTIONAL) A lambda function to set the parameters (claims) of the token. * * @return A new JWT with the specified claims. + * + * @throws [VideoResponseException] If the token could not be generated. */ fun generateToken(options: TokenOptions.Builder.() -> Unit = {}): String = client.generateToken(id, TokenOptions.builder().apply(options).build()) @@ -305,6 +347,8 @@ class Video(private val client: VideoClient) { * @param offset (OPTIONAL) Index of the first Archive to return (used for pagination). * * @return A list of Archives. + * + * @throws [VideoResponseException] If the archives could not be retrieved. */ fun listArchives(count: Int = 1000, offset: Int = 0): List = client.listArchives(listCompositionsFilter(count, offset)) @@ -329,6 +373,8 @@ class Video(private val client: VideoClient) { * Retrieve archive information. * * @return Details of the archive. + * + * @throws [VideoResponseException] If the archive details could not be retrieved. */ fun info(): Archive = client.getArchive(id) @@ -344,11 +390,15 @@ class Video(private val client: VideoClient) { * disconnects from the session, or 60 minutes after the last client stops publishing a stream to the session. * * @return Details of the archive. + * + * @throws [VideoResponseException] If the archive could not be stopped. */ fun stop(): Archive = client.stopArchive(id) /** * Delete the archive. + * + * @throws [VideoResponseException] If the archive could not be deleted. */ fun delete(): Unit = client.deleteArchive(id) @@ -364,6 +414,8 @@ class Video(private val client: VideoClient) { * * @param stylesheet (OPTIONAL) The CSS stylesheet to use for the archive. If you set this property, * then `initialLayout` must be set to [ScreenLayoutType.CUSTOM]. + * + * @throws [VideoResponseException] If the layout could not be set. */ fun setLayout(initialLayout: ScreenLayoutType, screenshareType: ScreenLayoutType? = null, @@ -382,6 +434,8 @@ class Video(private val client: VideoClient) { * @param streamId UUID of the stream to add. * @param audio (OPTIONAL) Whether the composed archive should include the stream's audio. * @param video (OPTIONAL) Whether the composed archive should include the stream's video. + * + * @throws [VideoResponseException] If the stream could not be added. */ fun addStream(streamId: String, audio: Boolean = true, video: Boolean = true): Unit = client.addArchiveStream(id, streamId, audio, video) @@ -391,6 +445,8 @@ class Video(private val client: VideoClient) { * the `streamMode` set to [StreamMode.MANUAL]. * * @param streamId UUID of the stream to remove. + * + * @throws [VideoResponseException] If the stream could not be removed. */ fun removeStream(streamId: String): Unit = client.removeArchiveStream(id, streamId) } @@ -402,6 +458,8 @@ class Video(private val client: VideoClient) { * @param offset (OPTIONAL) Index of the first Broadcast to return (used for pagination). * * @return A list of Broadcasts. + * + * @throws [VideoResponseException] If the broadcasts could not be retrieved. */ fun listBroadcasts(count: Int = 1000, offset: Int = 0): List = client.listBroadcasts(listCompositionsFilter(count, offset)) @@ -423,9 +481,11 @@ class Video(private val client: VideoClient) { inner class ExistingBroadcast internal constructor(id: String): ExistingResource(id) { /** - * Retrieves the broadcast details. + * Retrieves information about the broadcast in progress. * - * @return The broadcast metadata. + * @return Details of the broadcast. + * + * @throws [VideoResponseException] If the broadcast details could not be retrieved. */ fun info(): Broadcast = client.getBroadcast(id) @@ -433,6 +493,8 @@ class Video(private val client: VideoClient) { * Stops the broadcast. * * @return Details of the broadcast. + * + * @throws [VideoResponseException] If the broadcast could not be stopped. */ fun stop(): Broadcast = client.stopBroadcast(id) @@ -448,6 +510,8 @@ class Video(private val client: VideoClient) { * * @param stylesheet (OPTIONAL) The CSS stylesheet to use for the broadcast. If you set this property, * then `initialLayout` must be set to [ScreenLayoutType.CUSTOM]. + * + * @throws [VideoResponseException] If the layout could not be set. */ fun setLayout(initialLayout: ScreenLayoutType, screenshareType: ScreenLayoutType? = null, @@ -465,6 +529,8 @@ class Video(private val client: VideoClient) { * @param streamId UUID of the stream to add. * @param audio (OPTIONAL) Whether the broadcast should include the stream's audio. * @param video (OPTIONAL) Whether the broadcast should include the stream's video. + * + * @throws [VideoResponseException] If the stream could not be added. */ fun addStream(streamId: String, audio: Boolean = true, video: Boolean = true): Unit = client.addBroadcastStream(id, streamId, audio, video) @@ -473,6 +539,8 @@ class Video(private val client: VideoClient) { * Remove a stream from the broadcast. * * @param streamId UUID of the stream to remove. + * + * @throws [VideoResponseException] If the stream could not be removed. */ fun removeStream(streamId: String): Unit = client.removeBroadcastStream(id, streamId) } @@ -484,6 +552,8 @@ class Video(private val client: VideoClient) { * @param offset (OPTIONAL) Index of the first Experience Composer to return (used for pagination). * * @return A list of Experience Composers. + * + * @throws [VideoResponseException] If the Experience Composers could not be retrieved. */ fun listRenders(count: Int = 1000, offset: Int = 0): List = client.listRenders(ListStreamCompositionsRequest.builder().count(count).offset(offset).build()) @@ -508,11 +578,15 @@ class Video(private val client: VideoClient) { * Retrieves the Experience Composer. * * @return Details of the Experience Composer. + * + * @throws [VideoResponseException] If the Experience Composer details could not be retrieved. */ fun info(): RenderResponse = client.getRender(id) /** * Stops the Experience Composer. + * + * @throws [VideoResponseException] If the Experience Composer could not be stopped. */ fun stop(): Unit = client.stopRender(id) } diff --git a/src/main/kotlin/com/vonage/client/kt/Voice.kt b/src/main/kotlin/com/vonage/client/kt/Voice.kt index 49127a0..b08ecbf 100644 --- a/src/main/kotlin/com/vonage/client/kt/Voice.kt +++ b/src/main/kotlin/com/vonage/client/kt/Voice.kt @@ -24,7 +24,7 @@ import java.util.* /** * Implementation of the [Voice API](https://developer.vonage.com/en/api/voice). * - * Authentication method: JWT. + * *Authentication method:* JWT. */ class Voice internal constructor(private val client: VoiceClient) {