<commit_before>from .. import InstanceResource, ListResource


class IpAccessControlListMapping(InstanceResource):
    def delete(self):
        """
        Remove this mapping (disassociate the ACL from the Domain).
        """
        return self.parent.delete_instance(self.name)


class IpAccessControlListMappings(ListResource):
    name = "IpAccessControlListMappings"
    key = "ip_access_control_list_mappings"
    instance = IpAccessControlListMapping

    def create(self, ip_access_control_list_sid, **kwargs):
        """Add a :class:`CredentialListMapping` to this domain.

        :param sid: String identifier for an existing
                                    :class:`CredentialList`.
        """
        kwargs.update(ip_access_control_list_sid=ip_access_control_list_sid)
        return self.create_instance(kwargs)

    def delete(self, sid):
        """Remove a :class:`CredentialListMapping` from this domain.

        :param sid: String identifier for a CredentialList resource
        """
        return self.delete_instance(sid)


class CredentialListMapping(InstanceResource):
    def delete(self):
        """
        Remove this mapping (disassociate the CredentialList from the Domain).
        """
        return self.parent.delete_instance(self.name)


class CredentialListMappings(ListResource):
    name = "CredentialListMappings"
    key = "credential_list_mappings"
    instance = CredentialListMapping

    def create(self, credential_list_sid, **kwargs):
        """Add a :class:`CredentialListMapping` to this domain.

        :param sid: String identifier for an existing
                                    :class:`CredentialList`.
        """
        kwargs.update(credential_list_sid=credential_list_sid)
        return self.create_instance(kwargs)

    def delete(self, sid):
        """Remove a :class:`CredentialListMapping` from this domain.

        :param sid: String identifier for a CredentialList resource
        """
        return self.delete_instance(sid)


class Domain(InstanceResource):
    """An inbound SIP Domain.

    .. attribute:: sid

        A 34 character string that uniquely identifies this resource.

    .. attribute:: account_sid

        The unique id of the Account responsible for this domain.

    .. attribute:: domain_name

        A unique domain name for this inbound SIP endpoint. Must end in
        .sip.twilio.com.

    .. attribute:: friendly_name

        A human-readable name for this SIP domain. (restrictions?)

    .. attribute:: auth_type

        ???

    .. attribute:: voice_url

        The URL Twilio will request when this domain receives a call.

    .. attribute:: voice_method

        The HTTP method Twilio will use when requesting the above voice_url.
        Either GET or POST.

    .. attribute:: voice_fallback_url

        The URL that Twilio will request if an error occurs retrieving or
        executing the TwiML requested by voice_url.

    .. attribute:: voice_fallback_method

        The HTTP method Twilio will use when requesting the voice_fallback_url.
        Either GET or POST.

    .. attribute:: voice_status_callback_url

        The URL that Twilio will request to pass status parameters (such as
        call ended) to your application.

    .. attribute:: voice_status_callback_method

        The HTTP method Twilio will use to make requests to the status_callback
        URL. Either GET or POST.

    .. attribute:: date_created

        The date that this resource was created.

    .. attribute:: date_updated

        The date that this resource was last updated.

    """
    subresources = [IpAccessControlListMappings, CredentialListMappings]

    def update(self, **kwargs):<commit_msg>Fixed #157<commit_after>from .. import InstanceResource, ListResource


class IpAccessControlListMapping(InstanceResource):
    def delete(self):
        """
        Remove this mapping (disassociate the ACL from the Domain).
        """
        return self.parent.delete_instance(self.name)


class IpAccessControlListMappings(ListResource):
    name = "IpAccessControlListMappings"
    key = "ip_access_control_list_mappings"
    instance = IpAccessControlListMapping

    def create(self, ip_access_control_list_sid, **kwargs):
        """Add a :class:`CredentialListMapping` to this domain.

        :param sid: String identifier for an existing
                                    :class:`CredentialList`.
        """
        kwargs.update(ip_access_control_list_sid=ip_access_control_list_sid)
        return self.create_instance(kwargs)

    def delete(self, sid):
        """Remove a :class:`CredentialListMapping` from this domain.

        :param sid: String identifier for a CredentialList resource
        """
        return self.delete_instance(sid)


class CredentialListMapping(InstanceResource):
    def delete(self):
        """
        Remove this mapping (disassociate the CredentialList from the Domain).
        """
        return self.parent.delete_instance(self.name)


class CredentialListMappings(ListResource):
    name = "CredentialListMappings"
    key = "credential_list_mappings"
    instance = CredentialListMapping

    def create(self, credential_list_sid, **kwargs):
        """Add a :class:`CredentialListMapping` to this domain.

        :param sid: String identifier for an existing
                                    :class:`CredentialList`.
        """
        kwargs.update(credential_list_sid=credential_list_sid)
        return self.create_instance(kwargs)

    def delete(self, sid):
        """Remove a :class:`CredentialListMapping` from this domain.

        :param sid: String identifier for a CredentialList resource
        """
        return self.delete_instance(sid)


class Domain(InstanceResource):
    """An inbound SIP Domain.

    .. attribute:: sid

        A 34 character string that uniquely identifies this resource.

    .. attribute:: account_sid

        The unique id of the Account responsible for this domain.

    .. attribute:: domain_name

        A unique domain name for this inbound SIP endpoint. Must end in
        .sip.twilio.com.

    .. attribute:: friendly_name

        A human-readable name for this SIP domain. (restrictions?)

    .. attribute:: auth_type

        ???

    .. attribute:: voice_url

        The URL Twilio will request when this domain receives a call.

    .. attribute:: voice_method

        The HTTP method Twilio will use when requesting the above voice_url.
        Either GET or POST.

    .. attribute:: voice_fallback_url

        The URL that Twilio will request if an error occurs retrieving or
        executing the TwiML requested by voice_url.

    .. attribute:: voice_fallback_method

        The HTTP method Twilio will use when requesting the voice_fallback_url.
        Either GET or POST.

    .. attribute:: voice_status_callback

        The URL that Twilio will request to pass status parameters (such as
        call ended) to your application.

    .. attribute:: voice_status_callback_method

        The HTTP method Twilio will use to make requests to the status_callback
        URL. Either GET or POST.

    .. attribute:: date_created

        The date that this resource was created.

    .. attribute:: date_updated

        The date that this resource was last updated.

    """
    subresources = [IpAccessControlListMappings, CredentialListMappings]

    def update(self, **kwargs):
{'fraction_non_alphanumeric': 0.07270528154817901, 'fraction_numerical': 0.0009407337723424271, 'mean_word_length': 2.6878097125867195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5433625', 'n_tokens_mistral': 1987, 'n_tokens_neox': 1852, 'n_words': 630}