Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public int getSampleRate() {
*
* @return the channels value.
*/
public AudioChannelType getChannels() {
public AudioChannelType getChannelType() {
return channels;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
import java.util.Collection;

/** Defines values for MediaStreamingContentType. */
public final class MediaStreamingContent extends ExpandableStringEnum<MediaStreamingContent> {
public final class MediaStreamingContentType extends ExpandableStringEnum<MediaStreamingContentType> {
/** 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() {
}

/**
Expand All @@ -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<MediaStreamingContent> values() {
return values(MediaStreamingContent.class);
public static Collection<MediaStreamingContentType> values() {
return values(MediaStreamingContentType.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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() {
Expand All @@ -108,19 +108,19 @@ 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;
}

/**
* 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() {
Expand All @@ -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.
*/
Expand All @@ -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() {
Expand All @@ -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.
*/
Expand All @@ -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() {
Expand All @@ -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.
*/
Expand All @@ -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() {
Expand All @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final class MediaStreamingSubscription implements JsonSerializable<MediaS
/*
* Gets or Sets the subscribed media streaming content types.
*/
private List<MediaStreamingContent> subscribedContentTypes;
private List<MediaStreamingContentType> subscribedContentTypes;

static {
MediaStreamingSubscriptionConstructorProxy.setAccessor(
Expand Down Expand Up @@ -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() {
Expand All @@ -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() {
Expand All @@ -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<MediaStreamingContent> getSubscribedContentTypes() {
public List<MediaStreamingContentType> getSubscribedContentTypes() {
return this.subscribedContentTypes;
}

Expand All @@ -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.
Expand All @@ -132,8 +132,8 @@ public static MediaStreamingSubscription fromJson(JsonReader jsonReader) throws
deserializedMediaStreamingSubscription.state
= MediaStreamingSubscriptionState.fromString(reader.getString());
} else if ("subscribedContentTypes".equals(fieldName)) {
List<MediaStreamingContent> subscribedContentTypes
= reader.readArray(reader1 -> MediaStreamingContent.fromString(reader1.getString()));
List<MediaStreamingContentType> subscribedContentTypes
= reader.readArray(reader1 -> MediaStreamingContentType.fromString(reader1.getString()));
deserializedMediaStreamingSubscription.subscribedContentTypes = subscribedContentTypes;
} else {
reader.skipChildren();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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 <T> 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
Expand All @@ -67,8 +68,8 @@ public static <T extends StreamingData> T parse(String data, Class<T> type) {
}

/**
*
* @param data the base64 string
*
* @param data the base64 string
* @return the StreamingData
*/
private static StreamingData parseStreamingData(String data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand All @@ -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.
*/
Expand All @@ -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() {
Expand All @@ -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.
*/
Expand All @@ -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() {
Expand All @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down