diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 47e2a5a1..ae594a2e 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -8,10 +8,8 @@ bandwidth/api/conferences_api.py bandwidth/api/media_api.py bandwidth/api/messages_api.py bandwidth/api/mfa_api.py -bandwidth/api/participants_api.py bandwidth/api/phone_number_lookup_api.py bandwidth/api/recordings_api.py -bandwidth/api/sessions_api.py bandwidth/api/statistics_api.py bandwidth/api_client.py bandwidth/apis/__init__.py @@ -42,16 +40,12 @@ bandwidth/model/create_call.py bandwidth/model/create_call_response.py bandwidth/model/create_lookup_response.py bandwidth/model/create_message_request_error.py -bandwidth/model/create_participant_request.py -bandwidth/model/create_participant_response.py bandwidth/model/deferred_result.py -bandwidth/model/device_api_version_enum.py bandwidth/model/disconenct_callback.py bandwidth/model/diversion.py bandwidth/model/dtmf_callback.py bandwidth/model/field_error.py bandwidth/model/file_format_enum.py -bandwidth/model/forbidden_request.py bandwidth/model/gather_callback.py bandwidth/model/initiate_callback.py bandwidth/model/list_message_direction_enum.py @@ -76,19 +70,13 @@ bandwidth/model/mfa_forbidden_request_error.py bandwidth/model/mfa_request_error.py bandwidth/model/mfa_unauthorized_request_error.py bandwidth/model/page_info.py -bandwidth/model/participant.py -bandwidth/model/participant_subscription.py bandwidth/model/priority_enum.py -bandwidth/model/publish_permissions_enum.py bandwidth/model/recording_available_callback.py bandwidth/model/recording_complete_callback.py bandwidth/model/recording_state_enum.py bandwidth/model/redirect_callback.py bandwidth/model/redirect_method_enum.py -bandwidth/model/request_error.py -bandwidth/model/session.py bandwidth/model/stir_shaken.py -bandwidth/model/subscriptions.py bandwidth/model/tag.py bandwidth/model/tn_lookup_request_error.py bandwidth/model/transcribe_recording.py @@ -99,7 +87,6 @@ bandwidth/model/transcription_metadata.py bandwidth/model/transfer_answer_callback.py bandwidth/model/transfer_complete_callback.py bandwidth/model/transfer_disconnect_callback.py -bandwidth/model/unauthorized_request.py bandwidth/model/update_call.py bandwidth/model/update_call_recording.py bandwidth/model/update_conference.py @@ -137,16 +124,12 @@ docs/CreateCall.md docs/CreateCallResponse.md docs/CreateLookupResponse.md docs/CreateMessageRequestError.md -docs/CreateParticipantRequest.md -docs/CreateParticipantResponse.md docs/DeferredResult.md -docs/DeviceApiVersionEnum.md docs/DisconenctCallback.md docs/Diversion.md docs/DtmfCallback.md docs/FieldError.md docs/FileFormatEnum.md -docs/ForbiddenRequest.md docs/GatherCallback.md docs/InitiateCallback.md docs/ListMessageDirectionEnum.md @@ -174,24 +157,16 @@ docs/MfaForbiddenRequestError.md docs/MfaRequestError.md docs/MfaUnauthorizedRequestError.md docs/PageInfo.md -docs/Participant.md -docs/ParticipantSubscription.md -docs/ParticipantsApi.md docs/PhoneNumberLookupApi.md docs/PriorityEnum.md -docs/PublishPermissionsEnum.md docs/RecordingAvailableCallback.md docs/RecordingCompleteCallback.md docs/RecordingStateEnum.md docs/RecordingsApi.md docs/RedirectCallback.md docs/RedirectMethodEnum.md -docs/RequestError.md -docs/Session.md -docs/SessionsApi.md docs/StatisticsApi.md docs/StirShaken.md -docs/Subscriptions.md docs/Tag.md docs/TnLookupRequestError.md docs/TranscribeRecording.md @@ -202,7 +177,6 @@ docs/TranscriptionMetadata.md docs/TransferAnswerCallback.md docs/TransferCompleteCallback.md docs/TransferDisconnectCallback.md -docs/UnauthorizedRequest.md docs/UpdateCall.md docs/UpdateCallRecording.md docs/UpdateConference.md diff --git a/README.md b/README.md index 5f9b2047..2c93e413 100644 --- a/README.md +++ b/README.md @@ -153,9 +153,6 @@ Class | Method | HTTP request | Description *MediaApi* | [**upload_media**](docs/MediaApi.md#upload_media) | **PUT** /users/{accountId}/media/{mediaId} | Upload Media *MessagesApi* | [**create_message**](docs/MessagesApi.md#create_message) | **POST** /users/{accountId}/messages | Create Message *MessagesApi* | [**list_messages**](docs/MessagesApi.md#list_messages) | **GET** /users/{accountId}/messages | List Messages -*ParticipantsApi* | [**create_participant**](docs/ParticipantsApi.md#create_participant) | **POST** /accounts/{accountId}/participants | Create Participant -*ParticipantsApi* | [**delete_participant**](docs/ParticipantsApi.md#delete_participant) | **DELETE** /accounts/{accountId}/participants/{participantId} | Delete Participant -*ParticipantsApi* | [**get_participant**](docs/ParticipantsApi.md#get_participant) | **GET** /accounts/{accountId}/participants/{participantId} | Get Participant *PhoneNumberLookupApi* | [**create_lookup**](docs/PhoneNumberLookupApi.md#create_lookup) | **POST** /accounts/{accountId}/tnlookup | Create Lookup *PhoneNumberLookupApi* | [**get_lookup_status**](docs/PhoneNumberLookupApi.md#get_lookup_status) | **GET** /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status *RecordingsApi* | [**delete_call_transcription**](docs/RecordingsApi.md#delete_call_transcription) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Delete Transcription @@ -168,14 +165,6 @@ Class | Method | HTTP request | Description *RecordingsApi* | [**list_call_recordings**](docs/RecordingsApi.md#list_call_recordings) | **GET** /accounts/{accountId}/calls/{callId}/recordings | List Call Recordings *RecordingsApi* | [**transcribe_call_recording**](docs/RecordingsApi.md#transcribe_call_recording) | **POST** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Create Transcription Request *RecordingsApi* | [**update_call_recording_state**](docs/RecordingsApi.md#update_call_recording_state) | **PUT** /accounts/{accountId}/calls/{callId}/recording | Update Recording -*SessionsApi* | [**add_participant_to_session**](docs/SessionsApi.md#add_participant_to_session) | **PUT** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId} | Add Participant to Session -*SessionsApi* | [**create_session**](docs/SessionsApi.md#create_session) | **POST** /accounts/{accountId}/sessions | Create Session -*SessionsApi* | [**delete_session**](docs/SessionsApi.md#delete_session) | **DELETE** /accounts/{accountId}/sessions/{sessionId} | Delete Session -*SessionsApi* | [**get_participant_subscriptions**](docs/SessionsApi.md#get_participant_subscriptions) | **GET** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions | Get Participant Subscriptions -*SessionsApi* | [**get_session**](docs/SessionsApi.md#get_session) | **GET** /accounts/{accountId}/sessions/{sessionId} | Get Session -*SessionsApi* | [**list_session_participants**](docs/SessionsApi.md#list_session_participants) | **GET** /accounts/{accountId}/sessions/{sessionId}/participants | List Participants in Session -*SessionsApi* | [**remove_participant_from_session**](docs/SessionsApi.md#remove_participant_from_session) | **DELETE** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId} | Remove Participant from Session -*SessionsApi* | [**update_participant_subscriptions**](docs/SessionsApi.md#update_participant_subscriptions) | **PUT** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions | Update Participant Subscriptions *StatisticsApi* | [**get_statistics**](docs/StatisticsApi.md#get_statistics) | **GET** /accounts/{accountId}/statistics | Get Account Statistics @@ -205,16 +194,12 @@ Class | Method | HTTP request | Description - [CreateCallResponse](docs/CreateCallResponse.md) - [CreateLookupResponse](docs/CreateLookupResponse.md) - [CreateMessageRequestError](docs/CreateMessageRequestError.md) - - [CreateParticipantRequest](docs/CreateParticipantRequest.md) - - [CreateParticipantResponse](docs/CreateParticipantResponse.md) - [DeferredResult](docs/DeferredResult.md) - - [DeviceApiVersionEnum](docs/DeviceApiVersionEnum.md) - [DisconenctCallback](docs/DisconenctCallback.md) - [Diversion](docs/Diversion.md) - [DtmfCallback](docs/DtmfCallback.md) - [FieldError](docs/FieldError.md) - [FileFormatEnum](docs/FileFormatEnum.md) - - [ForbiddenRequest](docs/ForbiddenRequest.md) - [GatherCallback](docs/GatherCallback.md) - [InitiateCallback](docs/InitiateCallback.md) - [ListMessageDirectionEnum](docs/ListMessageDirectionEnum.md) @@ -239,19 +224,13 @@ Class | Method | HTTP request | Description - [MfaRequestError](docs/MfaRequestError.md) - [MfaUnauthorizedRequestError](docs/MfaUnauthorizedRequestError.md) - [PageInfo](docs/PageInfo.md) - - [Participant](docs/Participant.md) - - [ParticipantSubscription](docs/ParticipantSubscription.md) - [PriorityEnum](docs/PriorityEnum.md) - - [PublishPermissionsEnum](docs/PublishPermissionsEnum.md) - [RecordingAvailableCallback](docs/RecordingAvailableCallback.md) - [RecordingCompleteCallback](docs/RecordingCompleteCallback.md) - [RecordingStateEnum](docs/RecordingStateEnum.md) - [RedirectCallback](docs/RedirectCallback.md) - [RedirectMethodEnum](docs/RedirectMethodEnum.md) - - [RequestError](docs/RequestError.md) - - [Session](docs/Session.md) - [StirShaken](docs/StirShaken.md) - - [Subscriptions](docs/Subscriptions.md) - [Tag](docs/Tag.md) - [TnLookupRequestError](docs/TnLookupRequestError.md) - [TranscribeRecording](docs/TranscribeRecording.md) @@ -262,7 +241,6 @@ Class | Method | HTTP request | Description - [TransferAnswerCallback](docs/TransferAnswerCallback.md) - [TransferCompleteCallback](docs/TransferCompleteCallback.md) - [TransferDisconnectCallback](docs/TransferDisconnectCallback.md) - - [UnauthorizedRequest](docs/UnauthorizedRequest.md) - [UpdateCall](docs/UpdateCall.md) - [UpdateCallRecording](docs/UpdateCallRecording.md) - [UpdateConference](docs/UpdateConference.md) diff --git a/bandwidth/api/participants_api.py b/bandwidth/api/participants_api.py deleted file mode 100644 index 1e6cf02a..00000000 --- a/bandwidth/api/participants_api.py +++ /dev/null @@ -1,488 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.api_client import ApiClient, Endpoint as _Endpoint -from bandwidth.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from bandwidth.model.create_participant_request import CreateParticipantRequest -from bandwidth.model.create_participant_response import CreateParticipantResponse -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.participant import Participant -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest - - -class ParticipantsApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.create_participant_endpoint = _Endpoint( - settings={ - 'response_type': (CreateParticipantResponse,), - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/participants', - 'operation_id': 'create_participant', - 'http_method': 'POST', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'create_participant_request', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'create_participant_request': - (CreateParticipantRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'create_participant_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_participant_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/participants/{participantId}', - 'operation_id': 'delete_participant', - 'http_method': 'DELETE', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'participant_id', - ], - 'required': [ - 'account_id', - 'participant_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'participant_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'participant_id': 'participantId', - }, - 'location_map': { - 'account_id': 'path', - 'participant_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_participant_endpoint = _Endpoint( - settings={ - 'response_type': (Participant,), - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/participants/{participantId}', - 'operation_id': 'get_participant', - 'http_method': 'GET', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'participant_id', - ], - 'required': [ - 'account_id', - 'participant_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'participant_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'participant_id': 'participantId', - }, - 'location_map': { - 'account_id': 'path', - 'participant_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - - def create_participant( - self, - account_id, - **kwargs - ): - """Create Participant # noqa: E501 - - Create a new participant under this account. Participants are idempotent, so relevant parameters must be set in this function if desired. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_participant(account_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - - Keyword Args: - create_participant_request (CreateParticipantRequest): Create participant request body.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - CreateParticipantResponse - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - return self.create_participant_endpoint.call_with_http_info(**kwargs) - - def delete_participant( - self, - account_id, - participant_id, - **kwargs - ): - """Delete Participant # noqa: E501 - - Delete participant by ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_participant(account_id, participant_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - participant_id (str): Participant ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['participant_id'] = \ - participant_id - return self.delete_participant_endpoint.call_with_http_info(**kwargs) - - def get_participant( - self, - account_id, - participant_id, - **kwargs - ): - """Get Participant # noqa: E501 - - Get participant by ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_participant(account_id, participant_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - participant_id (str): Participant ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Participant - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['participant_id'] = \ - participant_id - return self.get_participant_endpoint.call_with_http_info(**kwargs) - diff --git a/bandwidth/api/sessions_api.py b/bandwidth/api/sessions_api.py deleted file mode 100644 index 8d76e66e..00000000 --- a/bandwidth/api/sessions_api.py +++ /dev/null @@ -1,1287 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.api_client import ApiClient, Endpoint as _Endpoint -from bandwidth.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.participant import Participant -from bandwidth.model.request_error import RequestError -from bandwidth.model.session import Session -from bandwidth.model.subscriptions import Subscriptions -from bandwidth.model.unauthorized_request import UnauthorizedRequest - - -class SessionsApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.add_participant_to_session_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}', - 'operation_id': 'add_participant_to_session', - 'http_method': 'PUT', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - 'participant_id', - 'subscriptions', - ], - 'required': [ - 'account_id', - 'session_id', - 'participant_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - 'participant_id': - (str,), - 'subscriptions': - (Subscriptions,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - 'participant_id': 'participantId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - 'participant_id': 'path', - 'subscriptions': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_session_endpoint = _Endpoint( - settings={ - 'response_type': (Session,), - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions', - 'operation_id': 'create_session', - 'http_method': 'POST', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session': - (Session,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'session': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_session_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}', - 'operation_id': 'delete_session', - 'http_method': 'DELETE', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - ], - 'required': [ - 'account_id', - 'session_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_participant_subscriptions_endpoint = _Endpoint( - settings={ - 'response_type': (Subscriptions,), - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions', - 'operation_id': 'get_participant_subscriptions', - 'http_method': 'GET', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - 'participant_id', - ], - 'required': [ - 'account_id', - 'session_id', - 'participant_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - 'participant_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - 'participant_id': 'participantId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - 'participant_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_session_endpoint = _Endpoint( - settings={ - 'response_type': (Session,), - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}', - 'operation_id': 'get_session', - 'http_method': 'GET', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - ], - 'required': [ - 'account_id', - 'session_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_session_participants_endpoint = _Endpoint( - settings={ - 'response_type': ([Participant],), - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}/participants', - 'operation_id': 'list_session_participants', - 'http_method': 'GET', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - ], - 'required': [ - 'account_id', - 'session_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.remove_participant_from_session_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}', - 'operation_id': 'remove_participant_from_session', - 'http_method': 'DELETE', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - 'participant_id', - ], - 'required': [ - 'account_id', - 'session_id', - 'participant_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - 'participant_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - 'participant_id': 'participantId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - 'participant_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_participant_subscriptions_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'Basic' - ], - 'endpoint_path': '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions', - 'operation_id': 'update_participant_subscriptions', - 'http_method': 'PUT', - 'servers': [ - { - 'url': "https://api.webrtc.bandwidth.com/v1", - 'description': "Production", - }, - ] - }, - params_map={ - 'all': [ - 'account_id', - 'session_id', - 'participant_id', - 'subscriptions', - ], - 'required': [ - 'account_id', - 'session_id', - 'participant_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'session_id': - (str,), - 'participant_id': - (str,), - 'subscriptions': - (Subscriptions,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'session_id': 'sessionId', - 'participant_id': 'participantId', - }, - 'location_map': { - 'account_id': 'path', - 'session_id': 'path', - 'participant_id': 'path', - 'subscriptions': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - - def add_participant_to_session( - self, - account_id, - session_id, - participant_id, - **kwargs - ): - """Add Participant to Session # noqa: E501 - - Add a participant to a session. Subscriptions can optionally be provided as part of this call. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_participant_to_session(account_id, session_id, participant_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - participant_id (str): Participant ID - - Keyword Args: - subscriptions (Subscriptions): The Body describes an optional set of subscriptions to apply to the participant. Calling this endpoint with no/empty body will only add the participant to the session, and will not subscribe the Participant to any media. The request body for this endpoint is OPTIONAL and provided as a convenience to avoid additional calls to the Update Participant Subscriptions endpoint. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - kwargs['participant_id'] = \ - participant_id - return self.add_participant_to_session_endpoint.call_with_http_info(**kwargs) - - def create_session( - self, - account_id, - **kwargs - ): - """Create Session # noqa: E501 - - Create a new session. Sessions are idempotent, so relevant parameters must be set in this function if desired. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_session(account_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - - Keyword Args: - session (Session): Create session request body.. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Session - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - return self.create_session_endpoint.call_with_http_info(**kwargs) - - def delete_session( - self, - account_id, - session_id, - **kwargs - ): - """Delete Session # noqa: E501 - - Delete session by ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_session(account_id, session_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - return self.delete_session_endpoint.call_with_http_info(**kwargs) - - def get_participant_subscriptions( - self, - account_id, - session_id, - participant_id, - **kwargs - ): - """Get Participant Subscriptions # noqa: E501 - - Get a participant's subscriptions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_participant_subscriptions(account_id, session_id, participant_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - participant_id (str): Participant ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Subscriptions - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - kwargs['participant_id'] = \ - participant_id - return self.get_participant_subscriptions_endpoint.call_with_http_info(**kwargs) - - def get_session( - self, - account_id, - session_id, - **kwargs - ): - """Get Session # noqa: E501 - - Get session by ID. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_session(account_id, session_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - Session - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - return self.get_session_endpoint.call_with_http_info(**kwargs) - - def list_session_participants( - self, - account_id, - session_id, - **kwargs - ): - """List Participants in Session # noqa: E501 - - List participants in a session. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_session_participants(account_id, session_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - [Participant] - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - return self.list_session_participants_endpoint.call_with_http_info(**kwargs) - - def remove_participant_from_session( - self, - account_id, - session_id, - participant_id, - **kwargs - ): - """Remove Participant from Session # noqa: E501 - - Remove a participant from a session. This will automatically remove any subscriptions the participant has associated with this session. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.remove_participant_from_session(account_id, session_id, participant_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - participant_id (str): Participant ID - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - kwargs['participant_id'] = \ - participant_id - return self.remove_participant_from_session_endpoint.call_with_http_info(**kwargs) - - def update_participant_subscriptions( - self, - account_id, - session_id, - participant_id, - **kwargs - ): - """Update Participant Subscriptions # noqa: E501 - - Update a participant's subscriptions. This is a full update that will replace the participant's subscriptions. It allows subscription to the entire Session, a subset list of Participants in that Session, or specific media streams on any of the listed Participants. First call `getParticipantSubscriptions` if you need the current subscriptions. Calling this API with no `Subscriptions` object to remove all subscriptions. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_participant_subscriptions(account_id, session_id, participant_id, async_req=True) - >>> result = thread.get() - - Args: - account_id (str): Account ID - session_id (str): Session ID - participant_id (str): Participant ID - - Keyword Args: - subscriptions (Subscriptions): The body describes the desired subscriptions for the Participant. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created. [optional] - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - None - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['account_id'] = \ - account_id - kwargs['session_id'] = \ - session_id - kwargs['participant_id'] = \ - participant_id - return self.update_participant_subscriptions_endpoint.call_with_http_info(**kwargs) - diff --git a/bandwidth/api/statistics_api.py b/bandwidth/api/statistics_api.py index e7190d50..e6bab392 100644 --- a/bandwidth/api/statistics_api.py +++ b/bandwidth/api/statistics_api.py @@ -1,8 +1,6 @@ """ Bandwidth - Bandwidth's Communication APIs # noqa: E501 - The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech @@ -29,7 +27,6 @@ class StatisticsApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech - Do not edit the class manually. """ @@ -100,17 +97,13 @@ def get_statistics( **kwargs ): """Get Account Statistics # noqa: E501 - Returns details about the current state of the account. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_statistics(account_id, async_req=True) >>> result = thread.get() - Args: account_id (str): Your Bandwidth Account ID - Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -142,7 +135,6 @@ def get_statistics( in the spec for a single request. Default is None async_req (bool): execute request asynchronously - Returns: AccountStatistics If the method is called asynchronously, returns the request @@ -176,4 +168,3 @@ def get_statistics( kwargs['account_id'] = \ account_id return self.get_statistics_endpoint.call_with_http_info(**kwargs) - diff --git a/bandwidth/apis/__init__.py b/bandwidth/apis/__init__.py index 24153c58..80e9c676 100644 --- a/bandwidth/apis/__init__.py +++ b/bandwidth/apis/__init__.py @@ -19,8 +19,6 @@ from bandwidth.api.mfa_api import MFAApi from bandwidth.api.media_api import MediaApi from bandwidth.api.messages_api import MessagesApi -from bandwidth.api.participants_api import ParticipantsApi from bandwidth.api.phone_number_lookup_api import PhoneNumberLookupApi from bandwidth.api.recordings_api import RecordingsApi -from bandwidth.api.sessions_api import SessionsApi from bandwidth.api.statistics_api import StatisticsApi diff --git a/bandwidth/model/create_participant_request.py b/bandwidth/model/create_participant_request.py deleted file mode 100644 index 8c7584be..00000000 --- a/bandwidth/model/create_participant_request.py +++ /dev/null @@ -1,286 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - -def lazy_import(): - from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum - from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum - globals()['DeviceApiVersionEnum'] = DeviceApiVersionEnum - globals()['PublishPermissionsEnum'] = PublishPermissionsEnum - - -class CreateParticipantRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('publish_permissions',): { - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'callback_url': (str, none_type,), # noqa: E501 - 'publish_permissions': ([PublishPermissionsEnum],), # noqa: E501 - 'tag': (str,), # noqa: E501 - 'device_api_version': (DeviceApiVersionEnum,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'callback_url': 'callbackUrl', # noqa: E501 - 'publish_permissions': 'publishPermissions', # noqa: E501 - 'tag': 'tag', # noqa: E501 - 'device_api_version': 'deviceApiVersion', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateParticipantRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str, none_type): Full callback url to use for notifications about this participant.. [optional] # noqa: E501 - publish_permissions ([PublishPermissionsEnum]): Defines if this participant can publish audio or video.. [optional] # noqa: E501 - tag (str): User defined tag to associate with the participant.. [optional] # noqa: E501 - device_api_version (DeviceApiVersionEnum): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateParticipantRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - callback_url (str, none_type): Full callback url to use for notifications about this participant.. [optional] # noqa: E501 - publish_permissions ([PublishPermissionsEnum]): Defines if this participant can publish audio or video.. [optional] # noqa: E501 - tag (str): User defined tag to associate with the participant.. [optional] # noqa: E501 - device_api_version (DeviceApiVersionEnum): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/create_participant_response.py b/bandwidth/model/create_participant_response.py deleted file mode 100644 index 1b173fab..00000000 --- a/bandwidth/model/create_participant_response.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - -def lazy_import(): - from bandwidth.model.participant import Participant - globals()['Participant'] = Participant - - -class CreateParticipantResponse(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'participant': (Participant,), # noqa: E501 - 'token': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'participant': 'participant', # noqa: E501 - 'token': 'token', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateParticipantResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - participant (Participant): [optional] # noqa: E501 - token (str): Auth token for the returned participant. This should be passed to the participant so that they can connect to the platform.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateParticipantResponse - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - participant (Participant): [optional] # noqa: E501 - token (str): Auth token for the returned participant. This should be passed to the participant so that they can connect to the platform.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/device_api_version_enum.py b/bandwidth/model/device_api_version_enum.py deleted file mode 100644 index 1967c940..00000000 --- a/bandwidth/model/device_api_version_enum.py +++ /dev/null @@ -1,282 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class DeviceApiVersionEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'V3': "V3", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """DeviceApiVersionEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Optional field to define the device api version of this participant.. if omitted defaults to "V3", must be one of ["V3", ] # noqa: E501 - - Keyword Args: - value (str): Optional field to define the device api version of this participant.. if omitted defaults to "V3", must be one of ["V3", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "V3" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """DeviceApiVersionEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): Optional field to define the device api version of this participant.. if omitted defaults to "V3", must be one of ["V3", ] # noqa: E501 - - Keyword Args: - value (str): Optional field to define the device api version of this participant.. if omitted defaults to "V3", must be one of ["V3", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "V3" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/bandwidth/model/forbidden_request.py b/bandwidth/model/forbidden_request.py deleted file mode 100644 index 18931463..00000000 --- a/bandwidth/model/forbidden_request.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class ForbiddenRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'message': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'message': 'message', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ForbiddenRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - message (str): The message containing the reason behind the request being forbidden.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ForbiddenRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - message (str): The message containing the reason behind the request being forbidden.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/participant.py b/bandwidth/model/participant.py deleted file mode 100644 index deaab0ec..00000000 --- a/bandwidth/model/participant.py +++ /dev/null @@ -1,302 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - -def lazy_import(): - from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum - from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum - from bandwidth.model.subscriptions import Subscriptions - globals()['DeviceApiVersionEnum'] = DeviceApiVersionEnum - globals()['PublishPermissionsEnum'] = PublishPermissionsEnum - globals()['Subscriptions'] = Subscriptions - - -class Participant(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('publish_permissions',): { - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'id': (str,), # noqa: E501 - 'callback_url': (str, none_type,), # noqa: E501 - 'publish_permissions': ([PublishPermissionsEnum],), # noqa: E501 - 'sessions': ([str],), # noqa: E501 - 'subscriptions': (Subscriptions,), # noqa: E501 - 'tag': (str,), # noqa: E501 - 'device_api_version': (DeviceApiVersionEnum,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'callback_url': 'callbackUrl', # noqa: E501 - 'publish_permissions': 'publishPermissions', # noqa: E501 - 'sessions': 'sessions', # noqa: E501 - 'subscriptions': 'subscriptions', # noqa: E501 - 'tag': 'tag', # noqa: E501 - 'device_api_version': 'deviceApiVersion', # noqa: E501 - } - - read_only_vars = { - 'id', # noqa: E501 - 'sessions', # noqa: E501 - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Participant - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique id of the participant.. [optional] # noqa: E501 - callback_url (str, none_type): Full callback url to use for notifications about this participant.. [optional] # noqa: E501 - publish_permissions ([PublishPermissionsEnum]): Defines if this participant can publish audio or video.. [optional] # noqa: E501 - sessions ([str]): List of session ids this participant is associated with Capped to one Upon creation of a Participant, returns as an empty array.. [optional] # noqa: E501 - subscriptions (Subscriptions): [optional] # noqa: E501 - tag (str): User defined tag to associate with the participant.. [optional] # noqa: E501 - device_api_version (DeviceApiVersionEnum): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Participant - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique id of the participant.. [optional] # noqa: E501 - callback_url (str, none_type): Full callback url to use for notifications about this participant.. [optional] # noqa: E501 - publish_permissions ([PublishPermissionsEnum]): Defines if this participant can publish audio or video.. [optional] # noqa: E501 - sessions ([str]): List of session ids this participant is associated with Capped to one Upon creation of a Participant, returns as an empty array.. [optional] # noqa: E501 - subscriptions (Subscriptions): [optional] # noqa: E501 - tag (str): User defined tag to associate with the participant.. [optional] # noqa: E501 - device_api_version (DeviceApiVersionEnum): [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/participant_subscription.py b/bandwidth/model/participant_subscription.py deleted file mode 100644 index 3de068ed..00000000 --- a/bandwidth/model/participant_subscription.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class ParticipantSubscription(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - ('stream_aliases',): { - }, - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'participant_id': (str,), # noqa: E501 - 'stream_aliases': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'participant_id': 'participantId', # noqa: E501 - 'stream_aliases': 'streamAliases', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, participant_id, *args, **kwargs): # noqa: E501 - """ParticipantSubscription - a model defined in OpenAPI - - Args: - participant_id (str): The Participant the subscriber will be subscribed to - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - stream_aliases ([str]): (optional) An array of specific streamAliases owned by the Participant that the subscriber will be subscribed to. Background: A streamAlias is created by a WebRTC client when it connects and declares a name for the related stream. The client is responsible for informing the application of any created streamAliases to enable the application to subscribe to specific streamAliases. Subscribing to a `streamAlias` that does not exist is undefined. If the array is empty all aliases are assumed.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.participant_id = participant_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, participant_id, *args, **kwargs): # noqa: E501 - """ParticipantSubscription - a model defined in OpenAPI - - Args: - participant_id (str): The Participant the subscriber will be subscribed to - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - stream_aliases ([str]): (optional) An array of specific streamAliases owned by the Participant that the subscriber will be subscribed to. Background: A streamAlias is created by a WebRTC client when it connects and declares a name for the related stream. The client is responsible for informing the application of any created streamAliases to enable the application to subscribe to specific streamAliases. Subscribing to a `streamAlias` that does not exist is undefined. If the array is empty all aliases are assumed.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.participant_id = participant_id - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/publish_permissions_enum.py b/bandwidth/model/publish_permissions_enum.py deleted file mode 100644 index 45b9b6f2..00000000 --- a/bandwidth/model/publish_permissions_enum.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class PublishPermissionsEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'AUDIO': "AUDIO", - 'VIDEO': "VIDEO", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): - """PublishPermissionsEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["AUDIO", "VIDEO", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["AUDIO", "VIDEO", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """PublishPermissionsEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str):, must be one of ["AUDIO", "VIDEO", ] # noqa: E501 - - Keyword Args: - value (str):, must be one of ["AUDIO", "VIDEO", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/bandwidth/model/request_error.py b/bandwidth/model/request_error.py deleted file mode 100644 index 0ead83dd..00000000 --- a/bandwidth/model/request_error.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class RequestError(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'error': (str,), # noqa: E501 - 'request_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'error': 'error', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RequestError - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): A message describing the error with your request.. [optional] # noqa: E501 - request_id (str): The associated requestId from AWS.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RequestError - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - error (str): A message describing the error with your request.. [optional] # noqa: E501 - request_id (str): The associated requestId from AWS.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/session.py b/bandwidth/model/session.py deleted file mode 100644 index ffbf844c..00000000 --- a/bandwidth/model/session.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class Session(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'id': (str,), # noqa: E501 - 'tag': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'id': 'id', # noqa: E501 - 'tag': 'tag', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Session - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique id of the session.. [optional] # noqa: E501 - tag (str): User defined tag to associate with the session.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Session - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - id (str): Unique id of the session.. [optional] # noqa: E501 - tag (str): User defined tag to associate with the session.. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/subscriptions.py b/bandwidth/model/subscriptions.py deleted file mode 100644 index 5939a0a8..00000000 --- a/bandwidth/model/subscriptions.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - -def lazy_import(): - from bandwidth.model.participant_subscription import ParticipantSubscription - globals()['ParticipantSubscription'] = ParticipantSubscription - - -class Subscriptions(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'session_id': (str,), # noqa: E501 - 'participants': ([ParticipantSubscription],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'session_id': 'sessionId', # noqa: E501 - 'participants': 'participants', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Subscriptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - session_id (str): If present, and not overridden by the array of participants, it represents the session the subscriptions are associated with. If this is the only field, the subscriber will be subscribed to all participants in the session (including any participants that are later added to the session). Upon creation of a Participant, returns as an empty object.. [optional] # noqa: E501 - participants ([ParticipantSubscription]): (optional) A list of participants in the session that will be subscribed to. If present and not empty or null, this will override any sessionId specified in the body. Returns empty if used during the creation of a Participant. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Subscriptions - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - session_id (str): If present, and not overridden by the array of participants, it represents the session the subscriptions are associated with. If this is the only field, the subscriber will be subscribed to all participants in the session (including any participants that are later added to the session). Upon creation of a Participant, returns as an empty object.. [optional] # noqa: E501 - participants ([ParticipantSubscription]): (optional) A list of participants in the session that will be subscribed to. If present and not empty or null, this will override any sessionId specified in the body. Returns empty if used during the creation of a Participant. . [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/model/unauthorized_request.py b/bandwidth/model/unauthorized_request.py deleted file mode 100644 index 27a91f25..00000000 --- a/bandwidth/model/unauthorized_request.py +++ /dev/null @@ -1,264 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from bandwidth.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from bandwidth.exceptions import ApiAttributeError - - - -class UnauthorizedRequest(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'message': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'message': 'message', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UnauthorizedRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - message (str): Unauthorized. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', True) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UnauthorizedRequest - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - message (str): Unauthorized. [optional] # noqa: E501 - """ - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) - - if args: - for arg in args: - if isinstance(arg, dict): - kwargs.update(arg) - else: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") diff --git a/bandwidth/models/__init__.py b/bandwidth/models/__init__.py index 14bed288..c2d49faf 100644 --- a/bandwidth/models/__init__.py +++ b/bandwidth/models/__init__.py @@ -33,16 +33,12 @@ from bandwidth.model.create_call_response import CreateCallResponse from bandwidth.model.create_lookup_response import CreateLookupResponse from bandwidth.model.create_message_request_error import CreateMessageRequestError -from bandwidth.model.create_participant_request import CreateParticipantRequest -from bandwidth.model.create_participant_response import CreateParticipantResponse from bandwidth.model.deferred_result import DeferredResult -from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum from bandwidth.model.disconenct_callback import DisconenctCallback from bandwidth.model.diversion import Diversion from bandwidth.model.dtmf_callback import DtmfCallback from bandwidth.model.field_error import FieldError from bandwidth.model.file_format_enum import FileFormatEnum -from bandwidth.model.forbidden_request import ForbiddenRequest from bandwidth.model.gather_callback import GatherCallback from bandwidth.model.initiate_callback import InitiateCallback from bandwidth.model.list_message_direction_enum import ListMessageDirectionEnum @@ -67,19 +63,13 @@ from bandwidth.model.mfa_request_error import MfaRequestError from bandwidth.model.mfa_unauthorized_request_error import MfaUnauthorizedRequestError from bandwidth.model.page_info import PageInfo -from bandwidth.model.participant import Participant -from bandwidth.model.participant_subscription import ParticipantSubscription from bandwidth.model.priority_enum import PriorityEnum -from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum from bandwidth.model.recording_available_callback import RecordingAvailableCallback from bandwidth.model.recording_complete_callback import RecordingCompleteCallback from bandwidth.model.recording_state_enum import RecordingStateEnum from bandwidth.model.redirect_callback import RedirectCallback from bandwidth.model.redirect_method_enum import RedirectMethodEnum -from bandwidth.model.request_error import RequestError -from bandwidth.model.session import Session from bandwidth.model.stir_shaken import StirShaken -from bandwidth.model.subscriptions import Subscriptions from bandwidth.model.tag import Tag from bandwidth.model.tn_lookup_request_error import TnLookupRequestError from bandwidth.model.transcribe_recording import TranscribeRecording @@ -90,7 +80,6 @@ from bandwidth.model.transfer_answer_callback import TransferAnswerCallback from bandwidth.model.transfer_complete_callback import TransferCompleteCallback from bandwidth.model.transfer_disconnect_callback import TransferDisconnectCallback -from bandwidth.model.unauthorized_request import UnauthorizedRequest from bandwidth.model.update_call import UpdateCall from bandwidth.model.update_call_recording import UpdateCallRecording from bandwidth.model.update_conference import UpdateConference diff --git a/bandwidth/utilities/init.py b/bandwidth/utilities/init.py deleted file mode 100644 index e69de29b..00000000 diff --git a/bandwidth/utilities/web_rtc.py b/bandwidth/utilities/web_rtc.py deleted file mode 100644 index 9943f3e0..00000000 --- a/bandwidth/utilities/web_rtc.py +++ /dev/null @@ -1,54 +0,0 @@ -from bandwidth.model.bxml.response import Response -from bandwidth.model.bxml.verbs import * - - -def _generate_transfer_model(device_token: str, voice_call_id: str, sip_uri: str = 'sip:sipx.webrtc.bandwidth.com:5060') -> Transfer: - """Generate a Transfer object for a WebRTC Session - - Args: - device_token (str): The device token. - voice_call_id (str): The Bandwidth voice Call ID. - sip_uri (str, optional): The SIP URI to transfer the call to. Defaults to 'sip:sipx.webrtc.bandwidth.com:5060'. - - Returns: - Transfer: Returns a Transfer BXML Verb Object - """ - uui = "".join(voice_call_id.split("-")[1::]) - sip_uri = SipUri( - uri=sip_uri, - uui=f"{uui};encoding=base64,{device_token};encoding=jwt" - ) - transfer = Transfer( - transfer_to=[sip_uri] - ) - return transfer - - -def generate_transfer_bxml_verb(device_token: str, voice_call_id: str, sip_uri: str = 'sip:sipx.webrtc.bandwidth.com:5060') -> str: - """Returns the Transfer verb to perform the SIP transfer without the Response wrapper - - Args: - device_token (str): The device token. - voice_call_id (str): The Bandwidth voice Call ID. - sip_uri (str, optional): The SIP URI to transfer the call to. Defaults to 'sip:sipx.webrtc.bandwidth.com:5060'. - - Returns: - str: BXML Verb - """ - return _generate_transfer_model(device_token, voice_call_id, sip_uri).to_bxml() - - -def generate_transfer_bxml(device_token: str, voice_call_id: str, sip_uri: str = 'sip:sipx.webrtc.bandwidth.com:5060') -> str: - """Generate BXML document with WebRTC a device token to perform a SIP transfer - - Args: - device_token (str): The device token. - voice_call_id (str): The Bandwidth voice Call ID. - sip_uri (str, optional): The SIP URI to transfer the call to. Defaults to 'sip:sipx.webrtc.bandwidth.com:5060'. - - Returns: - str: BXML document with transfer BXML - """ - response = Response() - response.add_verb(_generate_transfer_model(device_token, voice_call_id, sip_uri)) - return response.to_bxml() diff --git a/docs/CreateParticipantRequest.md b/docs/CreateParticipantRequest.md deleted file mode 100644 index 98c1c01d..00000000 --- a/docs/CreateParticipantRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateParticipantRequest - -Create a participant request. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**callback_url** | **str, none_type** | Full callback url to use for notifications about this participant. | [optional] -**publish_permissions** | [**[PublishPermissionsEnum]**](PublishPermissionsEnum.md) | Defines if this participant can publish audio or video. | [optional] -**tag** | **str** | User defined tag to associate with the participant. | [optional] -**device_api_version** | [**DeviceApiVersionEnum**](DeviceApiVersionEnum.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateParticipantResponse.md b/docs/CreateParticipantResponse.md deleted file mode 100644 index db29d849..00000000 --- a/docs/CreateParticipantResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateParticipantResponse - -Response generated when a Participant is created. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**participant** | [**Participant**](Participant.md) | | [optional] -**token** | **str** | Auth token for the returned participant. This should be passed to the participant so that they can connect to the platform. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeviceApiVersionEnum.md b/docs/DeviceApiVersionEnum.md deleted file mode 100644 index 81c4367d..00000000 --- a/docs/DeviceApiVersionEnum.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeviceApiVersionEnum - -Optional field to define the device api version of this participant. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | Optional field to define the device api version of this participant. | defaults to "V3", must be one of ["V3", ] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ForbiddenRequest.md b/docs/ForbiddenRequest.md deleted file mode 100644 index f8b3eecd..00000000 --- a/docs/ForbiddenRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ForbiddenRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | The message containing the reason behind the request being forbidden. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Participant.md b/docs/Participant.md deleted file mode 100644 index e032b83c..00000000 --- a/docs/Participant.md +++ /dev/null @@ -1,19 +0,0 @@ -# Participant - -Participant object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique id of the participant. | [optional] [readonly] -**callback_url** | **str, none_type** | Full callback url to use for notifications about this participant. | [optional] -**publish_permissions** | [**[PublishPermissionsEnum]**](PublishPermissionsEnum.md) | Defines if this participant can publish audio or video. | [optional] -**sessions** | **[str]** | List of session ids this participant is associated with Capped to one Upon creation of a Participant, returns as an empty array. | [optional] [readonly] -**subscriptions** | [**Subscriptions**](Subscriptions.md) | | [optional] -**tag** | **str** | User defined tag to associate with the participant. | [optional] -**device_api_version** | [**DeviceApiVersionEnum**](DeviceApiVersionEnum.md) | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ParticipantSubscription.md b/docs/ParticipantSubscription.md deleted file mode 100644 index 5dcb64c1..00000000 --- a/docs/ParticipantSubscription.md +++ /dev/null @@ -1,13 +0,0 @@ -# ParticipantSubscription - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**participant_id** | **str** | The Participant the subscriber will be subscribed to | -**stream_aliases** | **[str]** | (optional) An array of specific streamAliases owned by the Participant that the subscriber will be subscribed to. Background: A streamAlias is created by a WebRTC client when it connects and declares a name for the related stream. The client is responsible for informing the application of any created streamAliases to enable the application to subscribe to specific streamAliases. Subscribing to a `streamAlias` that does not exist is undefined. If the array is empty all aliases are assumed. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ParticipantsApi.md b/docs/ParticipantsApi.md deleted file mode 100644 index 437bd9c8..00000000 --- a/docs/ParticipantsApi.md +++ /dev/null @@ -1,289 +0,0 @@ -# bandwidth.ParticipantsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_participant**](ParticipantsApi.md#create_participant) | **POST** /accounts/{accountId}/participants | Create Participant -[**delete_participant**](ParticipantsApi.md#delete_participant) | **DELETE** /accounts/{accountId}/participants/{participantId} | Delete Participant -[**get_participant**](ParticipantsApi.md#get_participant) | **GET** /accounts/{accountId}/participants/{participantId} | Get Participant - - -# **create_participant** -> CreateParticipantResponse create_participant(account_id) - -Create Participant - -Create a new participant under this account. Participants are idempotent, so relevant parameters must be set in this function if desired. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import participants_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.create_participant_request import CreateParticipantRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.create_participant_response import CreateParticipantResponse -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = participants_api.ParticipantsApi(api_client) - account_id = "9900000" # str | Account ID - create_participant_request = CreateParticipantRequest( - callback_url="https://example.com/callback", - publish_permissions=[ - PublishPermissionsEnum("["VIDEO","AUDIO"]"), - ], - tag="participant1", - device_api_version=DeviceApiVersionEnum("V3"), - ) # CreateParticipantRequest | Create participant request body. (optional) - - # example passing only required values which don't have defaults set - try: - # Create Participant - api_response = api_instance.create_participant(account_id) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling ParticipantsApi->create_participant: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Create Participant - api_response = api_instance.create_participant(account_id, create_participant_request=create_participant_request) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling ParticipantsApi->create_participant: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **create_participant_request** | [**CreateParticipantRequest**](CreateParticipantRequest.md)| Create participant request body. | [optional] - -### Return type - -[**CreateParticipantResponse**](CreateParticipantResponse.md) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_participant** -> delete_participant(account_id, participant_id) - -Delete Participant - -Delete participant by ID. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import participants_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = participants_api.ParticipantsApi(api_client) - account_id = "9900000" # str | Account ID - participant_id = "62e0ecb9-0b1b-5115-aae4-4f36123d6bb1" # str | Participant ID - - # example passing only required values which don't have defaults set - try: - # Delete Participant - api_instance.delete_participant(account_id, participant_id) - except bandwidth.ApiException as e: - print("Exception when calling ParticipantsApi->delete_participant: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **participant_id** | **str**| Participant ID | - -### Return type - -void (empty response body) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_participant** -> Participant get_participant(account_id, participant_id) - -Get Participant - -Get participant by ID. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import participants_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.participant import Participant -from bandwidth.model.forbidden_request import ForbiddenRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = participants_api.ParticipantsApi(api_client) - account_id = "9900000" # str | Account ID - participant_id = "62e0ecb9-0b1b-5115-aae4-4f36123d6bb1" # str | Participant ID - - # example passing only required values which don't have defaults set - try: - # Get Participant - api_response = api_instance.get_participant(account_id, participant_id) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling ParticipantsApi->get_participant: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **participant_id** | **str**| Participant ID | - -### Return type - -[**Participant**](Participant.md) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Session.md b/docs/Session.md deleted file mode 100644 index 0c55512b..00000000 --- a/docs/Session.md +++ /dev/null @@ -1,14 +0,0 @@ -# Session - -Session object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Unique id of the session. | [optional] -**tag** | **str** | User defined tag to associate with the session. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SessionsApi.md b/docs/SessionsApi.md deleted file mode 100644 index 9a685ed4..00000000 --- a/docs/SessionsApi.md +++ /dev/null @@ -1,772 +0,0 @@ -# bandwidth.SessionsApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_participant_to_session**](SessionsApi.md#add_participant_to_session) | **PUT** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId} | Add Participant to Session -[**create_session**](SessionsApi.md#create_session) | **POST** /accounts/{accountId}/sessions | Create Session -[**delete_session**](SessionsApi.md#delete_session) | **DELETE** /accounts/{accountId}/sessions/{sessionId} | Delete Session -[**get_participant_subscriptions**](SessionsApi.md#get_participant_subscriptions) | **GET** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions | Get Participant Subscriptions -[**get_session**](SessionsApi.md#get_session) | **GET** /accounts/{accountId}/sessions/{sessionId} | Get Session -[**list_session_participants**](SessionsApi.md#list_session_participants) | **GET** /accounts/{accountId}/sessions/{sessionId}/participants | List Participants in Session -[**remove_participant_from_session**](SessionsApi.md#remove_participant_from_session) | **DELETE** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId} | Remove Participant from Session -[**update_participant_subscriptions**](SessionsApi.md#update_participant_subscriptions) | **PUT** /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions | Update Participant Subscriptions - - -# **add_participant_to_session** -> add_participant_to_session(account_id, session_id, participant_id) - -Add Participant to Session - -Add a participant to a session. Subscriptions can optionally be provided as part of this call. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.subscriptions import Subscriptions -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - participant_id = "62e0ecb9-0b1b-5115-aae4-4f36123d6bb1" # str | Participant ID - subscriptions = Subscriptions( - session_id="d8886aad-b956-4e1b-b2f4-d7c9f8162772", - participants=[ - ParticipantSubscription( - participant_id="568749d5-04d5-483d-adf5-deac7dd3d521", - stream_aliases=["alias_1","alias_2"], - ), - ], - ) # Subscriptions | The Body describes an optional set of subscriptions to apply to the participant. Calling this endpoint with no/empty body will only add the participant to the session, and will not subscribe the Participant to any media. The request body for this endpoint is OPTIONAL and provided as a convenience to avoid additional calls to the Update Participant Subscriptions endpoint. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created (optional) - - # example passing only required values which don't have defaults set - try: - # Add Participant to Session - api_instance.add_participant_to_session(account_id, session_id, participant_id) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->add_participant_to_session: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Add Participant to Session - api_instance.add_participant_to_session(account_id, session_id, participant_id, subscriptions=subscriptions) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->add_participant_to_session: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - **participant_id** | **str**| Participant ID | - **subscriptions** | [**Subscriptions**](Subscriptions.md)| The Body describes an optional set of subscriptions to apply to the participant. Calling this endpoint with no/empty body will only add the participant to the session, and will not subscribe the Participant to any media. The request body for this endpoint is OPTIONAL and provided as a convenience to avoid additional calls to the Update Participant Subscriptions endpoint. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**409** | Conflict | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_session** -> Session create_session(account_id) - -Create Session - -Create a new session. Sessions are idempotent, so relevant parameters must be set in this function if desired. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.session import Session -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session = Session( - id="75c21163-e110-41bc-bd76-1bb428ec85d5", - tag="session1", - ) # Session | Create session request body. (optional) - - # example passing only required values which don't have defaults set - try: - # Create Session - api_response = api_instance.create_session(account_id) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->create_session: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Create Session - api_response = api_instance.create_session(account_id, session=session) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->create_session: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session** | [**Session**](Session.md)| Create session request body. | [optional] - -### Return type - -[**Session**](Session.md) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_session** -> delete_session(account_id, session_id) - -Delete Session - -Delete session by ID. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - - # example passing only required values which don't have defaults set - try: - # Delete Session - api_instance.delete_session(account_id, session_id) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->delete_session: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - -### Return type - -void (empty response body) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_participant_subscriptions** -> Subscriptions get_participant_subscriptions(account_id, session_id, participant_id) - -Get Participant Subscriptions - -Get a participant's subscriptions. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.subscriptions import Subscriptions -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - participant_id = "62e0ecb9-0b1b-5115-aae4-4f36123d6bb1" # str | Participant ID - - # example passing only required values which don't have defaults set - try: - # Get Participant Subscriptions - api_response = api_instance.get_participant_subscriptions(account_id, session_id, participant_id) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->get_participant_subscriptions: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - **participant_id** | **str**| Participant ID | - -### Return type - -[**Subscriptions**](Subscriptions.md) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_session** -> Session get_session(account_id, session_id) - -Get Session - -Get session by ID. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.session import Session -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - - # example passing only required values which don't have defaults set - try: - # Get Session - api_response = api_instance.get_session(account_id, session_id) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->get_session: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - -### Return type - -[**Session**](Session.md) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_session_participants** -> [Participant] list_session_participants(account_id, session_id) - -List Participants in Session - -List participants in a session. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.participant import Participant -from bandwidth.model.forbidden_request import ForbiddenRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - - # example passing only required values which don't have defaults set - try: - # List Participants in Session - api_response = api_instance.list_session_participants(account_id, session_id) - pprint(api_response) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->list_session_participants: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - -### Return type - -[**[Participant]**](Participant.md) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **remove_participant_from_session** -> remove_participant_from_session(account_id, session_id, participant_id) - -Remove Participant from Session - -Remove a participant from a session. This will automatically remove any subscriptions the participant has associated with this session. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - participant_id = "62e0ecb9-0b1b-5115-aae4-4f36123d6bb1" # str | Participant ID - - # example passing only required values which don't have defaults set - try: - # Remove Participant from Session - api_instance.remove_participant_from_session(account_id, session_id, participant_id) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->remove_participant_from_session: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - **participant_id** | **str**| Participant ID | - -### Return type - -void (empty response body) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_participant_subscriptions** -> update_participant_subscriptions(account_id, session_id, participant_id) - -Update Participant Subscriptions - -Update a participant's subscriptions. This is a full update that will replace the participant's subscriptions. It allows subscription to the entire Session, a subset list of Participants in that Session, or specific media streams on any of the listed Participants. First call `getParticipantSubscriptions` if you need the current subscriptions. Calling this API with no `Subscriptions` object to remove all subscriptions. - -### Example - -* Basic Authentication (Basic): - -```python -import time -import bandwidth -from bandwidth.api import sessions_api -from bandwidth.model.request_error import RequestError -from bandwidth.model.unauthorized_request import UnauthorizedRequest -from bandwidth.model.forbidden_request import ForbiddenRequest -from bandwidth.model.subscriptions import Subscriptions -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = bandwidth.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: Basic -configuration = bandwidth.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Enter a context with an instance of the API client -with bandwidth.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = sessions_api.SessionsApi(api_client) - account_id = "9900000" # str | Account ID - session_id = "cb5054ee-a69b-41ac-9ab2-04d6370826b4" # str | Session ID - participant_id = "62e0ecb9-0b1b-5115-aae4-4f36123d6bb1" # str | Participant ID - subscriptions = Subscriptions( - session_id="d8886aad-b956-4e1b-b2f4-d7c9f8162772", - participants=[ - ParticipantSubscription( - participant_id="568749d5-04d5-483d-adf5-deac7dd3d521", - stream_aliases=["alias_1","alias_2"], - ), - ], - ) # Subscriptions | The body describes the desired subscriptions for the Participant. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created (optional) - - # example passing only required values which don't have defaults set - try: - # Update Participant Subscriptions - api_instance.update_participant_subscriptions(account_id, session_id, participant_id) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->update_participant_subscriptions: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Update Participant Subscriptions - api_instance.update_participant_subscriptions(account_id, session_id, participant_id, subscriptions=subscriptions) - except bandwidth.ApiException as e: - print("Exception when calling SessionsApi->update_participant_subscriptions: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Account ID | - **session_id** | **str**| Session ID | - **participant_id** | **str**| Participant ID | - **subscriptions** | [**Subscriptions**](Subscriptions.md)| The body describes the desired subscriptions for the Participant. --- If a body is provided it will result in direct control over what Participants are subscribed to. - if the participants Array is provided and not empty, that list of Participants will be subscribed To - if the participants Array is missing or empty, and the sessionId is provided, the participant will be subscribed to the session, including all subsequent changes to the membership of the session - if the sessionId and the participant Array are both missing or empty, no subscriptions will be created | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[Basic](../README.md#Basic) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/Subscriptions.md b/docs/Subscriptions.md deleted file mode 100644 index 95887631..00000000 --- a/docs/Subscriptions.md +++ /dev/null @@ -1,13 +0,0 @@ -# Subscriptions - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**session_id** | **str** | If present, and not overridden by the array of participants, it represents the session the subscriptions are associated with. If this is the only field, the subscriber will be subscribed to all participants in the session (including any participants that are later added to the session). Upon creation of a Participant, returns as an empty object. | [optional] -**participants** | [**[ParticipantSubscription]**](ParticipantSubscription.md) | (optional) A list of participants in the session that will be subscribed to. If present and not empty or null, this will override any sessionId specified in the body. Returns empty if used during the creation of a Participant. | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UnauthorizedRequest.md b/docs/UnauthorizedRequest.md deleted file mode 100644 index 1c2bfe46..00000000 --- a/docs/UnauthorizedRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnauthorizedRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | Unauthorized | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test/integration/test_webrtc_api.py b/test/integration/test_webrtc_api.py deleted file mode 100644 index 61367389..00000000 --- a/test/integration/test_webrtc_api.py +++ /dev/null @@ -1,258 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -from array import array -import unittest - -import bandwidth -from hamcrest import * -from bandwidth.api import participants_api, sessions_api -from bandwidth.exceptions import NotFoundException, UnauthorizedException -from bandwidth.model.create_participant_request import CreateParticipantRequest -from bandwidth.model.create_participant_response import CreateParticipantResponse -from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum -from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum -from bandwidth.model.participant import Participant -from bandwidth.model.session import Session -from bandwidth.model.subscriptions import Subscriptions -from bandwidth.model.participant_subscription import ParticipantSubscription -from test.utils.env_variables import * - - -class TestSessionsApi(unittest.TestCase): - """SessionsApi unit test stubs""" - - def setUp(self): - # API Client - configuration = bandwidth.Configuration( - username = BW_USERNAME, - password = BW_PASSWORD - ) - api_client = bandwidth.ApiClient(configuration) - self.sessions_api_instance = sessions_api.SessionsApi(api_client) - self.participants_api_instance = participants_api.ParticipantsApi(api_client) - self.account_id = BW_ACCOUNT_ID - - # Participant Properties - self.callback_url = 'https://example.com/callback' - self.publish_permissions = [ - PublishPermissionsEnum('AUDIO'), - PublishPermissionsEnum('VIDEO') - ] - self.participant_tag = 'python integration participant tag' - self.device_api_version = DeviceApiVersionEnum('V3') - self.participant_id = '' - - # Participant Request - self.create_participant_request = CreateParticipantRequest( - callback_url=self.callback_url, - publish_permissions=self.publish_permissions, - tag=self.participant_tag, - device_api_version=self.device_api_version - ) - - # Session Properties - self.session_tag = 'python integration session tag' - self.session_id = '' - - # Session Request - self.session = Session( - tag=self.session_tag - ) - - self.stream_aliases = ['python integration alias'] - - def create_participant(self): - """Test creating participant - """ - response = self.participants_api_instance.create_participant(self.account_id, create_participant_request=self.create_participant_request, _return_http_data_only=False) - - assert_that(response[1], equal_to(200)) - - assert_that(response[0], instance_of(CreateParticipantResponse)) - assert_that(response[0], has_properties( - 'participant', instance_of(Participant), - 'participant', has_properties( - 'device_api_version', self.device_api_version, - 'id', instance_of(str), - 'publish_permissions', contains_inanyorder( - PublishPermissionsEnum('AUDIO'), - PublishPermissionsEnum('VIDEO')), - 'tag', self.participant_tag - ), - 'token', instance_of(str) - )) - - self.participant_id = response[0].participant.id - - def delete_participant(self): - """Test deleting participant - """ - response = self.participants_api_instance.delete_participant(self.account_id, self.participant_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(204)) - - def get_participant(self): - """Test getting participant - """ - response = self.participants_api_instance.get_participant(self.account_id, self.participant_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(200)) - assert_that(response[0], instance_of(Participant)) - assert_that(response[0], has_properties( - 'device_api_version', self.device_api_version, - 'id', self.participant_id, - 'publish_permissions', contains_inanyorder( - PublishPermissionsEnum('AUDIO'), - PublishPermissionsEnum('VIDEO')), - 'sessions', [self.session_id], - 'subscriptions', has_properties( - 'participants', instance_of(list) - ), - 'tag', self.participant_tag - )) - - def add_participant_to_session(self): - """Test adding participant to session - """ - response = self.sessions_api_instance.add_participant_to_session(self.account_id, self.session_id, self.participant_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(204)) - - - def create_session(self): - """Test creating session - """ - response = self.sessions_api_instance.create_session(self.account_id, session=self.session, _return_http_data_only=False) - - assert_that(response[1], equal_to(200)) - - assert_that(response[0], instance_of(Session)) - assert_that(response[0], has_properties( - 'id', instance_of(str), - 'tag', self.session_tag, - 'participant_ids', instance_of(array), - 'participant_ids', empty() - )) - - self.session_id = response[0].id - - def delete_session(self): - """Test deleting session - """ - response = self.sessions_api_instance.delete_session(self.account_id, self.session_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(204)) - - def get_participant_subscriptions(self): - """Test getting participant subscriptions - """ - response = self.sessions_api_instance.get_participant_subscriptions(self.account_id, self.session_id, self.participant_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(200)) - - assert_that(response[0], has_properties( - 'participants', instance_of(list), - 'session_id', self.session_id - )) - assert_that(response[0].participants[0], instance_of(ParticipantSubscription)) - assert_that(response[0].participants[0], has_properties( - 'participant_id', self.participant_id, - 'stream_aliases', self.stream_aliases - )) - - def get_session(self): - """Test getting session - """ - response = self.sessions_api_instance.get_session(self.account_id, self.session_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(200)) - - assert_that(response[0], has_properties( - 'id', self.session_id, - 'tag', self.session_tag, - 'participant_ids', contains_exactly(self.participant_id) - )) - - def list_session_participants(self): - """Test listing session participants - """ - response = self.sessions_api_instance.list_session_participants(self.account_id, self.session_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(200)) - - assert_that(response[0], instance_of(list)) - assert_that(response[0][0], instance_of(Participant)) - assert_that(response[0][0], has_properties( - 'device_api_version', self.device_api_version, - 'id', self.participant_id, - 'publish_permissions', contains_inanyorder( - PublishPermissionsEnum('AUDIO'), - PublishPermissionsEnum('VIDEO')), - 'sessions', [self.session_id], - 'tag', self.participant_tag - )) - - def remove_participant_from_session(self): - """Test removing participant from session - """ - response = self.sessions_api_instance.remove_participant_from_session(self.account_id, self.session_id, self.participant_id, _return_http_data_only=False) - - assert_that(response[1], equal_to(204)) - - def update_participant_subscriptions(self): - """Test updating participant subscriptions - """ - subscriptions = Subscriptions( - session_id=self.session_id, - participants=[ - ParticipantSubscription( - participant_id=self.participant_id, - stream_aliases=self.stream_aliases, - ) - ], - ) - - response = self.sessions_api_instance.update_participant_subscriptions(self.account_id, self.session_id, self.participant_id, subscriptions=subscriptions, _return_http_data_only=False) - - assert_that(response[1], equal_to(204)) - - def get_participant_unauthorized(self): - """Test getting participant with unauthorized API client - """ - unauthorized_api_client = bandwidth.ApiClient() - unauthorized_participants_api_instance = participants_api.ParticipantsApi(unauthorized_api_client) - - assert_that(calling(unauthorized_participants_api_instance.get_participant).with_args( - self.account_id, self.participant_id, _return_http_data_only=False)), raises(UnauthorizedException) - - def get_participant_not_found(self): - """Test getting nonexistent participant - """ - assert_that(calling(self.participants_api_instance.get_participant).with_args( - self.account_id, self.participant_id)), raises(NotFoundException) - - def _steps(self) -> None: - call_order = ['create_participant', 'create_session', 'add_participant_to_session', - 'get_session', 'list_session_participants', 'update_participant_subscriptions', - 'get_participant_subscriptions', 'get_participant', 'remove_participant_from_session', - 'delete_session', 'delete_participant', 'get_participant_unauthorized', 'get_participant_not_found'] - for name in call_order: - yield name, getattr(self, name) - - def test_steps(self) -> None: - """Test each function from _steps.call_order in specified order - """ - for name, step in self._steps(): - step() - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_create_participant_request.py b/test/unit/test_create_participant_request.py deleted file mode 100644 index 59495afb..00000000 --- a/test/unit/test_create_participant_request.py +++ /dev/null @@ -1,40 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum -from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum -globals()['DeviceApiVersionEnum'] = DeviceApiVersionEnum -globals()['PublishPermissionsEnum'] = PublishPermissionsEnum -from bandwidth.model.create_participant_request import CreateParticipantRequest - - -class TestCreateParticipantRequest(unittest.TestCase): - """CreateParticipantRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCreateParticipantRequest(self): - """Test CreateParticipantRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateParticipantRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_create_participant_response.py b/test/unit/test_create_participant_response.py deleted file mode 100644 index 7b97e48c..00000000 --- a/test/unit/test_create_participant_response.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.participant import Participant -globals()['Participant'] = Participant -from bandwidth.model.create_participant_response import CreateParticipantResponse - - -class TestCreateParticipantResponse(unittest.TestCase): - """CreateParticipantResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCreateParticipantResponse(self): - """Test CreateParticipantResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = CreateParticipantResponse() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_device_api_version_enum.py b/test/unit/test_device_api_version_enum.py deleted file mode 100644 index f5183e93..00000000 --- a/test/unit/test_device_api_version_enum.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum - - -class TestDeviceApiVersionEnum(unittest.TestCase): - """DeviceApiVersionEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDeviceApiVersionEnum(self): - """Test DeviceApiVersionEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = DeviceApiVersionEnum() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_forbidden_request.py b/test/unit/test_forbidden_request.py deleted file mode 100644 index 976e7213..00000000 --- a/test/unit/test_forbidden_request.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.forbidden_request import ForbiddenRequest - - -class TestForbiddenRequest(unittest.TestCase): - """ForbiddenRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testForbiddenRequest(self): - """Test ForbiddenRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = ForbiddenRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_participant.py b/test/unit/test_participant.py deleted file mode 100644 index d93243a8..00000000 --- a/test/unit/test_participant.py +++ /dev/null @@ -1,42 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.device_api_version_enum import DeviceApiVersionEnum -from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum -from bandwidth.model.subscriptions import Subscriptions -globals()['DeviceApiVersionEnum'] = DeviceApiVersionEnum -globals()['PublishPermissionsEnum'] = PublishPermissionsEnum -globals()['Subscriptions'] = Subscriptions -from bandwidth.model.participant import Participant - - -class TestParticipant(unittest.TestCase): - """Participant unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testParticipant(self): - """Test Participant""" - # FIXME: construct object with mandatory attributes with example values - # model = Participant() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_participant_subscription.py b/test/unit/test_participant_subscription.py deleted file mode 100644 index 4169d5ef..00000000 --- a/test/unit/test_participant_subscription.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.participant_subscription import ParticipantSubscription - - -class TestParticipantSubscription(unittest.TestCase): - """ParticipantSubscription unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testParticipantSubscription(self): - """Test ParticipantSubscription""" - # FIXME: construct object with mandatory attributes with example values - # model = ParticipantSubscription() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_participants_api.py b/test/unit/test_participants_api.py deleted file mode 100644 index 0e6febb6..00000000 --- a/test/unit/test_participants_api.py +++ /dev/null @@ -1,50 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import bandwidth -from bandwidth.api.participants_api import ParticipantsApi # noqa: E501 - - -class TestParticipantsApi(unittest.TestCase): - """ParticipantsApi unit test stubs""" - - def setUp(self): - self.api = ParticipantsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_create_participant(self): - """Test case for create_participant - - Create Participant # noqa: E501 - """ - pass - - def test_delete_participant(self): - """Test case for delete_participant - - Delete Participant # noqa: E501 - """ - pass - - def test_get_participant(self): - """Test case for get_participant - - Get Participant # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_publish_permissions_enum.py b/test/unit/test_publish_permissions_enum.py deleted file mode 100644 index 030dfd8d..00000000 --- a/test/unit/test_publish_permissions_enum.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.publish_permissions_enum import PublishPermissionsEnum - - -class TestPublishPermissionsEnum(unittest.TestCase): - """PublishPermissionsEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPublishPermissionsEnum(self): - """Test PublishPermissionsEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = PublishPermissionsEnum() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_request_error.py b/test/unit/test_request_error.py deleted file mode 100644 index 6004a7da..00000000 --- a/test/unit/test_request_error.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.request_error import RequestError - - -class TestRequestError(unittest.TestCase): - """RequestError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRequestError(self): - """Test RequestError""" - # FIXME: construct object with mandatory attributes with example values - # model = RequestError() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_session.py b/test/unit/test_session.py deleted file mode 100644 index 78b74b99..00000000 --- a/test/unit/test_session.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.session import Session - - -class TestSession(unittest.TestCase): - """Session unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSession(self): - """Test Session""" - # FIXME: construct object with mandatory attributes with example values - # model = Session() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_sessions_api.py b/test/unit/test_sessions_api.py deleted file mode 100644 index df26e4a2..00000000 --- a/test/unit/test_sessions_api.py +++ /dev/null @@ -1,85 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import bandwidth -from bandwidth.api.sessions_api import SessionsApi # noqa: E501 - - -class TestSessionsApi(unittest.TestCase): - """SessionsApi unit test stubs""" - - def setUp(self): - self.api = SessionsApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_participant_to_session(self): - """Test case for add_participant_to_session - - Add Participant to Session # noqa: E501 - """ - pass - - def test_create_session(self): - """Test case for create_session - - Create Session # noqa: E501 - """ - pass - - def test_delete_session(self): - """Test case for delete_session - - Delete Session # noqa: E501 - """ - pass - - def test_get_participant_subscriptions(self): - """Test case for get_participant_subscriptions - - Get Participant Subscriptions # noqa: E501 - """ - pass - - def test_get_session(self): - """Test case for get_session - - Get Session # noqa: E501 - """ - pass - - def test_list_session_participants(self): - """Test case for list_session_participants - - List Participants in Session # noqa: E501 - """ - pass - - def test_remove_participant_from_session(self): - """Test case for remove_participant_from_session - - Remove Participant from Session # noqa: E501 - """ - pass - - def test_update_participant_subscriptions(self): - """Test case for update_participant_subscriptions - - Update Participant Subscriptions # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_subscriptions.py b/test/unit/test_subscriptions.py deleted file mode 100644 index a5b27634..00000000 --- a/test/unit/test_subscriptions.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.participant_subscription import ParticipantSubscription -globals()['ParticipantSubscription'] = ParticipantSubscription -from bandwidth.model.subscriptions import Subscriptions - - -class TestSubscriptions(unittest.TestCase): - """Subscriptions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSubscriptions(self): - """Test Subscriptions""" - # FIXME: construct object with mandatory attributes with example values - # model = Subscriptions() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_unauthorized_request.py b/test/unit/test_unauthorized_request.py deleted file mode 100644 index 470e782f..00000000 --- a/test/unit/test_unauthorized_request.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Bandwidth - - Bandwidth's Communication APIs # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: letstalk@bandwidth.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import bandwidth -from bandwidth.model.unauthorized_request import UnauthorizedRequest - - -class TestUnauthorizedRequest(unittest.TestCase): - """UnauthorizedRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnauthorizedRequest(self): - """Test UnauthorizedRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = UnauthorizedRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/unit/test_webrtc_utilities.py b/test/unit/test_webrtc_utilities.py deleted file mode 100644 index 9bc536d7..00000000 --- a/test/unit/test_webrtc_utilities.py +++ /dev/null @@ -1,19 +0,0 @@ -from bandwidth.utilities.web_rtc import * - - -class TestWebRtcUtilities: - """ - Class for the WebRTC Utilities Tests - """ - - def test_generate_transfer_bxml(self): - expected = 'sip:sipx.webrtc.bandwidth.com:5060' - actual = generate_transfer_bxml_verb( - 'asdf', 'c-93d6f3c0-be584596-0b74-4fa2-8015-d8ede84bd1a4') - assert actual == expected - - def test_generate_transfer_bxml_document(self): - expected = "\nsip:sipx.webrtc.bandwidth.com:5060" - actual = generate_transfer_bxml( - 'asdf', 'c-93d6f3c0-be584596-0b74-4fa2-8015-d8ede84bd1a4') - assert actual == expected