diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java index 21189f1d18a4..8d88583d0e7b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java @@ -102,7 +102,7 @@ public int getSampleRate() { * * @return the channels value. */ - public AudioChannelType getChannels() { + public AudioChannelType getChannelType() { return channels; } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContentType.java similarity index 58% rename from sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContent.java rename to sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContentType.java index bbc5f310f95a..82d231522207 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContent.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContentType.java @@ -9,17 +9,17 @@ import java.util.Collection; /** Defines values for MediaStreamingContentType. */ -public final class MediaStreamingContent extends ExpandableStringEnum { +public final class MediaStreamingContentType extends ExpandableStringEnum { /** Static value audio for MediaStreamingContentType. */ - public static final MediaStreamingContent AUDIO = fromString("audio"); + public static final MediaStreamingContentType AUDIO = fromString("audio"); /** - * Creates an instance of {@link MediaStreamingContent} with no string value. + * Creates an instance of {@link MediaStreamingContentType} with no string value. * - * @deprecated Please use {@link #fromString(String)} to create an instance of MediaStreamingContent. + * @deprecated Please use {@link #fromString(String)} to create an instance of MediaStreamingContentType. */ @Deprecated - public MediaStreamingContent() { + public MediaStreamingContentType() { } /** @@ -28,15 +28,15 @@ public MediaStreamingContent() { * @param name a name to look for. * @return the corresponding MediaStreamingContentType. */ - public static MediaStreamingContent fromString(String name) { - return fromString(name, MediaStreamingContent.class); + public static MediaStreamingContentType fromString(String name) { + return fromString(name, MediaStreamingContentType.class); } /** * Get the collection of MediaStreamingContentType values. * @return known MediaStreamingContentType values. */ - public static Collection values() { - return values(MediaStreamingContent.class); + public static Collection values() { + return values(MediaStreamingContentType.class); } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java index 74ed75b9b16a..760c0fcdfe1c 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java @@ -21,7 +21,7 @@ public final class MediaStreamingOptions { /* * Content type to stream, eg. audio, audio/video */ - private MediaStreamingContent contentType; + private MediaStreamingContentType contentType; /* * Audio channel type to stream, eg. unmixed audio, mixed audio @@ -56,7 +56,7 @@ public final class MediaStreamingOptions { public MediaStreamingOptions(String transportUrl, MediaStreamingAudioChannel audioChannelType) { this.transportUrl = transportUrl; this.transportType = StreamingTransport.WEBSOCKET; - this.contentType = MediaStreamingContent.AUDIO; + this.contentType = MediaStreamingContentType.AUDIO; this.audioChannelType = audioChannelType; this.startMediaStreaming = false; } @@ -84,13 +84,13 @@ public StreamingTransport getTransportType() { * * @return the contentType value. */ - public MediaStreamingContent getContentType() { + public MediaStreamingContentType getContentType() { return this.contentType; } /** * Get the startMediaStreaming property: Enables intermediate results for the transcribed speech. - * + * * @return the startMediaStreaming value. */ public Boolean isStartMediaStreamingEnabled() { @@ -108,11 +108,11 @@ public MediaStreamingAudioChannel getAudioChannelType() { /** * Set the contentType property: The contentType property. - * + * * @param contentType the contentType value to set. * @return the MediaStreamingOptions object itself. */ - public MediaStreamingOptions setContentType(MediaStreamingContent contentType) { + public MediaStreamingOptions setContentType(MediaStreamingContentType contentType) { this.contentType = contentType; return this; } @@ -120,7 +120,7 @@ public MediaStreamingOptions setContentType(MediaStreamingContent contentType) { /** * Get the startMediaStreaming property: A value indicating whether the media streaming should start immediately * after the call is answered. - * + * * @return the startMediaStreaming value. */ public Boolean isStartMediaStreaming() { @@ -130,7 +130,7 @@ public Boolean isStartMediaStreaming() { /** * Set the startMediaStreaming property: A value indicating whether the media streaming should start immediately * after the call is answered. - * + * * @param startMediaStreaming the startMediaStreaming value to set. * @return the MediaStreamingOptions object itself. */ @@ -141,7 +141,7 @@ public MediaStreamingOptions setStartMediaStreaming(Boolean startMediaStreaming) /** * Get the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. - * + * * @return the enableDtmfTones value. */ public Boolean isEnableDtmfTones() { @@ -150,7 +150,7 @@ public Boolean isEnableDtmfTones() { /** * Set the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. - * + * * @param enableDtmfTones the enableDtmfTones value to set. * @return the MediaStreamingOptions object itself. */ @@ -161,7 +161,7 @@ public MediaStreamingOptions setEnableDtmfTones(Boolean enableDtmfTones) { /** * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * + * * @return the enableBidirectional value. */ public Boolean isEnableBidirectional() { @@ -170,7 +170,7 @@ public Boolean isEnableBidirectional() { /** * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * + * * @param enableBidirectional the enableBidirectional value to set. * @return the MediaStreamingOptions object itself. */ @@ -182,7 +182,7 @@ public MediaStreamingOptions setEnableBidirectional(Boolean enableBidirectional) /** * Get the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel * type. - * + * * @return the audioFormat value. */ public AudioFormat getAudioFormat() { @@ -192,7 +192,7 @@ public AudioFormat getAudioFormat() { /** * Set the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel * type. - * + * * @param audioFormat the audioFormat value to set. * @return the MediaStreamingOptions object itself. */ diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java index 6769eb5701d3..4cec4a411c6b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java @@ -34,7 +34,7 @@ public final class MediaStreamingSubscription implements JsonSerializable subscribedContentTypes; + private List subscribedContentTypes; static { MediaStreamingSubscriptionConstructorProxy.setAccessor( @@ -69,14 +69,14 @@ public MediaStreamingSubscription() { this.subscribedContentTypes = mediaStreamingSubscriptionInternal.getSubscribedContentTypes() != null ? mediaStreamingSubscriptionInternal.getSubscribedContentTypes() .stream() - .map(contentType -> MediaStreamingContent.fromString(contentType.toString())) + .map(contentType -> MediaStreamingContentType.fromString(contentType.toString())) .collect(Collectors.toList()) : null; } /** * Get the id property: Gets or Sets subscription Id. - * + * * @return the id value. */ public String getId() { @@ -85,7 +85,7 @@ public String getId() { /** * Get the state property: Gets or Sets media streaming subscription state. - * + * * @return the state value. */ public MediaStreamingSubscriptionState getState() { @@ -94,10 +94,10 @@ public MediaStreamingSubscriptionState getState() { /** * Get the subscribedContentTypes property: Gets or Sets the subscribed media streaming content types. - * + * * @return the subscribedContentTypes value. */ - public List getSubscribedContentTypes() { + public List getSubscribedContentTypes() { return this.subscribedContentTypes; } @@ -113,7 +113,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MediaStreamingSubscriptionInternal from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MediaStreamingSubscriptionInternal if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. @@ -132,8 +132,8 @@ public static MediaStreamingSubscription fromJson(JsonReader jsonReader) throws deserializedMediaStreamingSubscription.state = MediaStreamingSubscriptionState.fromString(reader.getString()); } else if ("subscribedContentTypes".equals(fieldName)) { - List subscribedContentTypes - = reader.readArray(reader1 -> MediaStreamingContent.fromString(reader1.getString())); + List subscribedContentTypes + = reader.readArray(reader1 -> MediaStreamingContentType.fromString(reader1.getString())); deserializedMediaStreamingSubscription.subscribedContentTypes = subscribedContentTypes; } else { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java index 388de87c6164..26d47317ac13 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java @@ -26,6 +26,7 @@ public abstract class StreamingData { /** * Creates an instance of {@link StreamingData}. + * @param streamingDataKind The kind of streaming data. */ public StreamingData(StreamingDataKind streamingDataKind) { this.streamingDataKind = streamingDataKind; @@ -44,7 +45,7 @@ public StreamingDataKind getStreamingDataKind() { * Parses a base64 encoded string into a StreamingData object, * which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. * @param data The base64 string represents streaming data that will be converted into the appropriate subtype of StreamingData. - * @return StreamingData + * @return StreamingData * @throws RuntimeException Throws a RuntimeException if the provided base64 string does not correspond to a supported data type for the specified Kind. */ public static StreamingData parse(String data) { @@ -55,7 +56,7 @@ public static StreamingData parse(String data) { * Parses a base64 encoded string into a StreamingData object, * which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. * @param Subtypes of StreamingData ex. AudioData, AudioMetadata, TranscriptionData, TranscriptionMetadata - * @param data The base64 string represents streaming data that will be converted into the appropriate subtype of StreamingData. + * @param data The base64 string represents streaming data that will be converted into the appropriate subtype of StreamingData. * @param type type of the streamindata ex. AudioData, AudioMetadata, TranscriptionData, TranscriptionMetadata * @return Subtypes of StreamingData * @throws RuntimeException Throws a NotSupportedException if the provided base64 string does not correspond @@ -67,8 +68,8 @@ public static T parse(String data, Class type) { } /** - * - * @param data the base64 string + * + * @param data the base64 string * @return the StreamingData */ private static StreamingData parseStreamingData(String data) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java index 0656b35fa1a1..dec78a4d3c56 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java @@ -42,9 +42,7 @@ public final class TranscriptionOptions { /** * Creates a new instance of MediaStreamingConfiguration * @param transportUrl - The Transport URL - * @param transportType - Transport type * @param locale - Locale - * @param startTranscription - Start Transcription */ public TranscriptionOptions(String transportUrl, String locale) { this.transportUrl = transportUrl; @@ -92,7 +90,7 @@ public boolean getStartTranscription() { /** * Get the startTranscription property: Indicates whether the transcription should start immediately after the call * is answered. - * + * * @return the startTranscription value. */ public Boolean isStartTranscription() { @@ -102,7 +100,7 @@ public Boolean isStartTranscription() { /** * Set the startTranscription property: Indicates whether the transcription should start immediately after the call * is answered. - * + * * @param startTranscription the startTranscription value to set. * @return the TranscriptionOptions object itself. */ @@ -113,7 +111,7 @@ public TranscriptionOptions setStartTranscription(Boolean startTranscription) { /** * Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * + * * @return the speechRecognitionModelEndpointId value. */ public String getSpeechRecognitionModelEndpointId() { @@ -122,7 +120,7 @@ public String getSpeechRecognitionModelEndpointId() { /** * Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * + * * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. * @return the TranscriptionOptions object itself. */ @@ -133,7 +131,7 @@ public TranscriptionOptions setSpeechRecognitionModelEndpointId(String speechRec /** * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * + * * @return the enableIntermediateResults value. */ public Boolean isIntermediateResultsEnabled() { @@ -142,7 +140,7 @@ public Boolean isIntermediateResultsEnabled() { /** * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * + * * @param enableIntermediateResults the enableIntermediateResults value to set. * @return the TranscriptionOptions object itself. */ diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java index 8c8e1608a475..214559eeccc5 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java @@ -25,7 +25,7 @@ import com.azure.communication.callautomation.implementation.models.PhoneNumberIdentifierModel; import com.azure.communication.callautomation.models.MediaStreamingAudioChannel; import com.azure.communication.callautomation.models.MediaStreamingOptions; -import com.azure.communication.callautomation.models.MediaStreamingContent; +import com.azure.communication.callautomation.models.MediaStreamingContentType; import com.azure.communication.callautomation.models.MediaStreamingTransport; import com.azure.communication.callautomation.models.TranscriptionOptions; import com.azure.communication.callautomation.models.StreamingTransport; diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java index e340f1a2dc30..dfd0e78d8c08 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java @@ -24,7 +24,7 @@ import com.azure.communication.phonenumbers.models.PurchasedPhoneNumber; import com.azure.communication.callautomation.models.CallParticipant; import com.azure.communication.callautomation.models.MediaStreamingAudioChannel; -import com.azure.communication.callautomation.models.MediaStreamingContent; +import com.azure.communication.callautomation.models.MediaStreamingContentType; import com.azure.communication.callautomation.models.MediaStreamingOptions; import com.azure.communication.callautomation.models.MediaStreamingTransport; import com.azure.communication.callautomation.models.TranscriptionOptions;