r"""
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Api
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
"""

from datetime import datetime
from typing import Any, Dict, Optional, Union
from twilio.base import deserialize, serialize, values
from twilio.base.api_response import ApiResponse
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.version import Version


class TranscriptionInstance(InstanceResource):

    class Status(object):
        IN_PROGRESS = "in-progress"
        STOPPED = "stopped"

    class Track(object):
        INBOUND_TRACK = "inbound_track"
        OUTBOUND_TRACK = "outbound_track"
        BOTH_TRACKS = "both_tracks"

    class UpdateStatus(object):
        STOPPED = "stopped"

    """
    :ivar sid: The SID of the Transcription resource.
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
    :ivar call_sid: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
    :ivar name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
    :ivar status: 
    :ivar date_updated: The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
    :ivar uri: 
    """

    def __init__(
        self,
        version: Version,
        payload: Dict[str, Any],
        account_sid: str,
        call_sid: str,
        sid: Optional[str] = None,
    ):
        super().__init__(version)

        self.sid: Optional[str] = payload.get("sid")
        self.account_sid: Optional[str] = payload.get("account_sid")
        self.call_sid: Optional[str] = payload.get("call_sid")
        self.name: Optional[str] = payload.get("name")
        self.status: Optional["TranscriptionInstance.Status"] = payload.get("status")
        self.date_updated: Optional[datetime] = deserialize.rfc2822_datetime(
            payload.get("date_updated")
        )
        self.uri: Optional[str] = payload.get("uri")

        self._solution = {
            "account_sid": account_sid,
            "call_sid": call_sid,
            "sid": sid or self.sid,
        }
        self._context: Optional[TranscriptionContext] = None

    @property
    def _proxy(self) -> "TranscriptionContext":
        """
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: TranscriptionContext for this TranscriptionInstance
        """
        if self._context is None:
            self._context = TranscriptionContext(
                self._version,
                account_sid=self._solution["account_sid"],
                call_sid=self._solution["call_sid"],
                sid=self._solution["sid"],
            )
        return self._context

    def update(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> "TranscriptionInstance":
        """
        Update the TranscriptionInstance

        :param status:

        :returns: The updated TranscriptionInstance
        """
        return self._proxy.update(
            status=status,
        )

    async def update_async(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> "TranscriptionInstance":
        """
        Asynchronous coroutine to update the TranscriptionInstance

        :param status:

        :returns: The updated TranscriptionInstance
        """
        return await self._proxy.update_async(
            status=status,
        )

    def update_with_http_info(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> ApiResponse:
        """
        Update the TranscriptionInstance with HTTP info

        :param status:

        :returns: ApiResponse with instance, status code, and headers
        """
        return self._proxy.update_with_http_info(
            status=status,
        )

    async def update_with_http_info_async(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> ApiResponse:
        """
        Asynchronous coroutine to update the TranscriptionInstance with HTTP info

        :param status:

        :returns: ApiResponse with instance, status code, and headers
        """
        return await self._proxy.update_with_http_info_async(
            status=status,
        )

    def __repr__(self) -> str:
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        """
        context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
        return "<Twilio.Api.V2010.TranscriptionInstance {}>".format(context)


class TranscriptionContext(InstanceContext):

    def __init__(self, version: Version, account_sid: str, call_sid: str, sid: str):
        """
        Initialize the TranscriptionContext

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
        :param call_sid: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.
        :param sid: The SID of the Transcription resource, or the `name` used when creating the resource
        """
        super().__init__(version)

        # Path Solution
        self._solution = {
            "account_sid": account_sid,
            "call_sid": call_sid,
            "sid": sid,
        }
        self._uri = (
            "/Accounts/{account_sid}/Calls/{call_sid}/Transcriptions/{sid}.json".format(
                **self._solution
            )
        )

    def _update(self, status: "TranscriptionInstance.UpdateStatus") -> tuple:
        """
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        """

        data = values.of(
            {
                "Status": status,
            }
        )
        headers = values.of({})

        headers["Content-Type"] = "application/x-www-form-urlencoded"

        headers["Accept"] = "application/json"

        return self._version.update_with_response_info(
            method="POST", uri=self._uri, data=data, headers=headers
        )

    def update(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> TranscriptionInstance:
        """
        Update the TranscriptionInstance

        :param status:

        :returns: The updated TranscriptionInstance
        """
        payload, _, _ = self._update(status=status)
        return TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
            sid=self._solution["sid"],
        )

    def update_with_http_info(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> ApiResponse:
        """
        Update the TranscriptionInstance and return response metadata

        :param status:

        :returns: ApiResponse with instance, status code, and headers
        """
        payload, status_code, headers = self._update(status=status)
        instance = TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
            sid=self._solution["sid"],
        )
        return ApiResponse(data=instance, status_code=status_code, headers=headers)

    async def _update_async(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> tuple:
        """
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        """

        data = values.of(
            {
                "Status": status,
            }
        )
        headers = values.of({})

        headers["Content-Type"] = "application/x-www-form-urlencoded"

        headers["Accept"] = "application/json"

        return await self._version.update_with_response_info_async(
            method="POST", uri=self._uri, data=data, headers=headers
        )

    async def update_async(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> TranscriptionInstance:
        """
        Asynchronous coroutine to update the TranscriptionInstance

        :param status:

        :returns: The updated TranscriptionInstance
        """
        payload, _, _ = await self._update_async(status=status)
        return TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
            sid=self._solution["sid"],
        )

    async def update_with_http_info_async(
        self, status: "TranscriptionInstance.UpdateStatus"
    ) -> ApiResponse:
        """
        Asynchronous coroutine to update the TranscriptionInstance and return response metadata

        :param status:

        :returns: ApiResponse with instance, status code, and headers
        """
        payload, status_code, headers = await self._update_async(status=status)
        instance = TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
            sid=self._solution["sid"],
        )
        return ApiResponse(data=instance, status_code=status_code, headers=headers)

    def __repr__(self) -> str:
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        """
        context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
        return "<Twilio.Api.V2010.TranscriptionContext {}>".format(context)


class TranscriptionList(ListResource):

    def __init__(self, version: Version, account_sid: str, call_sid: str):
        """
        Initialize the TranscriptionList

        :param version: Version that contains the resource
        :param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Transcription resource.
        :param call_sid: The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Transcription resource is associated with.

        """
        super().__init__(version)

        # Path Solution
        self._solution = {
            "account_sid": account_sid,
            "call_sid": call_sid,
        }
        self._uri = (
            "/Accounts/{account_sid}/Calls/{call_sid}/Transcriptions.json".format(
                **self._solution
            )
        )

    def _create(
        self,
        name: Union[str, object] = values.unset,
        track: Union["TranscriptionInstance.Track", object] = values.unset,
        status_callback_url: Union[str, object] = values.unset,
        status_callback_method: Union[str, object] = values.unset,
        inbound_track_label: Union[str, object] = values.unset,
        outbound_track_label: Union[str, object] = values.unset,
        partial_results: Union[bool, object] = values.unset,
        language_code: Union[str, object] = values.unset,
        transcription_engine: Union[str, object] = values.unset,
        profanity_filter: Union[bool, object] = values.unset,
        speech_model: Union[str, object] = values.unset,
        hints: Union[str, object] = values.unset,
        enable_automatic_punctuation: Union[bool, object] = values.unset,
        intelligence_service: Union[str, object] = values.unset,
        conversation_configuration: Union[str, object] = values.unset,
        conversation_id: Union[str, object] = values.unset,
        enable_provider_data: Union[bool, object] = values.unset,
    ) -> tuple:
        """
        Internal helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        """

        data = values.of(
            {
                "Name": name,
                "Track": track,
                "StatusCallbackUrl": status_callback_url,
                "StatusCallbackMethod": status_callback_method,
                "InboundTrackLabel": inbound_track_label,
                "OutboundTrackLabel": outbound_track_label,
                "PartialResults": serialize.boolean_to_string(partial_results),
                "LanguageCode": language_code,
                "TranscriptionEngine": transcription_engine,
                "ProfanityFilter": serialize.boolean_to_string(profanity_filter),
                "SpeechModel": speech_model,
                "Hints": hints,
                "EnableAutomaticPunctuation": serialize.boolean_to_string(
                    enable_automatic_punctuation
                ),
                "IntelligenceService": intelligence_service,
                "ConversationConfiguration": conversation_configuration,
                "ConversationId": conversation_id,
                "EnableProviderData": serialize.boolean_to_string(enable_provider_data),
            }
        )
        headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})

        headers["Content-Type"] = "application/x-www-form-urlencoded"

        headers["Accept"] = "application/json"

        return self._version.create_with_response_info(
            method="POST", uri=self._uri, data=data, headers=headers
        )

    def create(
        self,
        name: Union[str, object] = values.unset,
        track: Union["TranscriptionInstance.Track", object] = values.unset,
        status_callback_url: Union[str, object] = values.unset,
        status_callback_method: Union[str, object] = values.unset,
        inbound_track_label: Union[str, object] = values.unset,
        outbound_track_label: Union[str, object] = values.unset,
        partial_results: Union[bool, object] = values.unset,
        language_code: Union[str, object] = values.unset,
        transcription_engine: Union[str, object] = values.unset,
        profanity_filter: Union[bool, object] = values.unset,
        speech_model: Union[str, object] = values.unset,
        hints: Union[str, object] = values.unset,
        enable_automatic_punctuation: Union[bool, object] = values.unset,
        intelligence_service: Union[str, object] = values.unset,
        conversation_configuration: Union[str, object] = values.unset,
        conversation_id: Union[str, object] = values.unset,
        enable_provider_data: Union[bool, object] = values.unset,
    ) -> TranscriptionInstance:
        """
        Create the TranscriptionInstance

        :param name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
        :param track:
        :param status_callback_url: Absolute URL of the status callback.
        :param status_callback_method: The http method for the status_callback (one of GET, POST).
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track
        :param partial_results: Indicates if partial results are going to be sent to the customer
        :param language_code: Language code used by the transcription engine, specified in [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) format
        :param transcription_engine: Definition of the transcription engine to be used, among those supported by Twilio
        :param profanity_filter: indicates if the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks
        :param speech_model: Recognition model used by the transcription engine, among those supported by the provider
        :param hints: A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
        :param enable_automatic_punctuation: The provider will add punctuation to recognition result
        :param intelligence_service: The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators
        :param conversation_configuration: The ID of the Conversations Configuration for customizing conversation behavior in Intelligence Service
        :param conversation_id: The ID of the Conversation for associating this Transcription with an existing Conversation in Intelligence Service
        :param enable_provider_data: Whether the callback includes raw provider data.

        :returns: The created TranscriptionInstance
        """
        payload, _, _ = self._create(
            name=name,
            track=track,
            status_callback_url=status_callback_url,
            status_callback_method=status_callback_method,
            inbound_track_label=inbound_track_label,
            outbound_track_label=outbound_track_label,
            partial_results=partial_results,
            language_code=language_code,
            transcription_engine=transcription_engine,
            profanity_filter=profanity_filter,
            speech_model=speech_model,
            hints=hints,
            enable_automatic_punctuation=enable_automatic_punctuation,
            intelligence_service=intelligence_service,
            conversation_configuration=conversation_configuration,
            conversation_id=conversation_id,
            enable_provider_data=enable_provider_data,
        )
        return TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
        )

    def create_with_http_info(
        self,
        name: Union[str, object] = values.unset,
        track: Union["TranscriptionInstance.Track", object] = values.unset,
        status_callback_url: Union[str, object] = values.unset,
        status_callback_method: Union[str, object] = values.unset,
        inbound_track_label: Union[str, object] = values.unset,
        outbound_track_label: Union[str, object] = values.unset,
        partial_results: Union[bool, object] = values.unset,
        language_code: Union[str, object] = values.unset,
        transcription_engine: Union[str, object] = values.unset,
        profanity_filter: Union[bool, object] = values.unset,
        speech_model: Union[str, object] = values.unset,
        hints: Union[str, object] = values.unset,
        enable_automatic_punctuation: Union[bool, object] = values.unset,
        intelligence_service: Union[str, object] = values.unset,
        conversation_configuration: Union[str, object] = values.unset,
        conversation_id: Union[str, object] = values.unset,
        enable_provider_data: Union[bool, object] = values.unset,
    ) -> ApiResponse:
        """
        Create the TranscriptionInstance and return response metadata

        :param name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
        :param track:
        :param status_callback_url: Absolute URL of the status callback.
        :param status_callback_method: The http method for the status_callback (one of GET, POST).
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track
        :param partial_results: Indicates if partial results are going to be sent to the customer
        :param language_code: Language code used by the transcription engine, specified in [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) format
        :param transcription_engine: Definition of the transcription engine to be used, among those supported by Twilio
        :param profanity_filter: indicates if the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks
        :param speech_model: Recognition model used by the transcription engine, among those supported by the provider
        :param hints: A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
        :param enable_automatic_punctuation: The provider will add punctuation to recognition result
        :param intelligence_service: The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators
        :param conversation_configuration: The ID of the Conversations Configuration for customizing conversation behavior in Intelligence Service
        :param conversation_id: The ID of the Conversation for associating this Transcription with an existing Conversation in Intelligence Service
        :param enable_provider_data: Whether the callback includes raw provider data.

        :returns: ApiResponse with instance, status code, and headers
        """
        payload, status_code, headers = self._create(
            name=name,
            track=track,
            status_callback_url=status_callback_url,
            status_callback_method=status_callback_method,
            inbound_track_label=inbound_track_label,
            outbound_track_label=outbound_track_label,
            partial_results=partial_results,
            language_code=language_code,
            transcription_engine=transcription_engine,
            profanity_filter=profanity_filter,
            speech_model=speech_model,
            hints=hints,
            enable_automatic_punctuation=enable_automatic_punctuation,
            intelligence_service=intelligence_service,
            conversation_configuration=conversation_configuration,
            conversation_id=conversation_id,
            enable_provider_data=enable_provider_data,
        )
        instance = TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
        )
        return ApiResponse(data=instance, status_code=status_code, headers=headers)

    async def _create_async(
        self,
        name: Union[str, object] = values.unset,
        track: Union["TranscriptionInstance.Track", object] = values.unset,
        status_callback_url: Union[str, object] = values.unset,
        status_callback_method: Union[str, object] = values.unset,
        inbound_track_label: Union[str, object] = values.unset,
        outbound_track_label: Union[str, object] = values.unset,
        partial_results: Union[bool, object] = values.unset,
        language_code: Union[str, object] = values.unset,
        transcription_engine: Union[str, object] = values.unset,
        profanity_filter: Union[bool, object] = values.unset,
        speech_model: Union[str, object] = values.unset,
        hints: Union[str, object] = values.unset,
        enable_automatic_punctuation: Union[bool, object] = values.unset,
        intelligence_service: Union[str, object] = values.unset,
        conversation_configuration: Union[str, object] = values.unset,
        conversation_id: Union[str, object] = values.unset,
        enable_provider_data: Union[bool, object] = values.unset,
    ) -> tuple:
        """
        Internal async helper for create operation

        Returns:
            tuple: (payload, status_code, headers)
        """

        data = values.of(
            {
                "Name": name,
                "Track": track,
                "StatusCallbackUrl": status_callback_url,
                "StatusCallbackMethod": status_callback_method,
                "InboundTrackLabel": inbound_track_label,
                "OutboundTrackLabel": outbound_track_label,
                "PartialResults": serialize.boolean_to_string(partial_results),
                "LanguageCode": language_code,
                "TranscriptionEngine": transcription_engine,
                "ProfanityFilter": serialize.boolean_to_string(profanity_filter),
                "SpeechModel": speech_model,
                "Hints": hints,
                "EnableAutomaticPunctuation": serialize.boolean_to_string(
                    enable_automatic_punctuation
                ),
                "IntelligenceService": intelligence_service,
                "ConversationConfiguration": conversation_configuration,
                "ConversationId": conversation_id,
                "EnableProviderData": serialize.boolean_to_string(enable_provider_data),
            }
        )
        headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})

        headers["Content-Type"] = "application/x-www-form-urlencoded"

        headers["Accept"] = "application/json"

        return await self._version.create_with_response_info_async(
            method="POST", uri=self._uri, data=data, headers=headers
        )

    async def create_async(
        self,
        name: Union[str, object] = values.unset,
        track: Union["TranscriptionInstance.Track", object] = values.unset,
        status_callback_url: Union[str, object] = values.unset,
        status_callback_method: Union[str, object] = values.unset,
        inbound_track_label: Union[str, object] = values.unset,
        outbound_track_label: Union[str, object] = values.unset,
        partial_results: Union[bool, object] = values.unset,
        language_code: Union[str, object] = values.unset,
        transcription_engine: Union[str, object] = values.unset,
        profanity_filter: Union[bool, object] = values.unset,
        speech_model: Union[str, object] = values.unset,
        hints: Union[str, object] = values.unset,
        enable_automatic_punctuation: Union[bool, object] = values.unset,
        intelligence_service: Union[str, object] = values.unset,
        conversation_configuration: Union[str, object] = values.unset,
        conversation_id: Union[str, object] = values.unset,
        enable_provider_data: Union[bool, object] = values.unset,
    ) -> TranscriptionInstance:
        """
        Asynchronously create the TranscriptionInstance

        :param name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
        :param track:
        :param status_callback_url: Absolute URL of the status callback.
        :param status_callback_method: The http method for the status_callback (one of GET, POST).
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track
        :param partial_results: Indicates if partial results are going to be sent to the customer
        :param language_code: Language code used by the transcription engine, specified in [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) format
        :param transcription_engine: Definition of the transcription engine to be used, among those supported by Twilio
        :param profanity_filter: indicates if the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks
        :param speech_model: Recognition model used by the transcription engine, among those supported by the provider
        :param hints: A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
        :param enable_automatic_punctuation: The provider will add punctuation to recognition result
        :param intelligence_service: The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators
        :param conversation_configuration: The ID of the Conversations Configuration for customizing conversation behavior in Intelligence Service
        :param conversation_id: The ID of the Conversation for associating this Transcription with an existing Conversation in Intelligence Service
        :param enable_provider_data: Whether the callback includes raw provider data.

        :returns: The created TranscriptionInstance
        """
        payload, _, _ = await self._create_async(
            name=name,
            track=track,
            status_callback_url=status_callback_url,
            status_callback_method=status_callback_method,
            inbound_track_label=inbound_track_label,
            outbound_track_label=outbound_track_label,
            partial_results=partial_results,
            language_code=language_code,
            transcription_engine=transcription_engine,
            profanity_filter=profanity_filter,
            speech_model=speech_model,
            hints=hints,
            enable_automatic_punctuation=enable_automatic_punctuation,
            intelligence_service=intelligence_service,
            conversation_configuration=conversation_configuration,
            conversation_id=conversation_id,
            enable_provider_data=enable_provider_data,
        )
        return TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
        )

    async def create_with_http_info_async(
        self,
        name: Union[str, object] = values.unset,
        track: Union["TranscriptionInstance.Track", object] = values.unset,
        status_callback_url: Union[str, object] = values.unset,
        status_callback_method: Union[str, object] = values.unset,
        inbound_track_label: Union[str, object] = values.unset,
        outbound_track_label: Union[str, object] = values.unset,
        partial_results: Union[bool, object] = values.unset,
        language_code: Union[str, object] = values.unset,
        transcription_engine: Union[str, object] = values.unset,
        profanity_filter: Union[bool, object] = values.unset,
        speech_model: Union[str, object] = values.unset,
        hints: Union[str, object] = values.unset,
        enable_automatic_punctuation: Union[bool, object] = values.unset,
        intelligence_service: Union[str, object] = values.unset,
        conversation_configuration: Union[str, object] = values.unset,
        conversation_id: Union[str, object] = values.unset,
        enable_provider_data: Union[bool, object] = values.unset,
    ) -> ApiResponse:
        """
        Asynchronously create the TranscriptionInstance and return response metadata

        :param name: The user-specified name of this Transcription, if one was given when the Transcription was created. This may be used to stop the Transcription.
        :param track:
        :param status_callback_url: Absolute URL of the status callback.
        :param status_callback_method: The http method for the status_callback (one of GET, POST).
        :param inbound_track_label: Friendly name given to the Inbound Track
        :param outbound_track_label: Friendly name given to the Outbound Track
        :param partial_results: Indicates if partial results are going to be sent to the customer
        :param language_code: Language code used by the transcription engine, specified in [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) format
        :param transcription_engine: Definition of the transcription engine to be used, among those supported by Twilio
        :param profanity_filter: indicates if the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks
        :param speech_model: Recognition model used by the transcription engine, among those supported by the provider
        :param hints: A Phrase contains words and phrase \\\"hints\\\" so that the speech recognition engine is more likely to recognize them.
        :param enable_automatic_punctuation: The provider will add punctuation to recognition result
        :param intelligence_service: The SID or unique name of the [Intelligence Service](https://www.twilio.com/docs/conversational-intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators
        :param conversation_configuration: The ID of the Conversations Configuration for customizing conversation behavior in Intelligence Service
        :param conversation_id: The ID of the Conversation for associating this Transcription with an existing Conversation in Intelligence Service
        :param enable_provider_data: Whether the callback includes raw provider data.

        :returns: ApiResponse with instance, status code, and headers
        """
        payload, status_code, headers = await self._create_async(
            name=name,
            track=track,
            status_callback_url=status_callback_url,
            status_callback_method=status_callback_method,
            inbound_track_label=inbound_track_label,
            outbound_track_label=outbound_track_label,
            partial_results=partial_results,
            language_code=language_code,
            transcription_engine=transcription_engine,
            profanity_filter=profanity_filter,
            speech_model=speech_model,
            hints=hints,
            enable_automatic_punctuation=enable_automatic_punctuation,
            intelligence_service=intelligence_service,
            conversation_configuration=conversation_configuration,
            conversation_id=conversation_id,
            enable_provider_data=enable_provider_data,
        )
        instance = TranscriptionInstance(
            self._version,
            payload,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
        )
        return ApiResponse(data=instance, status_code=status_code, headers=headers)

    def get(self, sid: str) -> TranscriptionContext:
        """
        Constructs a TranscriptionContext

        :param sid: The SID of the Transcription resource, or the `name` used when creating the resource
        """
        return TranscriptionContext(
            self._version,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
            sid=sid,
        )

    def __call__(self, sid: str) -> TranscriptionContext:
        """
        Constructs a TranscriptionContext

        :param sid: The SID of the Transcription resource, or the `name` used when creating the resource
        """
        return TranscriptionContext(
            self._version,
            account_sid=self._solution["account_sid"],
            call_sid=self._solution["call_sid"],
            sid=sid,
        )

    def __repr__(self) -> str:
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        """
        return "<Twilio.Api.V2010.TranscriptionList>"
