Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding the mediastreaming events - alpha3 #35462

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@ def hold(

:param target_participant: The participant being added.
:type target_participant: ~azure.communication.callautomation.CommunicationIdentifier
:param play_source: A PlaySource representing the source to play.
:type play_source: ~azure.communication.callautomation.FileSource or
:keyword play_source: A PlaySource representing the source to play.
:paramtype play_source: ~azure.communication.callautomation.FileSource or
~azure.communication.callautomation.TextSource or
~azure.communication.callautomation.SsmlSource
:keyword operation_context: Value that can be used to track this call and its associated events.
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
from ._models import HoldFailed
from ._models import HoldRequest
from ._models import MediaStreamingConfiguration
from ._models import MediaStreamingFailed
from ._models import MediaStreamingStarted
from ._models import MediaStreamingStopped
from ._models import MediaStreamingUpdate
from ._models import MicrosoftTeamsAppIdentifierModel
from ._models import MicrosoftTeamsUserIdentifierModel
from ._models import MuteParticipantsRequest
Expand Down Expand Up @@ -128,6 +132,8 @@
from ._enums import DtmfTone
from ._enums import MediaStreamingAudioChannelType
from ._enums import MediaStreamingContentType
from ._enums import MediaStreamingStatus
from ._enums import MediaStreamingStatusDetails
from ._enums import MediaStreamingTransportType
from ._enums import PlaySourceType
from ._enums import RecognitionType
Expand Down Expand Up @@ -202,6 +208,10 @@
"HoldFailed",
"HoldRequest",
"MediaStreamingConfiguration",
"MediaStreamingFailed",
"MediaStreamingStarted",
"MediaStreamingStopped",
"MediaStreamingUpdate",
"MicrosoftTeamsAppIdentifierModel",
"MicrosoftTeamsUserIdentifierModel",
"MuteParticipantsRequest",
Expand Down Expand Up @@ -268,6 +278,8 @@
"DtmfTone",
"MediaStreamingAudioChannelType",
"MediaStreamingContentType",
"MediaStreamingStatus",
"MediaStreamingStatusDetails",
"MediaStreamingTransportType",
"PlaySourceType",
"RecognitionType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,35 @@ class MediaStreamingContentType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
AUDIO = "audio"


class MediaStreamingStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""MediaStreamingStatus."""

MEDIA_STREAMING_STARTED = "mediaStreamingStarted"
MEDIA_STREAMING_FAILED = "mediaStreamingFailed"
MEDIA_STREAMING_STOPPED = "mediaStreamingStopped"
UNSPECIFIED_ERROR = "unspecifiedError"


class MediaStreamingStatusDetails(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""MediaStreamingStatusDetails."""

SUBSCRIPTION_STARTED = "subscriptionStarted"
STREAM_CONNECTION_REESTABLISHED = "streamConnectionReestablished"
STREAM_CONNECTION_UNSUCCESSFUL = "streamConnectionUnsuccessful"
STREAM_URL_MISSING = "streamUrlMissing"
SERVICE_SHUTDOWN = "serviceShutdown"
STREAM_CONNECTION_INTERRUPTED = "streamConnectionInterrupted"
SPEECH_SERVICES_CONNECTION_ERROR = "speechServicesConnectionError"
SUBSCRIPTION_STOPPED = "subscriptionStopped"
UNSPECIFIED_ERROR = "unspecifiedError"
AUTHENTICATION_FAILURE = "authenticationFailure"
BAD_REQUEST = "badRequest"
TOO_MANY_REQUESTS = "tooManyRequests"
FORBIDDEN = "forbidden"
SERVICE_TIMEOUT = "serviceTimeout"
INITIAL_WEB_SOCKET_CONNECTION_FAILED = "initialWebSocketConnectionFailed"


class MediaStreamingTransportType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The type of transport to be used for media streaming, eg. Websocket."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2825,6 +2825,215 @@ def __init__(
self.audio_channel_type = audio_channel_type


class MediaStreamingFailed(_serialization.Model):
"""MediaStreamingFailed.

Variables are only populated by the server, and will be ignored when sending a request.

:ivar operation_context: Used by customers when calling mid-call actions to correlate the
request to the response event.
:vartype operation_context: str
:ivar result_information: Contains the resulting SIP code, sub-code and message.
:vartype result_information: ~azure.communication.callautomation.models.ResultInformation
:ivar media_streaming_update: Defines the result for audio streaming update with the current
status and the details about the status.
:vartype media_streaming_update:
~azure.communication.callautomation.models.MediaStreamingUpdate
:ivar call_connection_id: Call connection ID.
:vartype call_connection_id: str
:ivar server_call_id: Server call ID.
:vartype server_call_id: str
:ivar correlation_id: Correlation ID for event to call correlation. Also called ChainId for
skype chain ID.
:vartype correlation_id: str
"""

_validation = {
"operation_context": {"readonly": True},
"result_information": {"readonly": True},
"media_streaming_update": {"readonly": True},
"call_connection_id": {"readonly": True},
"server_call_id": {"readonly": True},
"correlation_id": {"readonly": True},
}

_attribute_map = {
"operation_context": {"key": "operationContext", "type": "str"},
"result_information": {"key": "resultInformation", "type": "ResultInformation"},
"media_streaming_update": {"key": "mediaStreamingUpdate", "type": "MediaStreamingUpdate"},
"call_connection_id": {"key": "callConnectionId", "type": "str"},
"server_call_id": {"key": "serverCallId", "type": "str"},
"correlation_id": {"key": "correlationId", "type": "str"},
}

def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.operation_context = None
self.result_information = None
self.media_streaming_update = None
self.call_connection_id = None
self.server_call_id = None
self.correlation_id = None


class MediaStreamingStarted(_serialization.Model):
"""MediaStreamingStarted.

Variables are only populated by the server, and will be ignored when sending a request.

:ivar operation_context: Used by customers when calling mid-call actions to correlate the
request to the response event.
:vartype operation_context: str
:ivar result_information: Contains the resulting SIP code, sub-code and message.
:vartype result_information: ~azure.communication.callautomation.models.ResultInformation
:ivar media_streaming_update: Defines the result for audio streaming update with the current
status and the details about the status.
:vartype media_streaming_update:
~azure.communication.callautomation.models.MediaStreamingUpdate
:ivar call_connection_id: Call connection ID.
:vartype call_connection_id: str
:ivar server_call_id: Server call ID.
:vartype server_call_id: str
:ivar correlation_id: Correlation ID for event to call correlation. Also called ChainId for
skype chain ID.
:vartype correlation_id: str
"""

_validation = {
"operation_context": {"readonly": True},
"result_information": {"readonly": True},
"media_streaming_update": {"readonly": True},
"call_connection_id": {"readonly": True},
"server_call_id": {"readonly": True},
"correlation_id": {"readonly": True},
}

_attribute_map = {
"operation_context": {"key": "operationContext", "type": "str"},
"result_information": {"key": "resultInformation", "type": "ResultInformation"},
"media_streaming_update": {"key": "mediaStreamingUpdate", "type": "MediaStreamingUpdate"},
"call_connection_id": {"key": "callConnectionId", "type": "str"},
"server_call_id": {"key": "serverCallId", "type": "str"},
"correlation_id": {"key": "correlationId", "type": "str"},
}

def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.operation_context = None
self.result_information = None
self.media_streaming_update = None
self.call_connection_id = None
self.server_call_id = None
self.correlation_id = None


class MediaStreamingStopped(_serialization.Model):
"""MediaStreamingStopped.

Variables are only populated by the server, and will be ignored when sending a request.

:ivar operation_context: Used by customers when calling mid-call actions to correlate the
request to the response event.
:vartype operation_context: str
:ivar result_information: Contains the resulting SIP code, sub-code and message.
:vartype result_information: ~azure.communication.callautomation.models.ResultInformation
:ivar media_streaming_update: Defines the result for audio streaming update with the current
status and the details about the status.
:vartype media_streaming_update:
~azure.communication.callautomation.models.MediaStreamingUpdate
:ivar call_connection_id: Call connection ID.
:vartype call_connection_id: str
:ivar server_call_id: Server call ID.
:vartype server_call_id: str
:ivar correlation_id: Correlation ID for event to call correlation. Also called ChainId for
skype chain ID.
:vartype correlation_id: str
"""

_validation = {
"operation_context": {"readonly": True},
"result_information": {"readonly": True},
"media_streaming_update": {"readonly": True},
"call_connection_id": {"readonly": True},
"server_call_id": {"readonly": True},
"correlation_id": {"readonly": True},
}

_attribute_map = {
"operation_context": {"key": "operationContext", "type": "str"},
"result_information": {"key": "resultInformation", "type": "ResultInformation"},
"media_streaming_update": {"key": "mediaStreamingUpdate", "type": "MediaStreamingUpdate"},
"call_connection_id": {"key": "callConnectionId", "type": "str"},
"server_call_id": {"key": "serverCallId", "type": "str"},
"correlation_id": {"key": "correlationId", "type": "str"},
}

def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.operation_context = None
self.result_information = None
self.media_streaming_update = None
self.call_connection_id = None
self.server_call_id = None
self.correlation_id = None


class MediaStreamingUpdate(_serialization.Model):
"""MediaStreamingUpdate.

:ivar content_type:
:vartype content_type: str
:ivar media_streaming_status: Known values are: "mediaStreamingStarted",
"mediaStreamingFailed", "mediaStreamingStopped", and "unspecifiedError".
:vartype media_streaming_status: str or
~azure.communication.callautomation.models.MediaStreamingStatus
:ivar media_streaming_status_details: Known values are: "subscriptionStarted",
"streamConnectionReestablished", "streamConnectionUnsuccessful", "streamUrlMissing",
"serviceShutdown", "streamConnectionInterrupted", "speechServicesConnectionError",
"subscriptionStopped", "unspecifiedError", "authenticationFailure", "badRequest",
"tooManyRequests", "forbidden", "serviceTimeout", and "initialWebSocketConnectionFailed".
:vartype media_streaming_status_details: str or
~azure.communication.callautomation.models.MediaStreamingStatusDetails
"""

_attribute_map = {
"content_type": {"key": "contentType", "type": "str"},
"media_streaming_status": {"key": "mediaStreamingStatus", "type": "str"},
"media_streaming_status_details": {"key": "mediaStreamingStatusDetails", "type": "str"},
}

def __init__(
self,
*,
content_type: Optional[str] = None,
media_streaming_status: Optional[Union[str, "_models.MediaStreamingStatus"]] = None,
media_streaming_status_details: Optional[Union[str, "_models.MediaStreamingStatusDetails"]] = None,
**kwargs: Any
) -> None:
"""
:keyword content_type:
:paramtype content_type: str
:keyword media_streaming_status: Known values are: "mediaStreamingStarted",
"mediaStreamingFailed", "mediaStreamingStopped", and "unspecifiedError".
:paramtype media_streaming_status: str or
~azure.communication.callautomation.models.MediaStreamingStatus
:keyword media_streaming_status_details: Known values are: "subscriptionStarted",
"streamConnectionReestablished", "streamConnectionUnsuccessful", "streamUrlMissing",
"serviceShutdown", "streamConnectionInterrupted", "speechServicesConnectionError",
"subscriptionStopped", "unspecifiedError", "authenticationFailure", "badRequest",
"tooManyRequests", "forbidden", "serviceTimeout", and "initialWebSocketConnectionFailed".
:paramtype media_streaming_status_details: str or
~azure.communication.callautomation.models.MediaStreamingStatusDetails
"""
super().__init__(**kwargs)
self.content_type = content_type
self.media_streaming_status = media_streaming_status
self.media_streaming_status_details = media_streaming_status_details


class MicrosoftTeamsAppIdentifierModel(_serialization.Model):
"""A Microsoft Teams application.

Expand Down Expand Up @@ -5356,50 +5565,6 @@ def __init__(
self.operation_context = operation_context


class UnholdRequest(_serialization.Model):
"""The request payload for holding participant from the call.

All required parameters must be populated in order to send to server.

:ivar target_participant: Participants to be hold from the call.
Only ACS Users are supported. Required.
:vartype target_participant:
~azure.communication.callautomation.models.CommunicationIdentifierModel
:ivar operation_context: Used by customers when calling mid-call actions to correlate the
request to the response event.
:vartype operation_context: str
"""

_validation = {
"target_participant": {"required": True},
}

_attribute_map = {
"target_participant": {"key": "targetParticipant", "type": "CommunicationIdentifierModel"},
"operation_context": {"key": "operationContext", "type": "str"},
}

def __init__(
self,
*,
target_participant: "_models.CommunicationIdentifierModel",
operation_context: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword target_participant: Participants to be hold from the call.
Only ACS Users are supported. Required.
:paramtype target_participant:
~azure.communication.callautomation.models.CommunicationIdentifierModel
:keyword operation_context: Used by customers when calling mid-call actions to correlate the
request to the response event.
:paramtype operation_context: str
"""
super().__init__(**kwargs)
self.target_participant = target_participant
self.operation_context = operation_context


class UnmuteParticipantsRequest(_serialization.Model):
"""The request payload for unmuting participant from the call.

Expand Down