diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..3d82f65 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,41 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# +# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: freeclimb Python package + +on: + push: + branches: ["**"] + pull_request: + branches: ["master"] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + - name: Start Prism Server + run: | + yarn install + ./node_modules/.bin/prism mock -h 127.0.0.1 openapi.json & + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + - name: Test with pytest + run: | + pytest --cov={{packageName}} diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fd847a9..40790d8 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,314 +1,437 @@ +.github/workflows/python.yml README.md docs/AccountRequest.md docs/AccountResult.md -docs/AccountResultAllOf.md docs/AccountStatus.md docs/AccountType.md docs/AddToConference.md -docs/AddToConferenceAllOf.md +docs/AddToConferenceNotificationWebhook.md +docs/AddToQueueNotificationWebhook.md docs/AnsweredBy.md docs/ApplicationList.md -docs/ApplicationListAllOf.md docs/ApplicationRequest.md docs/ApplicationResult.md -docs/ApplicationResultAllOf.md docs/AvailableNumber.md docs/AvailableNumberList.md -docs/AvailableNumberListAllOf.md +docs/BargeInReason.md docs/BuyIncomingNumberRequest.md +docs/CallControlWebhook.md docs/CallDirection.md +docs/CallEndedReason.md docs/CallList.md -docs/CallListAllOf.md docs/CallResult.md -docs/CallResultAllOf.md docs/CallStatus.md +docs/CallStatusWebhook.md docs/Capabilities.md docs/CompletionRequest.md docs/CompletionResult.md +docs/CompletionResultStatus.md docs/ConferenceList.md -docs/ConferenceListAllOf.md docs/ConferenceParticipantList.md -docs/ConferenceParticipantListAllOf.md docs/ConferenceParticipantResult.md -docs/ConferenceParticipantResultAllOf.md +docs/ConferenceRecordingStatusWebhook.md docs/ConferenceResult.md -docs/ConferenceResultAllOf.md docs/ConferenceStatus.md +docs/ConferenceStatusWebhook.md docs/CreateConference.md -docs/CreateConferenceAllOf.md docs/CreateConferenceRequest.md +docs/CreateConferenceWebhook.md docs/CreateWebRTCToken.md docs/DefaultApi.md docs/Dequeue.md +docs/DequeueWebhook.md docs/Enqueue.md -docs/EnqueueAllOf.md docs/FilterLogsRequest.md docs/GetDigits.md -docs/GetDigitsAllOf.md +docs/GetDigitsReason.md +docs/GetDigitsWebhook.md docs/GetSpeech.md -docs/GetSpeechAllOf.md docs/GetSpeechReason.md +docs/GetSpeechWebhook.md docs/GrammarFileBuiltIn.md docs/GrammarType.md docs/Hangup.md -docs/HangupAllOf.md docs/IfMachine.md +docs/InboundCallWebhook.md docs/IncomingNumberList.md -docs/IncomingNumberListAllOf.md docs/IncomingNumberRequest.md docs/IncomingNumberResult.md -docs/IncomingNumberResultAllOf.md docs/Language.md +docs/LeaveConferenceWebhook.md docs/LogLevel.md docs/LogList.md -docs/LogListAllOf.md docs/LogResult.md +docs/MachineDetectedWebhook.md docs/MachineType.md docs/MakeCallRequest.md +docs/MessageDeliveryWebhook.md docs/MessageDirection.md docs/MessageRequest.md -docs/MessageRequestAllOf.md docs/MessageResult.md -docs/MessageResultAllOf.md docs/MessageStatus.md +docs/MessageStatusWebhook.md docs/MessagesList.md -docs/MessagesListAllOf.md docs/MutableResourceModel.md docs/OutDial.md -docs/OutDialAllOf.md +docs/OutDialApiConnectWebhook.md +docs/OutDialConnectWebhook.md +docs/OutDialStartWebhook.md docs/PaginationModel.md docs/Park.md -docs/ParkAllOf.md docs/Pause.md -docs/PauseAllOf.md docs/PerclCommand.md docs/PerclScript.md docs/Play.md -docs/PlayAllOf.md docs/PlayBeep.md docs/PlayEarlyMedia.md -docs/PlayEarlyMediaAllOf.md docs/QueueList.md -docs/QueueListAllOf.md docs/QueueMember.md docs/QueueMemberList.md -docs/QueueMemberListAllOf.md docs/QueueRequest.md docs/QueueResult.md -docs/QueueResultAllOf.md docs/QueueResultStatus.md +docs/QueueWaitWebhook.md docs/RecordUtterance.md -docs/RecordUtteranceAllOf.md docs/RecordUtteranceTermReason.md +docs/RecordWebhook.md docs/RecordingList.md -docs/RecordingListAllOf.md docs/RecordingResult.md -docs/RecordingResultAllOf.md docs/Redirect.md -docs/RedirectAllOf.md +docs/RedirectWebhook.md docs/Reject.md -docs/RejectAllOf.md docs/RemoveFromConference.md +docs/RemoveFromQueueNotificationWebhook.md docs/RequestType.md docs/SMSTenDLCBrand.md +docs/SMSTenDLCBrandAltBusinessIdType.md +docs/SMSTenDLCBrandEntityType.md +docs/SMSTenDLCBrandIdentityStatus.md +docs/SMSTenDLCBrandRelationship.md +docs/SMSTenDLCBrandStockExchange.md docs/SMSTenDLCBrandsListResult.md -docs/SMSTenDLCBrandsListResultAllOf.md docs/SMSTenDLCCampaign.md +docs/SMSTenDLCCampaignStatus.md docs/SMSTenDLCCampaignsListResult.md -docs/SMSTenDLCCampaignsListResultAllOf.md docs/SMSTenDLCPartnerCampaign.md docs/SMSTenDLCPartnerCampaignBrand.md +docs/SMSTenDLCPartnerCampaignStatus.md docs/SMSTenDLCPartnerCampaignsListResult.md -docs/SMSTenDLCPartnerCampaignsListResultAllOf.md docs/SMSTollFreeCampaign.md +docs/SMSTollFreeCampaignRegistrationStatus.md docs/SMSTollFreeCampaignsListResult.md -docs/SMSTollFreeCampaignsListResultAllOf.md docs/Say.md -docs/SayAllOf.md docs/SendDigits.md -docs/SendDigitsAllOf.md docs/SetDTMFPassThrough.md -docs/SetDTMFPassThroughAllOf.md docs/SetListen.md -docs/SetListenAllOf.md docs/SetTalk.md -docs/SetTalkAllOf.md docs/Sms.md -docs/SmsAllOf.md docs/StartRecordCall.md docs/TFN.md docs/TerminateConference.md +docs/TranscribeReason.md +docs/TranscribeTermReason.md docs/TranscribeUtterance.md -docs/TranscribeUtteranceAllOf.md -docs/TranscribeUtteranceAllOfRecord.md +docs/TranscribeUtteranceRecord.md +docs/TranscribeWebhook.md docs/Unpark.md docs/UpdateCallRequest.md docs/UpdateCallRequestStatus.md docs/UpdateConferenceParticipantRequest.md docs/UpdateConferenceRequest.md docs/UpdateConferenceRequestStatus.md +docs/Webhook.md freeclimb/__init__.py freeclimb/api/__init__.py freeclimb/api/default_api.py freeclimb/api_client.py -freeclimb/apis/__init__.py +freeclimb/api_response.py freeclimb/configuration.py freeclimb/exceptions.py -freeclimb/model/__init__.py -freeclimb/model/account_request.py -freeclimb/model/account_result.py -freeclimb/model/account_result_all_of.py -freeclimb/model/account_status.py -freeclimb/model/account_type.py -freeclimb/model/add_to_conference.py -freeclimb/model/add_to_conference_all_of.py -freeclimb/model/answered_by.py -freeclimb/model/application_list.py -freeclimb/model/application_list_all_of.py -freeclimb/model/application_request.py -freeclimb/model/application_result.py -freeclimb/model/application_result_all_of.py -freeclimb/model/available_number.py -freeclimb/model/available_number_list.py -freeclimb/model/available_number_list_all_of.py -freeclimb/model/buy_incoming_number_request.py -freeclimb/model/call_direction.py -freeclimb/model/call_list.py -freeclimb/model/call_list_all_of.py -freeclimb/model/call_result.py -freeclimb/model/call_result_all_of.py -freeclimb/model/call_status.py -freeclimb/model/capabilities.py -freeclimb/model/completion_request.py -freeclimb/model/completion_result.py -freeclimb/model/conference_list.py -freeclimb/model/conference_list_all_of.py -freeclimb/model/conference_participant_list.py -freeclimb/model/conference_participant_list_all_of.py -freeclimb/model/conference_participant_result.py -freeclimb/model/conference_participant_result_all_of.py -freeclimb/model/conference_result.py -freeclimb/model/conference_result_all_of.py -freeclimb/model/conference_status.py -freeclimb/model/create_conference.py -freeclimb/model/create_conference_all_of.py -freeclimb/model/create_conference_request.py -freeclimb/model/create_web_rtc_token.py -freeclimb/model/dequeue.py -freeclimb/model/enqueue.py -freeclimb/model/enqueue_all_of.py -freeclimb/model/filter_logs_request.py -freeclimb/model/get_digits.py -freeclimb/model/get_digits_all_of.py -freeclimb/model/get_speech.py -freeclimb/model/get_speech_all_of.py -freeclimb/model/get_speech_reason.py -freeclimb/model/grammar_file_built_in.py -freeclimb/model/grammar_type.py -freeclimb/model/hangup.py -freeclimb/model/hangup_all_of.py -freeclimb/model/if_machine.py -freeclimb/model/incoming_number_list.py -freeclimb/model/incoming_number_list_all_of.py -freeclimb/model/incoming_number_request.py -freeclimb/model/incoming_number_result.py -freeclimb/model/incoming_number_result_all_of.py -freeclimb/model/language.py -freeclimb/model/log_level.py -freeclimb/model/log_list.py -freeclimb/model/log_list_all_of.py -freeclimb/model/log_result.py -freeclimb/model/machine_type.py -freeclimb/model/make_call_request.py -freeclimb/model/message_direction.py -freeclimb/model/message_request.py -freeclimb/model/message_request_all_of.py -freeclimb/model/message_result.py -freeclimb/model/message_result_all_of.py -freeclimb/model/message_status.py -freeclimb/model/messages_list.py -freeclimb/model/messages_list_all_of.py -freeclimb/model/mutable_resource_model.py -freeclimb/model/out_dial.py -freeclimb/model/out_dial_all_of.py -freeclimb/model/pagination_model.py -freeclimb/model/park.py -freeclimb/model/park_all_of.py -freeclimb/model/pause.py -freeclimb/model/pause_all_of.py -freeclimb/model/percl_command.py -freeclimb/model/percl_script.py -freeclimb/model/play.py -freeclimb/model/play_all_of.py -freeclimb/model/play_beep.py -freeclimb/model/play_early_media.py -freeclimb/model/play_early_media_all_of.py -freeclimb/model/queue_list.py -freeclimb/model/queue_list_all_of.py -freeclimb/model/queue_member.py -freeclimb/model/queue_member_list.py -freeclimb/model/queue_member_list_all_of.py -freeclimb/model/queue_request.py -freeclimb/model/queue_result.py -freeclimb/model/queue_result_all_of.py -freeclimb/model/queue_result_status.py -freeclimb/model/record_utterance.py -freeclimb/model/record_utterance_all_of.py -freeclimb/model/record_utterance_term_reason.py -freeclimb/model/recording_list.py -freeclimb/model/recording_list_all_of.py -freeclimb/model/recording_result.py -freeclimb/model/recording_result_all_of.py -freeclimb/model/redirect.py -freeclimb/model/redirect_all_of.py -freeclimb/model/reject.py -freeclimb/model/reject_all_of.py -freeclimb/model/remove_from_conference.py -freeclimb/model/request_type.py -freeclimb/model/say.py -freeclimb/model/say_all_of.py -freeclimb/model/send_digits.py -freeclimb/model/send_digits_all_of.py -freeclimb/model/set_dtmf_pass_through.py -freeclimb/model/set_dtmf_pass_through_all_of.py -freeclimb/model/set_listen.py -freeclimb/model/set_listen_all_of.py -freeclimb/model/set_talk.py -freeclimb/model/set_talk_all_of.py -freeclimb/model/sms.py -freeclimb/model/sms_all_of.py -freeclimb/model/sms_ten_dlc_brand.py -freeclimb/model/sms_ten_dlc_brands_list_result.py -freeclimb/model/sms_ten_dlc_brands_list_result_all_of.py -freeclimb/model/sms_ten_dlc_campaign.py -freeclimb/model/sms_ten_dlc_campaigns_list_result.py -freeclimb/model/sms_ten_dlc_campaigns_list_result_all_of.py -freeclimb/model/sms_ten_dlc_partner_campaign.py -freeclimb/model/sms_ten_dlc_partner_campaign_brand.py -freeclimb/model/sms_ten_dlc_partner_campaigns_list_result.py -freeclimb/model/sms_ten_dlc_partner_campaigns_list_result_all_of.py -freeclimb/model/sms_toll_free_campaign.py -freeclimb/model/sms_toll_free_campaigns_list_result.py -freeclimb/model/sms_toll_free_campaigns_list_result_all_of.py -freeclimb/model/start_record_call.py -freeclimb/model/terminate_conference.py -freeclimb/model/tfn.py -freeclimb/model/transcribe_utterance.py -freeclimb/model/transcribe_utterance_all_of.py -freeclimb/model/transcribe_utterance_all_of_record.py -freeclimb/model/unpark.py -freeclimb/model/update_call_request.py -freeclimb/model/update_call_request_status.py -freeclimb/model/update_conference_participant_request.py -freeclimb/model/update_conference_request.py -freeclimb/model/update_conference_request_status.py -freeclimb/model_utils.py freeclimb/models/__init__.py +freeclimb/models/account_request.py +freeclimb/models/account_result.py +freeclimb/models/account_status.py +freeclimb/models/account_type.py +freeclimb/models/add_to_conference.py +freeclimb/models/add_to_conference_notification_webhook.py +freeclimb/models/add_to_queue_notification_webhook.py +freeclimb/models/answered_by.py +freeclimb/models/application_list.py +freeclimb/models/application_request.py +freeclimb/models/application_result.py +freeclimb/models/available_number.py +freeclimb/models/available_number_list.py +freeclimb/models/barge_in_reason.py +freeclimb/models/buy_incoming_number_request.py +freeclimb/models/call_control_webhook.py +freeclimb/models/call_direction.py +freeclimb/models/call_ended_reason.py +freeclimb/models/call_list.py +freeclimb/models/call_result.py +freeclimb/models/call_status.py +freeclimb/models/call_status_webhook.py +freeclimb/models/capabilities.py +freeclimb/models/completion_request.py +freeclimb/models/completion_result.py +freeclimb/models/completion_result_status.py +freeclimb/models/conference_list.py +freeclimb/models/conference_participant_list.py +freeclimb/models/conference_participant_result.py +freeclimb/models/conference_recording_status_webhook.py +freeclimb/models/conference_result.py +freeclimb/models/conference_status.py +freeclimb/models/conference_status_webhook.py +freeclimb/models/create_conference.py +freeclimb/models/create_conference_request.py +freeclimb/models/create_conference_webhook.py +freeclimb/models/create_web_rtc_token.py +freeclimb/models/dequeue.py +freeclimb/models/dequeue_webhook.py +freeclimb/models/enqueue.py +freeclimb/models/filter_logs_request.py +freeclimb/models/get_digits.py +freeclimb/models/get_digits_reason.py +freeclimb/models/get_digits_webhook.py +freeclimb/models/get_speech.py +freeclimb/models/get_speech_reason.py +freeclimb/models/get_speech_webhook.py +freeclimb/models/grammar_file_built_in.py +freeclimb/models/grammar_type.py +freeclimb/models/hangup.py +freeclimb/models/if_machine.py +freeclimb/models/inbound_call_webhook.py +freeclimb/models/incoming_number_list.py +freeclimb/models/incoming_number_request.py +freeclimb/models/incoming_number_result.py +freeclimb/models/language.py +freeclimb/models/leave_conference_webhook.py +freeclimb/models/log_level.py +freeclimb/models/log_list.py +freeclimb/models/log_result.py +freeclimb/models/machine_detected_webhook.py +freeclimb/models/machine_type.py +freeclimb/models/make_call_request.py +freeclimb/models/message_delivery_webhook.py +freeclimb/models/message_direction.py +freeclimb/models/message_request.py +freeclimb/models/message_result.py +freeclimb/models/message_status.py +freeclimb/models/message_status_webhook.py +freeclimb/models/messages_list.py +freeclimb/models/mutable_resource_model.py +freeclimb/models/out_dial.py +freeclimb/models/out_dial_api_connect_webhook.py +freeclimb/models/out_dial_connect_webhook.py +freeclimb/models/out_dial_start_webhook.py +freeclimb/models/pagination_model.py +freeclimb/models/park.py +freeclimb/models/pause.py +freeclimb/models/percl_command.py +freeclimb/models/percl_script.py +freeclimb/models/play.py +freeclimb/models/play_beep.py +freeclimb/models/play_early_media.py +freeclimb/models/queue_list.py +freeclimb/models/queue_member.py +freeclimb/models/queue_member_list.py +freeclimb/models/queue_request.py +freeclimb/models/queue_result.py +freeclimb/models/queue_result_status.py +freeclimb/models/queue_wait_webhook.py +freeclimb/models/record_utterance.py +freeclimb/models/record_utterance_term_reason.py +freeclimb/models/record_webhook.py +freeclimb/models/recording_list.py +freeclimb/models/recording_result.py +freeclimb/models/redirect.py +freeclimb/models/redirect_webhook.py +freeclimb/models/reject.py +freeclimb/models/remove_from_conference.py +freeclimb/models/remove_from_queue_notification_webhook.py +freeclimb/models/request_type.py +freeclimb/models/say.py +freeclimb/models/send_digits.py +freeclimb/models/set_dtmf_pass_through.py +freeclimb/models/set_listen.py +freeclimb/models/set_talk.py +freeclimb/models/sms.py +freeclimb/models/sms_ten_dlc_brand.py +freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.py +freeclimb/models/sms_ten_dlc_brand_entity_type.py +freeclimb/models/sms_ten_dlc_brand_identity_status.py +freeclimb/models/sms_ten_dlc_brand_relationship.py +freeclimb/models/sms_ten_dlc_brand_stock_exchange.py +freeclimb/models/sms_ten_dlc_brands_list_result.py +freeclimb/models/sms_ten_dlc_campaign.py +freeclimb/models/sms_ten_dlc_campaign_status.py +freeclimb/models/sms_ten_dlc_campaigns_list_result.py +freeclimb/models/sms_ten_dlc_partner_campaign.py +freeclimb/models/sms_ten_dlc_partner_campaign_brand.py +freeclimb/models/sms_ten_dlc_partner_campaign_status.py +freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.py +freeclimb/models/sms_toll_free_campaign.py +freeclimb/models/sms_toll_free_campaign_registration_status.py +freeclimb/models/sms_toll_free_campaigns_list_result.py +freeclimb/models/start_record_call.py +freeclimb/models/terminate_conference.py +freeclimb/models/tfn.py +freeclimb/models/transcribe_reason.py +freeclimb/models/transcribe_term_reason.py +freeclimb/models/transcribe_utterance.py +freeclimb/models/transcribe_utterance_record.py +freeclimb/models/transcribe_webhook.py +freeclimb/models/unpark.py +freeclimb/models/update_call_request.py +freeclimb/models/update_call_request_status.py +freeclimb/models/update_conference_participant_request.py +freeclimb/models/update_conference_request.py +freeclimb/models/update_conference_request_status.py +freeclimb/models/webhook.py +freeclimb/py.typed freeclimb/rest.py +pyproject.toml requirements.txt setup.cfg setup.py test/__init__.py +test/test_account_request.py +test/test_account_result.py +test/test_account_status.py +test/test_account_type.py +test/test_add_to_conference.py +test/test_add_to_conference_notification_webhook.py +test/test_add_to_queue_notification_webhook.py +test/test_answered_by.py +test/test_application_list.py +test/test_application_request.py +test/test_application_result.py +test/test_available_number.py +test/test_available_number_list.py +test/test_barge_in_reason.py +test/test_buy_incoming_number_request.py +test/test_call_control_webhook.py +test/test_call_direction.py +test/test_call_ended_reason.py +test/test_call_list.py +test/test_call_result.py +test/test_call_status.py +test/test_call_status_webhook.py +test/test_capabilities.py +test/test_completion_request.py +test/test_completion_result.py +test/test_completion_result_status.py +test/test_conference_list.py +test/test_conference_participant_list.py +test/test_conference_participant_result.py +test/test_conference_recording_status_webhook.py +test/test_conference_result.py +test/test_conference_status.py +test/test_conference_status_webhook.py +test/test_create_conference.py +test/test_create_conference_request.py +test/test_create_conference_webhook.py +test/test_create_web_rtc_token.py +test/test_default_api.py +test/test_dequeue.py +test/test_dequeue_webhook.py +test/test_enqueue.py +test/test_filter_logs_request.py +test/test_get_digits.py +test/test_get_digits_reason.py +test/test_get_digits_webhook.py +test/test_get_speech.py +test/test_get_speech_reason.py +test/test_get_speech_webhook.py +test/test_grammar_file_built_in.py +test/test_grammar_type.py +test/test_hangup.py +test/test_if_machine.py +test/test_inbound_call_webhook.py +test/test_incoming_number_list.py +test/test_incoming_number_request.py +test/test_incoming_number_result.py +test/test_language.py +test/test_leave_conference_webhook.py +test/test_log_level.py +test/test_log_list.py +test/test_log_result.py +test/test_machine_detected_webhook.py +test/test_machine_type.py +test/test_make_call_request.py +test/test_message_delivery_webhook.py +test/test_message_direction.py +test/test_message_request.py +test/test_message_result.py +test/test_message_status.py +test/test_message_status_webhook.py +test/test_messages_list.py +test/test_mutable_resource_model.py +test/test_out_dial.py +test/test_out_dial_api_connect_webhook.py +test/test_out_dial_connect_webhook.py +test/test_out_dial_start_webhook.py +test/test_pagination_model.py +test/test_park.py +test/test_pause.py +test/test_percl_command.py +test/test_percl_script.py +test/test_play.py +test/test_play_beep.py +test/test_play_early_media.py +test/test_queue_list.py +test/test_queue_member.py +test/test_queue_member_list.py +test/test_queue_request.py +test/test_queue_result.py +test/test_queue_result_status.py +test/test_queue_wait_webhook.py +test/test_record_utterance.py +test/test_record_utterance_term_reason.py +test/test_record_webhook.py +test/test_recording_list.py +test/test_recording_result.py +test/test_redirect.py +test/test_redirect_webhook.py +test/test_reject.py +test/test_remove_from_conference.py +test/test_remove_from_queue_notification_webhook.py +test/test_request_type.py +test/test_say.py +test/test_send_digits.py test/test_set_dtmf_pass_through.py -test/test_set_dtmf_pass_through_all_of.py +test/test_set_listen.py +test/test_set_talk.py +test/test_sms.py +test/test_sms_ten_dlc_brand.py +test/test_sms_ten_dlc_brand_alt_business_id_type.py +test/test_sms_ten_dlc_brand_entity_type.py +test/test_sms_ten_dlc_brand_identity_status.py +test/test_sms_ten_dlc_brand_relationship.py +test/test_sms_ten_dlc_brand_stock_exchange.py +test/test_sms_ten_dlc_brands_list_result.py +test/test_sms_ten_dlc_campaign.py +test/test_sms_ten_dlc_campaign_status.py +test/test_sms_ten_dlc_campaigns_list_result.py +test/test_sms_ten_dlc_partner_campaign.py +test/test_sms_ten_dlc_partner_campaign_brand.py +test/test_sms_ten_dlc_partner_campaign_status.py +test/test_sms_ten_dlc_partner_campaigns_list_result.py +test/test_sms_toll_free_campaign.py +test/test_sms_toll_free_campaign_registration_status.py +test/test_sms_toll_free_campaigns_list_result.py +test/test_start_record_call.py +test/test_terminate_conference.py +test/test_tfn.py +test/test_transcribe_reason.py +test/test_transcribe_term_reason.py +test/test_transcribe_utterance.py +test/test_transcribe_utterance_record.py +test/test_transcribe_webhook.py +test/test_unpark.py +test/test_update_call_request.py +test/test_update_call_request_status.py +test/test_update_conference_participant_request.py +test/test_update_conference_request.py +test/test_update_conference_request_status.py +test/test_webhook.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 1e20ec3..4bc5d61 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +7.9.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 07aba30..f10209c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,20 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm None + + +## [5.0.0] - 2025-01-08 + +### Added +- Webhook classes +- More idiomated Enum management + +### Changed +- Use upgraded openapi generator + +### Removed +- *AllOf model files + ## [4.9.0] - 2024-12-17 diff --git a/README.md b/README.md index d757bc7..979f10f 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,14 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 4.9.0 +- Package version: 5.0.0 +- Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) ## Requirements. -Python >=3.6 +Python 3.7+ ## Installation & Usage ### pip install @@ -18,9 +19,9 @@ Python >=3.6 If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/freeclimbapi/python-sdk.git +pip install git+https://https://github.com/freeclimbapi/python-sdk.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/freeclimbapi/python-sdk.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://https://github.com/freeclimbapi/python-sdk.git`) Then import the package: ```python @@ -41,17 +42,9 @@ Then import the package: import freeclimb ``` -### Running Tests -Ensure the test dependencies have been installed +### Tests -```sh -pip install -r test-requirements.txt -``` - -Run tests with command: -```sh -pytest -``` +Execute `pytest` to run the tests. ## Getting Started @@ -59,13 +52,9 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python -import time import freeclimb +from freeclimb.rest import ApiException from pprint import pprint -from freeclimb.api.default_api import DefaultApi - -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest - # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. @@ -88,22 +77,20 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = DefaultApi(api_client) - buy_incoming_number_request = BuyIncomingNumberRequest( - phone_number="phone_number_example", - alias="alias_example", - application_id="application_id_example", - ) # BuyIncomingNumberRequest | Incoming Number transaction details + api_instance = freeclimb.DefaultApi(api_client) + buy_incoming_number_request = freeclimb.BuyIncomingNumberRequest() # BuyIncomingNumberRequest | Incoming Number transaction details + try: # Buy a Phone Number api_response = api_instance.buy_a_phone_number(buy_incoming_number_request) + print("The response of DefaultApi->buy_a_phone_number:\n") pprint(api_response) - except freeclimb.ApiException as e: + except ApiException as e: print("Exception when calling DefaultApi->buy_a_phone_number: %s\n" % e) -``` +``` ## Documentation for PerCL The Performance Command Language (PerCL) defines a set of instructions, written in JSON format, that express telephony actions to be performed in response to an event on the FreeClimb platform. FreeClimb communicates with the application server when events associated with the application occur, so the webserver can instruct FreeClimb how to handle such events using PerCL scripts. @@ -121,6 +108,7 @@ percl_script = freeclimb.PerclScript(commands=[get_digits]) print(percl_script.to_json()) ``` + ## Documentation for API Endpoints All URIs are relative to *https://www.freeclimb.com/apiserver* @@ -184,163 +172,159 @@ Class | Method | HTTP request | Description *DefaultApi* | [**update_an_account**](docs/DefaultApi.md#update_an_account) | **POST** /Accounts/{accountId} | Manage an account *DefaultApi* | [**update_an_application**](docs/DefaultApi.md#update_an_application) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application *DefaultApi* | [**update_an_incoming_number**](docs/DefaultApi.md#update_an_incoming_number) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number + *DefaultApi* | [get_next_page](docs/DefaultApi.md#get_next_page) | **GET** | Get Next Page of Paginated List Resource ## Documentation For Models - [AccountRequest](docs/AccountRequest.md) - [AccountResult](docs/AccountResult.md) - - [AccountResultAllOf](docs/AccountResultAllOf.md) - [AccountStatus](docs/AccountStatus.md) - [AccountType](docs/AccountType.md) - [AddToConference](docs/AddToConference.md) - - [AddToConferenceAllOf](docs/AddToConferenceAllOf.md) + - [AddToConferenceNotificationWebhook](docs/AddToConferenceNotificationWebhook.md) + - [AddToQueueNotificationWebhook](docs/AddToQueueNotificationWebhook.md) - [AnsweredBy](docs/AnsweredBy.md) - [ApplicationList](docs/ApplicationList.md) - - [ApplicationListAllOf](docs/ApplicationListAllOf.md) - [ApplicationRequest](docs/ApplicationRequest.md) - [ApplicationResult](docs/ApplicationResult.md) - - [ApplicationResultAllOf](docs/ApplicationResultAllOf.md) - [AvailableNumber](docs/AvailableNumber.md) - [AvailableNumberList](docs/AvailableNumberList.md) - - [AvailableNumberListAllOf](docs/AvailableNumberListAllOf.md) + - [BargeInReason](docs/BargeInReason.md) - [BuyIncomingNumberRequest](docs/BuyIncomingNumberRequest.md) + - [CallControlWebhook](docs/CallControlWebhook.md) - [CallDirection](docs/CallDirection.md) + - [CallEndedReason](docs/CallEndedReason.md) - [CallList](docs/CallList.md) - - [CallListAllOf](docs/CallListAllOf.md) - [CallResult](docs/CallResult.md) - - [CallResultAllOf](docs/CallResultAllOf.md) - [CallStatus](docs/CallStatus.md) + - [CallStatusWebhook](docs/CallStatusWebhook.md) - [Capabilities](docs/Capabilities.md) - [CompletionRequest](docs/CompletionRequest.md) - [CompletionResult](docs/CompletionResult.md) + - [CompletionResultStatus](docs/CompletionResultStatus.md) - [ConferenceList](docs/ConferenceList.md) - - [ConferenceListAllOf](docs/ConferenceListAllOf.md) - [ConferenceParticipantList](docs/ConferenceParticipantList.md) - - [ConferenceParticipantListAllOf](docs/ConferenceParticipantListAllOf.md) - [ConferenceParticipantResult](docs/ConferenceParticipantResult.md) - - [ConferenceParticipantResultAllOf](docs/ConferenceParticipantResultAllOf.md) + - [ConferenceRecordingStatusWebhook](docs/ConferenceRecordingStatusWebhook.md) - [ConferenceResult](docs/ConferenceResult.md) - - [ConferenceResultAllOf](docs/ConferenceResultAllOf.md) - [ConferenceStatus](docs/ConferenceStatus.md) + - [ConferenceStatusWebhook](docs/ConferenceStatusWebhook.md) - [CreateConference](docs/CreateConference.md) - - [CreateConferenceAllOf](docs/CreateConferenceAllOf.md) - [CreateConferenceRequest](docs/CreateConferenceRequest.md) + - [CreateConferenceWebhook](docs/CreateConferenceWebhook.md) - [CreateWebRTCToken](docs/CreateWebRTCToken.md) - [Dequeue](docs/Dequeue.md) + - [DequeueWebhook](docs/DequeueWebhook.md) - [Enqueue](docs/Enqueue.md) - - [EnqueueAllOf](docs/EnqueueAllOf.md) - [FilterLogsRequest](docs/FilterLogsRequest.md) - [GetDigits](docs/GetDigits.md) - - [GetDigitsAllOf](docs/GetDigitsAllOf.md) + - [GetDigitsReason](docs/GetDigitsReason.md) + - [GetDigitsWebhook](docs/GetDigitsWebhook.md) - [GetSpeech](docs/GetSpeech.md) - - [GetSpeechAllOf](docs/GetSpeechAllOf.md) - [GetSpeechReason](docs/GetSpeechReason.md) + - [GetSpeechWebhook](docs/GetSpeechWebhook.md) - [GrammarFileBuiltIn](docs/GrammarFileBuiltIn.md) - [GrammarType](docs/GrammarType.md) - [Hangup](docs/Hangup.md) - - [HangupAllOf](docs/HangupAllOf.md) - [IfMachine](docs/IfMachine.md) + - [InboundCallWebhook](docs/InboundCallWebhook.md) - [IncomingNumberList](docs/IncomingNumberList.md) - - [IncomingNumberListAllOf](docs/IncomingNumberListAllOf.md) - [IncomingNumberRequest](docs/IncomingNumberRequest.md) - [IncomingNumberResult](docs/IncomingNumberResult.md) - - [IncomingNumberResultAllOf](docs/IncomingNumberResultAllOf.md) - [Language](docs/Language.md) + - [LeaveConferenceWebhook](docs/LeaveConferenceWebhook.md) - [LogLevel](docs/LogLevel.md) - [LogList](docs/LogList.md) - - [LogListAllOf](docs/LogListAllOf.md) - [LogResult](docs/LogResult.md) + - [MachineDetectedWebhook](docs/MachineDetectedWebhook.md) - [MachineType](docs/MachineType.md) - [MakeCallRequest](docs/MakeCallRequest.md) + - [MessageDeliveryWebhook](docs/MessageDeliveryWebhook.md) - [MessageDirection](docs/MessageDirection.md) - [MessageRequest](docs/MessageRequest.md) - - [MessageRequestAllOf](docs/MessageRequestAllOf.md) - [MessageResult](docs/MessageResult.md) - - [MessageResultAllOf](docs/MessageResultAllOf.md) - [MessageStatus](docs/MessageStatus.md) + - [MessageStatusWebhook](docs/MessageStatusWebhook.md) - [MessagesList](docs/MessagesList.md) - - [MessagesListAllOf](docs/MessagesListAllOf.md) - [MutableResourceModel](docs/MutableResourceModel.md) - [OutDial](docs/OutDial.md) - - [OutDialAllOf](docs/OutDialAllOf.md) + - [OutDialApiConnectWebhook](docs/OutDialApiConnectWebhook.md) + - [OutDialConnectWebhook](docs/OutDialConnectWebhook.md) + - [OutDialStartWebhook](docs/OutDialStartWebhook.md) - [PaginationModel](docs/PaginationModel.md) - [Park](docs/Park.md) - - [ParkAllOf](docs/ParkAllOf.md) - [Pause](docs/Pause.md) - - [PauseAllOf](docs/PauseAllOf.md) - [PerclCommand](docs/PerclCommand.md) - [PerclScript](docs/PerclScript.md) - [Play](docs/Play.md) - - [PlayAllOf](docs/PlayAllOf.md) - [PlayBeep](docs/PlayBeep.md) - [PlayEarlyMedia](docs/PlayEarlyMedia.md) - - [PlayEarlyMediaAllOf](docs/PlayEarlyMediaAllOf.md) - [QueueList](docs/QueueList.md) - - [QueueListAllOf](docs/QueueListAllOf.md) - [QueueMember](docs/QueueMember.md) - [QueueMemberList](docs/QueueMemberList.md) - - [QueueMemberListAllOf](docs/QueueMemberListAllOf.md) - [QueueRequest](docs/QueueRequest.md) - [QueueResult](docs/QueueResult.md) - - [QueueResultAllOf](docs/QueueResultAllOf.md) - [QueueResultStatus](docs/QueueResultStatus.md) + - [QueueWaitWebhook](docs/QueueWaitWebhook.md) - [RecordUtterance](docs/RecordUtterance.md) - - [RecordUtteranceAllOf](docs/RecordUtteranceAllOf.md) - [RecordUtteranceTermReason](docs/RecordUtteranceTermReason.md) + - [RecordWebhook](docs/RecordWebhook.md) - [RecordingList](docs/RecordingList.md) - - [RecordingListAllOf](docs/RecordingListAllOf.md) - [RecordingResult](docs/RecordingResult.md) - - [RecordingResultAllOf](docs/RecordingResultAllOf.md) - [Redirect](docs/Redirect.md) - - [RedirectAllOf](docs/RedirectAllOf.md) + - [RedirectWebhook](docs/RedirectWebhook.md) - [Reject](docs/Reject.md) - - [RejectAllOf](docs/RejectAllOf.md) - [RemoveFromConference](docs/RemoveFromConference.md) + - [RemoveFromQueueNotificationWebhook](docs/RemoveFromQueueNotificationWebhook.md) - [RequestType](docs/RequestType.md) - [SMSTenDLCBrand](docs/SMSTenDLCBrand.md) + - [SMSTenDLCBrandAltBusinessIdType](docs/SMSTenDLCBrandAltBusinessIdType.md) + - [SMSTenDLCBrandEntityType](docs/SMSTenDLCBrandEntityType.md) + - [SMSTenDLCBrandIdentityStatus](docs/SMSTenDLCBrandIdentityStatus.md) + - [SMSTenDLCBrandRelationship](docs/SMSTenDLCBrandRelationship.md) + - [SMSTenDLCBrandStockExchange](docs/SMSTenDLCBrandStockExchange.md) - [SMSTenDLCBrandsListResult](docs/SMSTenDLCBrandsListResult.md) - - [SMSTenDLCBrandsListResultAllOf](docs/SMSTenDLCBrandsListResultAllOf.md) - [SMSTenDLCCampaign](docs/SMSTenDLCCampaign.md) + - [SMSTenDLCCampaignStatus](docs/SMSTenDLCCampaignStatus.md) - [SMSTenDLCCampaignsListResult](docs/SMSTenDLCCampaignsListResult.md) - - [SMSTenDLCCampaignsListResultAllOf](docs/SMSTenDLCCampaignsListResultAllOf.md) - [SMSTenDLCPartnerCampaign](docs/SMSTenDLCPartnerCampaign.md) - [SMSTenDLCPartnerCampaignBrand](docs/SMSTenDLCPartnerCampaignBrand.md) + - [SMSTenDLCPartnerCampaignStatus](docs/SMSTenDLCPartnerCampaignStatus.md) - [SMSTenDLCPartnerCampaignsListResult](docs/SMSTenDLCPartnerCampaignsListResult.md) - - [SMSTenDLCPartnerCampaignsListResultAllOf](docs/SMSTenDLCPartnerCampaignsListResultAllOf.md) - [SMSTollFreeCampaign](docs/SMSTollFreeCampaign.md) + - [SMSTollFreeCampaignRegistrationStatus](docs/SMSTollFreeCampaignRegistrationStatus.md) - [SMSTollFreeCampaignsListResult](docs/SMSTollFreeCampaignsListResult.md) - - [SMSTollFreeCampaignsListResultAllOf](docs/SMSTollFreeCampaignsListResultAllOf.md) - [Say](docs/Say.md) - - [SayAllOf](docs/SayAllOf.md) - [SendDigits](docs/SendDigits.md) - - [SendDigitsAllOf](docs/SendDigitsAllOf.md) - [SetDTMFPassThrough](docs/SetDTMFPassThrough.md) - - [SetDTMFPassThroughAllOf](docs/SetDTMFPassThroughAllOf.md) - [SetListen](docs/SetListen.md) - - [SetListenAllOf](docs/SetListenAllOf.md) - [SetTalk](docs/SetTalk.md) - - [SetTalkAllOf](docs/SetTalkAllOf.md) - [Sms](docs/Sms.md) - - [SmsAllOf](docs/SmsAllOf.md) - [StartRecordCall](docs/StartRecordCall.md) - [TFN](docs/TFN.md) - [TerminateConference](docs/TerminateConference.md) + - [TranscribeReason](docs/TranscribeReason.md) + - [TranscribeTermReason](docs/TranscribeTermReason.md) - [TranscribeUtterance](docs/TranscribeUtterance.md) - - [TranscribeUtteranceAllOf](docs/TranscribeUtteranceAllOf.md) - - [TranscribeUtteranceAllOfRecord](docs/TranscribeUtteranceAllOfRecord.md) + - [TranscribeUtteranceRecord](docs/TranscribeUtteranceRecord.md) + - [TranscribeWebhook](docs/TranscribeWebhook.md) - [Unpark](docs/Unpark.md) - [UpdateCallRequest](docs/UpdateCallRequest.md) - [UpdateCallRequestStatus](docs/UpdateCallRequestStatus.md) - [UpdateConferenceParticipantRequest](docs/UpdateConferenceParticipantRequest.md) - [UpdateConferenceRequest](docs/UpdateConferenceRequest.md) - [UpdateConferenceRequestStatus](docs/UpdateConferenceRequestStatus.md) + - [Webhook](docs/Webhook.md) + ## Documentation For Authorization -## fc +Authentication schemes defined for the API: + +### fc - **Type**: HTTP basic authentication @@ -371,26 +355,10 @@ Class | Method | HTTP request | Description RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) ``` -## Author -support@freeclimb.com +## Author -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in freeclimb.apis and freeclimb.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: +support@freeclimb.com -Solution 1: -Use specific imports for apis and models like: -- `from freeclimb.api.default_api import DefaultApi` -- `from freeclimb.model.pet import Pet` -Solution 2: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import freeclimb -from freeclimb.apis import * -from freeclimb.models import * -``` diff --git a/docs/AccountRequest.md b/docs/AccountRequest.md index 6f16643..4873b45 100644 --- a/docs/AccountRequest.md +++ b/docs/AccountRequest.md @@ -1,11 +1,30 @@ # AccountRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alias** | **str** | Description for this account. | [optional] **label** | **str** | Group to which this account belongs. | [optional] +## Example + +```python +from freeclimb.models.account_request import AccountRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountRequest from a JSON string +account_request_instance = AccountRequest.from_json(json) +# print the JSON string representation of the object +print(AccountRequest.to_json()) + +# convert the object into a dict +account_request_dict = account_request_instance.to_dict() +# create an instance of AccountRequest from a dict +account_request_from_dict = AccountRequest.from_dict(account_request_dict) +``` [[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/AccountResult.md b/docs/AccountResult.md index c8d7b4f..62dd7ff 100644 --- a/docs/AccountResult.md +++ b/docs/AccountResult.md @@ -1,20 +1,39 @@ # AccountResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**account_id** | **str, none_type** | String that uniquely identifies this account resource. | [optional] -**api_key** | **str, none_type** | The API key assigned to this account. This key must be kept a secret by the customer. | [optional] -**alias** | **str, none_type** | A description for this account. | [optional] -**label** | **str, none_type** | A string that identifies a category or group to which the account belongs. | [optional] +**account_id** | **str** | String that uniquely identifies this account resource. | [optional] +**api_key** | **str** | The API key assigned to this account. This key must be kept a secret by the customer. | [optional] +**alias** | **str** | A description for this account. | [optional] +**label** | **str** | A string that identifies a category or group to which the account belongs. | [optional] **type** | [**AccountType**](AccountType.md) | | [optional] **status** | [**AccountStatus**](AccountStatus.md) | | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The list of subresources for this account. | [optional] +**subresource_uris** | **object** | The list of subresources for this account. | [optional] + +## Example + +```python +from freeclimb.models.account_result import AccountResult + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountResult from a JSON string +account_result_instance = AccountResult.from_json(json) +# print the JSON string representation of the object +print(AccountResult.to_json()) +# convert the object into a dict +account_result_dict = account_result_instance.to_dict() +# create an instance of AccountResult from a dict +account_result_from_dict = AccountResult.from_dict(account_result_dict) +``` [[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/AccountResultAllOf.md b/docs/AccountResultAllOf.md deleted file mode 100644 index 3d64d8d..0000000 --- a/docs/AccountResultAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# AccountResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **str, none_type** | String that uniquely identifies this account resource. | [optional] -**api_key** | **str, none_type** | The API key assigned to this account. This key must be kept a secret by the customer. | [optional] -**alias** | **str, none_type** | A description for this account. | [optional] -**label** | **str, none_type** | A string that identifies a category or group to which the account belongs. | [optional] -**type** | [**AccountType**](AccountType.md) | | [optional] -**status** | [**AccountStatus**](AccountStatus.md) | | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The list of subresources for this account. | [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/AccountStatus.md b/docs/AccountStatus.md index 88ff98a..a6cffd9 100644 --- a/docs/AccountStatus.md +++ b/docs/AccountStatus.md @@ -1,12 +1,14 @@ # AccountStatus The status of this account. It is one of: active, suspended, or closed. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **CLOSED** | **AccountStatus** | | Represented in Python as "closed" | -| **SUSPENDED** | **AccountStatus** | | Represented in Python as "suspended" | -| **ACTIVE** | **AccountStatus** | | Represented in Python as "active" | + +## Enum + +* `CLOSED` (value: `'closed'`) + +* `SUSPENDED` (value: `'suspended'`) + +* `ACTIVE` (value: `'active'`) [[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/AccountType.md b/docs/AccountType.md index 8cae397..7d45919 100644 --- a/docs/AccountType.md +++ b/docs/AccountType.md @@ -1,11 +1,12 @@ # AccountType The type of this account. It is one of: trial or full. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **TRIAL** | **AccountType** | | Represented in Python as "trial" | -| **FULL** | **AccountType** | | Represented in Python as "full" | + +## Enum + +* `TRIAL` (value: `'trial'`) + +* `FULL` (value: `'full'`) [[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/AddToConference.md b/docs/AddToConference.md index f51dbe4..8e42637 100644 --- a/docs/AddToConference.md +++ b/docs/AddToConference.md @@ -1,21 +1,39 @@ # AddToConference The `AddToConference` command adds a Participant to a Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**conference_id** | **str** | ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. | **allow_call_control** | **bool** | If `true`, Call control will be enabled for this Participant's Call leg. | [optional] **call_control_sequence** | **str** | Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used. | [optional] **call_control_url** | **str** | URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute. | [optional] +**conference_id** | **str** | ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. | **leave_conference_url** | **str** | URL to be invoked when the Participant leaves the Conference. | [optional] **listen** | **bool** | If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command. | [optional] **notification_url** | **str** | When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters. | [optional] **start_conf_on_enter** | **bool** | Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants. | [optional] **talk** | **bool** | If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. | [optional] **dtmf_pass_through** | **bool** | If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.add_to_conference import AddToConference + +# TODO update the JSON string below +json = "{}" +# create an instance of AddToConference from a JSON string +add_to_conference_instance = AddToConference.from_json(json) +# print the JSON string representation of the object +print(AddToConference.to_json()) + +# convert the object into a dict +add_to_conference_dict = add_to_conference_instance.to_dict() +# create an instance of AddToConference from a dict +add_to_conference_from_dict = AddToConference.from_dict(add_to_conference_dict) +``` [[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/AddToConferenceAllOf.md b/docs/AddToConferenceAllOf.md deleted file mode 100644 index 64e9c6d..0000000 --- a/docs/AddToConferenceAllOf.md +++ /dev/null @@ -1,19 +0,0 @@ -# AddToConferenceAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**conference_id** | **str** | ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. | -**allow_call_control** | **bool** | If `true`, Call control will be enabled for this Participant's Call leg. | [optional] -**call_control_sequence** | **str** | Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used. | [optional] -**call_control_url** | **str** | URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute. | [optional] -**leave_conference_url** | **str** | URL to be invoked when the Participant leaves the Conference. | [optional] -**listen** | **bool** | If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command. | [optional] -**notification_url** | **str** | When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters. | [optional] -**start_conf_on_enter** | **bool** | Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants. | [optional] -**talk** | **bool** | If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. | [optional] -**dtmf_pass_through** | **bool** | If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. | [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/AddToConferenceNotificationWebhook.md b/docs/AddToConferenceNotificationWebhook.md new file mode 100644 index 0000000..807ae7b --- /dev/null +++ b/docs/AddToConferenceNotificationWebhook.md @@ -0,0 +1,42 @@ +# AddToConferenceNotificationWebhook + +A Call has been bridged to a Conference and the AddToConference command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be addToConferenceNotification - A Call has been bridged to a conference and the addToConference command’s notificationUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**status** | [**ConferenceStatus**](ConferenceStatus.md) | | [optional] +**recording_url** | **str** | URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. | [optional] +**recording_id** | **str** | Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. | [optional] +**recording_duration_sec** | **int** | Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied. | [optional] + +## Example + +```python +from freeclimb.models.add_to_conference_notification_webhook import AddToConferenceNotificationWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of AddToConferenceNotificationWebhook from a JSON string +add_to_conference_notification_webhook_instance = AddToConferenceNotificationWebhook.from_json(json) +# print the JSON string representation of the object +print(AddToConferenceNotificationWebhook.to_json()) + +# convert the object into a dict +add_to_conference_notification_webhook_dict = add_to_conference_notification_webhook_instance.to_dict() +# create an instance of AddToConferenceNotificationWebhook from a dict +add_to_conference_notification_webhook_from_dict = AddToConferenceNotificationWebhook.from_dict(add_to_conference_notification_webhook_dict) +``` +[[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/AddToQueueNotificationWebhook.md b/docs/AddToQueueNotificationWebhook.md new file mode 100644 index 0000000..f13cce3 --- /dev/null +++ b/docs/AddToQueueNotificationWebhook.md @@ -0,0 +1,38 @@ +# AddToQueueNotificationWebhook + +A Call has been added to a Queue and the Enqueue command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be addToQueueNotification - A call has been added to a queue and the Enqueue command’s notificationUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] + +## Example + +```python +from freeclimb.models.add_to_queue_notification_webhook import AddToQueueNotificationWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of AddToQueueNotificationWebhook from a JSON string +add_to_queue_notification_webhook_instance = AddToQueueNotificationWebhook.from_json(json) +# print the JSON string representation of the object +print(AddToQueueNotificationWebhook.to_json()) + +# convert the object into a dict +add_to_queue_notification_webhook_dict = add_to_queue_notification_webhook_instance.to_dict() +# create an instance of AddToQueueNotificationWebhook from a dict +add_to_queue_notification_webhook_from_dict = AddToQueueNotificationWebhook.from_dict(add_to_queue_notification_webhook_dict) +``` +[[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/AnsweredBy.md b/docs/AnsweredBy.md index 5a28b29..0dbb334 100644 --- a/docs/AnsweredBy.md +++ b/docs/AnsweredBy.md @@ -1,11 +1,12 @@ # AnsweredBy If this Call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **HUMAN** | **AnsweredBy** | | Represented in Python as "human" | -| **MACHINE** | **AnsweredBy** | | Represented in Python as "machine" | + +## Enum + +* `HUMAN` (value: `'human'`) + +* `MACHINE` (value: `'machine'`) [[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/ApplicationList.md b/docs/ApplicationList.md index 6e57994..0d0aee7 100644 --- a/docs/ApplicationList.md +++ b/docs/ApplicationList.md @@ -1,17 +1,36 @@ # ApplicationList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**applications** | [**[ApplicationResult], none_type**](ApplicationResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**applications** | [**List[ApplicationResult]**](ApplicationResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.application_list import ApplicationList + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationList from a JSON string +application_list_instance = ApplicationList.from_json(json) +# print the JSON string representation of the object +print(ApplicationList.to_json()) +# convert the object into a dict +application_list_dict = application_list_instance.to_dict() +# create an instance of ApplicationList from a dict +application_list_from_dict = ApplicationList.from_dict(application_list_dict) +``` [[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/ApplicationListAllOf.md b/docs/ApplicationListAllOf.md deleted file mode 100644 index cab68b1..0000000 --- a/docs/ApplicationListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ApplicationListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**applications** | [**[ApplicationResult], none_type**](ApplicationResult.md) | | [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/ApplicationRequest.md b/docs/ApplicationRequest.md index 36f34f4..6cecf64 100644 --- a/docs/ApplicationRequest.md +++ b/docs/ApplicationRequest.md @@ -1,16 +1,35 @@ # ApplicationRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alias** | **str** | A human readable description of the application, with maximum length 64 characters. | [optional] -**voice_url** | **str, none_type** | The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls. | [optional] -**voice_fallback_url** | **str, none_type** | The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. Note: A PerCL response is expected to control the inbound call. | [optional] -**call_connect_url** | **str, none_type** | The URL that FreeClimb will request when an outbound call request is complete. Used for outbound calls only. Note: A PerCL response is expected if the outbound call is connected (status=InProgress) to control the call. | [optional] -**status_callback_url** | **str, none_type** | The URL that FreeClimb will request to pass call status (such as call ended) to the application. Note: This is a notification only; any PerCL returned will be ignored. | [optional] -**sms_url** | **str, none_type** | The URL that FreeClimb will request when a phone number assigned to this application receives an incoming SMS message. Used for inbound SMS only. Note: Any PerCL returned will be ignored. | [optional] -**sms_fallback_url** | **str, none_type** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. Note: Any PerCL returned will be ignored. | [optional] +**voice_url** | **str** | The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls. | [optional] +**voice_fallback_url** | **str** | The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. Note: A PerCL response is expected to control the inbound call. | [optional] +**call_connect_url** | **str** | The URL that FreeClimb will request when an outbound call request is complete. Used for outbound calls only. Note: A PerCL response is expected if the outbound call is connected (status=InProgress) to control the call. | [optional] +**status_callback_url** | **str** | The URL that FreeClimb will request to pass call status (such as call ended) to the application. Note: This is a notification only; any PerCL returned will be ignored. | [optional] +**sms_url** | **str** | The URL that FreeClimb will request when a phone number assigned to this application receives an incoming SMS message. Used for inbound SMS only. Note: Any PerCL returned will be ignored. | [optional] +**sms_fallback_url** | **str** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. Note: Any PerCL returned will be ignored. | [optional] + +## Example + +```python +from freeclimb.models.application_request import ApplicationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationRequest from a JSON string +application_request_instance = ApplicationRequest.from_json(json) +# print the JSON string representation of the object +print(ApplicationRequest.to_json()) +# convert the object into a dict +application_request_dict = application_request_instance.to_dict() +# create an instance of ApplicationRequest from a dict +application_request_from_dict = ApplicationRequest.from_dict(application_request_dict) +``` [[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/ApplicationResult.md b/docs/ApplicationResult.md index 21a9637..d56fea7 100644 --- a/docs/ApplicationResult.md +++ b/docs/ApplicationResult.md @@ -1,22 +1,41 @@ # ApplicationResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**account_id** | **str, none_type** | ID of the account that owns this phone number. | [optional] -**application_id** | **str, none_type** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] -**alias** | **str, none_type** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] -**voice_url** | **str, none_type** | The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only. | [optional] -**voice_fallback_url** | **str, none_type** | The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. | [optional] -**call_connect_url** | **str, none_type** | The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not. | [optional] -**status_callback_url** | **str, none_type** | A URL to which FreeClimb will make a POST request when the Call ends to notify this app. | [optional] -**sms_url** | **str, none_type** | The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. | [optional] -**sms_fallback_url** | **str, none_type** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. | [optional] +**account_id** | **str** | ID of the account that owns this phone number. | [optional] +**application_id** | **str** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] +**alias** | **str** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] +**voice_url** | **str** | The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only. | [optional] +**voice_fallback_url** | **str** | The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. | [optional] +**call_connect_url** | **str** | The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not. | [optional] +**status_callback_url** | **str** | A URL to which FreeClimb will make a POST request when the Call ends to notify this app. | [optional] +**sms_url** | **str** | The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. | [optional] +**sms_fallback_url** | **str** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. | [optional] + +## Example + +```python +from freeclimb.models.application_result import ApplicationResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationResult from a JSON string +application_result_instance = ApplicationResult.from_json(json) +# print the JSON string representation of the object +print(ApplicationResult.to_json()) +# convert the object into a dict +application_result_dict = application_result_instance.to_dict() +# create an instance of ApplicationResult from a dict +application_result_from_dict = ApplicationResult.from_dict(application_result_dict) +``` [[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/ApplicationResultAllOf.md b/docs/ApplicationResultAllOf.md deleted file mode 100644 index 185b7f8..0000000 --- a/docs/ApplicationResultAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# ApplicationResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **str, none_type** | ID of the account that owns this phone number. | [optional] -**application_id** | **str, none_type** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] -**alias** | **str, none_type** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] -**voice_url** | **str, none_type** | The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only. | [optional] -**voice_fallback_url** | **str, none_type** | The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. | [optional] -**call_connect_url** | **str, none_type** | The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not. | [optional] -**status_callback_url** | **str, none_type** | A URL to which FreeClimb will make a POST request when the Call ends to notify this app. | [optional] -**sms_url** | **str, none_type** | The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. | [optional] -**sms_fallback_url** | **str, none_type** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. | [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/AvailableNumber.md b/docs/AvailableNumber.md index 465d0eb..db0b9d9 100644 --- a/docs/AvailableNumber.md +++ b/docs/AvailableNumber.md @@ -1,16 +1,35 @@ # AvailableNumber + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **capabilities** | [**Capabilities**](Capabilities.md) | | [optional] -**campaign_id** | **str, none_type** | The campaign ID generated by the campaign registry | [optional] -**phone_number** | **str, none_type** | The phone number, in E.164 format (+ country code and phone number: +18003608245). | [optional] -**voice_enabled** | **bool, none_type** | Typically set to true for all numbers. | [optional] -**sms_enabled** | **bool, none_type** | Indicates whether the phone number can send and receive SMS messages. | [optional] -**region** | **str, none_type** | The state or province of this phone number. | [optional] -**country** | **str, none_type** | The country of this phone number. | [optional] +**campaign_id** | **str** | The campaign ID generated by the campaign registry | [optional] +**phone_number** | **str** | The phone number, in E.164 format (+ country code and phone number: +18003608245). | [optional] +**voice_enabled** | **bool** | Typically set to true for all numbers. | [optional] +**sms_enabled** | **bool** | Indicates whether the phone number can send and receive SMS messages. | [optional] +**region** | **str** | The state or province of this phone number. | [optional] +**country** | **str** | The country of this phone number. | [optional] + +## Example + +```python +from freeclimb.models.available_number import AvailableNumber + +# TODO update the JSON string below +json = "{}" +# create an instance of AvailableNumber from a JSON string +available_number_instance = AvailableNumber.from_json(json) +# print the JSON string representation of the object +print(AvailableNumber.to_json()) +# convert the object into a dict +available_number_dict = available_number_instance.to_dict() +# create an instance of AvailableNumber from a dict +available_number_from_dict = AvailableNumber.from_dict(available_number_dict) +``` [[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/AvailableNumberList.md b/docs/AvailableNumberList.md index dfc8390..2e245a7 100644 --- a/docs/AvailableNumberList.md +++ b/docs/AvailableNumberList.md @@ -1,17 +1,36 @@ # AvailableNumberList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**available_phone_numbers** | [**[AvailableNumber], none_type**](AvailableNumber.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**available_phone_numbers** | [**List[AvailableNumber]**](AvailableNumber.md) | | [optional] + +## Example + +```python +from freeclimb.models.available_number_list import AvailableNumberList + +# TODO update the JSON string below +json = "{}" +# create an instance of AvailableNumberList from a JSON string +available_number_list_instance = AvailableNumberList.from_json(json) +# print the JSON string representation of the object +print(AvailableNumberList.to_json()) +# convert the object into a dict +available_number_list_dict = available_number_list_instance.to_dict() +# create an instance of AvailableNumberList from a dict +available_number_list_from_dict = AvailableNumberList.from_dict(available_number_list_dict) +``` [[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/AvailableNumberListAllOf.md b/docs/AvailableNumberListAllOf.md deleted file mode 100644 index 68d66c8..0000000 --- a/docs/AvailableNumberListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# AvailableNumberListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**available_phone_numbers** | [**[AvailableNumber], none_type**](AvailableNumber.md) | | [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/BargeInReason.md b/docs/BargeInReason.md new file mode 100644 index 0000000..a50e01f --- /dev/null +++ b/docs/BargeInReason.md @@ -0,0 +1,14 @@ +# BargeInReason + + +## Enum + +* `NOBARGEIN` (value: `'noBargeIn'`) + +* `BARGEINBYDTMF` (value: `'bargeInByDTMF'`) + +* `BARGEINBYENERGY` (value: `'bargeInByEnergy'`) + +[[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/BuyIncomingNumberRequest.md b/docs/BuyIncomingNumberRequest.md index d427400..e4e961f 100644 --- a/docs/BuyIncomingNumberRequest.md +++ b/docs/BuyIncomingNumberRequest.md @@ -1,12 +1,31 @@ # BuyIncomingNumberRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone_number** | **str** | Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). | **alias** | **str** | Description for this new incoming phone number (max 64 characters). | [optional] **application_id** | **str** | ID of the application that should handle phone calls to the number. | [optional] +## Example + +```python +from freeclimb.models.buy_incoming_number_request import BuyIncomingNumberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BuyIncomingNumberRequest from a JSON string +buy_incoming_number_request_instance = BuyIncomingNumberRequest.from_json(json) +# print the JSON string representation of the object +print(BuyIncomingNumberRequest.to_json()) + +# convert the object into a dict +buy_incoming_number_request_dict = buy_incoming_number_request_instance.to_dict() +# create an instance of BuyIncomingNumberRequest from a dict +buy_incoming_number_request_from_dict = BuyIncomingNumberRequest.from_dict(buy_incoming_number_request_dict) +``` [[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/CallControlWebhook.md b/docs/CallControlWebhook.md new file mode 100644 index 0000000..ffa3d53 --- /dev/null +++ b/docs/CallControlWebhook.md @@ -0,0 +1,34 @@ +# CallControlWebhook + +The digit sequence defined in the callControlSequence attribute of the AddToConference PerCL command has been entered by the Conference participant. A PerCL response is expected. If invalid PerCL is provided, the call leg which triggered this webhook will terminate. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be callControl. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**digits** | **str** | String of digits entered by the participant. | [optional] + +## Example + +```python +from freeclimb.models.call_control_webhook import CallControlWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of CallControlWebhook from a JSON string +call_control_webhook_instance = CallControlWebhook.from_json(json) +# print the JSON string representation of the object +print(CallControlWebhook.to_json()) + +# convert the object into a dict +call_control_webhook_dict = call_control_webhook_instance.to_dict() +# create an instance of CallControlWebhook from a dict +call_control_webhook_from_dict = CallControlWebhook.from_dict(call_control_webhook_dict) +``` +[[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/CallDirection.md b/docs/CallDirection.md index c0ee9e8..2c09c82 100644 --- a/docs/CallDirection.md +++ b/docs/CallDirection.md @@ -1,12 +1,14 @@ # CallDirection Direction of the Call. `inbound` for Calls into FreeClimb, `outboundAPI` for Calls initiated via the REST API, `outboundDial` for Calls initiated by the `OutDial` PerCL command. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **INBOUND** | **CallDirection** | | Represented in Python as "inbound" | -| **OUTBOUND_API** | **CallDirection** | | Represented in Python as "outboundAPI" | -| **OUTBOUND_DIAL** | **CallDirection** | | Represented in Python as "outboundDial" | + +## Enum + +* `INBOUND` (value: `'inbound'`) + +* `OUTBOUNDAPI` (value: `'outboundAPI'`) + +* `OUTBOUNDDIAL` (value: `'outboundDial'`) [[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/CallEndedReason.md b/docs/CallEndedReason.md new file mode 100644 index 0000000..e6c681d --- /dev/null +++ b/docs/CallEndedReason.md @@ -0,0 +1,55 @@ +# CallEndedReason + +Enhanced status for the Call with additional information where available. + +## Enum + +* `BUSY` (value: `'busy'`) + +* `FAILED` (value: `'failed'`) + +* `NOANSWER` (value: `'noAnswer'`) + +* `CALLCANCELED` (value: `'callCanceled'`) + +* `FARENDHANGUP` (value: `'farEndHangup'`) + +* `APPHANGUP` (value: `'appHangup'`) + +* `APPREJECT` (value: `'appReject'`) + +* `APPNOPERCL` (value: `'appNoPercl'`) + +* `APPINVALIDPERCL` (value: `'appInvalidPercl'`) + +* `CONFERENCETERMINATED` (value: `'conferenceTerminated'`) + +* `CONFERENCEEMPTIED` (value: `'conferenceEmptied'`) + +* `REMOVEDFROMCONFERENCE` (value: `'removedFromConference'`) + +* `MACHINEDETECTED` (value: `'machineDetected'`) + +* `WEBHOOKFAILED` (value: `'webhookFailed'`) + +* `WEBHOOKINVALIDRESPONSE` (value: `'webhookInvalidResponse'`) + +* `VOICEDISABLED` (value: `'voiceDisabled'`) + +* `CONFIGERRORNOAPPLICATION` (value: `'configErrorNoApplication'`) + +* `CONFIGERRORNOVOICEURL` (value: `'configErrorNoVoiceUrl'`) + +* `MAXREDIRECTSERROR` (value: `'maxRedirectsError'`) + +* `PERCLPROCESSINGERROR` (value: `'perclProcessingError'`) + +* `INTERNALERROR` (value: `'internalError'`) + +* `GRPCHANGUP` (value: `'grpcHangup'`) + +* `MAXDURATION` (value: `'maxDuration'`) + +[[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/CallList.md b/docs/CallList.md index 0d70f7e..140e93d 100644 --- a/docs/CallList.md +++ b/docs/CallList.md @@ -1,17 +1,36 @@ # CallList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**calls** | [**[CallResult], none_type**](CallResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**calls** | [**List[CallResult]**](CallResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.call_list import CallList + +# TODO update the JSON string below +json = "{}" +# create an instance of CallList from a JSON string +call_list_instance = CallList.from_json(json) +# print the JSON string representation of the object +print(CallList.to_json()) +# convert the object into a dict +call_list_dict = call_list_instance.to_dict() +# create an instance of CallList from a dict +call_list_from_dict = CallList.from_dict(call_list_dict) +``` [[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/CallListAllOf.md b/docs/CallListAllOf.md deleted file mode 100644 index a591965..0000000 --- a/docs/CallListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CallListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**calls** | [**[CallResult], none_type**](CallResult.md) | | [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/CallResult.md b/docs/CallResult.md index 0f8f5f3..9459a5d 100644 --- a/docs/CallResult.md +++ b/docs/CallResult.md @@ -1,29 +1,48 @@ # CallResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**call_id** | **str, none_type** | String that uniquely identifies this Call resource. | [optional] -**parent_call_id** | **str, none_type** | ID of the Call that created this leg (child Call). | [optional] -**account_id** | **str, none_type** | ID of the account that owns this Call. | [optional] -**_from** | **str, none_type** | Phone number that initiated this Call. | [optional] -**to** | **str, none_type** | Phone number that received this Call. | [optional] -**phone_number_id** | **str, none_type** | If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI). | [optional] +**call_id** | **str** | String that uniquely identifies this Call resource. | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child Call). | [optional] +**account_id** | **str** | ID of the account that owns this Call. | [optional] +**var_from** | **str** | Phone number that initiated this Call. | [optional] +**to** | **str** | Phone number that received this Call. | [optional] +**phone_number_id** | **str** | If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI). | [optional] **call_status** | [**CallStatus**](CallStatus.md) | | [optional] -**start_time** | **str, none_type** | Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] -**connect_time** | **str, none_type** | Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] -**end_time** | **str, none_type** | End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully. | [optional] -**duration** | **int, none_type** | Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. | [optional] -**connect_duration** | **int, none_type** | Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. | [optional] +**start_time** | **str** | Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] +**connect_time** | **str** | Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] +**end_time** | **str** | End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully. | [optional] +**duration** | **int** | Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. | [optional] +**connect_duration** | **int** | Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. | [optional] **direction** | [**CallDirection**](CallDirection.md) | | [optional] **answered_by** | [**AnsweredBy**](AnsweredBy.md) | | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The list of subresources for this Call. These include things like logs and recordings associated with the Call. | [optional] -**application_id** | **str, none_type** | ApplicationId associated with the Call. | [optional] +**subresource_uris** | **object** | The list of subresources for this Call. These include things like logs and recordings associated with the Call. | [optional] +**application_id** | **str** | ApplicationId associated with the Call. | [optional] + +## Example + +```python +from freeclimb.models.call_result import CallResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CallResult from a JSON string +call_result_instance = CallResult.from_json(json) +# print the JSON string representation of the object +print(CallResult.to_json()) +# convert the object into a dict +call_result_dict = call_result_instance.to_dict() +# create an instance of CallResult from a dict +call_result_from_dict = CallResult.from_dict(call_result_dict) +``` [[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/CallResultAllOf.md b/docs/CallResultAllOf.md deleted file mode 100644 index 788b3f7..0000000 --- a/docs/CallResultAllOf.md +++ /dev/null @@ -1,25 +0,0 @@ -# CallResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**call_id** | **str, none_type** | String that uniquely identifies this Call resource. | [optional] -**parent_call_id** | **str, none_type** | ID of the Call that created this leg (child Call). | [optional] -**account_id** | **str, none_type** | ID of the account that owns this Call. | [optional] -**_from** | **str, none_type** | Phone number that initiated this Call. | [optional] -**to** | **str, none_type** | Phone number that received this Call. | [optional] -**phone_number_id** | **str, none_type** | If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI). | [optional] -**call_status** | [**CallStatus**](CallStatus.md) | | [optional] -**start_time** | **str, none_type** | Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] -**connect_time** | **str, none_type** | Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] -**end_time** | **str, none_type** | End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully. | [optional] -**duration** | **int, none_type** | Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. | [optional] -**connect_duration** | **int, none_type** | Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. | [optional] -**direction** | [**CallDirection**](CallDirection.md) | | [optional] -**answered_by** | [**AnsweredBy**](AnsweredBy.md) | | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The list of subresources for this Call. These include things like logs and recordings associated with the Call. | [optional] -**application_id** | **str, none_type** | ApplicationId associated with the Call. | [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/CallStatus.md b/docs/CallStatus.md index e932c09..ff27d93 100644 --- a/docs/CallStatus.md +++ b/docs/CallStatus.md @@ -1,17 +1,24 @@ # CallStatus * `queued` – Call is ready and waiting in line before going out. * `ringing` – Call is currently ringing. * `inProgress` – Call was answered and is currently in progress. * `canceled` – Call was hung up while it was queued or ringing. * `completed` – Call was answered and has ended normally. * `busy` – Caller received a busy signal. * `failed` – Call could not be completed as dialed, most likely because the phone number was non-existent. * `noAnswer` – Call ended without being answered. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **QUEUED** | **CallStatus** | | Represented in Python as "queued" | -| **RINGING** | **CallStatus** | | Represented in Python as "ringing" | -| **IN_PROGRESS** | **CallStatus** | | Represented in Python as "inProgress" | -| **CANCELED** | **CallStatus** | | Represented in Python as "canceled" | -| **COMPLETED** | **CallStatus** | | Represented in Python as "completed" | -| **FAILED** | **CallStatus** | | Represented in Python as "failed" | -| **BUSY** | **CallStatus** | | Represented in Python as "busy" | -| **NO_ANSWER** | **CallStatus** | | Represented in Python as "noAnswer" | + +## Enum + +* `QUEUED` (value: `'queued'`) + +* `RINGING` (value: `'ringing'`) + +* `INPROGRESS` (value: `'inProgress'`) + +* `CANCELED` (value: `'canceled'`) + +* `COMPLETED` (value: `'completed'`) + +* `FAILED` (value: `'failed'`) + +* `BUSY` (value: `'busy'`) + +* `NOANSWER` (value: `'noAnswer'`) [[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/CallStatusWebhook.md b/docs/CallStatusWebhook.md new file mode 100644 index 0000000..0468ff2 --- /dev/null +++ b/docs/CallStatusWebhook.md @@ -0,0 +1,39 @@ +# CallStatusWebhook + +A Call has ended and the statusCallbackUrl is being invoked. This is a notification only; All PerCL commands will be ignored. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be callStatus - A Call has ended and the statusCallbackUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**call_ended_reason** | [**CallEndedReason**](CallEndedReason.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] + +## Example + +```python +from freeclimb.models.call_status_webhook import CallStatusWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of CallStatusWebhook from a JSON string +call_status_webhook_instance = CallStatusWebhook.from_json(json) +# print the JSON string representation of the object +print(CallStatusWebhook.to_json()) + +# convert the object into a dict +call_status_webhook_dict = call_status_webhook_instance.to_dict() +# create an instance of CallStatusWebhook from a dict +call_status_webhook_from_dict = CallStatusWebhook.from_dict(call_status_webhook_dict) +``` +[[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/Capabilities.md b/docs/Capabilities.md index c57302e..ee57b66 100644 --- a/docs/Capabilities.md +++ b/docs/Capabilities.md @@ -1,15 +1,34 @@ # Capabilities Details for which features this number may be used. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**voice** | **bool, none_type** | Indicates whether a number can be used for voice calls. Replaces voiceEnabled. | -**sms** | **bool, none_type** | Indicates whether a number can be used SMS messaging. Replaces smsEnabled. | -**toll_free** | **bool, none_type** | Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages. | -**ten_dlc** | **bool, none_type** | Indicates that a number, if sms is true, will be used for 10DLC messaging | -**short_code** | **bool, none_type** | Indicates that a number is a short code and can be used for short code messaging | +**voice** | **bool** | Indicates whether a number can be used for voice calls. Replaces voiceEnabled. | +**sms** | **bool** | Indicates whether a number can be used SMS messaging. Replaces smsEnabled. | +**toll_free** | **bool** | Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages. | +**ten_dlc** | **bool** | Indicates that a number, if sms is true, will be used for 10DLC messaging | +**short_code** | **bool** | Indicates that a number is a short code and can be used for short code messaging | + +## Example + +```python +from freeclimb.models.capabilities import Capabilities + +# TODO update the JSON string below +json = "{}" +# create an instance of Capabilities from a JSON string +capabilities_instance = Capabilities.from_json(json) +# print the JSON string representation of the object +print(Capabilities.to_json()) +# convert the object into a dict +capabilities_dict = capabilities_instance.to_dict() +# create an instance of Capabilities from a dict +capabilities_from_dict = Capabilities.from_dict(capabilities_dict) +``` [[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/CompletionRequest.md b/docs/CompletionRequest.md index a4c035d..458c8c4 100644 --- a/docs/CompletionRequest.md +++ b/docs/CompletionRequest.md @@ -1,10 +1,29 @@ # CompletionRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **query** | **str** | Question to ask the Knowledge Base | +## Example + +```python +from freeclimb.models.completion_request import CompletionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CompletionRequest from a JSON string +completion_request_instance = CompletionRequest.from_json(json) +# print the JSON string representation of the object +print(CompletionRequest.to_json()) + +# convert the object into a dict +completion_request_dict = completion_request_instance.to_dict() +# create an instance of CompletionRequest from a dict +completion_request_from_dict = CompletionRequest.from_dict(completion_request_dict) +``` [[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/CompletionResult.md b/docs/CompletionResult.md index a3e36dc..fd6f271 100644 --- a/docs/CompletionResult.md +++ b/docs/CompletionResult.md @@ -1,11 +1,30 @@ # CompletionResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **response** | **str** | The generative response from the KnowledgeBase | -**status** | **str** | Completion result status. Possible values: success, no_context | +**status** | [**CompletionResultStatus**](CompletionResultStatus.md) | | + +## Example + +```python +from freeclimb.models.completion_result import CompletionResult + +# TODO update the JSON string below +json = "{}" +# create an instance of CompletionResult from a JSON string +completion_result_instance = CompletionResult.from_json(json) +# print the JSON string representation of the object +print(CompletionResult.to_json()) +# convert the object into a dict +completion_result_dict = completion_result_instance.to_dict() +# create an instance of CompletionResult from a dict +completion_result_from_dict = CompletionResult.from_dict(completion_result_dict) +``` [[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/CompletionResultStatus.md b/docs/CompletionResultStatus.md new file mode 100644 index 0000000..b2bea70 --- /dev/null +++ b/docs/CompletionResultStatus.md @@ -0,0 +1,13 @@ +# CompletionResultStatus + +Completion result status. Possible values: success, no_context + +## Enum + +* `SUCCESS` (value: `'success'`) + +* `NO_CONTEXT` (value: `'no_context'`) + +[[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/ConferenceList.md b/docs/ConferenceList.md index 71bb7f1..f986ff2 100644 --- a/docs/ConferenceList.md +++ b/docs/ConferenceList.md @@ -1,17 +1,36 @@ # ConferenceList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**conferences** | [**[ConferenceResult], none_type**](ConferenceResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**conferences** | [**List[ConferenceResult]**](ConferenceResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.conference_list import ConferenceList + +# TODO update the JSON string below +json = "{}" +# create an instance of ConferenceList from a JSON string +conference_list_instance = ConferenceList.from_json(json) +# print the JSON string representation of the object +print(ConferenceList.to_json()) +# convert the object into a dict +conference_list_dict = conference_list_instance.to_dict() +# create an instance of ConferenceList from a dict +conference_list_from_dict = ConferenceList.from_dict(conference_list_dict) +``` [[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/ConferenceListAllOf.md b/docs/ConferenceListAllOf.md deleted file mode 100644 index b6ed5bf..0000000 --- a/docs/ConferenceListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConferenceListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**conferences** | [**[ConferenceResult], none_type**](ConferenceResult.md) | | [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/ConferenceParticipantList.md b/docs/ConferenceParticipantList.md index 08640c4..4c65c73 100644 --- a/docs/ConferenceParticipantList.md +++ b/docs/ConferenceParticipantList.md @@ -1,17 +1,36 @@ # ConferenceParticipantList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**participants** | [**[ConferenceParticipantResult], none_type**](ConferenceParticipantResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**participants** | [**List[ConferenceParticipantResult]**](ConferenceParticipantResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.conference_participant_list import ConferenceParticipantList + +# TODO update the JSON string below +json = "{}" +# create an instance of ConferenceParticipantList from a JSON string +conference_participant_list_instance = ConferenceParticipantList.from_json(json) +# print the JSON string representation of the object +print(ConferenceParticipantList.to_json()) +# convert the object into a dict +conference_participant_list_dict = conference_participant_list_instance.to_dict() +# create an instance of ConferenceParticipantList from a dict +conference_participant_list_from_dict = ConferenceParticipantList.from_dict(conference_participant_list_dict) +``` [[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/ConferenceParticipantListAllOf.md b/docs/ConferenceParticipantListAllOf.md deleted file mode 100644 index 3ae311a..0000000 --- a/docs/ConferenceParticipantListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConferenceParticipantListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**participants** | [**[ConferenceParticipantResult], none_type**](ConferenceParticipantResult.md) | | [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/ConferenceParticipantResult.md b/docs/ConferenceParticipantResult.md index 545f1a7..ef270a1 100644 --- a/docs/ConferenceParticipantResult.md +++ b/docs/ConferenceParticipantResult.md @@ -1,20 +1,39 @@ # ConferenceParticipantResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**account_id** | **str, none_type** | ID of the account that created this participant. | [optional] -**conference_id** | **str, none_type** | ID of the conference this participant is in. | [optional] -**call_id** | **str, none_type** | ID of the Call associated with this Participant. | [optional] -**talk** | **bool, none_type** | True if this Participant has talk privileges in the Conference. False otherwise. | [optional] -**listen** | **bool, none_type** | True if this Participant has listen privileges in the Conference. False otherwise. | [optional] -**dtmf_pass_through** | **bool, none_type** | True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. | [optional] -**start_conf_on_enter** | **bool, none_type** | True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. | [optional] +**account_id** | **str** | ID of the account that created this participant. | [optional] +**conference_id** | **str** | ID of the conference this participant is in. | [optional] +**call_id** | **str** | ID of the Call associated with this Participant. | [optional] +**talk** | **bool** | True if this Participant has talk privileges in the Conference. False otherwise. | [optional] +**listen** | **bool** | True if this Participant has listen privileges in the Conference. False otherwise. | [optional] +**dtmf_pass_through** | **bool** | True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. | [optional] +**start_conf_on_enter** | **bool** | True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. | [optional] + +## Example + +```python +from freeclimb.models.conference_participant_result import ConferenceParticipantResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ConferenceParticipantResult from a JSON string +conference_participant_result_instance = ConferenceParticipantResult.from_json(json) +# print the JSON string representation of the object +print(ConferenceParticipantResult.to_json()) +# convert the object into a dict +conference_participant_result_dict = conference_participant_result_instance.to_dict() +# create an instance of ConferenceParticipantResult from a dict +conference_participant_result_from_dict = ConferenceParticipantResult.from_dict(conference_participant_result_dict) +``` [[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/ConferenceParticipantResultAllOf.md b/docs/ConferenceParticipantResultAllOf.md deleted file mode 100644 index 4e04f8d..0000000 --- a/docs/ConferenceParticipantResultAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# ConferenceParticipantResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **str, none_type** | ID of the account that created this participant. | [optional] -**conference_id** | **str, none_type** | ID of the conference this participant is in. | [optional] -**call_id** | **str, none_type** | ID of the Call associated with this Participant. | [optional] -**talk** | **bool, none_type** | True if this Participant has talk privileges in the Conference. False otherwise. | [optional] -**listen** | **bool, none_type** | True if this Participant has listen privileges in the Conference. False otherwise. | [optional] -**dtmf_pass_through** | **bool, none_type** | True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. | [optional] -**start_conf_on_enter** | **bool, none_type** | True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. | [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/ConferenceRecordingStatusWebhook.md b/docs/ConferenceRecordingStatusWebhook.md new file mode 100644 index 0000000..7f7a7d7 --- /dev/null +++ b/docs/ConferenceRecordingStatusWebhook.md @@ -0,0 +1,42 @@ +# ConferenceRecordingStatusWebhook + +The statusCallbackUrl request includes Recording information for a Conference that ended. This is a notification only; any PerCL returned will be ignored. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**status** | [**ConferenceStatus**](ConferenceStatus.md) | | [optional] +**recording_url** | **str** | URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. | [optional] +**recording_id** | **str** | Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. | [optional] +**recording_duration_sec** | **int** | Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied. | [optional] + +## Example + +```python +from freeclimb.models.conference_recording_status_webhook import ConferenceRecordingStatusWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of ConferenceRecordingStatusWebhook from a JSON string +conference_recording_status_webhook_instance = ConferenceRecordingStatusWebhook.from_json(json) +# print the JSON string representation of the object +print(ConferenceRecordingStatusWebhook.to_json()) + +# convert the object into a dict +conference_recording_status_webhook_dict = conference_recording_status_webhook_instance.to_dict() +# create an instance of ConferenceRecordingStatusWebhook from a dict +conference_recording_status_webhook_from_dict = ConferenceRecordingStatusWebhook.from_dict(conference_recording_status_webhook_dict) +``` +[[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/ConferenceResult.md b/docs/ConferenceResult.md index 12b656f..da68b36 100644 --- a/docs/ConferenceResult.md +++ b/docs/ConferenceResult.md @@ -1,23 +1,42 @@ # ConferenceResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**conference_id** | **str, none_type** | A string that uniquely identifies this Conference resource. | [optional] -**account_id** | **str, none_type** | ID of the account that created this Conference. | [optional] -**alias** | **str, none_type** | A description for this Conference. | [optional] +**conference_id** | **str** | A string that uniquely identifies this Conference resource. | [optional] +**account_id** | **str** | ID of the account that created this Conference. | [optional] +**alias** | **str** | A description for this Conference. | [optional] **play_beep** | [**PlayBeep**](PlayBeep.md) | | [optional] -**record** | **bool, none_type** | Flag indicating whether recording is enabled for this Conference. | [optional] +**record** | **bool** | Flag indicating whether recording is enabled for this Conference. | [optional] **status** | [**ConferenceStatus**](ConferenceStatus.md) | | [optional] -**wait_url** | **str, none_type** | URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state. | [optional] -**action_url** | **str, none_type** | URL invoked once the Conference is successfully created. | [optional] -**status_callback_url** | **str, none_type** | URL to inform that the Conference status has changed. | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The list of subresources for this Conference. This includes participants and/or recordings. | [optional] +**wait_url** | **str** | URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state. | [optional] +**action_url** | **str** | URL invoked once the Conference is successfully created. | [optional] +**status_callback_url** | **str** | URL to inform that the Conference status has changed. | [optional] +**subresource_uris** | **object** | The list of subresources for this Conference. This includes participants and/or recordings. | [optional] + +## Example + +```python +from freeclimb.models.conference_result import ConferenceResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ConferenceResult from a JSON string +conference_result_instance = ConferenceResult.from_json(json) +# print the JSON string representation of the object +print(ConferenceResult.to_json()) +# convert the object into a dict +conference_result_dict = conference_result_instance.to_dict() +# create an instance of ConferenceResult from a dict +conference_result_from_dict = ConferenceResult.from_dict(conference_result_dict) +``` [[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/ConferenceResultAllOf.md b/docs/ConferenceResultAllOf.md deleted file mode 100644 index f621823..0000000 --- a/docs/ConferenceResultAllOf.md +++ /dev/null @@ -1,19 +0,0 @@ -# ConferenceResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**conference_id** | **str, none_type** | A string that uniquely identifies this Conference resource. | [optional] -**account_id** | **str, none_type** | ID of the account that created this Conference. | [optional] -**alias** | **str, none_type** | A description for this Conference. | [optional] -**play_beep** | [**PlayBeep**](PlayBeep.md) | | [optional] -**record** | **bool, none_type** | Flag indicating whether recording is enabled for this Conference. | [optional] -**status** | [**ConferenceStatus**](ConferenceStatus.md) | | [optional] -**wait_url** | **str, none_type** | URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state. | [optional] -**action_url** | **str, none_type** | URL invoked once the Conference is successfully created. | [optional] -**status_callback_url** | **str, none_type** | URL to inform that the Conference status has changed. | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | The list of subresources for this Conference. This includes participants and/or recordings. | [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/ConferenceStatus.md b/docs/ConferenceStatus.md index 8717af4..dc232f4 100644 --- a/docs/ConferenceStatus.md +++ b/docs/ConferenceStatus.md @@ -1,13 +1,16 @@ # ConferenceStatus The status of the Conference. One of: creating, empty, populated, inProgress, or terminated. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **EMPTY** | **ConferenceStatus** | | Represented in Python as "empty" | -| **POPULATED** | **ConferenceStatus** | | Represented in Python as "populated" | -| **IN_PROGRESS** | **ConferenceStatus** | | Represented in Python as "inProgress" | -| **TERMINATED** | **ConferenceStatus** | | Represented in Python as "terminated" | + +## Enum + +* `EMPTY` (value: `'empty'`) + +* `POPULATED` (value: `'populated'`) + +* `INPROGRESS` (value: `'inProgress'`) + +* `TERMINATED` (value: `'terminated'`) [[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/ConferenceStatusWebhook.md b/docs/ConferenceStatusWebhook.md new file mode 100644 index 0000000..68041e4 --- /dev/null +++ b/docs/ConferenceStatusWebhook.md @@ -0,0 +1,42 @@ +# ConferenceStatusWebhook + +The context or reason why this request is being made. Will be conferenceStatus - A Conference's status changed and its statusCallbackUrl is being invoked. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**status** | [**ConferenceStatus**](ConferenceStatus.md) | | [optional] +**recording_url** | **str** | The URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked. | [optional] +**recording_id** | **str** | The unique ID of the Recording from this Conference. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked. | [optional] +**recording_duration_sec** | **int** | The duration of the recorded audio rounded up to the nearest second (in seconds). Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked. | [optional] + +## Example + +```python +from freeclimb.models.conference_status_webhook import ConferenceStatusWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of ConferenceStatusWebhook from a JSON string +conference_status_webhook_instance = ConferenceStatusWebhook.from_json(json) +# print the JSON string representation of the object +print(ConferenceStatusWebhook.to_json()) + +# convert the object into a dict +conference_status_webhook_dict = conference_status_webhook_instance.to_dict() +# create an instance of ConferenceStatusWebhook from a dict +conference_status_webhook_from_dict = ConferenceStatusWebhook.from_dict(conference_status_webhook_dict) +``` +[[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/CreateConference.md b/docs/CreateConference.md index 03d30a9..e6d4a16 100644 --- a/docs/CreateConference.md +++ b/docs/CreateConference.md @@ -1,7 +1,9 @@ # CreateConference The `CreateConference` command does exactly what its name implies — it creates an unpopulated Conference (one without any Participants). Once created, a Conference remains in FreeClimb until explicitly terminated by a customer. Once a Conference has been terminated, it can no longer be used. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. | @@ -10,8 +12,24 @@ Name | Type | Description | Notes **record** | **bool** | When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state. | [optional] **status_callback_url** | **str** | This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. | [optional] **wait_url** | **str** | If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.create_conference import CreateConference + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateConference from a JSON string +create_conference_instance = CreateConference.from_json(json) +# print the JSON string representation of the object +print(CreateConference.to_json()) + +# convert the object into a dict +create_conference_dict = create_conference_instance.to_dict() +# create an instance of CreateConference from a dict +create_conference_from_dict = CreateConference.from_dict(create_conference_dict) +``` [[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/CreateConferenceAllOf.md b/docs/CreateConferenceAllOf.md deleted file mode 100644 index 9192d9c..0000000 --- a/docs/CreateConferenceAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateConferenceAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. | -**alias** | **bool** | Descriptive name for the Conference. | [optional] -**play_beep** | [**PlayBeep**](PlayBeep.md) | | [optional] -**record** | **bool** | When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state. | [optional] -**status_callback_url** | **str** | This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. | [optional] -**wait_url** | **str** | If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb. | [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/CreateConferenceRequest.md b/docs/CreateConferenceRequest.md index e4250cb..6cfee26 100644 --- a/docs/CreateConferenceRequest.md +++ b/docs/CreateConferenceRequest.md @@ -1,6 +1,8 @@ # CreateConferenceRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alias** | **str** | A description for this Conference. Maximum 64 characters. | [optional] @@ -9,6 +11,23 @@ Name | Type | Description | Notes **wait_url** | **str** | If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once — when the Conference is created. | [optional] **status_callback_url** | **str** | This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below). | [optional] +## Example + +```python +from freeclimb.models.create_conference_request import CreateConferenceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateConferenceRequest from a JSON string +create_conference_request_instance = CreateConferenceRequest.from_json(json) +# print the JSON string representation of the object +print(CreateConferenceRequest.to_json()) + +# convert the object into a dict +create_conference_request_dict = create_conference_request_instance.to_dict() +# create an instance of CreateConferenceRequest from a dict +create_conference_request_from_dict = CreateConferenceRequest.from_dict(create_conference_request_dict) +``` [[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/CreateConferenceWebhook.md b/docs/CreateConferenceWebhook.md new file mode 100644 index 0000000..9c02402 --- /dev/null +++ b/docs/CreateConferenceWebhook.md @@ -0,0 +1,42 @@ +# CreateConferenceWebhook + +A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. A PerCL response is expected if the actionUrl is being invoked. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be createConference - A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**status** | [**ConferenceStatus**](ConferenceStatus.md) | | [optional] +**recording_url** | **str** | The URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked. | [optional] +**recording_id** | **str** | The unique ID of the Recording from this Conference. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked. | [optional] +**recording_duration_sec** | **int** | The duration of the recorded audio rounded up to the nearest second (in seconds). Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked. | [optional] + +## Example + +```python +from freeclimb.models.create_conference_webhook import CreateConferenceWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateConferenceWebhook from a JSON string +create_conference_webhook_instance = CreateConferenceWebhook.from_json(json) +# print the JSON string representation of the object +print(CreateConferenceWebhook.to_json()) + +# convert the object into a dict +create_conference_webhook_dict = create_conference_webhook_instance.to_dict() +# create an instance of CreateConferenceWebhook from a dict +create_conference_webhook_from_dict = CreateConferenceWebhook.from_dict(create_conference_webhook_dict) +``` +[[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/CreateWebRTCToken.md b/docs/CreateWebRTCToken.md index 196b36d..f753324 100644 --- a/docs/CreateWebRTCToken.md +++ b/docs/CreateWebRTCToken.md @@ -1,12 +1,31 @@ # CreateWebRTCToken + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to** | **str** | E.164 formatted phone number to which calls using this token will be made. | -**_from** | **str** | E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. | +**var_from** | **str** | E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. | **uses** | **int** | number of times this token may be used for a WebRTC call | +## Example + +```python +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateWebRTCToken from a JSON string +create_web_rtc_token_instance = CreateWebRTCToken.from_json(json) +# print the JSON string representation of the object +print(CreateWebRTCToken.to_json()) + +# convert the object into a dict +create_web_rtc_token_dict = create_web_rtc_token_instance.to_dict() +# create an instance of CreateWebRTCToken from a dict +create_web_rtc_token_from_dict = CreateWebRTCToken.from_dict(create_web_rtc_token_dict) +``` [[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/DefaultApi.md b/docs/DefaultApi.md index 955cc07..6e79a46 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -61,7 +61,7 @@ Method | HTTP request | Description [**update_an_account**](DefaultApi.md#update_an_account) | **POST** /Accounts/{accountId} | Manage an account [**update_an_application**](DefaultApi.md#update_an_application) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application [**update_an_incoming_number**](DefaultApi.md#update_an_incoming_number) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number -[**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get Next Page of Paginated List Resource + # **buy_a_phone_number** > IncomingNumberResult buy_a_phone_number(account_id, buy_incoming_number_request) @@ -73,12 +73,12 @@ Buy a Phone Number * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.incoming_number_result import IncomingNumberResult +from freeclimb.models.buy_incoming_number_request import BuyIncomingNumberRequest +from freeclimb.models.incoming_number_result import IncomingNumberResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -99,29 +99,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - buy_incoming_number_request = BuyIncomingNumberRequest( - phone_number="phone_number_example", - alias="alias_example", - application_id="application_id_example", - ) # BuyIncomingNumberRequest | Incoming Number transaction details - - # example passing only required values which don't have defaults set + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + buy_incoming_number_request = freeclimb.BuyIncomingNumberRequest() # BuyIncomingNumberRequest | Incoming Number transaction details + try: # Buy a Phone Number - api_response = api_instance.buy_a_phone_number(buy_incoming_number_request) + api_response = api_instance.buy_a_phone_number(account_id, buy_incoming_number_request) + print("The response of DefaultApi->buy_a_phone_number:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->buy_a_phone_number: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **buy_incoming_number_request** | [**BuyIncomingNumberRequest**](BuyIncomingNumberRequest.md)| Incoming Number transaction details | + **account_id** | **str**| ID of the account | + **buy_incoming_number_request** | [**BuyIncomingNumberRequest**](BuyIncomingNumberRequest.md)| Incoming Number transaction details | ### Return type @@ -136,7 +135,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -146,7 +144,7 @@ Name | Type | Description | Notes [[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_a_conference** -> ConferenceResult create_a_conference(account_id) +> ConferenceResult create_a_conference(account_id, create_conference_request=create_conference_request) Create a Conference @@ -155,12 +153,12 @@ Create a Conference * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.conference_result import ConferenceResult +from freeclimb.models.conference_result import ConferenceResult +from freeclimb.models.create_conference_request import CreateConferenceRequest +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -181,40 +179,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - create_conference_request = CreateConferenceRequest( - alias="alias_example", - play_beep=PlayBeep("always"), - record=True, - wait_url="wait_url_example", - status_callback_url="status_callback_url_example", - ) # CreateConferenceRequest | Conference to create (optional) - - # example passing only required values which don't have defaults set - try: - # Create a Conference - api_response = api_instance.create_a_conference() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->create_a_conference: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + create_conference_request = freeclimb.CreateConferenceRequest() # CreateConferenceRequest | Conference to create (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Create a Conference - api_response = api_instance.create_a_conference(create_conference_request=create_conference_request) + api_response = api_instance.create_a_conference(account_id, create_conference_request=create_conference_request) + print("The response of DefaultApi->create_a_conference:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->create_a_conference: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_conference_request** | [**CreateConferenceRequest**](CreateConferenceRequest.md)| Conference to create | [optional] + **account_id** | **str**| ID of the account | + **create_conference_request** | [**CreateConferenceRequest**](CreateConferenceRequest.md)| Conference to create | [optional] ### Return type @@ -229,7 +215,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -239,7 +224,7 @@ Name | Type | Description | Notes [[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_a_queue** -> QueueResult create_a_queue(account_id) +> QueueResult create_a_queue(account_id, queue_request=queue_request) Create a Queue @@ -248,12 +233,12 @@ Create a Queue * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.queue_request import QueueRequest +from freeclimb.models.queue_request import QueueRequest +from freeclimb.models.queue_result import QueueResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -274,37 +259,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_request = QueueRequest( - alias="alias_example", - max_size=100, - ) # QueueRequest | Queue details used to create a queue (optional) - - # example passing only required values which don't have defaults set - try: - # Create a Queue - api_response = api_instance.create_a_queue() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->create_a_queue: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_request = freeclimb.QueueRequest() # QueueRequest | Queue details used to create a queue (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Create a Queue - api_response = api_instance.create_a_queue(queue_request=queue_request) + api_response = api_instance.create_a_queue(account_id, queue_request=queue_request) + print("The response of DefaultApi->create_a_queue:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->create_a_queue: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_request** | [**QueueRequest**](QueueRequest.md)| Queue details used to create a queue | [optional] + **account_id** | **str**| ID of the account | + **queue_request** | [**QueueRequest**](QueueRequest.md)| Queue details used to create a queue | [optional] ### Return type @@ -319,7 +295,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -329,7 +304,7 @@ Name | Type | Description | Notes [[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_an_application** -> ApplicationResult create_an_application(account_id) +> ApplicationResult create_an_application(account_id, application_request=application_request) Create an application @@ -338,12 +313,12 @@ Create an application * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult +from freeclimb.models.application_request import ApplicationRequest +from freeclimb.models.application_result import ApplicationResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -364,42 +339,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - application_request = ApplicationRequest( - alias="alias_example", - voice_url="voice_url_example", - voice_fallback_url="voice_fallback_url_example", - call_connect_url="call_connect_url_example", - status_callback_url="status_callback_url_example", - sms_url="sms_url_example", - sms_fallback_url="sms_fallback_url_example", - ) # ApplicationRequest | Application Details (optional) - - # example passing only required values which don't have defaults set - try: - # Create an application - api_response = api_instance.create_an_application() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->create_an_application: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + application_request = freeclimb.ApplicationRequest() # ApplicationRequest | Application Details (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Create an application - api_response = api_instance.create_an_application(application_request=application_request) + api_response = api_instance.create_an_application(account_id, application_request=application_request) + print("The response of DefaultApi->create_an_application:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->create_an_application: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **application_request** | [**ApplicationRequest**](ApplicationRequest.md)| Application Details | [optional] + **account_id** | **str**| ID of the account | + **application_request** | [**ApplicationRequest**](ApplicationRequest.md)| Application Details | [optional] ### Return type @@ -414,7 +375,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -424,7 +384,7 @@ Name | Type | Description | Notes [[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_knowledge_base_completion** -> CompletionResult create_knowledge_base_completion(account_id, knowledge_base_id) +> CompletionResult create_knowledge_base_completion(account_id, knowledge_base_id, completion_request=completion_request) Query the knowledge base @@ -433,12 +393,12 @@ Query the knowledge base * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.completion_result import CompletionResult -from freeclimb.model.completion_request import CompletionRequest +from freeclimb.models.completion_request import CompletionRequest +from freeclimb.models.completion_result import CompletionResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -459,38 +419,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - knowledge_base_id = "knowledgeBaseId_example" # str | A string that uniquely identifies the KnowledgeBase resource. - completion_request = CompletionRequest( - query="query_example", - ) # CompletionRequest | Completion request details (optional) - - # example passing only required values which don't have defaults set - try: - # Query the knowledge base - api_response = api_instance.create_knowledge_base_completion(knowledge_base_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->create_knowledge_base_completion: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + knowledge_base_id = 'knowledge_base_id_example' # str | A string that uniquely identifies the KnowledgeBase resource. + completion_request = freeclimb.CompletionRequest() # CompletionRequest | Completion request details (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Query the knowledge base - api_response = api_instance.create_knowledge_base_completion(knowledge_base_id, completion_request=completion_request) + api_response = api_instance.create_knowledge_base_completion(account_id, knowledge_base_id, completion_request=completion_request) + print("The response of DefaultApi->create_knowledge_base_completion:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->create_knowledge_base_completion: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **knowledge_base_id** | **str**| A string that uniquely identifies the KnowledgeBase resource. | - **completion_request** | [**CompletionRequest**](CompletionRequest.md)| Completion request details | [optional] + **account_id** | **str**| ID of the account | + **knowledge_base_id** | **str**| A string that uniquely identifies the KnowledgeBase resource. | + **completion_request** | [**CompletionRequest**](CompletionRequest.md)| Completion request details | [optional] ### Return type @@ -505,7 +457,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -524,10 +475,10 @@ Delete a Recording * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -548,24 +499,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - recording_id = "recordingId_example" # str | String that uniquely identifies this recording resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + recording_id = 'recording_id_example' # str | String that uniquely identifies this recording resource. - # example passing only required values which don't have defaults set try: # Delete a Recording - api_instance.delete_a_recording(recording_id) - except freeclimb.ApiException as e: + api_instance.delete_a_recording(account_id, recording_id) + except Exception as e: print("Exception when calling DefaultApi->delete_a_recording: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **recording_id** | **str**| String that uniquely identifies this recording resource. | + **account_id** | **str**| ID of the account | + **recording_id** | **str**| String that uniquely identifies this recording resource. | ### Return type @@ -580,7 +533,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -599,10 +551,10 @@ Delete an application * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -623,24 +575,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - application_id = "applicationId_example" # str | String that uniquely identifies this application resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + application_id = 'application_id_example' # str | String that uniquely identifies this application resource. - # example passing only required values which don't have defaults set try: # Delete an application - api_instance.delete_an_application(application_id) - except freeclimb.ApiException as e: + api_instance.delete_an_application(account_id, application_id) + except Exception as e: print("Exception when calling DefaultApi->delete_an_application: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **application_id** | **str**| String that uniquely identifies this application resource. | + **account_id** | **str**| ID of the account | + **application_id** | **str**| String that uniquely identifies this application resource. | ### Return type @@ -655,7 +609,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -674,10 +627,10 @@ Delete an Incoming Number * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -698,24 +651,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - phone_number_id = "phoneNumberId_example" # str | String that uniquely identifies this phone number resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + phone_number_id = 'phone_number_id_example' # str | String that uniquely identifies this phone number resource. - # example passing only required values which don't have defaults set try: # Delete an Incoming Number - api_instance.delete_an_incoming_number(phone_number_id) - except freeclimb.ApiException as e: + api_instance.delete_an_incoming_number(account_id, phone_number_id) + except Exception as e: print("Exception when calling DefaultApi->delete_an_incoming_number: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **phone_number_id** | **str**| String that uniquely identifies this phone number resource. | + **account_id** | **str**| ID of the account | + **phone_number_id** | **str**| String that uniquely identifies this phone number resource. | ### Return type @@ -730,7 +685,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -749,11 +703,11 @@ Dequeue a Member * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_member import QueueMember +from freeclimb.models.queue_member import QueueMember +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -774,27 +728,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | String that uniquely identifies the Queue that the Member belongs to. - call_id = "callId_example" # str | ID if the Call that the Member belongs to + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | String that uniquely identifies the Queue that the Member belongs to. + call_id = 'call_id_example' # str | ID if the Call that the Member belongs to - # example passing only required values which don't have defaults set try: # Dequeue a Member - api_response = api_instance.dequeue_a_member(queue_id, call_id) + api_response = api_instance.dequeue_a_member(account_id, queue_id, call_id) + print("The response of DefaultApi->dequeue_a_member:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->dequeue_a_member: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | - **call_id** | **str**| ID if the Call that the Member belongs to | + **account_id** | **str**| ID of the account | + **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | + **call_id** | **str**| ID if the Call that the Member belongs to | ### Return type @@ -809,7 +766,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -828,11 +784,11 @@ Dequeue Head Member * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_member import QueueMember +from freeclimb.models.queue_member import QueueMember +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -853,25 +809,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | String that uniquely identifies this queue resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | String that uniquely identifies this queue resource. - # example passing only required values which don't have defaults set try: # Dequeue Head Member - api_response = api_instance.dequeue_head_member(queue_id) + api_response = api_instance.dequeue_head_member(account_id, queue_id) + print("The response of DefaultApi->dequeue_head_member:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->dequeue_head_member: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| String that uniquely identifies this queue resource. | + **account_id** | **str**| ID of the account | + **queue_id** | **str**| String that uniquely identifies this queue resource. | ### Return type @@ -886,7 +845,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -896,7 +854,7 @@ Name | Type | Description | Notes [[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) # **download_a_recording_file** -> file_type download_a_recording_file(account_id, recording_id) +> bytearray download_a_recording_file(account_id, recording_id) Download a Recording File @@ -905,10 +863,10 @@ Download a Recording File * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -929,29 +887,32 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - recording_id = "recordingId_example" # str | String that uniquely identifies this recording resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + recording_id = 'recording_id_example' # str | String that uniquely identifies this recording resource. - # example passing only required values which don't have defaults set try: # Download a Recording File - api_response = api_instance.download_a_recording_file(recording_id) + api_response = api_instance.download_a_recording_file(account_id, recording_id) + print("The response of DefaultApi->download_a_recording_file:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->download_a_recording_file: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **recording_id** | **str**| String that uniquely identifies this recording resource. | + **account_id** | **str**| ID of the account | + **recording_id** | **str**| String that uniquely identifies this recording resource. | ### Return type -**file_type** +**bytearray** ### Authorization @@ -962,7 +923,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: audio/x-wav - ### HTTP response details | Status code | Description | Response headers | @@ -981,12 +941,12 @@ Filter Logs * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.log_list import LogList -from freeclimb.model.filter_logs_request import FilterLogsRequest +from freeclimb.models.filter_logs_request import FilterLogsRequest +from freeclimb.models.log_list import LogList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1007,27 +967,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - filter_logs_request = FilterLogsRequest( - pql="pql_example", - ) # FilterLogsRequest | Filter logs request paramters + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + filter_logs_request = freeclimb.FilterLogsRequest() # FilterLogsRequest | Filter logs request paramters - # example passing only required values which don't have defaults set try: # Filter Logs - api_response = api_instance.filter_logs(filter_logs_request) + api_response = api_instance.filter_logs(account_id, filter_logs_request) + print("The response of DefaultApi->filter_logs:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->filter_logs: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **filter_logs_request** | [**FilterLogsRequest**](FilterLogsRequest.md)| Filter logs request paramters | + **account_id** | **str**| ID of the account | + **filter_logs_request** | [**FilterLogsRequest**](FilterLogsRequest.md)| Filter logs request paramters | ### Return type @@ -1042,7 +1003,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1061,11 +1021,11 @@ Get a Call * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.call_result import CallResult +from freeclimb.models.call_result import CallResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1086,25 +1046,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - call_id = "callId_example" # str | String that uniquely identifies this call resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + call_id = 'call_id_example' # str | String that uniquely identifies this call resource. - # example passing only required values which don't have defaults set try: # Get a Call - api_response = api_instance.get_a_call(call_id) + api_response = api_instance.get_a_call(account_id, call_id) + print("The response of DefaultApi->get_a_call:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_a_call: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **call_id** | **str**| String that uniquely identifies this call resource. | + **account_id** | **str**| ID of the account | + **call_id** | **str**| String that uniquely identifies this call resource. | ### Return type @@ -1119,7 +1082,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1138,11 +1100,11 @@ Get a Conference * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.conference_result import ConferenceResult +from freeclimb.models.conference_result import ConferenceResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1163,25 +1125,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | A string that uniquely identifies this conference resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | A string that uniquely identifies this conference resource. - # example passing only required values which don't have defaults set try: # Get a Conference - api_response = api_instance.get_a_conference(conference_id) + api_response = api_instance.get_a_conference(account_id, conference_id) + print("The response of DefaultApi->get_a_conference:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_a_conference: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| A string that uniquely identifies this conference resource. | + **account_id** | **str**| ID of the account | + **conference_id** | **str**| A string that uniquely identifies this conference resource. | ### Return type @@ -1196,7 +1161,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1215,11 +1179,11 @@ Get a Member * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_member import QueueMember +from freeclimb.models.queue_member import QueueMember +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1240,27 +1204,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | String that uniquely identifies the Queue that the Member belongs to. - call_id = "callId_example" # str | ID of the Call that the Member belongs to + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | String that uniquely identifies the Queue that the Member belongs to. + call_id = 'call_id_example' # str | ID of the Call that the Member belongs to - # example passing only required values which don't have defaults set try: # Get a Member - api_response = api_instance.get_a_member(queue_id, call_id) + api_response = api_instance.get_a_member(account_id, queue_id, call_id) + print("The response of DefaultApi->get_a_member:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_a_member: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | - **call_id** | **str**| ID of the Call that the Member belongs to | + **account_id** | **str**| ID of the account | + **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | + **call_id** | **str**| ID of the Call that the Member belongs to | ### Return type @@ -1275,7 +1242,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1294,11 +1260,11 @@ Get a Participant * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.conference_participant_result import ConferenceParticipantResult +from freeclimb.models.conference_participant_result import ConferenceParticipantResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1319,27 +1285,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | ID of the conference this participant is in. - call_id = "callId_example" # str | ID of the Call associated with this participant. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | ID of the conference this participant is in. + call_id = 'call_id_example' # str | ID of the Call associated with this participant. - # example passing only required values which don't have defaults set try: # Get a Participant - api_response = api_instance.get_a_participant(conference_id, call_id) + api_response = api_instance.get_a_participant(account_id, conference_id, call_id) + print("The response of DefaultApi->get_a_participant:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_a_participant: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| ID of the conference this participant is in. | - **call_id** | **str**| ID of the Call associated with this participant. | + **account_id** | **str**| ID of the account | + **conference_id** | **str**| ID of the conference this participant is in. | + **call_id** | **str**| ID of the Call associated with this participant. | ### Return type @@ -1354,7 +1323,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1373,11 +1341,11 @@ Get a Queue * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_result import QueueResult +from freeclimb.models.queue_result import QueueResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1398,25 +1366,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | A string that uniquely identifies this queue resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | A string that uniquely identifies this queue resource. - # example passing only required values which don't have defaults set try: # Get a Queue - api_response = api_instance.get_a_queue(queue_id) + api_response = api_instance.get_a_queue(account_id, queue_id) + print("The response of DefaultApi->get_a_queue:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_a_queue: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| A string that uniquely identifies this queue resource. | + **account_id** | **str**| ID of the account | + **queue_id** | **str**| A string that uniquely identifies this queue resource. | ### Return type @@ -1431,7 +1402,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1450,11 +1420,11 @@ Get a Recording * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.recording_result import RecordingResult +from freeclimb.models.recording_result import RecordingResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1475,25 +1445,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - recording_id = "recordingId_example" # str | String that uniquely identifies this recording resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + recording_id = 'recording_id_example' # str | String that uniquely identifies this recording resource. - # example passing only required values which don't have defaults set try: # Get a Recording - api_response = api_instance.get_a_recording(recording_id) + api_response = api_instance.get_a_recording(account_id, recording_id) + print("The response of DefaultApi->get_a_recording:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_a_recording: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **recording_id** | **str**| String that uniquely identifies this recording resource. | + **account_id** | **str**| ID of the account | + **recording_id** | **str**| String that uniquely identifies this recording resource. | ### Return type @@ -1508,7 +1481,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1527,11 +1499,11 @@ Get an Account * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.account_result import AccountResult +from freeclimb.models.account_result import AccountResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1552,23 +1524,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account - # example passing only required values which don't have defaults set try: # Get an Account - api_response = api_instance.get_an_account() + api_response = api_instance.get_an_account(account_id) + print("The response of DefaultApi->get_an_account:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_an_account: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | ### Return type @@ -1583,7 +1558,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1602,11 +1576,11 @@ Get an Application * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.application_result import ApplicationResult +from freeclimb.models.application_result import ApplicationResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1627,25 +1601,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - application_id = "applicationId_example" # str | A string that uniquely identifies this application resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + application_id = 'application_id_example' # str | A string that uniquely identifies this application resource. - # example passing only required values which don't have defaults set try: # Get an Application - api_response = api_instance.get_an_application(application_id) + api_response = api_instance.get_an_application(account_id, application_id) + print("The response of DefaultApi->get_an_application:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_an_application: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **application_id** | **str**| A string that uniquely identifies this application resource. | + **account_id** | **str**| ID of the account | + **application_id** | **str**| A string that uniquely identifies this application resource. | ### Return type @@ -1660,7 +1637,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1679,11 +1655,11 @@ Get an Incoming Number * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.incoming_number_result import IncomingNumberResult +from freeclimb.models.incoming_number_result import IncomingNumberResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1704,25 +1680,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - phone_number_id = "phoneNumberId_example" # str | String that uniquely identifies this phone number resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + phone_number_id = 'phone_number_id_example' # str | String that uniquely identifies this phone number resource. - # example passing only required values which don't have defaults set try: # Get an Incoming Number - api_response = api_instance.get_an_incoming_number(phone_number_id) + api_response = api_instance.get_an_incoming_number(account_id, phone_number_id) + print("The response of DefaultApi->get_an_incoming_number:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_an_incoming_number: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **phone_number_id** | **str**| String that uniquely identifies this phone number resource. | + **account_id** | **str**| ID of the account | + **phone_number_id** | **str**| String that uniquely identifies this phone number resource. | ### Return type @@ -1737,7 +1716,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1756,11 +1734,11 @@ Get an SMS Message * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.message_result import MessageResult +from freeclimb.models.message_result import MessageResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1781,25 +1759,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - message_id = "messageId_example" # str | String that uniquely identifies this Message resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + message_id = 'message_id_example' # str | String that uniquely identifies this Message resource. - # example passing only required values which don't have defaults set try: # Get an SMS Message - api_response = api_instance.get_an_sms_message(message_id) + api_response = api_instance.get_an_sms_message(account_id, message_id) + print("The response of DefaultApi->get_an_sms_message:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_an_sms_message: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **message_id** | **str**| String that uniquely identifies this Message resource. | + **account_id** | **str**| ID of the account | + **message_id** | **str**| String that uniquely identifies this Message resource. | ### Return type @@ -1814,7 +1795,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1833,11 +1813,11 @@ Get Head Member * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_member import QueueMember +from freeclimb.models.queue_member import QueueMember +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1858,25 +1838,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | String that uniquely identifies the Queue that the Member belongs to. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | String that uniquely identifies the Queue that the Member belongs to. - # example passing only required values which don't have defaults set try: # Get Head Member - api_response = api_instance.get_head_member(queue_id) + api_response = api_instance.get_head_member(account_id, queue_id) + print("The response of DefaultApi->get_head_member:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_head_member: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | + **account_id** | **str**| ID of the account | + **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | ### Return type @@ -1891,7 +1874,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1910,11 +1892,11 @@ Get a 10DLC SMS Brand * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -1935,25 +1917,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - brand_id = "brandId_example" # str | String that uniquely identifies this brand resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + brand_id = 'brand_id_example' # str | String that uniquely identifies this brand resource. - # example passing only required values which don't have defaults set try: # Get a 10DLC SMS Brand - api_response = api_instance.get_ten_dlc_sms_brand(brand_id) + api_response = api_instance.get_ten_dlc_sms_brand(account_id, brand_id) + print("The response of DefaultApi->get_ten_dlc_sms_brand:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_ten_dlc_sms_brand: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **brand_id** | **str**| String that uniquely identifies this brand resource. | + **account_id** | **str**| ID of the account | + **brand_id** | **str**| String that uniquely identifies this brand resource. | ### Return type @@ -1968,7 +1953,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -1987,11 +1971,11 @@ Get list of SMS 10DLC Brands * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult +from freeclimb.models.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2012,23 +1996,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account - # example passing only required values which don't have defaults set try: # Get list of SMS 10DLC Brands - api_response = api_instance.get_ten_dlc_sms_brands() + api_response = api_instance.get_ten_dlc_sms_brands(account_id) + print("The response of DefaultApi->get_ten_dlc_sms_brands:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_ten_dlc_sms_brands: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | ### Return type @@ -2043,7 +2030,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2062,11 +2048,11 @@ Get a 10DLC SMS Campaign * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2087,25 +2073,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - campaign_id = "campaignId_example" # str | String that uniquely identifies this campaign resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + campaign_id = 'campaign_id_example' # str | String that uniquely identifies this campaign resource. - # example passing only required values which don't have defaults set try: # Get a 10DLC SMS Campaign - api_response = api_instance.get_ten_dlc_sms_campaign(campaign_id) + api_response = api_instance.get_ten_dlc_sms_campaign(account_id, campaign_id) + print("The response of DefaultApi->get_ten_dlc_sms_campaign:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_ten_dlc_sms_campaign: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **campaign_id** | **str**| String that uniquely identifies this campaign resource. | + **account_id** | **str**| ID of the account | + **campaign_id** | **str**| String that uniquely identifies this campaign resource. | ### Return type @@ -2120,7 +2109,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2130,7 +2118,7 @@ Name | Type | Description | Notes [[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_ten_dlc_sms_campaigns** -> SMSTenDLCCampaignsListResult get_ten_dlc_sms_campaigns(account_id) +> SMSTenDLCCampaignsListResult get_ten_dlc_sms_campaigns(account_id, brand_id=brand_id) Get list of SMS 10DLC Campaigns @@ -2139,11 +2127,11 @@ Get list of SMS 10DLC Campaigns * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult +from freeclimb.models.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2164,34 +2152,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - brand_id = "brandId_example" # str | The unique identifier for a brand (optional) - - # example passing only required values which don't have defaults set - try: - # Get list of SMS 10DLC Campaigns - api_response = api_instance.get_ten_dlc_sms_campaigns() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->get_ten_dlc_sms_campaigns: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + brand_id = 'brand_id_example' # str | The unique identifier for a brand (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Get list of SMS 10DLC Campaigns - api_response = api_instance.get_ten_dlc_sms_campaigns(brand_id=brand_id) + api_response = api_instance.get_ten_dlc_sms_campaigns(account_id, brand_id=brand_id) + print("The response of DefaultApi->get_ten_dlc_sms_campaigns:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_ten_dlc_sms_campaigns: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **brand_id** | **str**| The unique identifier for a brand | [optional] + **account_id** | **str**| ID of the account | + **brand_id** | **str**| The unique identifier for a brand | [optional] ### Return type @@ -2206,7 +2188,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2225,11 +2206,11 @@ Get a 10DLC SMS Partner Campaign * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign +from freeclimb.models.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2250,25 +2231,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - campaign_id = "campaignId_example" # str | String that uniquely identifies this campaign resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + campaign_id = 'campaign_id_example' # str | String that uniquely identifies this campaign resource. - # example passing only required values which don't have defaults set try: # Get a 10DLC SMS Partner Campaign - api_response = api_instance.get_ten_dlc_sms_partner_campaign(campaign_id) + api_response = api_instance.get_ten_dlc_sms_partner_campaign(account_id, campaign_id) + print("The response of DefaultApi->get_ten_dlc_sms_partner_campaign:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_ten_dlc_sms_partner_campaign: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **campaign_id** | **str**| String that uniquely identifies this campaign resource. | + **account_id** | **str**| ID of the account | + **campaign_id** | **str**| String that uniquely identifies this campaign resource. | ### Return type @@ -2283,7 +2267,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2293,7 +2276,7 @@ Name | Type | Description | Notes [[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_ten_dlc_sms_partner_campaigns** -> SMSTenDLCPartnerCampaignsListResult get_ten_dlc_sms_partner_campaigns(account_id) +> SMSTenDLCPartnerCampaignsListResult get_ten_dlc_sms_partner_campaigns(account_id, brand_id=brand_id) Get list of SMS 10DLC Partner Campaigns @@ -2302,11 +2285,11 @@ Get list of SMS 10DLC Partner Campaigns * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2327,34 +2310,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - brand_id = "brandId_example" # str | The unique identifier for a brand (optional) - - # example passing only required values which don't have defaults set - try: - # Get list of SMS 10DLC Partner Campaigns - api_response = api_instance.get_ten_dlc_sms_partner_campaigns() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->get_ten_dlc_sms_partner_campaigns: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + brand_id = 'brand_id_example' # str | The unique identifier for a brand (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Get list of SMS 10DLC Partner Campaigns - api_response = api_instance.get_ten_dlc_sms_partner_campaigns(brand_id=brand_id) + api_response = api_instance.get_ten_dlc_sms_partner_campaigns(account_id, brand_id=brand_id) + print("The response of DefaultApi->get_ten_dlc_sms_partner_campaigns:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_ten_dlc_sms_partner_campaigns: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **brand_id** | **str**| The unique identifier for a brand | [optional] + **account_id** | **str**| ID of the account | + **brand_id** | **str**| The unique identifier for a brand | [optional] ### Return type @@ -2369,7 +2346,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2388,11 +2364,11 @@ Get a TollFree SMS Campaign * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign +from freeclimb.models.sms_toll_free_campaign import SMSTollFreeCampaign +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2413,25 +2389,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - campaign_id = "campaignId_example" # str | String that uniquely identifies this TollFree Campaign resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + campaign_id = 'campaign_id_example' # str | String that uniquely identifies this TollFree Campaign resource. - # example passing only required values which don't have defaults set try: # Get a TollFree SMS Campaign - api_response = api_instance.get_toll_free_sms_campaign(campaign_id) + api_response = api_instance.get_toll_free_sms_campaign(account_id, campaign_id) + print("The response of DefaultApi->get_toll_free_sms_campaign:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_toll_free_sms_campaign: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **campaign_id** | **str**| String that uniquely identifies this TollFree Campaign resource. | + **account_id** | **str**| ID of the account | + **campaign_id** | **str**| String that uniquely identifies this TollFree Campaign resource. | ### Return type @@ -2446,7 +2425,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2465,11 +2443,11 @@ Get list of TollFree Campaigns * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult +from freeclimb.models.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2490,23 +2468,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account - # example passing only required values which don't have defaults set try: # Get list of TollFree Campaigns - api_response = api_instance.get_toll_free_sms_campaigns() + api_response = api_instance.get_toll_free_sms_campaigns(account_id) + print("The response of DefaultApi->get_toll_free_sms_campaigns:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->get_toll_free_sms_campaigns: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | ### Return type @@ -2521,7 +2502,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2531,7 +2511,7 @@ Name | Type | Description | Notes [[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_active_queues** -> QueueList list_active_queues(account_id) +> QueueList list_active_queues(account_id, alias=alias) List Active Queues @@ -2540,11 +2520,11 @@ List Active Queues * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_list import QueueList +from freeclimb.models.queue_list import QueueList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2565,34 +2545,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - alias = "alias_example" # str | Return only the Queue resources with aliases that exactly match this name. (optional) - - # example passing only required values which don't have defaults set - try: - # List Active Queues - api_response = api_instance.list_active_queues() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_active_queues: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + alias = 'alias_example' # str | Return only the Queue resources with aliases that exactly match this name. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List Active Queues - api_response = api_instance.list_active_queues(alias=alias) + api_response = api_instance.list_active_queues(account_id, alias=alias) + print("The response of DefaultApi->list_active_queues:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_active_queues: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **alias** | **str**| Return only the Queue resources with aliases that exactly match this name. | [optional] + **account_id** | **str**| ID of the account | + **alias** | **str**| Return only the Queue resources with aliases that exactly match this name. | [optional] ### Return type @@ -2607,7 +2581,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2626,11 +2599,11 @@ List All Account Logs * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.log_list import LogList +from freeclimb.models.log_list import LogList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2651,23 +2624,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account - # example passing only required values which don't have defaults set try: # List All Account Logs - api_response = api_instance.list_all_account_logs() + api_response = api_instance.list_all_account_logs(account_id) + print("The response of DefaultApi->list_all_account_logs:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_all_account_logs: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | ### Return type @@ -2682,7 +2658,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2692,7 +2667,7 @@ Name | Type | Description | Notes [[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_applications** -> ApplicationList list_applications(account_id) +> ApplicationList list_applications(account_id, alias=alias) List applications @@ -2701,11 +2676,11 @@ List applications * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.application_list import ApplicationList +from freeclimb.models.application_list import ApplicationList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2726,34 +2701,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - alias = "alias_example" # str | Return only applications with aliases that exactly match this value. (optional) - - # example passing only required values which don't have defaults set - try: - # List applications - api_response = api_instance.list_applications() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_applications: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + alias = 'alias_example' # str | Return only applications with aliases that exactly match this value. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List applications - api_response = api_instance.list_applications(alias=alias) + api_response = api_instance.list_applications(account_id, alias=alias) + print("The response of DefaultApi->list_applications:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_applications: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **alias** | **str**| Return only applications with aliases that exactly match this value. | [optional] + **account_id** | **str**| ID of the account | + **alias** | **str**| Return only applications with aliases that exactly match this value. | [optional] ### Return type @@ -2768,7 +2737,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2778,7 +2746,7 @@ Name | Type | Description | Notes [[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_available_numbers** -> AvailableNumberList list_available_numbers() +> AvailableNumberList list_available_numbers(phone_number=phone_number, region=region, country=country, voice_enabled=voice_enabled, sms_enabled=sms_enabled, capabilities_voice=capabilities_voice, capabilities_sms=capabilities_sms, capabilities_toll_free=capabilities_toll_free, capabilities_ten_dlc=capabilities_ten_dlc, capabilities_short_code=capabilities_short_code) List available numbers @@ -2787,11 +2755,11 @@ List available numbers * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.available_number_list import AvailableNumberList +from freeclimb.models.available_number_list import AvailableNumberList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2812,43 +2780,44 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - phone_number = "phoneNumber_example" # str | PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - region = "region_example" # str | State or province of this phone number. (optional) - country = "country_example" # str | Country of this phone number. (optional) - voice_enabled = True # bool | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional) if omitted the server will use the default value of True - sms_enabled = True # bool | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional) if omitted the server will use the default value of True + api_instance = freeclimb.DefaultApi(api_client) + phone_number = 'phone_number_example' # str | PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) + region = 'region_example' # str | State or province of this phone number. (optional) + country = 'country_example' # str | Country of this phone number. (optional) + voice_enabled = True # bool | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional) (default to True) + sms_enabled = True # bool | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional) (default to True) capabilities_voice = True # bool | (optional) capabilities_sms = True # bool | (optional) capabilities_toll_free = True # bool | (optional) capabilities_ten_dlc = True # bool | (optional) capabilities_short_code = True # bool | (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List available numbers api_response = api_instance.list_available_numbers(phone_number=phone_number, region=region, country=country, voice_enabled=voice_enabled, sms_enabled=sms_enabled, capabilities_voice=capabilities_voice, capabilities_sms=capabilities_sms, capabilities_toll_free=capabilities_toll_free, capabilities_ten_dlc=capabilities_ten_dlc, capabilities_short_code=capabilities_short_code) + print("The response of DefaultApi->list_available_numbers:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_available_numbers: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **phone_number** | **str**| PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. | [optional] - **region** | **str**| State or province of this phone number. | [optional] - **country** | **str**| Country of this phone number. | [optional] - **voice_enabled** | **bool**| Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] if omitted the server will use the default value of True - **sms_enabled** | **bool**| Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] if omitted the server will use the default value of True - **capabilities_voice** | **bool**| | [optional] - **capabilities_sms** | **bool**| | [optional] - **capabilities_toll_free** | **bool**| | [optional] - **capabilities_ten_dlc** | **bool**| | [optional] - **capabilities_short_code** | **bool**| | [optional] + **phone_number** | **str**| PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. | [optional] + **region** | **str**| State or province of this phone number. | [optional] + **country** | **str**| Country of this phone number. | [optional] + **voice_enabled** | **bool**| Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] [default to True] + **sms_enabled** | **bool**| Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] [default to True] + **capabilities_voice** | **bool**| | [optional] + **capabilities_sms** | **bool**| | [optional] + **capabilities_toll_free** | **bool**| | [optional] + **capabilities_ten_dlc** | **bool**| | [optional] + **capabilities_short_code** | **bool**| | [optional] ### Return type @@ -2863,7 +2832,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2882,11 +2850,11 @@ List Call Logs * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.log_list import LogList +from freeclimb.models.log_list import LogList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2907,25 +2875,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - call_id = "callId_example" # str | String that uniquely identifies this call resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + call_id = 'call_id_example' # str | String that uniquely identifies this call resource. - # example passing only required values which don't have defaults set try: # List Call Logs - api_response = api_instance.list_call_logs(call_id) + api_response = api_instance.list_call_logs(account_id, call_id) + print("The response of DefaultApi->list_call_logs:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_call_logs: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **call_id** | **str**| String that uniquely identifies this call resource. | + **account_id** | **str**| ID of the account | + **call_id** | **str**| String that uniquely identifies this call resource. | ### Return type @@ -2940,7 +2911,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -2950,7 +2920,7 @@ Name | Type | Description | Notes [[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_call_recordings** -> RecordingList list_call_recordings(account_id, call_id) +> RecordingList list_call_recordings(account_id, call_id, date_created=date_created) List Call Recordings @@ -2959,11 +2929,11 @@ List Call Recordings * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.recording_list import RecordingList +from freeclimb.models.recording_list import RecordingList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -2984,36 +2954,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - call_id = "callId_example" # str | String that uniquely identifies this call resource. - date_created = "dateCreated_example" # str | Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - - # example passing only required values which don't have defaults set - try: - # List Call Recordings - api_response = api_instance.list_call_recordings(call_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_call_recordings: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + call_id = 'call_id_example' # str | String that uniquely identifies this call resource. + date_created = 'date_created_example' # str | Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List Call Recordings - api_response = api_instance.list_call_recordings(call_id, date_created=date_created) + api_response = api_instance.list_call_recordings(account_id, call_id, date_created=date_created) + print("The response of DefaultApi->list_call_recordings:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_call_recordings: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **call_id** | **str**| String that uniquely identifies this call resource. | - **date_created** | **str**| Only show recordings created on the specified date, in the form *YYYY-MM-DD*. | [optional] + **account_id** | **str**| ID of the account | + **call_id** | **str**| String that uniquely identifies this call resource. | + **date_created** | **str**| Only show recordings created on the specified date, in the form *YYYY-MM-DD*. | [optional] ### Return type @@ -3028,7 +2992,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3038,7 +3001,7 @@ Name | Type | Description | Notes [[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_calls** -> CallList list_calls(account_id) +> CallList list_calls(account_id, active=active, to=to, var_from=var_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id) List Calls @@ -3047,12 +3010,12 @@ List Calls * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.call_status import CallStatus -from freeclimb.model.call_list import CallList +from freeclimb.models.call_list import CallList +from freeclimb.models.call_status import CallStatus +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3073,50 +3036,42 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - active = False # bool | If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional) if omitted the server will use the default value of False - to = "to_example" # str | Only show Calls to this phone number. (optional) - _from = "from_example" # str | Only show Calls from this phone number. (optional) - status = CallStatus("queued") # CallStatus | Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - start_time = "startTime_example" # str | Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - end_time = "endTime_example" # str | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - parent_call_id = "parentCallId_example" # str | Only show Calls spawned by the call with this ID. (optional) - application_id = [ - "AP62ECB020842930cc01FFCCfeEe150AC32DcAEc8a", - ] # [str] | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - - # example passing only required values which don't have defaults set - try: - # List Calls - api_response = api_instance.list_calls() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_calls: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + active = False # bool | If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional) (default to False) + to = 'to_example' # str | Only show Calls to this phone number. (optional) + var_from = 'var_from_example' # str | Only show Calls from this phone number. (optional) + status = freeclimb.CallStatus() # CallStatus | Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) + start_time = 'start_time_example' # str | Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) + end_time = 'end_time_example' # str | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) + parent_call_id = 'parent_call_id_example' # str | Only show Calls spawned by the call with this ID. (optional) + application_id = ['application_id_example'] # List[str] | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List Calls - api_response = api_instance.list_calls(active=active, to=to, _from=_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id) + api_response = api_instance.list_calls(account_id, active=active, to=to, var_from=var_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id) + print("The response of DefaultApi->list_calls:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_calls: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **active** | **bool**| If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. | [optional] if omitted the server will use the default value of False - **to** | **str**| Only show Calls to this phone number. | [optional] - **_from** | **str**| Only show Calls from this phone number. | [optional] - **status** | **CallStatus**| Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. | [optional] - **start_time** | **str**| Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. | [optional] - **end_time** | **str**| Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional] - **parent_call_id** | **str**| Only show Calls spawned by the call with this ID. | [optional] - **application_id** | **[str]**| Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional] + **account_id** | **str**| ID of the account | + **active** | **bool**| If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. | [optional] [default to False] + **to** | **str**| Only show Calls to this phone number. | [optional] + **var_from** | **str**| Only show Calls from this phone number. | [optional] + **status** | [**CallStatus**](.md)| Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. | [optional] + **start_time** | **str**| Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. | [optional] + **end_time** | **str**| Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional] + **parent_call_id** | **str**| Only show Calls spawned by the call with this ID. | [optional] + **application_id** | [**List[str]**](str.md)| Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional] ### Return type @@ -3131,7 +3086,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3141,7 +3095,7 @@ Name | Type | Description | Notes [[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_conference_recordings** -> RecordingList list_conference_recordings(account_id, conference_id) +> RecordingList list_conference_recordings(account_id, conference_id, call_id=call_id, date_created=date_created) List Conference Recordings @@ -3150,11 +3104,11 @@ List Conference Recordings * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.recording_list import RecordingList +from freeclimb.models.recording_list import RecordingList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3175,38 +3129,32 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | Show only Recordings made during the conference with this ID. - call_id = "callId_example" # str | Show only Recordings made during the Call with this ID. (optional) - date_created = "dateCreated_example" # str | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | Show only Recordings made during the conference with this ID. + call_id = 'call_id_example' # str | Show only Recordings made during the Call with this ID. (optional) + date_created = 'date_created_example' # str | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - # example passing only required values which don't have defaults set try: # List Conference Recordings - api_response = api_instance.list_conference_recordings(conference_id) + api_response = api_instance.list_conference_recordings(account_id, conference_id, call_id=call_id, date_created=date_created) + print("The response of DefaultApi->list_conference_recordings:\n") pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_conference_recordings: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # List Conference Recordings - api_response = api_instance.list_conference_recordings(conference_id, call_id=call_id, date_created=date_created) - pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_conference_recordings: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| Show only Recordings made during the conference with this ID. | - **call_id** | **str**| Show only Recordings made during the Call with this ID. | [optional] - **date_created** | **str**| Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] + **account_id** | **str**| ID of the account | + **conference_id** | **str**| Show only Recordings made during the conference with this ID. | + **call_id** | **str**| Show only Recordings made during the Call with this ID. | [optional] + **date_created** | **str**| Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] ### Return type @@ -3221,7 +3169,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3231,7 +3178,7 @@ Name | Type | Description | Notes [[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_conferences** -> ConferenceList list_conferences(account_id) +> ConferenceList list_conferences(account_id, status=status, alias=alias, date_created=date_created, date_updated=date_updated) List Conferences @@ -3240,11 +3187,11 @@ List Conferences * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.conference_list import ConferenceList +from freeclimb.models.conference_list import ConferenceList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3265,40 +3212,34 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - status = "status_example" # str | Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - alias = "alias_example" # str | List Conferences whose alias exactly matches this string. (optional) - date_created = "dateCreated_example" # str | Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - date_updated = "dateUpdated_example" # str | Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - - # example passing only required values which don't have defaults set - try: - # List Conferences - api_response = api_instance.list_conferences() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_conferences: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + status = 'status_example' # str | Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) + alias = 'alias_example' # str | List Conferences whose alias exactly matches this string. (optional) + date_created = 'date_created_example' # str | Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) + date_updated = 'date_updated_example' # str | Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # List Conferences - api_response = api_instance.list_conferences(status=status, alias=alias, date_created=date_created, date_updated=date_updated) + api_response = api_instance.list_conferences(account_id, status=status, alias=alias, date_created=date_created, date_updated=date_updated) + print("The response of DefaultApi->list_conferences:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_conferences: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **status** | **str**| Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. | [optional] - **alias** | **str**| List Conferences whose alias exactly matches this string. | [optional] - **date_created** | **str**| Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. | [optional] - **date_updated** | **str**| Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. | [optional] + **account_id** | **str**| ID of the account | + **status** | **str**| Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. | [optional] + **alias** | **str**| List Conferences whose alias exactly matches this string. | [optional] + **date_created** | **str**| Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. | [optional] + **date_updated** | **str**| Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. | [optional] ### Return type @@ -3313,7 +3254,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3323,7 +3263,7 @@ Name | Type | Description | Notes [[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_incoming_numbers** -> IncomingNumberList list_incoming_numbers(account_id) +> IncomingNumberList list_incoming_numbers(account_id, phone_number=phone_number, alias=alias, region=region, country=country, application_id=application_id, has_application=has_application, voice_enabled=voice_enabled, sms_enabled=sms_enabled, has_campaign=has_campaign, capabilities_voice=capabilities_voice, capabilities_sms=capabilities_sms, capabilities_toll_free=capabilities_toll_free, capabilities_ten_dlc=capabilities_ten_dlc, capabilities_short_code=capabilities_short_code, tfn_campaign_id=tfn_campaign_id, offnet=offnet) List Incoming Numbers @@ -3332,11 +3272,11 @@ List Incoming Numbers * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.incoming_number_list import IncomingNumberList +from freeclimb.models.incoming_number_list import IncomingNumberList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3357,64 +3297,58 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - phone_number = "phoneNumber_example" # str | Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - alias = "alias_example" # str | Only show incoming phone numbers with aliases that exactly match this value. (optional) - region = "region_example" # str | State or province of this phone number. (optional) - country = "country_example" # str | Country of this phone number. (optional) - application_id = "applicationId_example" # str | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. (optional) - has_application = False # bool | Indication of whether the phone number has an application linked to it. (optional) if omitted the server will use the default value of False - voice_enabled = True # bool | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional) if omitted the server will use the default value of True - sms_enabled = True # bool | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional) if omitted the server will use the default value of True + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + phone_number = 'phone_number_example' # str | Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) + alias = 'alias_example' # str | Only show incoming phone numbers with aliases that exactly match this value. (optional) + region = 'region_example' # str | State or province of this phone number. (optional) + country = 'country_example' # str | Country of this phone number. (optional) + application_id = 'application_id_example' # str | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. (optional) + has_application = False # bool | Indication of whether the phone number has an application linked to it. (optional) (default to False) + voice_enabled = True # bool | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional) (default to True) + sms_enabled = True # bool | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional) (default to True) has_campaign = True # bool | Indication of whether the phone number has a campaign associated with it (optional) capabilities_voice = True # bool | (optional) capabilities_sms = True # bool | (optional) capabilities_toll_free = True # bool | (optional) capabilities_ten_dlc = True # bool | (optional) capabilities_short_code = True # bool | (optional) - tfn_campaign_id = "tfn.campaignId_example" # str | Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) + tfn_campaign_id = 'tfn_campaign_id_example' # str | Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) offnet = True # bool | Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. (optional) - # example passing only required values which don't have defaults set try: # List Incoming Numbers - api_response = api_instance.list_incoming_numbers() + api_response = api_instance.list_incoming_numbers(account_id, phone_number=phone_number, alias=alias, region=region, country=country, application_id=application_id, has_application=has_application, voice_enabled=voice_enabled, sms_enabled=sms_enabled, has_campaign=has_campaign, capabilities_voice=capabilities_voice, capabilities_sms=capabilities_sms, capabilities_toll_free=capabilities_toll_free, capabilities_ten_dlc=capabilities_ten_dlc, capabilities_short_code=capabilities_short_code, tfn_campaign_id=tfn_campaign_id, offnet=offnet) + print("The response of DefaultApi->list_incoming_numbers:\n") pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_incoming_numbers: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # List Incoming Numbers - api_response = api_instance.list_incoming_numbers(phone_number=phone_number, alias=alias, region=region, country=country, application_id=application_id, has_application=has_application, voice_enabled=voice_enabled, sms_enabled=sms_enabled, has_campaign=has_campaign, capabilities_voice=capabilities_voice, capabilities_sms=capabilities_sms, capabilities_toll_free=capabilities_toll_free, capabilities_ten_dlc=capabilities_ten_dlc, capabilities_short_code=capabilities_short_code, tfn_campaign_id=tfn_campaign_id, offnet=offnet) - pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_incoming_numbers: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **phone_number** | **str**| Only show incoming phone number resources that match this PCRE-compatible regular expression. | [optional] - **alias** | **str**| Only show incoming phone numbers with aliases that exactly match this value. | [optional] - **region** | **str**| State or province of this phone number. | [optional] - **country** | **str**| Country of this phone number. | [optional] - **application_id** | **str**| ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] - **has_application** | **bool**| Indication of whether the phone number has an application linked to it. | [optional] if omitted the server will use the default value of False - **voice_enabled** | **bool**| Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] if omitted the server will use the default value of True - **sms_enabled** | **bool**| Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] if omitted the server will use the default value of True - **has_campaign** | **bool**| Indication of whether the phone number has a campaign associated with it | [optional] - **capabilities_voice** | **bool**| | [optional] - **capabilities_sms** | **bool**| | [optional] - **capabilities_toll_free** | **bool**| | [optional] - **capabilities_ten_dlc** | **bool**| | [optional] - **capabilities_short_code** | **bool**| | [optional] - **tfn_campaign_id** | **str**| Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. | [optional] - **offnet** | **bool**| Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. | [optional] + **account_id** | **str**| ID of the account | + **phone_number** | **str**| Only show incoming phone number resources that match this PCRE-compatible regular expression. | [optional] + **alias** | **str**| Only show incoming phone numbers with aliases that exactly match this value. | [optional] + **region** | **str**| State or province of this phone number. | [optional] + **country** | **str**| Country of this phone number. | [optional] + **application_id** | **str**| ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] + **has_application** | **bool**| Indication of whether the phone number has an application linked to it. | [optional] [default to False] + **voice_enabled** | **bool**| Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] [default to True] + **sms_enabled** | **bool**| Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] [default to True] + **has_campaign** | **bool**| Indication of whether the phone number has a campaign associated with it | [optional] + **capabilities_voice** | **bool**| | [optional] + **capabilities_sms** | **bool**| | [optional] + **capabilities_toll_free** | **bool**| | [optional] + **capabilities_ten_dlc** | **bool**| | [optional] + **capabilities_short_code** | **bool**| | [optional] + **tfn_campaign_id** | **str**| Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. | [optional] + **offnet** | **bool**| Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. | [optional] ### Return type @@ -3429,7 +3363,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3448,11 +3381,11 @@ List Members * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_member_list import QueueMemberList +from freeclimb.models.queue_member_list import QueueMemberList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3473,25 +3406,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | String that uniquely identifies the Queue that the Member belongs to. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | String that uniquely identifies the Queue that the Member belongs to. - # example passing only required values which don't have defaults set try: # List Members - api_response = api_instance.list_members(queue_id) + api_response = api_instance.list_members(account_id, queue_id) + print("The response of DefaultApi->list_members:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_members: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | + **account_id** | **str**| ID of the account | + **queue_id** | **str**| String that uniquely identifies the Queue that the Member belongs to. | ### Return type @@ -3506,7 +3442,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3516,7 +3451,7 @@ Name | Type | Description | Notes [[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_participants** -> ConferenceParticipantList list_participants(account_id, conference_id) +> ConferenceParticipantList list_participants(account_id, conference_id, talk=talk, listen=listen, dtmf_pass_through=dtmf_pass_through) List Participants @@ -3525,11 +3460,11 @@ List Participants * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.conference_participant_list import ConferenceParticipantList +from freeclimb.models.conference_participant_list import ConferenceParticipantList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3550,40 +3485,34 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | ID of the conference this participant is in. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | ID of the conference this participant is in. talk = True # bool | Only show Participants with the talk privilege. (optional) listen = True # bool | Only show Participants with the listen privilege. (optional) dtmf_pass_through = True # bool | Only show Participants with the dtmfPassThrough privilege. (optional) - # example passing only required values which don't have defaults set - try: - # List Participants - api_response = api_instance.list_participants(conference_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_participants: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List Participants - api_response = api_instance.list_participants(conference_id, talk=talk, listen=listen, dtmf_pass_through=dtmf_pass_through) + api_response = api_instance.list_participants(account_id, conference_id, talk=talk, listen=listen, dtmf_pass_through=dtmf_pass_through) + print("The response of DefaultApi->list_participants:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_participants: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| ID of the conference this participant is in. | - **talk** | **bool**| Only show Participants with the talk privilege. | [optional] - **listen** | **bool**| Only show Participants with the listen privilege. | [optional] - **dtmf_pass_through** | **bool**| Only show Participants with the dtmfPassThrough privilege. | [optional] + **account_id** | **str**| ID of the account | + **conference_id** | **str**| ID of the conference this participant is in. | + **talk** | **bool**| Only show Participants with the talk privilege. | [optional] + **listen** | **bool**| Only show Participants with the listen privilege. | [optional] + **dtmf_pass_through** | **bool**| Only show Participants with the dtmfPassThrough privilege. | [optional] ### Return type @@ -3598,7 +3527,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3608,7 +3536,7 @@ Name | Type | Description | Notes [[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_recordings** -> RecordingList list_recordings(account_id) +> RecordingList list_recordings(account_id, call_id=call_id, conference_id=conference_id, date_created=date_created) List Recordings @@ -3617,11 +3545,11 @@ List Recordings * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.recording_list import RecordingList +from freeclimb.models.recording_list import RecordingList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3642,38 +3570,32 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - call_id = "callId_example" # str | Show only Recordings made during the Call with this ID. (optional) - conference_id = "conferenceId_example" # str | Show only Recordings made during the conference with this ID. (optional) - date_created = "dateCreated_example" # str | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + call_id = 'call_id_example' # str | Show only Recordings made during the Call with this ID. (optional) + conference_id = 'conference_id_example' # str | Show only Recordings made during the conference with this ID. (optional) + date_created = 'date_created_example' # str | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - # example passing only required values which don't have defaults set try: # List Recordings - api_response = api_instance.list_recordings() + api_response = api_instance.list_recordings(account_id, call_id=call_id, conference_id=conference_id, date_created=date_created) + print("The response of DefaultApi->list_recordings:\n") pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_recordings: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # List Recordings - api_response = api_instance.list_recordings(call_id=call_id, conference_id=conference_id, date_created=date_created) - pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_recordings: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **call_id** | **str**| Show only Recordings made during the Call with this ID. | [optional] - **conference_id** | **str**| Show only Recordings made during the conference with this ID. | [optional] - **date_created** | **str**| Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] + **account_id** | **str**| ID of the account | + **call_id** | **str**| Show only Recordings made during the Call with this ID. | [optional] + **conference_id** | **str**| Show only Recordings made during the conference with this ID. | [optional] + **date_created** | **str**| Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] ### Return type @@ -3688,7 +3610,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3698,7 +3619,7 @@ Name | Type | Description | Notes [[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_sms_messages** -> MessagesList list_sms_messages(account_id) +> MessagesList list_sms_messages(account_id, to=to, var_from=var_from, begin_time=begin_time, end_time=end_time, direction=direction, campaign_id=campaign_id, brand_id=brand_id, is10_dlc=is10_dlc) List SMS Messages @@ -3707,12 +3628,12 @@ List SMS Messages * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.message_direction import MessageDirection -from freeclimb.model.messages_list import MessagesList +from freeclimb.models.message_direction import MessageDirection +from freeclimb.models.messages_list import MessagesList +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3733,48 +3654,42 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - to = "to_example" # str | Only show Messages to this phone number. (optional) - _from = "from_example" # str | Only show Messages from this phone number. (optional) - begin_time = "beginTime_example" # str | Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - end_time = "endTime_example" # str | Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - direction = MessageDirection("inbound") # MessageDirection | Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - campaign_id = "campaignId_example" # str | Only show messages associated with this campaign ID. (optional) - brand_id = "brandId_example" # str | Only show messages associated with this brand ID (optional) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + to = 'to_example' # str | Only show Messages to this phone number. (optional) + var_from = 'var_from_example' # str | Only show Messages from this phone number. (optional) + begin_time = 'begin_time_example' # str | Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) + end_time = 'end_time_example' # str | Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) + direction = freeclimb.MessageDirection() # MessageDirection | Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) + campaign_id = 'campaign_id_example' # str | Only show messages associated with this campaign ID. (optional) + brand_id = 'brand_id_example' # str | Only show messages associated with this brand ID (optional) is10_dlc = True # bool | Only show messages that were sent as part of a 10DLC campaign. (optional) - # example passing only required values which don't have defaults set - try: - # List SMS Messages - api_response = api_instance.list_sms_messages() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_sms_messages: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values try: # List SMS Messages - api_response = api_instance.list_sms_messages(to=to, _from=_from, begin_time=begin_time, end_time=end_time, direction=direction, campaign_id=campaign_id, brand_id=brand_id, is10_dlc=is10_dlc) + api_response = api_instance.list_sms_messages(account_id, to=to, var_from=var_from, begin_time=begin_time, end_time=end_time, direction=direction, campaign_id=campaign_id, brand_id=brand_id, is10_dlc=is10_dlc) + print("The response of DefaultApi->list_sms_messages:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->list_sms_messages: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **to** | **str**| Only show Messages to this phone number. | [optional] - **_from** | **str**| Only show Messages from this phone number. | [optional] - **begin_time** | **str**| Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. | [optional] - **end_time** | **str**| Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. | [optional] - **direction** | **MessageDirection**| Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. | [optional] - **campaign_id** | **str**| Only show messages associated with this campaign ID. | [optional] - **brand_id** | **str**| Only show messages associated with this brand ID | [optional] - **is10_dlc** | **bool**| Only show messages that were sent as part of a 10DLC campaign. | [optional] + **account_id** | **str**| ID of the account | + **to** | **str**| Only show Messages to this phone number. | [optional] + **var_from** | **str**| Only show Messages from this phone number. | [optional] + **begin_time** | **str**| Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. | [optional] + **end_time** | **str**| Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. | [optional] + **direction** | [**MessageDirection**](.md)| Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. | [optional] + **campaign_id** | **str**| Only show messages associated with this campaign ID. | [optional] + **brand_id** | **str**| Only show messages associated with this brand ID | [optional] + **is10_dlc** | **bool**| Only show messages that were sent as part of a 10DLC campaign. | [optional] ### Return type @@ -3789,7 +3704,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3799,7 +3713,7 @@ Name | Type | Description | Notes [[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) # **make_a_call** -> CallResult make_a_call(account_id) +> CallResult make_a_call(account_id, make_call_request=make_call_request) Make a Call @@ -3808,12 +3722,12 @@ Make a Call * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.call_result import CallResult +from freeclimb.models.call_result import CallResult +from freeclimb.models.make_call_request import MakeCallRequest +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3834,45 +3748,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - make_call_request = MakeCallRequest( - _from="_from_example", - to="to_example", - application_id="application_id_example", - send_digits="send_digits_example", - if_machine="if_machine_example", - if_machine_url="if_machine_url_example", - timeout=30, - parent_call_id="parent_call_id_example", - privacy_mode=True, - call_connect_url="call_connect_url_example", - ) # MakeCallRequest | Call details for making a call (optional) - - # example passing only required values which don't have defaults set - try: - # Make a Call - api_response = api_instance.make_a_call() - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->make_a_call: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + make_call_request = freeclimb.MakeCallRequest() # MakeCallRequest | Call details for making a call (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Make a Call - api_response = api_instance.make_a_call(make_call_request=make_call_request) + api_response = api_instance.make_a_call(account_id, make_call_request=make_call_request) + print("The response of DefaultApi->make_a_call:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->make_a_call: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **make_call_request** | [**MakeCallRequest**](MakeCallRequest.md)| Call details for making a call | [optional] + **account_id** | **str**| ID of the account | + **make_call_request** | [**MakeCallRequest**](MakeCallRequest.md)| Call details for making a call | [optional] ### Return type @@ -3887,7 +3784,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -3906,11 +3802,11 @@ Make a JWT for WebRTC calling * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.create_web_rtc_token import CreateWebRTCToken +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -3931,29 +3827,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - create_web_rtc_token = CreateWebRTCToken( - to="to_example", - _from="_from_example", - uses=1, - ) # CreateWebRTCToken | Information needed to craft a JWT compatible with the platforms WebRTC APIs - - # example passing only required values which don't have defaults set + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + create_web_rtc_token = freeclimb.CreateWebRTCToken() # CreateWebRTCToken | Information needed to craft a JWT compatible with the platforms WebRTC APIs + try: # Make a JWT for WebRTC calling - api_response = api_instance.make_a_webrtc_jwt(create_web_rtc_token) + api_response = api_instance.make_a_webrtc_jwt(account_id, create_web_rtc_token) + print("The response of DefaultApi->make_a_webrtc_jwt:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->make_a_webrtc_jwt: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_web_rtc_token** | [**CreateWebRTCToken**](CreateWebRTCToken.md)| Information needed to craft a JWT compatible with the platforms WebRTC APIs | + **account_id** | **str**| ID of the account | + **create_web_rtc_token** | [**CreateWebRTCToken**](CreateWebRTCToken.md)| Information needed to craft a JWT compatible with the platforms WebRTC APIs | ### Return type @@ -3968,7 +3863,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: text/plain - ### HTTP response details | Status code | Description | Response headers | @@ -3987,10 +3881,10 @@ Remove a Participant * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4011,26 +3905,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | ID of the conference this participant is in. - call_id = "callId_example" # str | ID of the Call associated with this participant. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | ID of the conference this participant is in. + call_id = 'call_id_example' # str | ID of the Call associated with this participant. - # example passing only required values which don't have defaults set try: # Remove a Participant - api_instance.remove_a_participant(conference_id, call_id) - except freeclimb.ApiException as e: + api_instance.remove_a_participant(account_id, conference_id, call_id) + except Exception as e: print("Exception when calling DefaultApi->remove_a_participant: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| ID of the conference this participant is in. | - **call_id** | **str**| ID of the Call associated with this participant. | + **account_id** | **str**| ID of the account | + **conference_id** | **str**| ID of the conference this participant is in. | + **call_id** | **str**| ID of the Call associated with this participant. | ### Return type @@ -4045,7 +3941,6 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -4064,12 +3959,12 @@ Send an SMS Message * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.message_result import MessageResult -from freeclimb.model.message_request import MessageRequest +from freeclimb.models.message_request import MessageRequest +from freeclimb.models.message_result import MessageResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4090,25 +3985,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - message_request = MessageRequest(None) # MessageRequest | Details to create a message + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + message_request = freeclimb.MessageRequest() # MessageRequest | Details to create a message - # example passing only required values which don't have defaults set try: # Send an SMS Message - api_response = api_instance.send_an_sms_message(message_request) + api_response = api_instance.send_an_sms_message(account_id, message_request) + print("The response of DefaultApi->send_an_sms_message:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->send_an_sms_message: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **message_request** | [**MessageRequest**](MessageRequest.md)| Details to create a message | + **account_id** | **str**| ID of the account | + **message_request** | [**MessageRequest**](MessageRequest.md)| Details to create a message | ### Return type @@ -4123,7 +4021,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -4133,7 +4030,7 @@ Name | Type | Description | Notes [[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) # **stream_a_recording_file** -> file_type stream_a_recording_file(account_id, recording_id) +> bytearray stream_a_recording_file(account_id, recording_id) Stream a Recording File @@ -4142,10 +4039,10 @@ Stream a Recording File * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4166,29 +4063,32 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - recording_id = "recordingId_example" # str | String that uniquely identifies this recording resource. + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + recording_id = 'recording_id_example' # str | String that uniquely identifies this recording resource. - # example passing only required values which don't have defaults set try: # Stream a Recording File - api_response = api_instance.stream_a_recording_file(recording_id) + api_response = api_instance.stream_a_recording_file(account_id, recording_id) + print("The response of DefaultApi->stream_a_recording_file:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->stream_a_recording_file: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **recording_id** | **str**| String that uniquely identifies this recording resource. | + **account_id** | **str**| ID of the account | + **recording_id** | **str**| String that uniquely identifies this recording resource. | ### Return type -**file_type** +**bytearray** ### Authorization @@ -4199,7 +4099,6 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: audio/x-wav - ### HTTP response details | Status code | Description | Response headers | @@ -4209,7 +4108,7 @@ Name | Type | Description | Notes [[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_a_conference** -> update_a_conference(account_id, conference_id) +> update_a_conference(account_id, conference_id, update_conference_request=update_conference_request) Update a Conference @@ -4218,11 +4117,11 @@ Update a Conference * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.update_conference_request import UpdateConferenceRequest +from freeclimb.models.update_conference_request import UpdateConferenceRequest +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4243,38 +4142,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | String that uniquely identifies this conference resource. - update_conference_request = UpdateConferenceRequest( - alias="alias_example", - play_beep=PlayBeep("always"), - status=UpdateConferenceRequestStatus("empty"), - ) # UpdateConferenceRequest | Conference Details to update (optional) - - # example passing only required values which don't have defaults set - try: - # Update a Conference - api_instance.update_a_conference(conference_id) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->update_a_conference: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | String that uniquely identifies this conference resource. + update_conference_request = freeclimb.UpdateConferenceRequest() # UpdateConferenceRequest | Conference Details to update (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Update a Conference - api_instance.update_a_conference(conference_id, update_conference_request=update_conference_request) - except freeclimb.ApiException as e: + api_instance.update_a_conference(account_id, conference_id, update_conference_request=update_conference_request) + except Exception as e: print("Exception when calling DefaultApi->update_a_conference: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| String that uniquely identifies this conference resource. | - **update_conference_request** | [**UpdateConferenceRequest**](UpdateConferenceRequest.md)| Conference Details to update | [optional] + **account_id** | **str**| ID of the account | + **conference_id** | **str**| String that uniquely identifies this conference resource. | + **update_conference_request** | [**UpdateConferenceRequest**](UpdateConferenceRequest.md)| Conference Details to update | [optional] ### Return type @@ -4289,7 +4178,6 @@ void (empty response body) - **Content-Type**: application/json - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -4308,11 +4196,11 @@ Update a Live Call * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.update_call_request import UpdateCallRequest +from freeclimb.models.update_call_request import UpdateCallRequest +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4333,28 +4221,28 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - call_id = "callId_example" # str | String that uniquely identifies this call resource. - update_call_request = UpdateCallRequest( - status=UpdateCallRequestStatus("canceled"), - ) # UpdateCallRequest | Call details to update - - # example passing only required values which don't have defaults set + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + call_id = 'call_id_example' # str | String that uniquely identifies this call resource. + update_call_request = freeclimb.UpdateCallRequest() # UpdateCallRequest | Call details to update + try: # Update a Live Call - api_instance.update_a_live_call(call_id, update_call_request) - except freeclimb.ApiException as e: + api_instance.update_a_live_call(account_id, call_id, update_call_request) + except Exception as e: print("Exception when calling DefaultApi->update_a_live_call: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **call_id** | **str**| String that uniquely identifies this call resource. | - **update_call_request** | [**UpdateCallRequest**](UpdateCallRequest.md)| Call details to update | + **account_id** | **str**| ID of the account | + **call_id** | **str**| String that uniquely identifies this call resource. | + **update_call_request** | [**UpdateCallRequest**](UpdateCallRequest.md)| Call details to update | ### Return type @@ -4369,7 +4257,6 @@ void (empty response body) - **Content-Type**: application/json - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -4379,7 +4266,7 @@ void (empty response body) [[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_a_participant** -> ConferenceParticipantResult update_a_participant(account_id, conference_id, call_id) +> ConferenceParticipantResult update_a_participant(account_id, conference_id, call_id, update_conference_participant_request=update_conference_participant_request) Update a Participant @@ -4388,12 +4275,12 @@ Update a Participant * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.conference_participant_result import ConferenceParticipantResult +from freeclimb.models.conference_participant_result import ConferenceParticipantResult +from freeclimb.models.update_conference_participant_request import UpdateConferenceParticipantRequest +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4414,42 +4301,32 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - conference_id = "conferenceId_example" # str | ID of the conference this participant is in. - call_id = "callId_example" # str | ID of the Call associated with this participant. - update_conference_participant_request = UpdateConferenceParticipantRequest( - talk=True, - listen=True, - dtmf_pass_through=True, - ) # UpdateConferenceParticipantRequest | Conference participant details to update (optional) - - # example passing only required values which don't have defaults set - try: - # Update a Participant - api_response = api_instance.update_a_participant(conference_id, call_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->update_a_participant: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + conference_id = 'conference_id_example' # str | ID of the conference this participant is in. + call_id = 'call_id_example' # str | ID of the Call associated with this participant. + update_conference_participant_request = freeclimb.UpdateConferenceParticipantRequest() # UpdateConferenceParticipantRequest | Conference participant details to update (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Update a Participant - api_response = api_instance.update_a_participant(conference_id, call_id, update_conference_participant_request=update_conference_participant_request) + api_response = api_instance.update_a_participant(account_id, conference_id, call_id, update_conference_participant_request=update_conference_participant_request) + print("The response of DefaultApi->update_a_participant:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->update_a_participant: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **conference_id** | **str**| ID of the conference this participant is in. | - **call_id** | **str**| ID of the Call associated with this participant. | - **update_conference_participant_request** | [**UpdateConferenceParticipantRequest**](UpdateConferenceParticipantRequest.md)| Conference participant details to update | [optional] + **account_id** | **str**| ID of the account | + **conference_id** | **str**| ID of the conference this participant is in. | + **call_id** | **str**| ID of the Call associated with this participant. | + **update_conference_participant_request** | [**UpdateConferenceParticipantRequest**](UpdateConferenceParticipantRequest.md)| Conference participant details to update | [optional] ### Return type @@ -4464,7 +4341,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -4474,7 +4350,7 @@ Name | Type | Description | Notes [[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_a_queue** -> QueueResult update_a_queue(account_id, queue_id) +> QueueResult update_a_queue(account_id, queue_id, queue_request=queue_request) Update a Queue @@ -4483,12 +4359,12 @@ Update a Queue * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.queue_request import QueueRequest +from freeclimb.models.queue_request import QueueRequest +from freeclimb.models.queue_result import QueueResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4509,39 +4385,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - queue_id = "queueId_example" # str | A string that uniquely identifies this Queue resource. - queue_request = QueueRequest( - alias="alias_example", - max_size=100, - ) # QueueRequest | Queue Details to update (optional) - - # example passing only required values which don't have defaults set - try: - # Update a Queue - api_response = api_instance.update_a_queue(queue_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->update_a_queue: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + queue_id = 'queue_id_example' # str | A string that uniquely identifies this Queue resource. + queue_request = freeclimb.QueueRequest() # QueueRequest | Queue Details to update (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Update a Queue - api_response = api_instance.update_a_queue(queue_id, queue_request=queue_request) + api_response = api_instance.update_a_queue(account_id, queue_id, queue_request=queue_request) + print("The response of DefaultApi->update_a_queue:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->update_a_queue: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queue_id** | **str**| A string that uniquely identifies this Queue resource. | - **queue_request** | [**QueueRequest**](QueueRequest.md)| Queue Details to update | [optional] + **account_id** | **str**| ID of the account | + **queue_id** | **str**| A string that uniquely identifies this Queue resource. | + **queue_request** | [**QueueRequest**](QueueRequest.md)| Queue Details to update | [optional] ### Return type @@ -4556,7 +4423,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -4566,7 +4432,7 @@ Name | Type | Description | Notes [[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_an_account** -> update_an_account(account_id) +> update_an_account(account_id, account_request=account_request) Manage an account @@ -4575,11 +4441,11 @@ Manage an account * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.account_request import AccountRequest +from freeclimb.models.account_request import AccountRequest +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4600,35 +4466,26 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - account_request = AccountRequest( - alias="alias_example", - label="label_example", - ) # AccountRequest | Account details to update (optional) - - # example passing only required values which don't have defaults set - try: - # Manage an account - api_instance.update_an_account() - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->update_an_account: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + account_request = freeclimb.AccountRequest() # AccountRequest | Account details to update (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Manage an account - api_instance.update_an_account(account_request=account_request) - except freeclimb.ApiException as e: + api_instance.update_an_account(account_id, account_request=account_request) + except Exception as e: print("Exception when calling DefaultApi->update_an_account: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **account_request** | [**AccountRequest**](AccountRequest.md)| Account details to update | [optional] + **account_id** | **str**| ID of the account | + **account_request** | [**AccountRequest**](AccountRequest.md)| Account details to update | [optional] ### Return type @@ -4643,7 +4500,6 @@ void (empty response body) - **Content-Type**: application/json - **Accept**: Not defined - ### HTTP response details | Status code | Description | Response headers | @@ -4653,7 +4509,7 @@ void (empty response body) [[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_an_application** -> ApplicationResult update_an_application(account_id, application_id) +> ApplicationResult update_an_application(account_id, application_id, application_request=application_request) Update an application @@ -4662,12 +4518,12 @@ Update an application * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult +from freeclimb.models.application_request import ApplicationRequest +from freeclimb.models.application_result import ApplicationResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4688,44 +4544,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - application_id = "applicationId_example" # str | A string that uniquely identifies this application resource. - application_request = ApplicationRequest( - alias="alias_example", - voice_url="voice_url_example", - voice_fallback_url="voice_fallback_url_example", - call_connect_url="call_connect_url_example", - status_callback_url="status_callback_url_example", - sms_url="sms_url_example", - sms_fallback_url="sms_fallback_url_example", - ) # ApplicationRequest | Application details to update. (optional) - - # example passing only required values which don't have defaults set - try: - # Update an application - api_response = api_instance.update_an_application(application_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->update_an_application: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + application_id = 'application_id_example' # str | A string that uniquely identifies this application resource. + application_request = freeclimb.ApplicationRequest() # ApplicationRequest | Application details to update. (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Update an application - api_response = api_instance.update_an_application(application_id, application_request=application_request) + api_response = api_instance.update_an_application(account_id, application_id, application_request=application_request) + print("The response of DefaultApi->update_an_application:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->update_an_application: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **application_id** | **str**| A string that uniquely identifies this application resource. | - **application_request** | [**ApplicationRequest**](ApplicationRequest.md)| Application details to update. | [optional] + **account_id** | **str**| ID of the account | + **application_id** | **str**| A string that uniquely identifies this application resource. | + **application_request** | [**ApplicationRequest**](ApplicationRequest.md)| Application details to update. | [optional] ### Return type @@ -4740,7 +4582,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -4750,7 +4591,7 @@ Name | Type | Description | Notes [[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_an_incoming_number** -> IncomingNumberResult update_an_incoming_number(account_id, phone_number_id) +> IncomingNumberResult update_an_incoming_number(account_id, phone_number_id, incoming_number_request=incoming_number_request) Update an Incoming Number @@ -4759,12 +4600,12 @@ Update an Incoming Number * Basic Authentication (fc): ```python -import time import freeclimb -from freeclimb.api import default_api -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.incoming_number_request import IncomingNumberRequest +from freeclimb.models.incoming_number_request import IncomingNumberRequest +from freeclimb.models.incoming_number_result import IncomingNumberResult +from freeclimb.rest import ApiException from pprint import pprint + # Defining the host is optional and defaults to https://www.freeclimb.com/apiserver # See configuration.py for a list of all supported configuration parameters. configuration = freeclimb.Configuration( @@ -4785,40 +4626,30 @@ configuration = freeclimb.Configuration( # Enter a context with an instance of the API client with freeclimb.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - account_id = "accountId_example" # str | ID of the account - phone_number_id = "phoneNumberId_example" # str | String that uniquely identifies this phone number resource. - incoming_number_request = IncomingNumberRequest( - application_id="application_id_example", - alias="alias_example", - campaign_id="campaign_id_example", - ) # IncomingNumberRequest | Incoming Number details to update (optional) - - # example passing only required values which don't have defaults set - try: - # Update an Incoming Number - api_response = api_instance.update_an_incoming_number(phone_number_id) - pprint(api_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->update_an_incoming_number: %s\n" % e) + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + phone_number_id = 'phone_number_id_example' # str | String that uniquely identifies this phone number resource. + incoming_number_request = freeclimb.IncomingNumberRequest() # IncomingNumberRequest | Incoming Number details to update (optional) - # example passing only required values which don't have defaults set - # and optional values try: # Update an Incoming Number - api_response = api_instance.update_an_incoming_number(phone_number_id, incoming_number_request=incoming_number_request) + api_response = api_instance.update_an_incoming_number(account_id, phone_number_id, incoming_number_request=incoming_number_request) + print("The response of DefaultApi->update_an_incoming_number:\n") pprint(api_response) - except freeclimb.ApiException as e: + except Exception as e: print("Exception when calling DefaultApi->update_an_incoming_number: %s\n" % e) ``` + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **phone_number_id** | **str**| String that uniquely identifies this phone number resource. | - **incoming_number_request** | [**IncomingNumberRequest**](IncomingNumberRequest.md)| Incoming Number details to update | [optional] + **account_id** | **str**| ID of the account | + **phone_number_id** | **str**| String that uniquely identifies this phone number resource. | + **incoming_number_request** | [**IncomingNumberRequest**](IncomingNumberRequest.md)| Incoming Number details to update | [optional] ### Return type @@ -4833,7 +4664,6 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - ### HTTP response details | Status code | Description | Response headers | @@ -4842,76 +4672,3 @@ Name | Type | Description | Notes [[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_next_page** - -> (type(response)) get_next_page(response) - -Get Next Page of Paginated List Resource - -### Example - -* Basic Authentication (fc): - -```typescript -import time -import freeclimb -from freeclimb.api import default_api -from freeclimb.model.call_status import CallStatus -from freeclimb.model.call_list import CallList -from pprint import pprint -# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver -# See configuration.py for a list of all supported configuration parameters. -configuration = freeclimb.Configuration( - host = "https://www.freeclimb.com/apiserver" -) - -# 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: fc -configuration = freeclimb.Configuration( - username = 'ACCOUNT_ID', - password = 'API_KEY' -) - -# Enter a context with an instance of the API client -with freeclimb.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - - try: - api_response = api_instance.list_calls() - pprint(api_response) - next_page_response = api_instance.get_next_page(api_response) - pprint(next_page_response) - except freeclimb.ApiException as e: - print("Exception when calling DefaultApi->list_calls: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | Any | Response from operation to list an API resource | - -### Return type - -type(response) - -### Authorization - -[fc](../README.md#fc) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| 200 | Successful retrieved resource list | - | \ No newline at end of file diff --git a/docs/Dequeue.md b/docs/Dequeue.md index 367ceb9..338418f 100644 --- a/docs/Dequeue.md +++ b/docs/Dequeue.md @@ -1,11 +1,29 @@ # Dequeue The `Dequeue` command transfers control of a Call that is in a Queue so that the waiting caller exits the Queue. Execution continues with the first command in the PerCL script returned by the `actionUrl` specified in the `Enqueue` command. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.dequeue import Dequeue + +# TODO update the JSON string below +json = "{}" +# create an instance of Dequeue from a JSON string +dequeue_instance = Dequeue.from_json(json) +# print the JSON string representation of the object +print(Dequeue.to_json()) + +# convert the object into a dict +dequeue_dict = dequeue_instance.to_dict() +# create an instance of Dequeue from a dict +dequeue_from_dict = Dequeue.from_dict(dequeue_dict) +``` [[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/DequeueWebhook.md b/docs/DequeueWebhook.md new file mode 100644 index 0000000..fabdbaa --- /dev/null +++ b/docs/DequeueWebhook.md @@ -0,0 +1,40 @@ +# DequeueWebhook + +A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. A PerCL response is expected. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be dequeue - A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**queue_result** | **str** | The final result of the enqueued Call. Valid values are: •dequeued - Enqueued caller exited the Queue via a Dequeue action (Dequeue command or Queue Members POST REST API). | [optional] +**queue_time** | **int** | Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued. | [optional] + +## Example + +```python +from freeclimb.models.dequeue_webhook import DequeueWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of DequeueWebhook from a JSON string +dequeue_webhook_instance = DequeueWebhook.from_json(json) +# print the JSON string representation of the object +print(DequeueWebhook.to_json()) + +# convert the object into a dict +dequeue_webhook_dict = dequeue_webhook_instance.to_dict() +# create an instance of DequeueWebhook from a dict +dequeue_webhook_from_dict = DequeueWebhook.from_dict(dequeue_webhook_dict) +``` +[[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/Enqueue.md b/docs/Enqueue.md index bf9c2cf..b325af5 100644 --- a/docs/Enqueue.md +++ b/docs/Enqueue.md @@ -1,15 +1,33 @@ # Enqueue The `Enqueue` command adds the current Call to a call Queue. If the specified Queue does not exist, it is created and then the Call is added to it. The default maximum length of the queue is 100. This can be modified using the REST API. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. | +**notification_url** | **str** | URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored. | [optional] **queue_id** | **str** | ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters. | **wait_url** | **str** | A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. | -**notification_url** | **str** | URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.enqueue import Enqueue + +# TODO update the JSON string below +json = "{}" +# create an instance of Enqueue from a JSON string +enqueue_instance = Enqueue.from_json(json) +# print the JSON string representation of the object +print(Enqueue.to_json()) + +# convert the object into a dict +enqueue_dict = enqueue_instance.to_dict() +# create an instance of Enqueue from a dict +enqueue_from_dict = Enqueue.from_dict(enqueue_dict) +``` [[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/EnqueueAllOf.md b/docs/EnqueueAllOf.md deleted file mode 100644 index 23135c7..0000000 --- a/docs/EnqueueAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ -# EnqueueAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. | -**queue_id** | **str** | ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters. | -**wait_url** | **str** | A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. | -**notification_url** | **str** | URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored. | [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/FilterLogsRequest.md b/docs/FilterLogsRequest.md index 0c1d90e..7b3038e 100644 --- a/docs/FilterLogsRequest.md +++ b/docs/FilterLogsRequest.md @@ -1,10 +1,29 @@ # FilterLogsRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pql** | **str** | The filter query for retrieving logs. See **Performance Query Language** below. | +## Example + +```python +from freeclimb.models.filter_logs_request import FilterLogsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of FilterLogsRequest from a JSON string +filter_logs_request_instance = FilterLogsRequest.from_json(json) +# print the JSON string representation of the object +print(FilterLogsRequest.to_json()) + +# convert the object into a dict +filter_logs_request_dict = filter_logs_request_instance.to_dict() +# create an instance of FilterLogsRequest from a dict +filter_logs_request_from_dict = FilterLogsRequest.from_dict(filter_logs_request_dict) +``` [[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/GetDigits.md b/docs/GetDigits.md index 396bb10..5642cbb 100644 --- a/docs/GetDigits.md +++ b/docs/GetDigits.md @@ -1,7 +1,9 @@ # GetDigits The `GetDigits` command collects DTMF inputs from the caller. It is only supported only when there is a single party on the Call. `GetDigits` is a Terminal Command — any actions following it are never executed. When the Caller is done entering the digits, FreeClimb submits that data to the provided `actionUrl` using an HTTP POST request. Your server will be required to respond to the FreeClimb Webhook with PerCL to continue handling the call. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL. | @@ -11,10 +13,26 @@ Name | Type | Description | Notes **initial_timeout_ms** | **int** | Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed. | [optional] **max_digits** | **int** | Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`. | [optional] **min_digits** | **int** | Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits. | [optional] -**prompts** | [**[PerclCommand]**](PerclCommand.md) | JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller. | [optional] +**prompts** | [**List[PerclCommand]**](PerclCommand.md) | JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller. | [optional] **privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.get_digits import GetDigits + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDigits from a JSON string +get_digits_instance = GetDigits.from_json(json) +# print the JSON string representation of the object +print(GetDigits.to_json()) + +# convert the object into a dict +get_digits_dict = get_digits_instance.to_dict() +# create an instance of GetDigits from a dict +get_digits_from_dict = GetDigits.from_dict(get_digits_dict) +``` [[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/GetDigitsAllOf.md b/docs/GetDigitsAllOf.md deleted file mode 100644 index bfbd016..0000000 --- a/docs/GetDigitsAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetDigitsAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL. | -**digit_timeout_ms** | **int** | Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered. | [optional] -**finish_on_key** | **str** | Digit that causes the input sequence to be deemed complete. This attribute defers to the `timeout` attribute – so, if a `timeout` occurs, then the command terminates regardless of the value of `finishOnKey`. | [optional] -**flush_buffer** | **bool** | If set to true, the FreeClimb platform starts with an empty DTMF buffer to store the digits entered by the caller. If set to false, FreeClimb will append the user inputs to the end of the existing digits buffer and will return digits from the start of the digits buffer. | [optional] -**initial_timeout_ms** | **int** | Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed. | [optional] -**max_digits** | **int** | Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`. | [optional] -**min_digits** | **int** | Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits. | [optional] -**prompts** | [**[PerclCommand]**](PerclCommand.md) | JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller. | [optional] -**privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [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/GetDigitsReason.md b/docs/GetDigitsReason.md new file mode 100644 index 0000000..7027694 --- /dev/null +++ b/docs/GetDigitsReason.md @@ -0,0 +1,17 @@ +# GetDigitsReason + +This field explains how the GetDigits action ended. The value is one of the below: •finishKey - The finish key as specified had been pressed by the caller. Digit string has all keys up to, but not including, the finish key. •timeout - The timeout limit was reached prior to any other criteria being met. If any digits were collected, they will be included. •maxDigits - The maximum number of digits was reached and digit collection ended. •tone - Answering machine or fax tone detection occurred, interrupting digit collection. Any digits received up to this point are included in this webhook. + +## Enum + +* `FINISHKEY` (value: `'finishKey'`) + +* `TIMEOUT` (value: `'timeout'`) + +* `MAXDIGITS` (value: `'maxDigits'`) + +* `TONE` (value: `'tone'`) + +[[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/GetDigitsWebhook.md b/docs/GetDigitsWebhook.md new file mode 100644 index 0000000..bce53a8 --- /dev/null +++ b/docs/GetDigitsWebhook.md @@ -0,0 +1,41 @@ +# GetDigitsWebhook + +A POST request with the following fields will be sent to the actionUrl provided in your GetDigits command. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be getDigits - The GetDigits command has completed and its actionUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**digits** | **str** | tring of digits entered by the Caller, excluding the terminating digit (if used). The string of digits will be replaced by 'xxxxx' when privacyMode is set to true | [optional] +**reason** | [**GetDigitsReason**](GetDigitsReason.md) | | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child call). | [optional] + +## Example + +```python +from freeclimb.models.get_digits_webhook import GetDigitsWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDigitsWebhook from a JSON string +get_digits_webhook_instance = GetDigitsWebhook.from_json(json) +# print the JSON string representation of the object +print(GetDigitsWebhook.to_json()) + +# convert the object into a dict +get_digits_webhook_dict = get_digits_webhook_instance.to_dict() +# create an instance of GetDigitsWebhook from a dict +get_digits_webhook_from_dict = GetDigitsWebhook.from_dict(get_digits_webhook_dict) +``` +[[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/GetSpeech.md b/docs/GetSpeech.md index 412070a..e654668 100644 --- a/docs/GetSpeech.md +++ b/docs/GetSpeech.md @@ -1,15 +1,17 @@ # GetSpeech The `GetSpeech` command enables the Caller to respond to the application using a supported language. Unlike DTMF entry, which implicitly restricts the user to using the available buttons on the phone key pad, speech input allows for flexible audio inputs based on grammar. FreeClimb supports grammars written using GRXML compatible with the Microsoft Speech Platform. `GetSpeech` is only supported on a single call leg. It is not supported when there are two or more call legs connected (as in within a Conference). + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call. | -**grammar_file** | **str** | The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. | **grammar_type** | [**GrammarType**](GrammarType.md) | | [optional] +**grammar_file** | **str** | The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. | **grammar_rule** | **str** | The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`. | [optional] **play_beep** | **bool** | Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak. | [optional] -**prompts** | [**[PerclCommand]**](PerclCommand.md) | The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech. | [optional] +**prompts** | [**List[PerclCommand]**](PerclCommand.md) | The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech. | [optional] **no_input_timeout_ms** | **int** | When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. | [optional] **recognition_timeout_ms** | **int** | When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. | [optional] **confidence_threshold** | **float** | When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0. | [optional] @@ -17,8 +19,24 @@ Name | Type | Description | Notes **speech_complete_timeout_ms** | **int** | Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds. | [optional] **speech_incomplete_timeout_ms** | **int** | Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance. | [optional] **privacy_mode** | **bool** | Parameter privacyMode will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.get_speech import GetSpeech + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSpeech from a JSON string +get_speech_instance = GetSpeech.from_json(json) +# print the JSON string representation of the object +print(GetSpeech.to_json()) + +# convert the object into a dict +get_speech_dict = get_speech_instance.to_dict() +# create an instance of GetSpeech from a dict +get_speech_from_dict = GetSpeech.from_dict(get_speech_dict) +``` [[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/GetSpeechAllOf.md b/docs/GetSpeechAllOf.md deleted file mode 100644 index 8b64f0b..0000000 --- a/docs/GetSpeechAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetSpeechAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call. | -**grammar_file** | **str** | The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. | -**grammar_type** | [**GrammarType**](GrammarType.md) | | [optional] -**grammar_rule** | **str** | The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`. | [optional] -**play_beep** | **bool** | Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak. | [optional] -**prompts** | [**[PerclCommand]**](PerclCommand.md) | The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech. | [optional] -**no_input_timeout_ms** | **int** | When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. | [optional] -**recognition_timeout_ms** | **int** | When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. | [optional] -**confidence_threshold** | **float** | When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0. | [optional] -**sensitivity_level** | **float** | The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 | [optional] -**speech_complete_timeout_ms** | **int** | Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds. | [optional] -**speech_incomplete_timeout_ms** | **int** | Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance. | [optional] -**privacy_mode** | **bool** | Parameter privacyMode will not log the `text` as required by PCI compliance. | [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/GetSpeechReason.md b/docs/GetSpeechReason.md index 5f670fe..804c1d6 100644 --- a/docs/GetSpeechReason.md +++ b/docs/GetSpeechReason.md @@ -1,14 +1,19 @@ # GetSpeechReason -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **ERROR** | **GetSpeechReason** | | Represented in Python as "error" | -| **HANGUP** | **GetSpeechReason** | | Represented in Python as "hangup" | -| **DIGIT** | **GetSpeechReason** | | Represented in Python as "digit" | -| **NO_INPUT** | **GetSpeechReason** | | Represented in Python as "noInput" | -| **NO_MATCH** | **GetSpeechReason** | | Represented in Python as "noMatch" | -| **RECOGNITION** | **GetSpeechReason** | | Represented in Python as "recognition" | + +## Enum + +* `ERROR` (value: `'error'`) + +* `HANGUP` (value: `'hangup'`) + +* `DIGIT` (value: `'digit'`) + +* `NOINPUT` (value: `'noInput'`) + +* `NOMATCH` (value: `'noMatch'`) + +* `RECOGNITION` (value: `'recognition'`) [[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/GetSpeechWebhook.md b/docs/GetSpeechWebhook.md new file mode 100644 index 0000000..216ae80 --- /dev/null +++ b/docs/GetSpeechWebhook.md @@ -0,0 +1,46 @@ +# GetSpeechWebhook + +The GetSpeech command has completed and its actionUrl is being invoked. A PerCL response is expected, unless reason is hangup. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be getSpeech - The GetSpeech command has completed and its actionUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | Unique ID of the Conference. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**reason** | [**GetSpeechReason**](GetSpeechReason.md) | | [optional] +**recognition_result** | **str** | Semantic content (either a string if speech was recognized or a digit if a digit was input instead of speech) returned from the entry or tag that was recognized within the grammar. The content will be replaced by 'xxxxx' when privacyMode is set to true. This field is populated only if the reason field is set to recognition or digit. | [optional] +**confidence** | **int** | Level of confidence in the obtained result. This is a value in the range 0 to 100 – with 0 being total lack of confidence and 100 being absolute certainty in the recognition. This field is populated only if the reason field is set to recognition. | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child call). | [optional] +**completion_reason** | **str** | Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition. | [optional] +**completion_cause** | **str** | Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition. | [optional] +**mrcp_code** | **int** | Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. | [optional] +**mrcp_diagnostic** | **str** | Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. | [optional] + +## Example + +```python +from freeclimb.models.get_speech_webhook import GetSpeechWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSpeechWebhook from a JSON string +get_speech_webhook_instance = GetSpeechWebhook.from_json(json) +# print the JSON string representation of the object +print(GetSpeechWebhook.to_json()) + +# convert the object into a dict +get_speech_webhook_dict = get_speech_webhook_instance.to_dict() +# create an instance of GetSpeechWebhook from a dict +get_speech_webhook_from_dict = GetSpeechWebhook.from_dict(get_speech_webhook_dict) +``` +[[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/GrammarFileBuiltIn.md b/docs/GrammarFileBuiltIn.md index 5e45846..f2370fa 100644 --- a/docs/GrammarFileBuiltIn.md +++ b/docs/GrammarFileBuiltIn.md @@ -1,23 +1,37 @@ # GrammarFileBuiltIn -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **ALPHNUM6** | **GrammarFileBuiltIn** | | Represented in Python as "ALPHNUM6" | -| **ANY_DIG** | **GrammarFileBuiltIn** | | Represented in Python as "ANY_DIG" | -| **DIG1** | **GrammarFileBuiltIn** | | Represented in Python as "DIG1" | -| **DIG2** | **GrammarFileBuiltIn** | | Represented in Python as "DIG2" | -| **DIG3** | **GrammarFileBuiltIn** | | Represented in Python as "DIG3" | -| **DIG4** | **GrammarFileBuiltIn** | | Represented in Python as "DIG4" | -| **DIG5** | **GrammarFileBuiltIn** | | Represented in Python as "DIG5" | -| **DIG6** | **GrammarFileBuiltIn** | | Represented in Python as "DIG6" | -| **DIG7** | **GrammarFileBuiltIn** | | Represented in Python as "DIG7" | -| **DIG8** | **GrammarFileBuiltIn** | | Represented in Python as "DIG8" | -| **DIG9** | **GrammarFileBuiltIn** | | Represented in Python as "DIG9" | -| **DIG10** | **GrammarFileBuiltIn** | | Represented in Python as "DIG10" | -| **DIG11** | **GrammarFileBuiltIn** | | Represented in Python as "DIG11" | -| **UP_TO_20_DIGIT_SEQUENCE** | **GrammarFileBuiltIn** | | Represented in Python as "UP_TO_20_DIGIT_SEQUENCE" | -| **VERSAY_YESNO** | **GrammarFileBuiltIn** | | Represented in Python as "VERSAY_YESNO" | + +## Enum + +* `ALPHNUM6` (value: `'ALPHNUM6'`) + +* `ANY_DIG` (value: `'ANY_DIG'`) + +* `DIG1` (value: `'DIG1'`) + +* `DIG2` (value: `'DIG2'`) + +* `DIG3` (value: `'DIG3'`) + +* `DIG4` (value: `'DIG4'`) + +* `DIG5` (value: `'DIG5'`) + +* `DIG6` (value: `'DIG6'`) + +* `DIG7` (value: `'DIG7'`) + +* `DIG8` (value: `'DIG8'`) + +* `DIG9` (value: `'DIG9'`) + +* `DIG10` (value: `'DIG10'`) + +* `DIG11` (value: `'DIG11'`) + +* `UP_TO_20_DIGIT_SEQUENCE` (value: `'UP_TO_20_DIGIT_SEQUENCE'`) + +* `VERSAY_YESNO` (value: `'VERSAY_YESNO'`) [[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/GrammarType.md b/docs/GrammarType.md index 8f7ff92..c044698 100644 --- a/docs/GrammarType.md +++ b/docs/GrammarType.md @@ -1,11 +1,12 @@ # GrammarType The grammar file type to use for speech recognition. A value of 'URL' indicates the grammarFile attribute specifies a URL that points to the grammar file. A value of `BUILTIN` indicates the grammarFile attribute specifies the name of one of the platform built-in grammar files. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **URL** | **GrammarType** | | Represented in Python as "URL" | -| **BUILT_IN** | **GrammarType** | | Represented in Python as "BUILTIN" | + +## Enum + +* `URL` (value: `'URL'`) + +* `BUILTIN` (value: `'BUILTIN'`) [[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/Hangup.md b/docs/Hangup.md index d904a7b..05c1efd 100644 --- a/docs/Hangup.md +++ b/docs/Hangup.md @@ -1,12 +1,30 @@ # Hangup The `Hangup` command terminates a Call. If `Hangup` is used as the first action in a PerCL response, it does not prevent FreeClimb from answering the Call and billing your account. See the `Reject` command to hang up at no charge. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **reason** | **str** | The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.hangup import Hangup + +# TODO update the JSON string below +json = "{}" +# create an instance of Hangup from a JSON string +hangup_instance = Hangup.from_json(json) +# print the JSON string representation of the object +print(Hangup.to_json()) + +# convert the object into a dict +hangup_dict = hangup_instance.to_dict() +# create an instance of Hangup from a dict +hangup_from_dict = Hangup.from_dict(hangup_dict) +``` [[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/HangupAllOf.md b/docs/HangupAllOf.md deleted file mode 100644 index 6dcac63..0000000 --- a/docs/HangupAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# HangupAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **str** | The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application. | [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/IfMachine.md b/docs/IfMachine.md index 992f323..e346c61 100644 --- a/docs/IfMachine.md +++ b/docs/IfMachine.md @@ -1,11 +1,12 @@ # IfMachine Specifies how FreeClimb should handle this OutDial if an answering machine answers the Call. Valid values: `redirect` invokes the ifMachineUrl for instructions. `hangup` hangs up the Call. The ifMachineUrl will not be invoked. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **REDIRECT** | **IfMachine** | | Represented in Python as "redirect" | -| **HANGUP** | **IfMachine** | | Represented in Python as "hangup" | + +## Enum + +* `REDIRECT` (value: `'redirect'`) + +* `HANGUP` (value: `'hangup'`) [[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/InboundCallWebhook.md b/docs/InboundCallWebhook.md new file mode 100644 index 0000000..87b2cca --- /dev/null +++ b/docs/InboundCallWebhook.md @@ -0,0 +1,39 @@ +# InboundCallWebhook + +An inbound Call to a number registered on FreeClimb will trigger a request to the voiceUrl of the application the number is assigned to. FreeClimb expects to receive PerCL in response to this request in order to process the Call. The following parameters are sent as the POST body. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be inboundCall - An inbound call was received and the voiceUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a Conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**parent_call_id** | **str** | | [optional] + +## Example + +```python +from freeclimb.models.inbound_call_webhook import InboundCallWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of InboundCallWebhook from a JSON string +inbound_call_webhook_instance = InboundCallWebhook.from_json(json) +# print the JSON string representation of the object +print(InboundCallWebhook.to_json()) + +# convert the object into a dict +inbound_call_webhook_dict = inbound_call_webhook_instance.to_dict() +# create an instance of InboundCallWebhook from a dict +inbound_call_webhook_from_dict = InboundCallWebhook.from_dict(inbound_call_webhook_dict) +``` +[[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/IncomingNumberList.md b/docs/IncomingNumberList.md index fe6b778..d1f7383 100644 --- a/docs/IncomingNumberList.md +++ b/docs/IncomingNumberList.md @@ -1,17 +1,36 @@ # IncomingNumberList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**incoming_phone_numbers** | [**[IncomingNumberResult], none_type**](IncomingNumberResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**incoming_phone_numbers** | [**List[IncomingNumberResult]**](IncomingNumberResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.incoming_number_list import IncomingNumberList + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingNumberList from a JSON string +incoming_number_list_instance = IncomingNumberList.from_json(json) +# print the JSON string representation of the object +print(IncomingNumberList.to_json()) +# convert the object into a dict +incoming_number_list_dict = incoming_number_list_instance.to_dict() +# create an instance of IncomingNumberList from a dict +incoming_number_list_from_dict = IncomingNumberList.from_dict(incoming_number_list_dict) +``` [[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/IncomingNumberListAllOf.md b/docs/IncomingNumberListAllOf.md deleted file mode 100644 index 968dc0e..0000000 --- a/docs/IncomingNumberListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# IncomingNumberListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**incoming_phone_numbers** | [**[IncomingNumberResult], none_type**](IncomingNumberResult.md) | | [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/IncomingNumberRequest.md b/docs/IncomingNumberRequest.md index 0de98a0..87b8025 100644 --- a/docs/IncomingNumberRequest.md +++ b/docs/IncomingNumberRequest.md @@ -1,12 +1,31 @@ # IncomingNumberRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **application_id** | **str** | ID of the Application that should handle calls to this number. | [optional] **alias** | **str** | Description for this phone number. | [optional] -**campaign_id** | **str, none_type** | The campaign ID generated by the campaign registry | [optional] +**campaign_id** | **str** | The campaign ID generated by the campaign registry | [optional] + +## Example + +```python +from freeclimb.models.incoming_number_request import IncomingNumberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingNumberRequest from a JSON string +incoming_number_request_instance = IncomingNumberRequest.from_json(json) +# print the JSON string representation of the object +print(IncomingNumberRequest.to_json()) +# convert the object into a dict +incoming_number_request_dict = incoming_number_request_instance.to_dict() +# create an instance of IncomingNumberRequest from a dict +incoming_number_request_from_dict = IncomingNumberRequest.from_dict(incoming_number_request_dict) +``` [[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/IncomingNumberResult.md b/docs/IncomingNumberResult.md index ffd6c2c..ae6127d 100644 --- a/docs/IncomingNumberResult.md +++ b/docs/IncomingNumberResult.md @@ -1,6 +1,8 @@ # IncomingNumberResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] @@ -8,19 +10,36 @@ Name | Type | Description | Notes **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] **capabilities** | [**Capabilities**](Capabilities.md) | | [optional] -**campaign_id** | **str, none_type** | The campaign ID generated by the campaign registry | [optional] -**phone_number_id** | **str, none_type** | String that uniquely identifies this phone number resource. | [optional] -**account_id** | **str, none_type** | ID of the account that owns this phone number. | [optional] -**application_id** | **str, none_type** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] -**phone_number** | **str, none_type** | Phone number in E.164 format. | [optional] -**alias** | **str, none_type** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] -**region** | **str, none_type** | State or province of this phone number. | [optional] -**country** | **str, none_type** | Country of this phone number. | [optional] -**voice_enabled** | **bool, none_type** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] -**sms_enabled** | **bool, none_type** | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] -**offnet** | **bool, none_type** | The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource. | [optional] +**campaign_id** | **str** | The campaign ID generated by the campaign registry | [optional] +**phone_number_id** | **str** | String that uniquely identifies this phone number resource. | [optional] +**account_id** | **str** | ID of the account that owns this phone number. | [optional] +**application_id** | **str** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] +**phone_number** | **str** | Phone number in E.164 format. | [optional] +**alias** | **str** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] +**region** | **str** | State or province of this phone number. | [optional] +**country** | **str** | Country of this phone number. | [optional] +**voice_enabled** | **bool** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] +**sms_enabled** | **bool** | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] +**offnet** | **bool** | The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource. | [optional] **tfn** | [**TFN**](TFN.md) | | [optional] +## Example + +```python +from freeclimb.models.incoming_number_result import IncomingNumberResult + +# TODO update the JSON string below +json = "{}" +# create an instance of IncomingNumberResult from a JSON string +incoming_number_result_instance = IncomingNumberResult.from_json(json) +# print the JSON string representation of the object +print(IncomingNumberResult.to_json()) + +# convert the object into a dict +incoming_number_result_dict = incoming_number_result_instance.to_dict() +# create an instance of IncomingNumberResult from a dict +incoming_number_result_from_dict = IncomingNumberResult.from_dict(incoming_number_result_dict) +``` [[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/IncomingNumberResultAllOf.md b/docs/IncomingNumberResultAllOf.md deleted file mode 100644 index b8e16d5..0000000 --- a/docs/IncomingNumberResultAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ -# IncomingNumberResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capabilities** | [**Capabilities**](Capabilities.md) | | [optional] -**campaign_id** | **str, none_type** | The campaign ID generated by the campaign registry | [optional] -**phone_number_id** | **str, none_type** | String that uniquely identifies this phone number resource. | [optional] -**account_id** | **str, none_type** | ID of the account that owns this phone number. | [optional] -**application_id** | **str, none_type** | ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. | [optional] -**phone_number** | **str, none_type** | Phone number in E.164 format. | [optional] -**alias** | **str, none_type** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] -**region** | **str, none_type** | State or province of this phone number. | [optional] -**country** | **str, none_type** | Country of this phone number. | [optional] -**voice_enabled** | **bool, none_type** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] -**sms_enabled** | **bool, none_type** | Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. | [optional] -**offnet** | **bool, none_type** | The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource. | [optional] -**tfn** | [**TFN**](TFN.md) | | [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/Language.md b/docs/Language.md index 7032487..c26d6bc 100644 --- a/docs/Language.md +++ b/docs/Language.md @@ -1,34 +1,59 @@ # Language -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **CATALAN** | **Language** | | Represented in Python as "ca-ES" | -| **DANISH** | **Language** | | Represented in Python as "da-DK" | -| **GERMAN** | **Language** | | Represented in Python as "de-DE" | -| **ENGLISH_AU** | **Language** | | Represented in Python as "en-AU" | -| **ENGLISH_CA** | **Language** | | Represented in Python as "en-CA" | -| **ENGLISH_UK** | **Language** | | Represented in Python as "en-GB" | -| **ENGLISH_IN** | **Language** | | Represented in Python as "en-IN" | -| **ENGLISH_US** | **Language** | | Represented in Python as "en-US" | -| **ENGLISH_ES** | **Language** | | Represented in Python as "es-ES" | -| **ENGLISH_MX** | **Language** | | Represented in Python as "es-MX" | -| **FINNISH** | **Language** | | Represented in Python as "fi-FI" | -| **FRENCH_CA** | **Language** | | Represented in Python as "fr-CA" | -| **FRENCH_FR** | **Language** | | Represented in Python as "fr-FR" | -| **ITALIAN** | **Language** | | Represented in Python as "it-IT" | -| **JAPANESE** | **Language** | | Represented in Python as "ja-JP" | -| **KOREAN** | **Language** | | Represented in Python as "ko-KR" | -| **NORWEGIAN** | **Language** | | Represented in Python as "nb-NO" | -| **DUTCH** | **Language** | | Represented in Python as "nl-NL" | -| **POLISH** | **Language** | | Represented in Python as "pl-PL" | -| **PORTUGESE_BR** | **Language** | | Represented in Python as "pt-BR" | -| **PORTUGESE_PT** | **Language** | | Represented in Python as "pt-PT" | -| **RUSSIAN** | **Language** | | Represented in Python as "ru-RU" | -| **SWEDISH** | **Language** | | Represented in Python as "sv-SE" | -| **CHINESE_CN** | **Language** | | Represented in Python as "zh-CN" | -| **CHINESE_HK** | **Language** | | Represented in Python as "zh-HK" | -| **CHINESE_TW** | **Language** | | Represented in Python as "zh-TW" | + +## Enum + +* `CA_MINUS_ES` (value: `'ca-ES'`) + +* `DA_MINUS_DK` (value: `'da-DK'`) + +* `DE_MINUS_DE` (value: `'de-DE'`) + +* `EN_MINUS_AU` (value: `'en-AU'`) + +* `EN_MINUS_CA` (value: `'en-CA'`) + +* `EN_MINUS_GB` (value: `'en-GB'`) + +* `EN_MINUS_IN` (value: `'en-IN'`) + +* `EN_MINUS_US` (value: `'en-US'`) + +* `ES_MINUS_ES` (value: `'es-ES'`) + +* `ES_MINUS_MX` (value: `'es-MX'`) + +* `FI_MINUS_FI` (value: `'fi-FI'`) + +* `FR_MINUS_CA` (value: `'fr-CA'`) + +* `FR_MINUS_FR` (value: `'fr-FR'`) + +* `IT_MINUS_IT` (value: `'it-IT'`) + +* `JA_MINUS_JP` (value: `'ja-JP'`) + +* `KO_MINUS_KR` (value: `'ko-KR'`) + +* `NB_MINUS_NO` (value: `'nb-NO'`) + +* `NL_MINUS_NL` (value: `'nl-NL'`) + +* `PL_MINUS_PL` (value: `'pl-PL'`) + +* `PT_MINUS_BR` (value: `'pt-BR'`) + +* `PT_MINUS_PT` (value: `'pt-PT'`) + +* `RU_MINUS_RU` (value: `'ru-RU'`) + +* `SV_MINUS_SE` (value: `'sv-SE'`) + +* `ZH_MINUS_CN` (value: `'zh-CN'`) + +* `ZH_MINUS_HK` (value: `'zh-HK'`) + +* `ZH_MINUS_TW` (value: `'zh-TW'`) [[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/LeaveConferenceWebhook.md b/docs/LeaveConferenceWebhook.md new file mode 100644 index 0000000..955236c --- /dev/null +++ b/docs/LeaveConferenceWebhook.md @@ -0,0 +1,38 @@ +# LeaveConferenceWebhook + +A Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked. A PerCL response is expected — unless the URL is invoked due to the participant hanging up. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be leaveConference - Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a Conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] + +## Example + +```python +from freeclimb.models.leave_conference_webhook import LeaveConferenceWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of LeaveConferenceWebhook from a JSON string +leave_conference_webhook_instance = LeaveConferenceWebhook.from_json(json) +# print the JSON string representation of the object +print(LeaveConferenceWebhook.to_json()) + +# convert the object into a dict +leave_conference_webhook_dict = leave_conference_webhook_instance.to_dict() +# create an instance of LeaveConferenceWebhook from a dict +leave_conference_webhook_from_dict = LeaveConferenceWebhook.from_dict(leave_conference_webhook_dict) +``` +[[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/LogLevel.md b/docs/LogLevel.md index 97b33ea..9700a29 100644 --- a/docs/LogLevel.md +++ b/docs/LogLevel.md @@ -1,12 +1,14 @@ # LogLevel Level of the log. Possible values are info, warning, and error. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **INFO** | **LogLevel** | | Represented in Python as "info" | -| **WARNING** | **LogLevel** | | Represented in Python as "warning" | -| **ERROR** | **LogLevel** | | Represented in Python as "error" | + +## Enum + +* `INFO` (value: `'info'`) + +* `WARNING` (value: `'warning'`) + +* `ERROR` (value: `'error'`) [[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/LogList.md b/docs/LogList.md index f3058af..48f5733 100644 --- a/docs/LogList.md +++ b/docs/LogList.md @@ -1,17 +1,36 @@ # LogList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**logs** | [**[LogResult], none_type**](LogResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**logs** | [**List[LogResult]**](LogResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.log_list import LogList + +# TODO update the JSON string below +json = "{}" +# create an instance of LogList from a JSON string +log_list_instance = LogList.from_json(json) +# print the JSON string representation of the object +print(LogList.to_json()) +# convert the object into a dict +log_list_dict = log_list_instance.to_dict() +# create an instance of LogList from a dict +log_list_from_dict = LogList.from_dict(log_list_dict) +``` [[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/LogListAllOf.md b/docs/LogListAllOf.md deleted file mode 100644 index 75514c4..0000000 --- a/docs/LogListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# LogListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**logs** | [**[LogResult], none_type**](LogResult.md) | | [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/LogResult.md b/docs/LogResult.md index 85eb6cb..eeff861 100644 --- a/docs/LogResult.md +++ b/docs/LogResult.md @@ -1,16 +1,35 @@ # LogResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**timestamp** | **int, none_type** | Time that the log was generated. The time is represented as microseconds since the Unix Epoch. | [optional] +**timestamp** | **int** | Time that the log was generated. The time is represented as microseconds since the Unix Epoch. | [optional] **level** | [**LogLevel**](LogLevel.md) | | [optional] -**request_id** | **str, none_type** | ID of the request associated with the log. The requestId is propagated across all logs generated by FreeClimb when processing a request. | [optional] -**account_id** | **str, none_type** | ID of the account that this log was generated under. | [optional] -**call_id** | **str, none_type** | ID of the Call associated with the log. Can be set to null if the log was generated without regard to a specific Call. | [optional] -**message** | **str, none_type** | A simple string describing the event being logged. | [optional] -**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | JSON document containing metadata about the event. Some log messages may include request and response header content in this field. | [optional] +**request_id** | **str** | ID of the request associated with the log. The requestId is propagated across all logs generated by FreeClimb when processing a request. | [optional] +**account_id** | **str** | ID of the account that this log was generated under. | [optional] +**call_id** | **str** | ID of the Call associated with the log. Can be set to null if the log was generated without regard to a specific Call. | [optional] +**message** | **str** | A simple string describing the event being logged. | [optional] +**metadata** | **object** | JSON document containing metadata about the event. Some log messages may include request and response header content in this field. | [optional] + +## Example + +```python +from freeclimb.models.log_result import LogResult + +# TODO update the JSON string below +json = "{}" +# create an instance of LogResult from a JSON string +log_result_instance = LogResult.from_json(json) +# print the JSON string representation of the object +print(LogResult.to_json()) +# convert the object into a dict +log_result_dict = log_result_instance.to_dict() +# create an instance of LogResult from a dict +log_result_from_dict = LogResult.from_dict(log_result_dict) +``` [[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/MachineDetectedWebhook.md b/docs/MachineDetectedWebhook.md new file mode 100644 index 0000000..cb35f14 --- /dev/null +++ b/docs/MachineDetectedWebhook.md @@ -0,0 +1,40 @@ +# MachineDetectedWebhook + +An outbound call spawned by OutDial detected an answer by a machine (answering machine or fax/modem machine) and ifMachineUrl is being invoked. A PerCL response is expected. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be machineDetected - An outbound call spawned by OutDial was answered by a machine and the ifMachineUrl is being invoked. | [optional] +**call_id** | **str** | Unique ID for this Call, generated by FreeClimb. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a Conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**parent_call_id** | **str** | Call ID of the leg which initiated the OutDial. | [optional] +**machine_type** | [**MachineType**](MachineType.md) | | [optional] + +## Example + +```python +from freeclimb.models.machine_detected_webhook import MachineDetectedWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of MachineDetectedWebhook from a JSON string +machine_detected_webhook_instance = MachineDetectedWebhook.from_json(json) +# print the JSON string representation of the object +print(MachineDetectedWebhook.to_json()) + +# convert the object into a dict +machine_detected_webhook_dict = machine_detected_webhook_instance.to_dict() +# create an instance of MachineDetectedWebhook from a dict +machine_detected_webhook_from_dict = MachineDetectedWebhook.from_dict(machine_detected_webhook_dict) +``` +[[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/MachineType.md b/docs/MachineType.md index 0804cf6..b6f0fe3 100644 --- a/docs/MachineType.md +++ b/docs/MachineType.md @@ -1,10 +1,11 @@ # MachineType -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **ANSWERING_MACHINE** | **MachineType** | | Represented in Python as "answeringMachine" | -| **FAX_MACHINE** | **MachineType** | | Represented in Python as "faxMachine" | + +## Enum + +* `ANSWERING_MACHINE` (value: `'answering machine'`) + +* `FAX_MODEM` (value: `'fax modem'`) [[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/MakeCallRequest.md b/docs/MakeCallRequest.md index e4b96e9..0d8ddba 100644 --- a/docs/MakeCallRequest.md +++ b/docs/MakeCallRequest.md @@ -1,19 +1,38 @@ # MakeCallRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_from** | **str** | Phone number to use as the caller ID. This can be: (a) The To or From number provided in FreeClimb's initial request to your app or (b) Any incoming phone number you have purchased from FreeClimb. | +**var_from** | **str** | Phone number to use as the caller ID. This can be: (a) The To or From number provided in FreeClimb's initial request to your app or (b) Any incoming phone number you have purchased from FreeClimb. | **to** | **str** | Phone number to place the Call to. | **application_id** | **str** | Required if no `parentCallId` or `callConnectUrl` has been provided. ID of the application FreeClimb should use to handle this phone call. FreeClimb will use the `callConnectUrl` and `statusCallbackUrl` set on the application unless the `callConnectUrl` attribute is also provided with the request. In this case, the URL specified in that `callConnectUrl` attribute will be used as a replacement of the `callConnectUrl` originally assigned in the application. If the `callConnectUrl` is not set as either an attribute of the request or as part of the specified application, an error will be provided. The application’s voiceUrl parameter is not used for outbound calls. | [optional] **send_digits** | **str** | String of digits to dial after connecting to the number. It can include digits `0-9`, `*`, and `#`, and allows embedding a pause between the output of individual digits. The default pause is 500 milliseconds. So, a string such as *1234#* will be played in 2 seconds because of the 4 standard pauses implied within the string. A custom pause is specified by including a positive integer wrapped in curly braces: {n}. For more information, see **sendDigits examples** below. | [optional] **if_machine** | **str** | Specifies how FreeClimb should handle this Call if an answering machine answers it. | [optional] **if_machine_url** | **str** | This attribute specifies a URL to which FreeClimb will make a POST request when an answering machine or a fax machine is detected. This URL is required if the ifMachine flag is set to redirect. When ifMachine is set to hangup, ifMachineUrl must not be included in the request. For more information, see **ifMachineUrl example** below. | [optional] -**timeout** | **int** | Number of seconds that FreeClimb should allow the phone to ring before assuming there is no answer. Default is 30 seconds. Maximum allowed ring-time is determined by the target phone's provider. Note that most providers limit ring-time to 120 seconds. | [optional] if omitted the server will use the default value of 30 +**timeout** | **int** | Number of seconds that FreeClimb should allow the phone to ring before assuming there is no answer. Default is 30 seconds. Maximum allowed ring-time is determined by the target phone's provider. Note that most providers limit ring-time to 120 seconds. | [optional] [default to 30] **parent_call_id** | **str** | Required if no `applicationId` or `callConnectUrl` has been provided. The ID of the parent Call in the case that this new Call is meant to be treated as a child of an existing Call. This attribute should be included when possible to reduce latency when adding child calls to Conferences containing the parent Call. A call can only be used as a parent once the call is in progress or as an inbound call that is still ringing. An outbound call is considered to be in progress once the `outdialConnect` or `outdialApiConnect` webhook is invoked. An inbound call is ringing when the inbound webhook is invoked. If a `callConnectUrl` attribute is also included with the `parentCallId` in the request, this URL will be used as a replacement of the `callConnectUrl` originally assigned in the parent call. | [optional] **privacy_mode** | **bool** | Activate privacy mode in order to obscure log data that can potentially expose private information. | [optional] **call_connect_url** | **str** | The URL that FreeClimb should use to handle this phone call. If an applicationId or parentCallId have already been provided, this callConnectUrl attribute will be used as a replacement of the callConnectUrl originally assigned in the application or parent call. | [optional] +## Example + +```python +from freeclimb.models.make_call_request import MakeCallRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MakeCallRequest from a JSON string +make_call_request_instance = MakeCallRequest.from_json(json) +# print the JSON string representation of the object +print(MakeCallRequest.to_json()) + +# convert the object into a dict +make_call_request_dict = make_call_request_instance.to_dict() +# create an instance of MakeCallRequest from a dict +make_call_request_from_dict = MakeCallRequest.from_dict(make_call_request_dict) +``` [[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/MessageDeliveryWebhook.md b/docs/MessageDeliveryWebhook.md new file mode 100644 index 0000000..c967515 --- /dev/null +++ b/docs/MessageDeliveryWebhook.md @@ -0,0 +1,39 @@ +# MessageDeliveryWebhook + +An SMS has been received by the platform and is being delivered to the smsUrl of the customer application that is associated with the destination number. A PerCL response will be ignored. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Value will be messageDelivery - An SMS message has been received by the platform and is being delivered to the customer application associated with the destination number. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**text** | **str** | Body of the SMS message. | [optional] +**direction** | **str** | Value will be inbound to indicate the receipt of a message into the FreeClimb platform. | [optional] +**application_id** | **str** | ID of the application to which the destination number is assigned. | [optional] +**status** | **str** | Value will be received to indicate that the platform has successfully received the incoming message. | [optional] +**phone_number_id** | **str** | ID of the destination phone number. | [optional] +**uri** | **str** | The URI for this resource, relative to the API base URL | [optional] + +## Example + +```python +from freeclimb.models.message_delivery_webhook import MessageDeliveryWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageDeliveryWebhook from a JSON string +message_delivery_webhook_instance = MessageDeliveryWebhook.from_json(json) +# print the JSON string representation of the object +print(MessageDeliveryWebhook.to_json()) + +# convert the object into a dict +message_delivery_webhook_dict = message_delivery_webhook_instance.to_dict() +# create an instance of MessageDeliveryWebhook from a dict +message_delivery_webhook_from_dict = MessageDeliveryWebhook.from_dict(message_delivery_webhook_dict) +``` +[[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/MessageDirection.md b/docs/MessageDirection.md index 3cdd7ed..995dc98 100644 --- a/docs/MessageDirection.md +++ b/docs/MessageDirection.md @@ -1,10 +1,11 @@ # MessageDirection -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **INBOUND** | **MessageDirection** | | Represented in Python as "inbound" | -| **OUTBOUND** | **MessageDirection** | | Represented in Python as "outbound" | + +## Enum + +* `INBOUND` (value: `'inbound'`) + +* `OUTBOUND` (value: `'outbound'`) [[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/MessageRequest.md b/docs/MessageRequest.md index 9c07aa8..b18c182 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -1,18 +1,37 @@ # MessageRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_from** | **str** | Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. | -**to** | **str** | Phone number to receive the message. Must be within FreeClimb's service area. | -**text** | **str** | Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. | **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] +**var_from** | **str** | Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. | +**to** | **str** | Phone number to receive the message. Must be within FreeClimb's service area. | +**text** | **str** | Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. | **notification_url** | **str** | When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored. | [optional] -**media_urls** | **[str], none_type** | an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile. | [optional] +**media_urls** | **List[str]** | an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile. | [optional] + +## Example + +```python +from freeclimb.models.message_request import MessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageRequest from a JSON string +message_request_instance = MessageRequest.from_json(json) +# print the JSON string representation of the object +print(MessageRequest.to_json()) +# convert the object into a dict +message_request_dict = message_request_instance.to_dict() +# create an instance of MessageRequest from a dict +message_request_from_dict = MessageRequest.from_dict(message_request_dict) +``` [[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/MessageRequestAllOf.md b/docs/MessageRequestAllOf.md deleted file mode 100644 index ee8d9c1..0000000 --- a/docs/MessageRequestAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# MessageRequestAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_from** | **str** | Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. | -**to** | **str** | Phone number to receive the message. Must be within FreeClimb's service area. | -**text** | **str** | Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. | -**notification_url** | **str** | When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored. | [optional] -**media_urls** | **[str], none_type** | an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile. | [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/MessageResult.md b/docs/MessageResult.md index 1e48f3d..ffeffea 100644 --- a/docs/MessageResult.md +++ b/docs/MessageResult.md @@ -1,25 +1,44 @@ # MessageResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**account_id** | **str, none_type** | String that uniquely identifies this account resource. | [optional] -**message_id** | **str, none_type** | String that uniquely identifies this message resource | [optional] +**account_id** | **str** | String that uniquely identifies this account resource. | [optional] +**message_id** | **str** | String that uniquely identifies this message resource | [optional] **status** | [**MessageStatus**](MessageStatus.md) | | [optional] -**_from** | **str, none_type** | Phone number in E.164 format that sent the message. | [optional] -**to** | **str, none_type** | Phone number in E.164 format that received the message. | [optional] -**text** | **str, none_type** | Message contents | [optional] -**direction** | **str, none_type** | Noting whether the message was inbound or outbound | [optional] -**notification_url** | **str, none_type** | URL invoked when message sent | [optional] -**brand_id** | **str, none_type** | The unique identifier for the brand associated with the message | [optional] -**campaign_id** | **str, none_type** | The unique identifier for the campaign associated with the message | [optional] -**segment_count** | **float, none_type** | The number of segments into which the message was split | [optional] -**media_urls** | **[str], none_type** | an array of HTTP URLs which were attached this this message | [optional] +**var_from** | **str** | Phone number in E.164 format that sent the message. | [optional] +**to** | **str** | Phone number in E.164 format that received the message. | [optional] +**text** | **str** | Message contents | [optional] +**direction** | **str** | Noting whether the message was inbound or outbound | [optional] +**notification_url** | **str** | URL invoked when message sent | [optional] +**brand_id** | **str** | The unique identifier for the brand associated with the message | [optional] +**campaign_id** | **str** | The unique identifier for the campaign associated with the message | [optional] +**segment_count** | **float** | The number of segments into which the message was split | [optional] +**media_urls** | **List[str]** | an array of HTTP URLs which were attached this this message | [optional] + +## Example + +```python +from freeclimb.models.message_result import MessageResult + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageResult from a JSON string +message_result_instance = MessageResult.from_json(json) +# print the JSON string representation of the object +print(MessageResult.to_json()) +# convert the object into a dict +message_result_dict = message_result_instance.to_dict() +# create an instance of MessageResult from a dict +message_result_from_dict = MessageResult.from_dict(message_result_dict) +``` [[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/MessageResultAllOf.md b/docs/MessageResultAllOf.md deleted file mode 100644 index 287f621..0000000 --- a/docs/MessageResultAllOf.md +++ /dev/null @@ -1,21 +0,0 @@ -# MessageResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **str, none_type** | String that uniquely identifies this account resource. | [optional] -**message_id** | **str, none_type** | String that uniquely identifies this message resource | [optional] -**status** | [**MessageStatus**](MessageStatus.md) | | [optional] -**_from** | **str, none_type** | Phone number in E.164 format that sent the message. | [optional] -**to** | **str, none_type** | Phone number in E.164 format that received the message. | [optional] -**text** | **str, none_type** | Message contents | [optional] -**direction** | **str, none_type** | Noting whether the message was inbound or outbound | [optional] -**notification_url** | **str, none_type** | URL invoked when message sent | [optional] -**brand_id** | **str, none_type** | The unique identifier for the brand associated with the message | [optional] -**campaign_id** | **str, none_type** | The unique identifier for the campaign associated with the message | [optional] -**segment_count** | **float, none_type** | The number of segments into which the message was split | [optional] -**media_urls** | **[str], none_type** | an array of HTTP URLs which were attached this this message | [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/MessageStatus.md b/docs/MessageStatus.md index 60aa980..b2c099c 100644 --- a/docs/MessageStatus.md +++ b/docs/MessageStatus.md @@ -1,20 +1,30 @@ # MessageStatus Indicates the state of the message through the message lifecycle including: new, queued, rejected, sending, sent, failed, received, undelivered, expired, deleted, and unknown -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **NEW** | **MessageStatus** | | Represented in Python as "new" | -| **QUEUED** | **MessageStatus** | | Represented in Python as "queued" | -| **REJECTED** | **MessageStatus** | | Represented in Python as "rejected" | -| **SENDING** | **MessageStatus** | | Represented in Python as "sending" | -| **SENT** | **MessageStatus** | | Represented in Python as "sent" | -| **FAILED** | **MessageStatus** | | Represented in Python as "failed" | -| **RECEIVED** | **MessageStatus** | | Represented in Python as "received" | -| **UNDELIVERED** | **MessageStatus** | | Represented in Python as "undelivered" | -| **EXPIRED** | **MessageStatus** | | Represented in Python as "expired" | -| **DELETED** | **MessageStatus** | | Represented in Python as "deleted" | -| **UNKNOWN** | **MessageStatus** | | Represented in Python as "unknown" | + +## Enum + +* `NEW` (value: `'new'`) + +* `QUEUED` (value: `'queued'`) + +* `REJECTED` (value: `'rejected'`) + +* `SENDING` (value: `'sending'`) + +* `SENT` (value: `'sent'`) + +* `FAILED` (value: `'failed'`) + +* `RECEIVED` (value: `'received'`) + +* `UNDELIVERED` (value: `'undelivered'`) + +* `EXPIRED` (value: `'expired'`) + +* `DELETED` (value: `'deleted'`) + +* `UNKNOWN` (value: `'unknown'`) [[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/MessageStatusWebhook.md b/docs/MessageStatusWebhook.md new file mode 100644 index 0000000..651c212 --- /dev/null +++ b/docs/MessageStatusWebhook.md @@ -0,0 +1,40 @@ +# MessageStatusWebhook + +An outbound SMS has changed status and the notificationUrl from the Sms command or Send an SMS request is being invoked. A PerCL response will be ignored. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Value will be messageStatus - An outbound SMS has changed status and the Sms command's notificationUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**message_id** | **str** | Unique ID for this message, generated by FreeClimb. | [optional] +**call_id** | **str** | Unique ID for the Call in the context of which the Sms PerCL command was issued. | [optional] +**var_from** | **str** | aPhone number used to initiate the SMS message (in E.164 format). | [optional] +**to** | **str** | Destination number of the SMS message (in E.164 format). | [optional] +**text** | **str** | Body of the SMS message. | [optional] +**direction** | **str** | Value will be outbound to indicate an outgoing SMS from FreeClimb. | [optional] +**application_id** | **str** | ID of the application to which the destination number is assigned. May be null if the originating number is invalid in some way or is not registered to an application. | [optional] +**status** | [**MessageStatus**](MessageStatus.md) | | [optional] +**phone_number_id** | **str** | ID of the destination phone number. | [optional] + +## Example + +```python +from freeclimb.models.message_status_webhook import MessageStatusWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageStatusWebhook from a JSON string +message_status_webhook_instance = MessageStatusWebhook.from_json(json) +# print the JSON string representation of the object +print(MessageStatusWebhook.to_json()) + +# convert the object into a dict +message_status_webhook_dict = message_status_webhook_instance.to_dict() +# create an instance of MessageStatusWebhook from a dict +message_status_webhook_from_dict = MessageStatusWebhook.from_dict(message_status_webhook_dict) +``` +[[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/MessagesList.md b/docs/MessagesList.md index f96c4b6..d54b37e 100644 --- a/docs/MessagesList.md +++ b/docs/MessagesList.md @@ -1,17 +1,36 @@ # MessagesList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**messages** | [**[MessageResult], none_type**](MessageResult.md) | Array of messages | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**messages** | [**List[MessageResult]**](MessageResult.md) | Array of messages | [optional] + +## Example + +```python +from freeclimb.models.messages_list import MessagesList + +# TODO update the JSON string below +json = "{}" +# create an instance of MessagesList from a JSON string +messages_list_instance = MessagesList.from_json(json) +# print the JSON string representation of the object +print(MessagesList.to_json()) +# convert the object into a dict +messages_list_dict = messages_list_instance.to_dict() +# create an instance of MessagesList from a dict +messages_list_from_dict = MessagesList.from_dict(messages_list_dict) +``` [[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/MessagesListAllOf.md b/docs/MessagesListAllOf.md deleted file mode 100644 index a85b616..0000000 --- a/docs/MessagesListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# MessagesListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**messages** | [**[MessageResult], none_type**](MessageResult.md) | Array of messages | [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/MutableResourceModel.md b/docs/MutableResourceModel.md index 2a56605..abc8752 100644 --- a/docs/MutableResourceModel.md +++ b/docs/MutableResourceModel.md @@ -1,6 +1,8 @@ # MutableResourceModel + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] @@ -8,6 +10,23 @@ Name | Type | Description | Notes **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] +## Example + +```python +from freeclimb.models.mutable_resource_model import MutableResourceModel + +# TODO update the JSON string below +json = "{}" +# create an instance of MutableResourceModel from a JSON string +mutable_resource_model_instance = MutableResourceModel.from_json(json) +# print the JSON string representation of the object +print(MutableResourceModel.to_json()) + +# convert the object into a dict +mutable_resource_model_dict = mutable_resource_model_instance.to_dict() +# create an instance of MutableResourceModel from a dict +mutable_resource_model_from_dict = MutableResourceModel.from_dict(mutable_resource_model_dict) +``` [[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/OutDial.md b/docs/OutDial.md index df288ef..608210a 100644 --- a/docs/OutDial.md +++ b/docs/OutDial.md @@ -1,7 +1,9 @@ # OutDial The OutDial command is used to call a phone number + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | URL to which FreeClimb sends an HTTP POST request. | @@ -14,8 +16,24 @@ Name | Type | Description | Notes **status_callback_url** | **str** | When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored. | [optional] **timeout** | **int** | Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`. | [optional] **privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.out_dial import OutDial + +# TODO update the JSON string below +json = "{}" +# create an instance of OutDial from a JSON string +out_dial_instance = OutDial.from_json(json) +# print the JSON string representation of the object +print(OutDial.to_json()) + +# convert the object into a dict +out_dial_dict = out_dial_instance.to_dict() +# create an instance of OutDial from a dict +out_dial_from_dict = OutDial.from_dict(out_dial_dict) +``` [[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/OutDialAllOf.md b/docs/OutDialAllOf.md deleted file mode 100644 index aa8ab86..0000000 --- a/docs/OutDialAllOf.md +++ /dev/null @@ -1,19 +0,0 @@ -# OutDialAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | URL to which FreeClimb sends an HTTP POST request. | -**call_connect_url** | **str** | URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. | -**calling_number** | **str** | he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb. | -**destination** | **str** | E.164 representation of the phone number to Call. | -**if_machine** | [**IfMachine**](IfMachine.md) | | [optional] -**if_machine_url** | **str** | When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included. | [optional] -**send_digits** | **str** | DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension. | [optional] -**status_callback_url** | **str** | When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored. | [optional] -**timeout** | **int** | Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`. | [optional] -**privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [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/OutDialApiConnectWebhook.md b/docs/OutDialApiConnectWebhook.md new file mode 100644 index 0000000..1f8f047 --- /dev/null +++ b/docs/OutDialApiConnectWebhook.md @@ -0,0 +1,39 @@ +# OutDialApiConnectWebhook + +An outbound call initiated by the REST API has connected and the callConnectUrl specified in the API request is being invoked. A PerCL response is expected if the call was successfully connected (with status of inProgress). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be outDialApiConnect - An outbound call spawned by the REST API has connected and the callConnectUrl specified in the API request is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child call). | [optional] + +## Example + +```python +from freeclimb.models.out_dial_api_connect_webhook import OutDialApiConnectWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of OutDialApiConnectWebhook from a JSON string +out_dial_api_connect_webhook_instance = OutDialApiConnectWebhook.from_json(json) +# print the JSON string representation of the object +print(OutDialApiConnectWebhook.to_json()) + +# convert the object into a dict +out_dial_api_connect_webhook_dict = out_dial_api_connect_webhook_instance.to_dict() +# create an instance of OutDialApiConnectWebhook from a dict +out_dial_api_connect_webhook_from_dict = OutDialApiConnectWebhook.from_dict(out_dial_api_connect_webhook_dict) +``` +[[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/OutDialConnectWebhook.md b/docs/OutDialConnectWebhook.md new file mode 100644 index 0000000..d23c415 --- /dev/null +++ b/docs/OutDialConnectWebhook.md @@ -0,0 +1,39 @@ +# OutDialConnectWebhook + +A Call generated by OutDial has connected and the callConnectUrl is being invoked. This request is made in the context of the Call leg that was generated using OutDial and not the parent (the OutDialStart webhook is invoked on the parent call to continue that call context). A PerCL response is expected if the call was successfully connected (as indicated by status of inProgress) and begins the execution context for this (child) call. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be outDialConnect - A Call generated by OutDial has connected and the callConnectUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child call). | [optional] + +## Example + +```python +from freeclimb.models.out_dial_connect_webhook import OutDialConnectWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of OutDialConnectWebhook from a JSON string +out_dial_connect_webhook_instance = OutDialConnectWebhook.from_json(json) +# print the JSON string representation of the object +print(OutDialConnectWebhook.to_json()) + +# convert the object into a dict +out_dial_connect_webhook_dict = out_dial_connect_webhook_instance.to_dict() +# create an instance of OutDialConnectWebhook from a dict +out_dial_connect_webhook_from_dict = OutDialConnectWebhook.from_dict(out_dial_connect_webhook_dict) +``` +[[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/OutDialStartWebhook.md b/docs/OutDialStartWebhook.md new file mode 100644 index 0000000..01b378f --- /dev/null +++ b/docs/OutDialStartWebhook.md @@ -0,0 +1,40 @@ +# OutDialStartWebhook + +The OutDial command has started and the actionUrl is being invoked. This request is made in the context of the parent call (Call leg that invoked). A PerCL response is expected. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be outDialStart - The OutDial command has started and the actionUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**dial_call_id** | **str** | ID of the child call that was generated as a result of the Outdial. | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child call). If this was an inbound call or call created via REST API with no parent, this field will be null. | [optional] + +## Example + +```python +from freeclimb.models.out_dial_start_webhook import OutDialStartWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of OutDialStartWebhook from a JSON string +out_dial_start_webhook_instance = OutDialStartWebhook.from_json(json) +# print the JSON string representation of the object +print(OutDialStartWebhook.to_json()) + +# convert the object into a dict +out_dial_start_webhook_dict = out_dial_start_webhook_instance.to_dict() +# create an instance of OutDialStartWebhook from a dict +out_dial_start_webhook_from_dict = OutDialStartWebhook.from_dict(out_dial_start_webhook_dict) +``` +[[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/PaginationModel.md b/docs/PaginationModel.md index 8b407a4..a6ce821 100644 --- a/docs/PaginationModel.md +++ b/docs/PaginationModel.md @@ -1,16 +1,35 @@ # PaginationModel + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] + +## Example + +```python +from freeclimb.models.pagination_model import PaginationModel + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationModel from a JSON string +pagination_model_instance = PaginationModel.from_json(json) +# print the JSON string representation of the object +print(PaginationModel.to_json()) +# convert the object into a dict +pagination_model_dict = pagination_model_instance.to_dict() +# create an instance of PaginationModel from a dict +pagination_model_from_dict = PaginationModel.from_dict(pagination_model_dict) +``` [[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/Park.md b/docs/Park.md index d5d8ee8..a94d2c4 100644 --- a/docs/Park.md +++ b/docs/Park.md @@ -1,14 +1,32 @@ # Park The `Park` command allows a caller to be put on hold. You can provide hold music,messages,etc until ready to resume the call. Park is a terminal command. Actions performed on the Call while on hold are provided in a PerCL script in response to the waitUrl property. Actions performed on the Call after it has been unparked (resumed) will be provided in a PerCL script in response to the actionUrl provided. A Call can be resumed in two ways -- REST API invocation or the Unpark percl command. No actions can be nested within Park and Park cannot be nested in any other actions. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **wait_url** | **str** | Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. | **action_url** | **str** | A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call. | **notification_url** | **str** | URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.park import Park + +# TODO update the JSON string below +json = "{}" +# create an instance of Park from a JSON string +park_instance = Park.from_json(json) +# print the JSON string representation of the object +print(Park.to_json()) + +# convert the object into a dict +park_dict = park_instance.to_dict() +# create an instance of Park from a dict +park_from_dict = Park.from_dict(park_dict) +``` [[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/ParkAllOf.md b/docs/ParkAllOf.md deleted file mode 100644 index 33ac43c..0000000 --- a/docs/ParkAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# ParkAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wait_url** | **str** | Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. | -**action_url** | **str** | A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call. | -**notification_url** | **str** | URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters. | [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/Pause.md b/docs/Pause.md index f0e9449..2248646 100644 --- a/docs/Pause.md +++ b/docs/Pause.md @@ -1,12 +1,30 @@ # Pause The `Pause` command halts execution of the current PerCL script for a specified number of milliseconds. If `Pause` is the first command in a PerCL document, FreeClimb will wait for the specified time to elapse before picking up the call. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **length** | **int** | Length in milliseconds. FreeClimb will wait silently before continuing on. | -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.pause import Pause + +# TODO update the JSON string below +json = "{}" +# create an instance of Pause from a JSON string +pause_instance = Pause.from_json(json) +# print the JSON string representation of the object +print(Pause.to_json()) + +# convert the object into a dict +pause_dict = pause_instance.to_dict() +# create an instance of Pause from a dict +pause_from_dict = Pause.from_dict(pause_dict) +``` [[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/PauseAllOf.md b/docs/PauseAllOf.md deleted file mode 100644 index 4663f9a..0000000 --- a/docs/PauseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# PauseAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**length** | **int** | Length in milliseconds. FreeClimb will wait silently before continuing on. | - -[[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/PerclCommand.md b/docs/PerclCommand.md index 58645b0..ceb5144 100644 --- a/docs/PerclCommand.md +++ b/docs/PerclCommand.md @@ -1,11 +1,30 @@ # PerclCommand An individual command used in a PerCLScript. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.percl_command import PerclCommand + +# TODO update the JSON string below +json = "{}" +# create an instance of PerclCommand from a JSON string +percl_command_instance = PerclCommand.from_json(json) +# print the JSON string representation of the object +print(PerclCommand.to_json()) + +# convert the object into a dict +percl_command_dict = percl_command_instance.to_dict() +# create an instance of PerclCommand from a dict +percl_command_from_dict = PerclCommand.from_dict(percl_command_dict) +``` [[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/PerclScript.md b/docs/PerclScript.md index 45a9a22..f8c5d57 100644 --- a/docs/PerclScript.md +++ b/docs/PerclScript.md @@ -1,11 +1,30 @@ # PerclScript A PerCL script to be returned to the FreeClimb servers in FreeClimb applications + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commands** | [**[PerclCommand]**](PerclCommand.md) | A JSON array of PerCL commands | [optional] +**commands** | [**List[PerclCommand]**](PerclCommand.md) | A JSON array of PerCL commands | [optional] + +## Example + +```python +from freeclimb.models.percl_script import PerclScript + +# TODO update the JSON string below +json = "{}" +# create an instance of PerclScript from a JSON string +percl_script_instance = PerclScript.from_json(json) +# print the JSON string representation of the object +print(PerclScript.to_json()) +# convert the object into a dict +percl_script_dict = percl_script_instance.to_dict() +# create an instance of PerclScript from a dict +percl_script_from_dict = PerclScript.from_dict(percl_script_dict) +``` [[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/Play.md b/docs/Play.md index 65fd85b..f02d927 100644 --- a/docs/Play.md +++ b/docs/Play.md @@ -1,14 +1,32 @@ # Play The `Play` command plays an audio file back to the caller. The audio file may be located at any location accessible via a URL. `Play` can exist as a stand-alone command or as a nested command. It does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **file** | **str** | RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. | **loop** | **int** | Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up. | [optional] **privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.play import Play + +# TODO update the JSON string below +json = "{}" +# create an instance of Play from a JSON string +play_instance = Play.from_json(json) +# print the JSON string representation of the object +print(Play.to_json()) + +# convert the object into a dict +play_dict = play_instance.to_dict() +# create an instance of Play from a dict +play_from_dict = Play.from_dict(play_dict) +``` [[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/PlayAllOf.md b/docs/PlayAllOf.md deleted file mode 100644 index b855a8b..0000000 --- a/docs/PlayAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# PlayAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | **str** | RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. | -**loop** | **int** | Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up. | [optional] -**privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [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/PlayBeep.md b/docs/PlayBeep.md index 552920a..f2b73ae 100644 --- a/docs/PlayBeep.md +++ b/docs/PlayBeep.md @@ -1,13 +1,16 @@ # PlayBeep Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **ALWAYS** | **PlayBeep** | | Represented in Python as "always" | -| **NEVER** | **PlayBeep** | | Represented in Python as "never" | -| **ENTRY_ONLY** | **PlayBeep** | | Represented in Python as "entryOnly" | -| **EXIT_ONLY** | **PlayBeep** | | Represented in Python as "exitOnly" | + +## Enum + +* `ALWAYS` (value: `'always'`) + +* `NEVER` (value: `'never'`) + +* `ENTRYONLY` (value: `'entryOnly'`) + +* `EXITONLY` (value: `'exitOnly'`) [[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/PlayEarlyMedia.md b/docs/PlayEarlyMedia.md index 08cccec..e9253fc 100644 --- a/docs/PlayEarlyMedia.md +++ b/docs/PlayEarlyMedia.md @@ -1,12 +1,30 @@ # PlayEarlyMedia `PlayEarlyMedia` is relevant only when present as the very first command in the PerCL script returned for an incoming Call. In such cases, the command is executed before FreeClimb attempts to connect the call. The audio file it uses can be stored in any location that is accessible via URL. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **file** | **str** | RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default. | -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.play_early_media import PlayEarlyMedia + +# TODO update the JSON string below +json = "{}" +# create an instance of PlayEarlyMedia from a JSON string +play_early_media_instance = PlayEarlyMedia.from_json(json) +# print the JSON string representation of the object +print(PlayEarlyMedia.to_json()) + +# convert the object into a dict +play_early_media_dict = play_early_media_instance.to_dict() +# create an instance of PlayEarlyMedia from a dict +play_early_media_from_dict = PlayEarlyMedia.from_dict(play_early_media_dict) +``` [[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/PlayEarlyMediaAllOf.md b/docs/PlayEarlyMediaAllOf.md deleted file mode 100644 index 31b2f66..0000000 --- a/docs/PlayEarlyMediaAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# PlayEarlyMediaAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | **str** | RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default. | - -[[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/QueueList.md b/docs/QueueList.md index 0f9e8fe..d1016bd 100644 --- a/docs/QueueList.md +++ b/docs/QueueList.md @@ -1,17 +1,36 @@ # QueueList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**queues** | [**[QueueResult], none_type**](QueueResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**queues** | [**List[QueueResult]**](QueueResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.queue_list import QueueList + +# TODO update the JSON string below +json = "{}" +# create an instance of QueueList from a JSON string +queue_list_instance = QueueList.from_json(json) +# print the JSON string representation of the object +print(QueueList.to_json()) +# convert the object into a dict +queue_list_dict = queue_list_instance.to_dict() +# create an instance of QueueList from a dict +queue_list_from_dict = QueueList.from_dict(queue_list_dict) +``` [[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/QueueListAllOf.md b/docs/QueueListAllOf.md deleted file mode 100644 index 37b338b..0000000 --- a/docs/QueueListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# QueueListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**queues** | [**[QueueResult], none_type**](QueueResult.md) | | [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/QueueMember.md b/docs/QueueMember.md index cbbe43e..33712f2 100644 --- a/docs/QueueMember.md +++ b/docs/QueueMember.md @@ -1,14 +1,33 @@ # QueueMember + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uri** | **str, none_type** | URI for this Queue Member resource, relative to the API base URL. | [optional] -**call_id** | **str, none_type** | ID of the Call associated with this Queue Member. | [optional] -**wait_time** | **int, none_type** | Number of seconds the Member has been in the queue. | [optional] -**position** | **int, none_type** | Member's current position in the Queue, 1 indexed. | [optional] -**date_enqueued** | **str, none_type** | Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] +**uri** | **str** | URI for this Queue Member resource, relative to the API base URL. | [optional] +**call_id** | **str** | ID of the Call associated with this Queue Member. | [optional] +**wait_time** | **int** | Number of seconds the Member has been in the queue. | [optional] +**position** | **int** | Member's current position in the Queue, 1 indexed. | [optional] +**date_enqueued** | **str** | Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] + +## Example + +```python +from freeclimb.models.queue_member import QueueMember + +# TODO update the JSON string below +json = "{}" +# create an instance of QueueMember from a JSON string +queue_member_instance = QueueMember.from_json(json) +# print the JSON string representation of the object +print(QueueMember.to_json()) +# convert the object into a dict +queue_member_dict = queue_member_instance.to_dict() +# create an instance of QueueMember from a dict +queue_member_from_dict = QueueMember.from_dict(queue_member_dict) +``` [[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/QueueMemberList.md b/docs/QueueMemberList.md index 21ca0a5..160f5f9 100644 --- a/docs/QueueMemberList.md +++ b/docs/QueueMemberList.md @@ -1,17 +1,36 @@ # QueueMemberList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**queue_members** | [**[QueueMember], none_type**](QueueMember.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**queue_members** | [**List[QueueMember]**](QueueMember.md) | | [optional] + +## Example + +```python +from freeclimb.models.queue_member_list import QueueMemberList + +# TODO update the JSON string below +json = "{}" +# create an instance of QueueMemberList from a JSON string +queue_member_list_instance = QueueMemberList.from_json(json) +# print the JSON string representation of the object +print(QueueMemberList.to_json()) +# convert the object into a dict +queue_member_list_dict = queue_member_list_instance.to_dict() +# create an instance of QueueMemberList from a dict +queue_member_list_from_dict = QueueMemberList.from_dict(queue_member_list_dict) +``` [[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/QueueMemberListAllOf.md b/docs/QueueMemberListAllOf.md deleted file mode 100644 index 0d1e8a3..0000000 --- a/docs/QueueMemberListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# QueueMemberListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**queue_members** | [**[QueueMember], none_type**](QueueMember.md) | | [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/QueueRequest.md b/docs/QueueRequest.md index b3ad38c..c36325c 100644 --- a/docs/QueueRequest.md +++ b/docs/QueueRequest.md @@ -1,11 +1,30 @@ # QueueRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alias** | **str** | Description for this Queue. Max length is 64 characters. | [optional] -**max_size** | **int** | Maximum number of calls this queue can hold. Default is 100. Maximum is 1000. **Note:** Reducing the maxSize of a Queue causes the Queue to reject incoming requests until it shrinks below the new value of maxSize. | [optional] if omitted the server will use the default value of 100 +**max_size** | **int** | Maximum number of calls this queue can hold. Default is 100. Maximum is 1000. **Note:** Reducing the maxSize of a Queue causes the Queue to reject incoming requests until it shrinks below the new value of maxSize. | [optional] [default to 100] + +## Example + +```python +from freeclimb.models.queue_request import QueueRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of QueueRequest from a JSON string +queue_request_instance = QueueRequest.from_json(json) +# print the JSON string representation of the object +print(QueueRequest.to_json()) +# convert the object into a dict +queue_request_dict = queue_request_instance.to_dict() +# create an instance of QueueRequest from a dict +queue_request_from_dict = QueueRequest.from_dict(queue_request_dict) +``` [[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/QueueResult.md b/docs/QueueResult.md index 6f25302..87359b3 100644 --- a/docs/QueueResult.md +++ b/docs/QueueResult.md @@ -1,20 +1,39 @@ # QueueResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**account_id** | **str, none_type** | ID of the account that created this Queue. | [optional] -**queue_id** | **str, none_type** | A string that uniquely identifies this Queue resource. | [optional] -**alias** | **str, none_type** | A description for this Queue. | [optional] -**max_size** | **int, none_type** | The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000. | [optional] -**current_size** | **int, none_type** | Count of Calls currently in the Queue. | [optional] -**average_queue_removal_time** | **int, none_type** | The average amount of time (in seconds) for a call to be removed from the queue. | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | List of subresources for this Queue (which includes Queue members). | [optional] +**account_id** | **str** | ID of the account that created this Queue. | [optional] +**queue_id** | **str** | A string that uniquely identifies this Queue resource. | [optional] +**alias** | **str** | A description for this Queue. | [optional] +**max_size** | **int** | The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000. | [optional] +**current_size** | **int** | Count of Calls currently in the Queue. | [optional] +**average_queue_removal_time** | **int** | The average amount of time (in seconds) for a call to be removed from the queue. | [optional] +**subresource_uris** | **object** | List of subresources for this Queue (which includes Queue members). | [optional] + +## Example + +```python +from freeclimb.models.queue_result import QueueResult + +# TODO update the JSON string below +json = "{}" +# create an instance of QueueResult from a JSON string +queue_result_instance = QueueResult.from_json(json) +# print the JSON string representation of the object +print(QueueResult.to_json()) +# convert the object into a dict +queue_result_dict = queue_result_instance.to_dict() +# create an instance of QueueResult from a dict +queue_result_from_dict = QueueResult.from_dict(queue_result_dict) +``` [[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/QueueResultAllOf.md b/docs/QueueResultAllOf.md deleted file mode 100644 index cd9129d..0000000 --- a/docs/QueueResultAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# QueueResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **str, none_type** | ID of the account that created this Queue. | [optional] -**queue_id** | **str, none_type** | A string that uniquely identifies this Queue resource. | [optional] -**alias** | **str, none_type** | A description for this Queue. | [optional] -**max_size** | **int, none_type** | The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000. | [optional] -**current_size** | **int, none_type** | Count of Calls currently in the Queue. | [optional] -**average_queue_removal_time** | **int, none_type** | The average amount of time (in seconds) for a call to be removed from the queue. | [optional] -**subresource_uris** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | List of subresources for this Queue (which includes Queue members). | [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/QueueResultStatus.md b/docs/QueueResultStatus.md index 690e472..8c06f5a 100644 --- a/docs/QueueResultStatus.md +++ b/docs/QueueResultStatus.md @@ -1,12 +1,15 @@ # QueueResultStatus -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **QUEUE_FULL** | **QueueResultStatus** | | Represented in Python as "queueFull" | -| **DEQUEUED** | **QueueResultStatus** | | Represented in Python as "dequeued" | -| **HANGUP** | **QueueResultStatus** | | Represented in Python as "hangup" | -| **SYSTEM_ERROR** | **QueueResultStatus** | | Represented in Python as "systemError" | + +## Enum + +* `QUEUEFULL` (value: `'queueFull'`) + +* `DEQUEUED` (value: `'dequeued'`) + +* `HANGUP` (value: `'hangup'`) + +* `SYSTEMERROR` (value: `'systemError'`) [[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/QueueWaitWebhook.md b/docs/QueueWaitWebhook.md new file mode 100644 index 0000000..85e8046 --- /dev/null +++ b/docs/QueueWaitWebhook.md @@ -0,0 +1,41 @@ +# QueueWaitWebhook + +A queued Call is requesting instructions to execute during the wait in the Queue and the corresponding waitUrl is being invoked. A PerCL response is expected. The following are the only PerCL commands supported in the PerCL script response to a request to the waitUrl: Play,Say,Pause,GetDigits,Dequeue,Hangup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be queueWait - A queued call is requesting instructions to execute during the wait in the queue and the corresponding waitUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**queue_position** | **str** | Current queue position of the enqueued Call. | [optional] +**queue_time** | **int** | Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. | [optional] +**current_queue_size** | **int** | Current number of enqueued Calls in this Queue. | [optional] + +## Example + +```python +from freeclimb.models.queue_wait_webhook import QueueWaitWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of QueueWaitWebhook from a JSON string +queue_wait_webhook_instance = QueueWaitWebhook.from_json(json) +# print the JSON string representation of the object +print(QueueWaitWebhook.to_json()) + +# convert the object into a dict +queue_wait_webhook_dict = queue_wait_webhook_instance.to_dict() +# create an instance of QueueWaitWebhook from a dict +queue_wait_webhook_from_dict = QueueWaitWebhook.from_dict(queue_wait_webhook_dict) +``` +[[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/RecordUtterance.md b/docs/RecordUtterance.md index 07d4cb5..9efc8b5 100644 --- a/docs/RecordUtterance.md +++ b/docs/RecordUtterance.md @@ -1,7 +1,9 @@ # RecordUtterance The `RecordUtterance` command records the caller's voice and returns the URL of a file containing the audio recording. `RecordUtterance` is blocking and is a terminal command. As such, the `actionUrl` property is required, and control of the Call picks up using the PerCL returned in response to the `actionUrl`. Recording information is returned in the `actionUrl` request. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. | @@ -11,8 +13,24 @@ Name | Type | Description | Notes **play_beep** | **bool** | Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played. | [optional] **auto_start** | **bool** | If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated. | [optional] **privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.record_utterance import RecordUtterance + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordUtterance from a JSON string +record_utterance_instance = RecordUtterance.from_json(json) +# print the JSON string representation of the object +print(RecordUtterance.to_json()) + +# convert the object into a dict +record_utterance_dict = record_utterance_instance.to_dict() +# create an instance of RecordUtterance from a dict +record_utterance_from_dict = RecordUtterance.from_dict(record_utterance_dict) +``` [[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/RecordUtteranceAllOf.md b/docs/RecordUtteranceAllOf.md deleted file mode 100644 index cd5c6ec..0000000 --- a/docs/RecordUtteranceAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# RecordUtteranceAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. | -**silence_timeout_ms** | **int** | Interval of silence that should elapse before ending the recording. | [optional] -**finish_on_key** | **str** | Key that triggers the end of the recording. any digit, '#', or '*' | [optional] -**max_length_sec** | **int** | Maximum length for the command execution in seconds. | [optional] -**play_beep** | **bool** | Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played. | [optional] -**auto_start** | **bool** | If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated. | [optional] -**privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [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/RecordUtteranceTermReason.md b/docs/RecordUtteranceTermReason.md index 9b0c7dc..672b9e5 100644 --- a/docs/RecordUtteranceTermReason.md +++ b/docs/RecordUtteranceTermReason.md @@ -1,12 +1,15 @@ # RecordUtteranceTermReason -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **FINISH_KEY** | **RecordUtteranceTermReason** | | Represented in Python as "finishKey" | -| **TIMEOUT** | **RecordUtteranceTermReason** | | Represented in Python as "timeout" | -| **HANGUP** | **RecordUtteranceTermReason** | | Represented in Python as "hangup" | -| **MAX_LENGTH** | **RecordUtteranceTermReason** | | Represented in Python as "maxLength" | + +## Enum + +* `FINISHKEY` (value: `'finishKey'`) + +* `TIMEOUT` (value: `'timeout'`) + +* `HANGUP` (value: `'hangup'`) + +* `MAXLENGTH` (value: `'maxLength'`) [[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/RecordWebhook.md b/docs/RecordWebhook.md new file mode 100644 index 0000000..7c3a58d --- /dev/null +++ b/docs/RecordWebhook.md @@ -0,0 +1,46 @@ +# RecordWebhook + +The RecordUtterance command has completed and its actionUrl is being invoked. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | The context or reason why this request is being made. Will be record - The RecordUtterance command has completed and its actionUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**recording_id** | **str** | ID of the recording. | [optional] +**recording_url** | **str** | URL of the recorded audio file. This URL can be used as is in a Play command to play the recording (no authentication needed). It can also be used to download a recording file via the REST API. | [optional] +**recording_size** | **str** | Size of the recording in bytes | [optional] +**recording_format** | **str** | File type of the recording (audio/wav) | [optional] +**recording_duration_sec** | **int** | Duration of the recorded audio rounded up to the nearest second (in seconds) | [optional] +**term_reason** | [**RecordUtteranceTermReason**](RecordUtteranceTermReason.md) | | [optional] +**parent_call_id** | **str** | ID of Call that created this leg (child call). | [optional] +**privacy_mode** | **bool** | If true then it indicates the recording will only be available for download for two minutes prior to it being deleted. This is to minimize risk of anyone else getting access to the url and attempting to access it. | [optional] + +## Example + +```python +from freeclimb.models.record_webhook import RecordWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordWebhook from a JSON string +record_webhook_instance = RecordWebhook.from_json(json) +# print the JSON string representation of the object +print(RecordWebhook.to_json()) + +# convert the object into a dict +record_webhook_dict = record_webhook_instance.to_dict() +# create an instance of RecordWebhook from a dict +record_webhook_from_dict = RecordWebhook.from_dict(record_webhook_dict) +``` +[[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/RecordingList.md b/docs/RecordingList.md index 7775a6b..39ca129 100644 --- a/docs/RecordingList.md +++ b/docs/RecordingList.md @@ -1,17 +1,36 @@ # RecordingList + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**recordings** | [**[RecordingResult], none_type**](RecordingResult.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**recordings** | [**List[RecordingResult]**](RecordingResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.recording_list import RecordingList + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordingList from a JSON string +recording_list_instance = RecordingList.from_json(json) +# print the JSON string representation of the object +print(RecordingList.to_json()) +# convert the object into a dict +recording_list_dict = recording_list_instance.to_dict() +# create an instance of RecordingList from a dict +recording_list_from_dict = RecordingList.from_dict(recording_list_dict) +``` [[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/RecordingListAllOf.md b/docs/RecordingListAllOf.md deleted file mode 100644 index 2caaa19..0000000 --- a/docs/RecordingListAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# RecordingListAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**recordings** | [**[RecordingResult], none_type**](RecordingResult.md) | | [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/RecordingResult.md b/docs/RecordingResult.md index a124841..006059f 100644 --- a/docs/RecordingResult.md +++ b/docs/RecordingResult.md @@ -1,18 +1,37 @@ # RecordingResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uri** | **str** | The URI for this resource, relative to /apiserver. | [optional] **date_created** | **str** | The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **date_updated** | **str** | The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] **revision** | **int** | Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated. | [optional] -**recording_id** | **str, none_type** | String that uniquely identifies this recording resource. | [optional] -**account_id** | **str, none_type** | ID of the account that created this recording. | [optional] -**call_id** | **str, none_type** | ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated. | [optional] -**duration_sec** | **int, none_type** | Length of the recording in seconds. | [optional] -**conference_id** | **str, none_type** | ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. | [optional] +**recording_id** | **str** | String that uniquely identifies this recording resource. | [optional] +**account_id** | **str** | ID of the account that created this recording. | [optional] +**call_id** | **str** | ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated. | [optional] +**duration_sec** | **int** | Length of the recording in seconds. | [optional] +**conference_id** | **str** | ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. | [optional] + +## Example + +```python +from freeclimb.models.recording_result import RecordingResult + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordingResult from a JSON string +recording_result_instance = RecordingResult.from_json(json) +# print the JSON string representation of the object +print(RecordingResult.to_json()) +# convert the object into a dict +recording_result_dict = recording_result_instance.to_dict() +# create an instance of RecordingResult from a dict +recording_result_from_dict = RecordingResult.from_dict(recording_result_dict) +``` [[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/RecordingResultAllOf.md b/docs/RecordingResultAllOf.md deleted file mode 100644 index f18668d..0000000 --- a/docs/RecordingResultAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# RecordingResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**recording_id** | **str, none_type** | String that uniquely identifies this recording resource. | [optional] -**account_id** | **str, none_type** | ID of the account that created this recording. | [optional] -**call_id** | **str, none_type** | ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated. | [optional] -**duration_sec** | **int, none_type** | Length of the recording in seconds. | [optional] -**conference_id** | **str, none_type** | ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. | [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/Redirect.md b/docs/Redirect.md index 849215f..d6ac246 100644 --- a/docs/Redirect.md +++ b/docs/Redirect.md @@ -1,12 +1,30 @@ # Redirect The `Redirect` command transfers control of a Call to the PerCL at a different URL. `Redirect` is a terminal command, so any actions following it are never executed. The maximum number of redirections allowed during the life time of a Call is 256. This is intended to prevent a Call from possibly looping infinitely due to errors in PerCL being generated. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call. | -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.redirect import Redirect + +# TODO update the JSON string below +json = "{}" +# create an instance of Redirect from a JSON string +redirect_instance = Redirect.from_json(json) +# print the JSON string representation of the object +print(Redirect.to_json()) + +# convert the object into a dict +redirect_dict = redirect_instance.to_dict() +# create an instance of Redirect from a dict +redirect_from_dict = Redirect.from_dict(redirect_dict) +``` [[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/RedirectAllOf.md b/docs/RedirectAllOf.md deleted file mode 100644 index 67dbde1..0000000 --- a/docs/RedirectAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# RedirectAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call. | - -[[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/RedirectWebhook.md b/docs/RedirectWebhook.md new file mode 100644 index 0000000..2244968 --- /dev/null +++ b/docs/RedirectWebhook.md @@ -0,0 +1,39 @@ +# RedirectWebhook + +The Redirect command is executing and its actionUrl is being invoked. A PerCL response is expected. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be redirect - The Redirect command is executing and its actionUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**parent_call_id** | **str** | ID of Call that created this leg (child call). | [optional] + +## Example + +```python +from freeclimb.models.redirect_webhook import RedirectWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of RedirectWebhook from a JSON string +redirect_webhook_instance = RedirectWebhook.from_json(json) +# print the JSON string representation of the object +print(RedirectWebhook.to_json()) + +# convert the object into a dict +redirect_webhook_dict = redirect_webhook_instance.to_dict() +# create an instance of RedirectWebhook from a dict +redirect_webhook_from_dict = RedirectWebhook.from_dict(redirect_webhook_dict) +``` +[[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/Reject.md b/docs/Reject.md index 5fdf068..1d1372f 100644 --- a/docs/Reject.md +++ b/docs/Reject.md @@ -1,12 +1,30 @@ # Reject The `Reject` command blocks an incoming Call. Using `Reject` is the only way to prevent FreeClimb from answering a Call. Any other response will result in an answered Call and your account will be billed. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **reason** | **str** | Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.reject import Reject + +# TODO update the JSON string below +json = "{}" +# create an instance of Reject from a JSON string +reject_instance = Reject.from_json(json) +# print the JSON string representation of the object +print(Reject.to_json()) + +# convert the object into a dict +reject_dict = reject_instance.to_dict() +# create an instance of Reject from a dict +reject_from_dict = Reject.from_dict(reject_dict) +``` [[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/RejectAllOf.md b/docs/RejectAllOf.md deleted file mode 100644 index 5dea2f8..0000000 --- a/docs/RejectAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# RejectAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reason** | **str** | Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application. | [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/RemoveFromConference.md b/docs/RemoveFromConference.md index de334a9..b1e9c72 100644 --- a/docs/RemoveFromConference.md +++ b/docs/RemoveFromConference.md @@ -1,11 +1,29 @@ # RemoveFromConference The `RemoveFromConference` command removes a Participant from a Conference but does not hang up. Instead, the Call is simply unbridged and what happens next with the Call is determined by the PerCL returned in response to the `leaveConferenceUrl` attribute. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.remove_from_conference import RemoveFromConference + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveFromConference from a JSON string +remove_from_conference_instance = RemoveFromConference.from_json(json) +# print the JSON string representation of the object +print(RemoveFromConference.to_json()) + +# convert the object into a dict +remove_from_conference_dict = remove_from_conference_instance.to_dict() +# create an instance of RemoveFromConference from a dict +remove_from_conference_from_dict = RemoveFromConference.from_dict(remove_from_conference_dict) +``` [[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/RemoveFromConferenceAllOf.md b/docs/RemoveFromConferenceAllOf.md deleted file mode 100644 index d3ac7b9..0000000 --- a/docs/RemoveFromConferenceAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# RemoveFromConferenceAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**call_id** | **str** | ID of the Call leg to be removed from the Conference. The Call must be in a Conference or an error will be triggered. | - -[[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/RemoveFromQueueNotificationWebhook.md b/docs/RemoveFromQueueNotificationWebhook.md new file mode 100644 index 0000000..55b751c --- /dev/null +++ b/docs/RemoveFromQueueNotificationWebhook.md @@ -0,0 +1,40 @@ +# RemoveFromQueueNotificationWebhook + +A call has been removed from a queue and the Enqueue command’s actionUrl is being invoked. A PerCL response is expected except if reason is hangup. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Context or reason why this request is being made. Will be removeFromQueueNotification - A Call has been removed from a Queue and the Enqueue command’s actionUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**direction** | [**CallDirection**](CallDirection.md) | | [optional] +**conference_id** | **str** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**queue_id** | **str** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**queue_result** | [**QueueResultStatus**](QueueResultStatus.md) | | [optional] +**queue_time** | **int** | Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. | [optional] + +## Example + +```python +from freeclimb.models.remove_from_queue_notification_webhook import RemoveFromQueueNotificationWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveFromQueueNotificationWebhook from a JSON string +remove_from_queue_notification_webhook_instance = RemoveFromQueueNotificationWebhook.from_json(json) +# print the JSON string representation of the object +print(RemoveFromQueueNotificationWebhook.to_json()) + +# convert the object into a dict +remove_from_queue_notification_webhook_dict = remove_from_queue_notification_webhook_instance.to_dict() +# create an instance of RemoveFromQueueNotificationWebhook from a dict +remove_from_queue_notification_webhook_from_dict = RemoveFromQueueNotificationWebhook.from_dict(remove_from_queue_notification_webhook_dict) +``` +[[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/RequestType.md b/docs/RequestType.md index e3e4f0a..46a355f 100644 --- a/docs/RequestType.md +++ b/docs/RequestType.md @@ -1,31 +1,53 @@ # RequestType -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **INBOUND_CALL** | **RequestType** | | Represented in Python as "inboundCall" | -| **RECORD** | **RequestType** | | Represented in Python as "record" | -| **GET_DIGITS** | **RequestType** | | Represented in Python as "getDigits" | -| **GET_SPEECH** | **RequestType** | | Represented in Python as "getSpeech" | -| **REDIRECT** | **RequestType** | | Represented in Python as "redirect" | -| **PAUSE** | **RequestType** | | Represented in Python as "pause" | -| **OUT_DIAL_START** | **RequestType** | | Represented in Python as "outDialStart" | -| **OUT_DIAL_CONNECT** | **RequestType** | | Represented in Python as "outDialConnect" | -| **OUT_DIAL_API_CONNECT** | **RequestType** | | Represented in Python as "outDialApiConnect" | -| **MACHINE_DETECTED** | **RequestType** | | Represented in Python as "machineDetected" | -| **DEQUEUE** | **RequestType** | | Represented in Python as "dequeue" | -| **QUEUE_WAIT** | **RequestType** | | Represented in Python as "queueWait" | -| **ADD_TO_QUEUE_NOTIFICATION** | **RequestType** | | Represented in Python as "addToQueueNotification" | -| **REMOVE_FROM_QUEUE_NOTIFICATION** | **RequestType** | | Represented in Python as "removeFromQueueNotification" | -| **CALL_STATUS** | **RequestType** | | Represented in Python as "callStatus" | -| **CREATE_CONFERENCE** | **RequestType** | | Represented in Python as "createConference" | -| **CONFERENCE_STATUS** | **RequestType** | | Represented in Python as "conferenceStatus" | -| **LEAVE_CONFERENCE** | **RequestType** | | Represented in Python as "leaveConference" | -| **ADD_TO_CONFERENCE_NOTIFICATION** | **RequestType** | | Represented in Python as "addToConferenceNotification" | -| **CONFERENCE_RECORDING_STATUS** | **RequestType** | | Represented in Python as "conferenceRecordingStatus" | -| **CONFERENCE_CALL_CONTROL** | **RequestType** | | Represented in Python as "conferenceCallControl" | -| **MESSAGE_DELIVERY** | **RequestType** | | Represented in Python as "messageDelivery" | -| **MESSAGE_STATUS** | **RequestType** | | Represented in Python as "messageStatus" | + +## Enum + +* `INBOUNDCALL` (value: `'inboundCall'`) + +* `RECORD` (value: `'record'`) + +* `GETDIGITS` (value: `'getDigits'`) + +* `GETSPEECH` (value: `'getSpeech'`) + +* `REDIRECT` (value: `'redirect'`) + +* `PAUSE` (value: `'pause'`) + +* `OUTDIALSTART` (value: `'outDialStart'`) + +* `OUTDIALCONNECT` (value: `'outDialConnect'`) + +* `OUTDIALAPICONNECT` (value: `'outDialApiConnect'`) + +* `MACHINEDETECTED` (value: `'machineDetected'`) + +* `DEQUEUE` (value: `'dequeue'`) + +* `QUEUEWAIT` (value: `'queueWait'`) + +* `ADDTOQUEUENOTIFICATION` (value: `'addToQueueNotification'`) + +* `REMOVEFROMQUEUENOTIFICATION` (value: `'removeFromQueueNotification'`) + +* `CALLSTATUS` (value: `'callStatus'`) + +* `CREATECONFERENCE` (value: `'createConference'`) + +* `CONFERENCESTATUS` (value: `'conferenceStatus'`) + +* `LEAVECONFERENCE` (value: `'leaveConference'`) + +* `ADDTOCONFERENCENOTIFICATION` (value: `'addToConferenceNotification'`) + +* `CONFERENCERECORDINGSTATUS` (value: `'conferenceRecordingStatus'`) + +* `CONFERENCECALLCONTROL` (value: `'conferenceCallControl'`) + +* `MESSAGEDELIVERY` (value: `'messageDelivery'`) + +* `MESSAGESTATUS` (value: `'messageStatus'`) [[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/SMSTenDLCBrand.md b/docs/SMSTenDLCBrand.md index e6bdd84..92423b5 100644 --- a/docs/SMSTenDLCBrand.md +++ b/docs/SMSTenDLCBrand.md @@ -1,41 +1,60 @@ # SMSTenDLCBrand A brand is a business identity behind the campaign. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**entity_type** | **str** | Entity type behind the brand. This is the form of business establishment. | -**display_name** | **str** | Display or marketing name of the brand. | -**phone** | **str** | Valid phone number in e.164 international format. | -**country** | **str** | ISO2 2 characters country code. Example: US - United States | -**email** | **str** | Valid email address of brand support contact. | -**brand_relationship** | **str** | Brand relationship to the CSP | -**vertical** | **str** | Vertical or industry segment of the brand. | -**mock** | **bool** | Test brand. | -**identity_status** | **str** | TCR assessment of the brand identification status. | -**account_id** | **str, none_type** | ID of the account that created this Queue. | [optional] +**account_id** | **str** | ID of the account that created this Queue. | [optional] +**entity_type** | [**SMSTenDLCBrandEntityType**](SMSTenDLCBrandEntityType.md) | | **csp_id** | **str** | Unique identifier assigned to the csp by the registry. | [optional] [readonly] **brand_id** | **str** | Unique identifier assigned to the brand by the registry. | [optional] [readonly] **first_name** | **str** | First or given name. | [optional] **last_name** | **str** | Last or Surname. | [optional] +**display_name** | **str** | Display or marketing name of the brand. | **company_name** | **str** | (Required for Non-profit/private/public) Legal company name. | [optional] **ein** | **str** | (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S. | [optional] **ein_issuing_country** | **str** | ISO2 2 characters country code. Example: US - United States | [optional] +**phone** | **str** | Valid phone number in e.164 international format. | **street** | **str** | Street number and name. | [optional] **city** | **str** | City name | [optional] **state** | **str** | State. Must be 2 letters code for United States. | [optional] **postal_code** | **str** | Postal codes. Use 5 digit zipcode for United States | [optional] +**country** | **str** | ISO2 2 characters country code. Example: US - United States | +**email** | **str** | Valid email address of brand support contact. | **stock_symbol** | **str** | (Required for public company) stock symbol. | [optional] -**stock_exchange** | **str** | (Required for public company) stock exchange. | [optional] +**stock_exchange** | [**SMSTenDLCBrandStockExchange**](SMSTenDLCBrandStockExchange.md) | | [optional] **ip_address** | **str** | IP address of the browser requesting to create brand identity. | [optional] **website** | **str** | Brand website URL. | [optional] +**brand_relationship** | [**SMSTenDLCBrandRelationship**](SMSTenDLCBrandRelationship.md) | | +**vertical** | **str** | Vertical or industry segment of the brand. | **alt_business_id** | **str** | Alternate business identifier such as DUNS, LEI, or GIIN | [optional] -**alt_business_id_type** | **str** | The type of the Alternative business identifier | [optional] +**alt_business_id_type** | [**SMSTenDLCBrandAltBusinessIdType**](SMSTenDLCBrandAltBusinessIdType.md) | | [optional] **universal_ein** | **str** | Universal EIN of Brand, Read Only. | [optional] [readonly] **reference_id** | **str** | Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations. | [optional] -**optional_attributes** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names. | [optional] +**optional_attributes** | **Dict[str, object]** | Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names. | [optional] +**mock** | **bool** | Test brand. | +**identity_status** | [**SMSTenDLCBrandIdentityStatus**](SMSTenDLCBrandIdentityStatus.md) | | **create_date** | **datetime** | Unix timestamp when brand was created. | [optional] +## Example + +```python +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCBrand from a JSON string +sms_ten_dlc_brand_instance = SMSTenDLCBrand.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCBrand.to_json()) + +# convert the object into a dict +sms_ten_dlc_brand_dict = sms_ten_dlc_brand_instance.to_dict() +# create an instance of SMSTenDLCBrand from a dict +sms_ten_dlc_brand_from_dict = SMSTenDLCBrand.from_dict(sms_ten_dlc_brand_dict) +``` [[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/SMSTenDLCBrandAltBusinessIdType.md b/docs/SMSTenDLCBrandAltBusinessIdType.md new file mode 100644 index 0000000..8d9eaff --- /dev/null +++ b/docs/SMSTenDLCBrandAltBusinessIdType.md @@ -0,0 +1,17 @@ +# SMSTenDLCBrandAltBusinessIdType + +The type of the Alternative business identifier + +## Enum + +* `NONE` (value: `'NONE'`) + +* `DUNS` (value: `'DUNS'`) + +* `GIIN` (value: `'GIIN'`) + +* `LEI` (value: `'LEI'`) + +[[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/SMSTenDLCBrandEntityType.md b/docs/SMSTenDLCBrandEntityType.md new file mode 100644 index 0000000..ae586c5 --- /dev/null +++ b/docs/SMSTenDLCBrandEntityType.md @@ -0,0 +1,19 @@ +# SMSTenDLCBrandEntityType + +Entity type behind the brand. This is the form of business establishment. + +## Enum + +* `PRIVATE_PROFIT` (value: `'PRIVATE_PROFIT'`) + +* `PUBLIC_PROFIT` (value: `'PUBLIC_PROFIT'`) + +* `NON_PROFIT` (value: `'NON_PROFIT'`) + +* `GOVERNMENT` (value: `'GOVERNMENT'`) + +* `SOLE_PROPRIETOR` (value: `'SOLE_PROPRIETOR'`) + +[[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/SMSTenDLCBrandIdentityStatus.md b/docs/SMSTenDLCBrandIdentityStatus.md new file mode 100644 index 0000000..9b8a9eb --- /dev/null +++ b/docs/SMSTenDLCBrandIdentityStatus.md @@ -0,0 +1,17 @@ +# SMSTenDLCBrandIdentityStatus + +TCR assessment of the brand identification status. + +## Enum + +* `SELF_DECLARED` (value: `'SELF_DECLARED'`) + +* `UNVERIFIED` (value: `'UNVERIFIED'`) + +* `VERIFIED` (value: `'VERIFIED'`) + +* `VETTED_VERIFIED` (value: `'VETTED_VERIFIED'`) + +[[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/SMSTenDLCBrandRelationship.md b/docs/SMSTenDLCBrandRelationship.md new file mode 100644 index 0000000..72050ee --- /dev/null +++ b/docs/SMSTenDLCBrandRelationship.md @@ -0,0 +1,19 @@ +# SMSTenDLCBrandRelationship + +Brand relationship to the CSP + +## Enum + +* `BASIC_ACCOUNT` (value: `'BASIC_ACCOUNT'`) + +* `SMALL_ACCOUNT` (value: `'SMALL_ACCOUNT'`) + +* `MEDIUM_ACCOUNT` (value: `'MEDIUM_ACCOUNT'`) + +* `LARGE_ACCOUNT` (value: `'LARGE_ACCOUNT'`) + +* `KEY_ACCOUNT` (value: `'KEY_ACCOUNT'`) + +[[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/SMSTenDLCBrandStockExchange.md b/docs/SMSTenDLCBrandStockExchange.md new file mode 100644 index 0000000..36e29d7 --- /dev/null +++ b/docs/SMSTenDLCBrandStockExchange.md @@ -0,0 +1,63 @@ +# SMSTenDLCBrandStockExchange + +(Required for public company) stock exchange. + +## Enum + +* `NONE` (value: `'NONE'`) + +* `NASDAQ` (value: `'NASDAQ'`) + +* `NYSE` (value: `'NYSE'`) + +* `AMEX` (value: `'AMEX'`) + +* `AMX` (value: `'AMX'`) + +* `ASX` (value: `'ASX'`) + +* `B3` (value: `'B3'`) + +* `BME` (value: `'BME'`) + +* `BSE` (value: `'BSE'`) + +* `FRA` (value: `'FRA'`) + +* `ICEX` (value: `'ICEX'`) + +* `JPX` (value: `'JPX'`) + +* `JSE` (value: `'JSE'`) + +* `KRX` (value: `'KRX'`) + +* `LON` (value: `'LON'`) + +* `NSE` (value: `'NSE'`) + +* `OMX` (value: `'OMX'`) + +* `SEHK` (value: `'SEHK'`) + +* `SGX` (value: `'SGX'`) + +* `SSE` (value: `'SSE'`) + +* `STO` (value: `'STO'`) + +* `SWX` (value: `'SWX'`) + +* `SZSE` (value: `'SZSE'`) + +* `TSX` (value: `'TSX'`) + +* `TWSE` (value: `'TWSE'`) + +* `VSE` (value: `'VSE'`) + +* `OTHER` (value: `'OTHER'`) + +[[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/SMSTenDLCBrandsListResult.md b/docs/SMSTenDLCBrandsListResult.md index df5a87d..2118989 100644 --- a/docs/SMSTenDLCBrandsListResult.md +++ b/docs/SMSTenDLCBrandsListResult.md @@ -1,17 +1,36 @@ # SMSTenDLCBrandsListResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**brands** | [**[SMSTenDLCBrand], none_type**](SMSTenDLCBrand.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**brands** | [**List[SMSTenDLCBrand]**](SMSTenDLCBrand.md) | | [optional] + +## Example + +```python +from freeclimb.models.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCBrandsListResult from a JSON string +sms_ten_dlc_brands_list_result_instance = SMSTenDLCBrandsListResult.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCBrandsListResult.to_json()) +# convert the object into a dict +sms_ten_dlc_brands_list_result_dict = sms_ten_dlc_brands_list_result_instance.to_dict() +# create an instance of SMSTenDLCBrandsListResult from a dict +sms_ten_dlc_brands_list_result_from_dict = SMSTenDLCBrandsListResult.from_dict(sms_ten_dlc_brands_list_result_dict) +``` [[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/SMSTenDLCBrandsListResultAllOf.md b/docs/SMSTenDLCBrandsListResultAllOf.md deleted file mode 100644 index caeebf8..0000000 --- a/docs/SMSTenDLCBrandsListResultAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SMSTenDLCBrandsListResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**brands** | [**[SMSTenDLCBrand], none_type**](SMSTenDLCBrand.md) | | [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/SMSTenDLCCampaign.md b/docs/SMSTenDLCCampaign.md index 790ae4f..ba85860 100644 --- a/docs/SMSTenDLCCampaign.md +++ b/docs/SMSTenDLCCampaign.md @@ -1,45 +1,64 @@ # SMSTenDLCCampaign + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**account_id** | **str** | ID of the account that created this Queue. | [optional] **campaign_id** | **str** | Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. | **csp_id** | **str** | Alphanumeric identifier of the CSP associated with this campaign. | +**reseller_id** | **str** | Alphanumeric identifier of the reseller that you want to associate with this campaign. | [optional] +**status** | [**SMSTenDLCCampaignStatus**](SMSTenDLCCampaignStatus.md) | | [optional] +**create_date** | **datetime** | Unix timestamp when campaign was created. | [optional] +**auto_renewal** | **bool** | Campaign subscription auto-renewal status. | [optional] +**billed_date** | **datetime** | Campaign recent billed date. | [optional] **brand_id** | **str** | Alphanumeric identifier of the brand associated with this campaign. | **usecase** | **str** | Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. | -**sub_usecases** | **[str]** | Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases | +**sub_usecases** | **List[str]** | Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases | **description** | **str** | Summary description of this campaign. | -**mock** | **bool** | Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP. | -**account_id** | **str, none_type** | ID of the account that created this Queue. | [optional] -**reseller_id** | **str, none_type** | Alphanumeric identifier of the reseller that you want to associate with this campaign. | [optional] -**status** | **str** | Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. | [optional] -**create_date** | **datetime** | Unix timestamp when campaign was created. | [optional] -**auto_renewal** | **bool** | Campaign subscription auto-renewal status. | [optional] -**billed_date** | **datetime, none_type** | Campaign recent billed date. | [optional] -**embedded_link** | **bool** | Does message generated by the campaign include URL link in SMS? | [optional] if omitted the server will use the default value of False -**embedded_phone** | **bool** | Does message generated by the campaign include phone number in SMS? | [optional] if omitted the server will use the default value of False +**embedded_link** | **bool** | Does message generated by the campaign include URL link in SMS? | [optional] [default to False] +**embedded_phone** | **bool** | Does message generated by the campaign include phone number in SMS? | [optional] [default to False] **affiliate_marketing** | **bool** | Does message content controlled by affiliate marketing other than the brand? | [optional] -**number_pool** | **bool** | Does campaign utilize pool of phone nubers? | [optional] if omitted the server will use the default value of False +**number_pool** | **bool** | Does campaign utilize pool of phone nubers? | [optional] [default to False] **age_gated** | **bool** | Age gated content in campaign. | [optional] **direct_lending** | **bool** | | [optional] -**subscriber_optin** | **bool** | Does campaign require subscriber to opt-in before SMS is sent to subscriber? | [optional] if omitted the server will use the default value of False -**subscriber_optout** | **bool** | Does campaign support subscriber opt-out keyword(s)? | [optional] if omitted the server will use the default value of False -**subscriber_help** | **bool** | Does campaign responds to help keyword(s)? | [optional] if omitted the server will use the default value of False +**subscriber_optin** | **bool** | Does campaign require subscriber to opt-in before SMS is sent to subscriber? | [optional] [default to False] +**subscriber_optout** | **bool** | Does campaign support subscriber opt-out keyword(s)? | [optional] [default to False] +**subscriber_help** | **bool** | Does campaign responds to help keyword(s)? | [optional] [default to False] **sample1** | **str** | Message sample. Some campaign tiers require 1 or more message samples. | [optional] -**sample2** | **str, none_type** | Message sample. Some campaign tiers require 2 or more message samples. | [optional] -**sample3** | **str, none_type** | Message sample. Some campaign tiers require 3 or more message samples. | [optional] -**sample4** | **str, none_type** | Message sample. Some campaign tiers require 4 or more message samples. | [optional] -**sample5** | **str, none_type** | Message sample. Some campaign tiers require 5 or more message samples. | [optional] -**message_flow** | **str, none_type** | Message flow description. | [optional] -**help_message** | **str, none_type** | Help message of the campaign. | [optional] +**sample2** | **str** | Message sample. Some campaign tiers require 2 or more message samples. | [optional] +**sample3** | **str** | Message sample. Some campaign tiers require 3 or more message samples. | [optional] +**sample4** | **str** | Message sample. Some campaign tiers require 4 or more message samples. | [optional] +**sample5** | **str** | Message sample. Some campaign tiers require 5 or more message samples. | [optional] +**message_flow** | **str** | Message flow description. | [optional] +**help_message** | **str** | Help message of the campaign. | [optional] **optin_keywords** | **str** | Subscriber opt-in keywords. Multiple keywords are comma separated without space. | [optional] **optout_keywords** | **str** | Subscriber opt-out keywords. Multiple keywords are comma separated without space. | [optional] **help_keywords** | **str** | Subscriber help keywords. Multiple keywords are comma separated without space. | [optional] **optin_message** | **str** | Subscriber opt-in message. | [optional] **optout_message** | **str** | Subscriber opt-out message. | [optional] -**reference_id** | **str, none_type** | Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations. | [optional] -**next_renewal_or_expiration_date** | **date, none_type** | When the campaign would be due for its next renew/bill date. | [optional] +**reference_id** | **str** | Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations. | [optional] +**mock** | **bool** | Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP. | +**next_renewal_or_expiration_date** | **date** | When the campaign would be due for its next renew/bill date. | [optional] + +## Example + +```python +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCCampaign from a JSON string +sms_ten_dlc_campaign_instance = SMSTenDLCCampaign.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCCampaign.to_json()) +# convert the object into a dict +sms_ten_dlc_campaign_dict = sms_ten_dlc_campaign_instance.to_dict() +# create an instance of SMSTenDLCCampaign from a dict +sms_ten_dlc_campaign_from_dict = SMSTenDLCCampaign.from_dict(sms_ten_dlc_campaign_dict) +``` [[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/SMSTenDLCCampaignStatus.md b/docs/SMSTenDLCCampaignStatus.md new file mode 100644 index 0000000..fadabf7 --- /dev/null +++ b/docs/SMSTenDLCCampaignStatus.md @@ -0,0 +1,13 @@ +# SMSTenDLCCampaignStatus + +Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + +## Enum + +* `ACTIVE` (value: `'ACTIVE'`) + +* `EXPIRED` (value: `'EXPIRED'`) + +[[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/SMSTenDLCCampaignsListResult.md b/docs/SMSTenDLCCampaignsListResult.md index e79e4e4..85fa14f 100644 --- a/docs/SMSTenDLCCampaignsListResult.md +++ b/docs/SMSTenDLCCampaignsListResult.md @@ -1,17 +1,36 @@ # SMSTenDLCCampaignsListResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**campaigns** | [**[SMSTenDLCCampaign], none_type**](SMSTenDLCCampaign.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**campaigns** | [**List[SMSTenDLCCampaign]**](SMSTenDLCCampaign.md) | | [optional] + +## Example + +```python +from freeclimb.models.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCCampaignsListResult from a JSON string +sms_ten_dlc_campaigns_list_result_instance = SMSTenDLCCampaignsListResult.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCCampaignsListResult.to_json()) +# convert the object into a dict +sms_ten_dlc_campaigns_list_result_dict = sms_ten_dlc_campaigns_list_result_instance.to_dict() +# create an instance of SMSTenDLCCampaignsListResult from a dict +sms_ten_dlc_campaigns_list_result_from_dict = SMSTenDLCCampaignsListResult.from_dict(sms_ten_dlc_campaigns_list_result_dict) +``` [[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/SMSTenDLCCampaignsListResultAllOf.md b/docs/SMSTenDLCCampaignsListResultAllOf.md deleted file mode 100644 index e3673ba..0000000 --- a/docs/SMSTenDLCCampaignsListResultAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SMSTenDLCCampaignsListResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**campaigns** | [**[SMSTenDLCCampaign], none_type**](SMSTenDLCCampaign.md) | | [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/SMSTenDLCPartnerCampaign.md b/docs/SMSTenDLCPartnerCampaign.md index f58ab90..a6b13fd 100644 --- a/docs/SMSTenDLCPartnerCampaign.md +++ b/docs/SMSTenDLCPartnerCampaign.md @@ -1,31 +1,33 @@ # SMSTenDLCPartnerCampaign + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**account_id** | **str** | ID of the account that created this Queue. | [optional] **campaign_id** | **str** | Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. | +**status** | [**SMSTenDLCPartnerCampaignStatus**](SMSTenDLCPartnerCampaignStatus.md) | | [optional] +**create_date** | **datetime** | Unix timestamp when campaign was created. | [optional] **brand_id** | **str** | Alphanumeric identifier of the brand associated with this campaign. | **usecase** | **str** | Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. | **description** | **str** | Summary description of this campaign. | -**account_id** | **str, none_type** | ID of the account that created this Queue. | [optional] -**status** | **str** | Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. | [optional] -**create_date** | **datetime** | Unix timestamp when campaign was created. | [optional] -**embedded_link** | **bool** | Does message generated by the campaign include URL link in SMS? | [optional] if omitted the server will use the default value of False -**embedded_phone** | **bool** | Does message generated by the campaign include phone number in SMS? | [optional] if omitted the server will use the default value of False +**embedded_link** | **bool** | Does message generated by the campaign include URL link in SMS? | [optional] [default to False] +**embedded_phone** | **bool** | Does message generated by the campaign include phone number in SMS? | [optional] [default to False] **affiliate_marketing** | **bool** | Does message content controlled by affiliate marketing other than the brand? | [optional] -**number_pool** | **bool** | Does campaign utilize pool of phone nubers? | [optional] if omitted the server will use the default value of False +**number_pool** | **bool** | Does campaign utilize pool of phone nubers? | [optional] [default to False] **age_gated** | **bool** | Age gated content in campaign. | [optional] **direct_lending** | **bool** | | [optional] -**subscriber_optin** | **bool** | Does campaign require subscriber to opt-in before SMS is sent to subscriber? | [optional] if omitted the server will use the default value of False -**subscriber_optout** | **bool** | Does campaign support subscriber opt-out keyword(s)? | [optional] if omitted the server will use the default value of False -**subscriber_help** | **bool** | Does campaign responds to help keyword(s)? | [optional] if omitted the server will use the default value of False +**subscriber_optin** | **bool** | Does campaign require subscriber to opt-in before SMS is sent to subscriber? | [optional] [default to False] +**subscriber_optout** | **bool** | Does campaign support subscriber opt-out keyword(s)? | [optional] [default to False] +**subscriber_help** | **bool** | Does campaign responds to help keyword(s)? | [optional] [default to False] **sample1** | **str** | Message sample. Some campaign tiers require 1 or more message samples. | [optional] -**sample2** | **str, none_type** | Message sample. Some campaign tiers require 2 or more message samples. | [optional] -**sample3** | **str, none_type** | Message sample. Some campaign tiers require 3 or more message samples. | [optional] -**sample4** | **str, none_type** | Message sample. Some campaign tiers require 4 or more message samples. | [optional] -**sample5** | **str, none_type** | Message sample. Some campaign tiers require 5 or more message samples. | [optional] -**message_flow** | **str, none_type** | Message flow description. | [optional] -**help_message** | **str, none_type** | Help message of the campaign. | [optional] +**sample2** | **str** | Message sample. Some campaign tiers require 2 or more message samples. | [optional] +**sample3** | **str** | Message sample. Some campaign tiers require 3 or more message samples. | [optional] +**sample4** | **str** | Message sample. Some campaign tiers require 4 or more message samples. | [optional] +**sample5** | **str** | Message sample. Some campaign tiers require 5 or more message samples. | [optional] +**message_flow** | **str** | Message flow description. | [optional] +**help_message** | **str** | Help message of the campaign. | [optional] **optin_keywords** | **str** | Subscriber opt-in keywords. Multiple keywords are comma separated without space. | [optional] **optout_keywords** | **str** | Subscriber opt-out keywords. Multiple keywords are comma separated without space. | [optional] **help_keywords** | **str** | Subscriber help keywords. Multiple keywords are comma separated without space. | [optional] @@ -33,6 +35,23 @@ Name | Type | Description | Notes **optout_message** | **str** | Subscriber opt-out message. | [optional] **brand** | [**SMSTenDLCPartnerCampaignBrand**](SMSTenDLCPartnerCampaignBrand.md) | | [optional] +## Example + +```python +from freeclimb.models.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCPartnerCampaign from a JSON string +sms_ten_dlc_partner_campaign_instance = SMSTenDLCPartnerCampaign.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCPartnerCampaign.to_json()) + +# convert the object into a dict +sms_ten_dlc_partner_campaign_dict = sms_ten_dlc_partner_campaign_instance.to_dict() +# create an instance of SMSTenDLCPartnerCampaign from a dict +sms_ten_dlc_partner_campaign_from_dict = SMSTenDLCPartnerCampaign.from_dict(sms_ten_dlc_partner_campaign_dict) +``` [[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/SMSTenDLCPartnerCampaignBrand.md b/docs/SMSTenDLCPartnerCampaignBrand.md index 84e1f65..4dd3565 100644 --- a/docs/SMSTenDLCPartnerCampaignBrand.md +++ b/docs/SMSTenDLCPartnerCampaignBrand.md @@ -1,20 +1,39 @@ # SMSTenDLCPartnerCampaignBrand + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**phone** | **str** | Valid phone number in e.164 international format. | -**email** | **str** | Valid email address of brand support contact. | -**account_id** | **str, none_type** | ID of the account that created this Queue. | [optional] +**account_id** | **str** | ID of the account that created this Queue. | [optional] **brand_id** | **str** | Unique identifier assigned to the brand by the registry. | [optional] [readonly] **first_name** | **str** | First or given name. | [optional] **last_name** | **str** | Last or Surname. | [optional] **display_name** | **str** | Display or marketing name of the brand. | [optional] **company_name** | **str** | (Required for Non-profit/private/public) Legal company name. | [optional] +**phone** | **str** | Valid phone number in e.164 international format. | +**email** | **str** | Valid email address of brand support contact. | **website** | **str** | Brand website URL. | [optional] -**optional_attributes** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names. | [optional] +**optional_attributes** | **Dict[str, object]** | Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names. | [optional] **evp_vetting_score** | **int** | External vetting score. | [optional] +## Example + +```python +from freeclimb.models.sms_ten_dlc_partner_campaign_brand import SMSTenDLCPartnerCampaignBrand + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCPartnerCampaignBrand from a JSON string +sms_ten_dlc_partner_campaign_brand_instance = SMSTenDLCPartnerCampaignBrand.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCPartnerCampaignBrand.to_json()) + +# convert the object into a dict +sms_ten_dlc_partner_campaign_brand_dict = sms_ten_dlc_partner_campaign_brand_instance.to_dict() +# create an instance of SMSTenDLCPartnerCampaignBrand from a dict +sms_ten_dlc_partner_campaign_brand_from_dict = SMSTenDLCPartnerCampaignBrand.from_dict(sms_ten_dlc_partner_campaign_brand_dict) +``` [[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/SMSTenDLCPartnerCampaignStatus.md b/docs/SMSTenDLCPartnerCampaignStatus.md new file mode 100644 index 0000000..b08145b --- /dev/null +++ b/docs/SMSTenDLCPartnerCampaignStatus.md @@ -0,0 +1,13 @@ +# SMSTenDLCPartnerCampaignStatus + +Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + +## Enum + +* `ACTIVE` (value: `'ACTIVE'`) + +* `EXPIRED` (value: `'EXPIRED'`) + +[[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/SMSTenDLCPartnerCampaignsListResult.md b/docs/SMSTenDLCPartnerCampaignsListResult.md index 453b4e5..2999df7 100644 --- a/docs/SMSTenDLCPartnerCampaignsListResult.md +++ b/docs/SMSTenDLCPartnerCampaignsListResult.md @@ -1,17 +1,36 @@ # SMSTenDLCPartnerCampaignsListResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**partner_campaigns** | [**[SMSTenDLCPartnerCampaign], none_type**](SMSTenDLCPartnerCampaign.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**partner_campaigns** | [**List[SMSTenDLCPartnerCampaign]**](SMSTenDLCPartnerCampaign.md) | | [optional] + +## Example + +```python +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTenDLCPartnerCampaignsListResult from a JSON string +sms_ten_dlc_partner_campaigns_list_result_instance = SMSTenDLCPartnerCampaignsListResult.from_json(json) +# print the JSON string representation of the object +print(SMSTenDLCPartnerCampaignsListResult.to_json()) +# convert the object into a dict +sms_ten_dlc_partner_campaigns_list_result_dict = sms_ten_dlc_partner_campaigns_list_result_instance.to_dict() +# create an instance of SMSTenDLCPartnerCampaignsListResult from a dict +sms_ten_dlc_partner_campaigns_list_result_from_dict = SMSTenDLCPartnerCampaignsListResult.from_dict(sms_ten_dlc_partner_campaigns_list_result_dict) +``` [[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/SMSTenDLCPartnerCampaignsListResultAllOf.md b/docs/SMSTenDLCPartnerCampaignsListResultAllOf.md deleted file mode 100644 index 2ccd52a..0000000 --- a/docs/SMSTenDLCPartnerCampaignsListResultAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SMSTenDLCPartnerCampaignsListResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**partner_campaigns** | [**[SMSTenDLCPartnerCampaign], none_type**](SMSTenDLCPartnerCampaign.md) | | [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/SMSTollFreeCampaign.md b/docs/SMSTollFreeCampaign.md index 4f665bc..a9950fc 100644 --- a/docs/SMSTollFreeCampaign.md +++ b/docs/SMSTollFreeCampaign.md @@ -1,16 +1,35 @@ # SMSTollFreeCampaign + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**account_id** | **str, none_type** | ID of the account that created this toll-free campaign | +**account_id** | **str** | ID of the account that created this toll-free campaign | **campaign_id** | **str** | Alphanumeric identifier used by the platform to identify this toll-free campaign | **use_case** | **str** | | -**registration_status** | **str** | Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. | +**registration_status** | [**SMSTollFreeCampaignRegistrationStatus**](SMSTollFreeCampaignRegistrationStatus.md) | | **date_created** | **str** | | **date_updated** | **str** | | **revision** | **int** | | +## Example + +```python +from freeclimb.models.sms_toll_free_campaign import SMSTollFreeCampaign + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTollFreeCampaign from a JSON string +sms_toll_free_campaign_instance = SMSTollFreeCampaign.from_json(json) +# print the JSON string representation of the object +print(SMSTollFreeCampaign.to_json()) + +# convert the object into a dict +sms_toll_free_campaign_dict = sms_toll_free_campaign_instance.to_dict() +# create an instance of SMSTollFreeCampaign from a dict +sms_toll_free_campaign_from_dict = SMSTollFreeCampaign.from_dict(sms_toll_free_campaign_dict) +``` [[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/SMSTollFreeCampaignRegistrationStatus.md b/docs/SMSTollFreeCampaignRegistrationStatus.md new file mode 100644 index 0000000..de19c27 --- /dev/null +++ b/docs/SMSTollFreeCampaignRegistrationStatus.md @@ -0,0 +1,19 @@ +# SMSTollFreeCampaignRegistrationStatus + +Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. + +## Enum + +* `UNREGISTERED` (value: `'UNREGISTERED'`) + +* `INITIATED` (value: `'INITIATED'`) + +* `PENDING` (value: `'PENDING'`) + +* `DECLINED` (value: `'DECLINED'`) + +* `REGISTERED` (value: `'REGISTERED'`) + +[[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/SMSTollFreeCampaignsListResult.md b/docs/SMSTollFreeCampaignsListResult.md index 79aeb64..aee7e15 100644 --- a/docs/SMSTollFreeCampaignsListResult.md +++ b/docs/SMSTollFreeCampaignsListResult.md @@ -1,17 +1,36 @@ # SMSTollFreeCampaignsListResult + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **int, none_type** | Total amount of requested resource. | [optional] -**start** | **int, none_type** | Resource index at start of current page | [optional] -**end** | **int, none_type** | Resource index at end of current page | [optional] -**page** | **int, none_type** | Current page | [optional] -**num_pages** | **int, none_type** | Total number of pages | [optional] -**page_size** | **int, none_type** | Number of items per page | [optional] -**next_page_uri** | **str, none_type** | Uri to retrieve the next page of items | [optional] -**brands** | [**[SMSTollFreeCampaign], none_type**](SMSTollFreeCampaign.md) | | [optional] +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**brands** | [**List[SMSTollFreeCampaign]**](SMSTollFreeCampaign.md) | | [optional] + +## Example + +```python +from freeclimb.models.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult + +# TODO update the JSON string below +json = "{}" +# create an instance of SMSTollFreeCampaignsListResult from a JSON string +sms_toll_free_campaigns_list_result_instance = SMSTollFreeCampaignsListResult.from_json(json) +# print the JSON string representation of the object +print(SMSTollFreeCampaignsListResult.to_json()) +# convert the object into a dict +sms_toll_free_campaigns_list_result_dict = sms_toll_free_campaigns_list_result_instance.to_dict() +# create an instance of SMSTollFreeCampaignsListResult from a dict +sms_toll_free_campaigns_list_result_from_dict = SMSTollFreeCampaignsListResult.from_dict(sms_toll_free_campaigns_list_result_dict) +``` [[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/SMSTollFreeCampaignsListResultAllOf.md b/docs/SMSTollFreeCampaignsListResultAllOf.md deleted file mode 100644 index 948caf8..0000000 --- a/docs/SMSTollFreeCampaignsListResultAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SMSTollFreeCampaignsListResultAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**brands** | [**[SMSTollFreeCampaign], none_type**](SMSTollFreeCampaign.md) | | [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/Say.md b/docs/Say.md index 24f7623..95af29e 100644 --- a/docs/Say.md +++ b/docs/Say.md @@ -1,15 +1,33 @@ # Say The `Say` command provides Text-To-Speech (TTS) support. It converts text to speech and then renders it in a female voice back to the caller. `Say` is useful in cases where it's difficult to pre-record a prompt for any reason. `Say` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **str** | The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. | **language** | **str** | Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below. | [optional] -**loop** | **int** | Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. | [optional] if omitted the server will use the default value of 1 +**loop** | **int** | Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. | [optional] [default to 1] **privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.say import Say + +# TODO update the JSON string below +json = "{}" +# create an instance of Say from a JSON string +say_instance = Say.from_json(json) +# print the JSON string representation of the object +print(Say.to_json()) + +# convert the object into a dict +say_dict = say_instance.to_dict() +# create an instance of Say from a dict +say_from_dict = Say.from_dict(say_dict) +``` [[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/SayAllOf.md b/docs/SayAllOf.md deleted file mode 100644 index 782646f..0000000 --- a/docs/SayAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ -# SayAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**text** | **str** | The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. | -**language** | **str** | Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below. | [optional] -**loop** | **int** | Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. | [optional] if omitted the server will use the default value of 1 -**privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [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/SendDigits.md b/docs/SendDigits.md index f335bc0..8bbc962 100644 --- a/docs/SendDigits.md +++ b/docs/SendDigits.md @@ -1,14 +1,32 @@ # SendDigits The `SendDigits` command plays DTMF tones on a live Call. This is useful for navigating through IVR menus or dialing extensions. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **digits** | **str** | String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits. | **pause_ms** | **int** | Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint. | [optional] **privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.send_digits import SendDigits + +# TODO update the JSON string below +json = "{}" +# create an instance of SendDigits from a JSON string +send_digits_instance = SendDigits.from_json(json) +# print the JSON string representation of the object +print(SendDigits.to_json()) + +# convert the object into a dict +send_digits_dict = send_digits_instance.to_dict() +# create an instance of SendDigits from a dict +send_digits_from_dict = SendDigits.from_dict(send_digits_dict) +``` [[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/SendDigitsAllOf.md b/docs/SendDigitsAllOf.md deleted file mode 100644 index b7f395f..0000000 --- a/docs/SendDigitsAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# SendDigitsAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**digits** | **str** | String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits. | -**pause_ms** | **int** | Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint. | [optional] -**privacy_mode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [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/SetDTMFPassThrough.md b/docs/SetDTMFPassThrough.md index 284b13e..57e973d 100644 --- a/docs/SetDTMFPassThrough.md +++ b/docs/SetDTMFPassThrough.md @@ -1,12 +1,30 @@ # SetDTMFPassThrough The `SetDTMFPassThrough` command enables or disables the dtmfPassThrough privilege for this Conference Participant. If 'true', DTMFs will be passed through from this Participant to all other Participants in the Conference + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **dtmf_pass_through** | **bool** | Specifying `false` mutes the Participant's dtmf audio. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.set_dtmf_pass_through import SetDTMFPassThrough + +# TODO update the JSON string below +json = "{}" +# create an instance of SetDTMFPassThrough from a JSON string +set_dtmf_pass_through_instance = SetDTMFPassThrough.from_json(json) +# print the JSON string representation of the object +print(SetDTMFPassThrough.to_json()) + +# convert the object into a dict +set_dtmf_pass_through_dict = set_dtmf_pass_through_instance.to_dict() +# create an instance of SetDTMFPassThrough from a dict +set_dtmf_pass_through_from_dict = SetDTMFPassThrough.from_dict(set_dtmf_pass_through_dict) +``` [[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/SetDTMFPassThroughAllOf.md b/docs/SetDTMFPassThroughAllOf.md deleted file mode 100644 index 0ef49a5..0000000 --- a/docs/SetDTMFPassThroughAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SetDTMFPassThroughAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dtmf_pass_through** | **bool** | Specifying `false` mutes the Participant's dtmf audio. | [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/SetListen.md b/docs/SetListen.md index 6bc02d9..7413783 100644 --- a/docs/SetListen.md +++ b/docs/SetListen.md @@ -1,12 +1,30 @@ # SetListen The `SetListen` command enables or disables the listen privilege for this Conference Participant. The Participant can hear what the other participants are saying only if this privilege is enabled. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **listen** | **bool** | Specifying `false` will silence the Conference for this Participant. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.set_listen import SetListen + +# TODO update the JSON string below +json = "{}" +# create an instance of SetListen from a JSON string +set_listen_instance = SetListen.from_json(json) +# print the JSON string representation of the object +print(SetListen.to_json()) + +# convert the object into a dict +set_listen_dict = set_listen_instance.to_dict() +# create an instance of SetListen from a dict +set_listen_from_dict = SetListen.from_dict(set_listen_dict) +``` [[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/SetListenAllOf.md b/docs/SetListenAllOf.md deleted file mode 100644 index 0125584..0000000 --- a/docs/SetListenAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SetListenAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**listen** | **bool** | Specifying `false` will silence the Conference for this Participant. | [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/SetTalk.md b/docs/SetTalk.md index d3d45d9..26256f2 100644 --- a/docs/SetTalk.md +++ b/docs/SetTalk.md @@ -1,12 +1,30 @@ # SetTalk The `SetTalk` command enables or disables the talk privilege for this Conference Participant. If 'true', no audio from that Participant is shared with the other Participants of the Conference. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **talk** | **bool** | Specifying `false` mutes the Participant. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.set_talk import SetTalk + +# TODO update the JSON string below +json = "{}" +# create an instance of SetTalk from a JSON string +set_talk_instance = SetTalk.from_json(json) +# print the JSON string representation of the object +print(SetTalk.to_json()) + +# convert the object into a dict +set_talk_dict = set_talk_instance.to_dict() +# create an instance of SetTalk from a dict +set_talk_from_dict = SetTalk.from_dict(set_talk_dict) +``` [[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/SetTalkAllOf.md b/docs/SetTalkAllOf.md deleted file mode 100644 index 3744008..0000000 --- a/docs/SetTalkAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# SetTalkAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**talk** | **bool** | Specifying `false` mutes the Participant. | [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/Sms.md b/docs/Sms.md index b9c430b..8494243 100644 --- a/docs/Sms.md +++ b/docs/Sms.md @@ -1,15 +1,33 @@ # Sms The `Sms` command can be used to send an SMS message to a phone number during a phone call. International SMS is disabled by default. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to** | **str** | E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). | -**_from** | **str** | E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. | +**var_from** | **str** | E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. | **text** | **str** | Text contained in the message (maximum 160 characters). | **notification_url** | **str** | When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored. | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.sms import Sms + +# TODO update the JSON string below +json = "{}" +# create an instance of Sms from a JSON string +sms_instance = Sms.from_json(json) +# print the JSON string representation of the object +print(Sms.to_json()) + +# convert the object into a dict +sms_dict = sms_instance.to_dict() +# create an instance of Sms from a dict +sms_from_dict = Sms.from_dict(sms_dict) +``` [[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/SmsAllOf.md b/docs/SmsAllOf.md deleted file mode 100644 index 6cab713..0000000 --- a/docs/SmsAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ -# SmsAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**to** | **str** | E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). | -**_from** | **str** | E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. | -**text** | **str** | Text contained in the message (maximum 160 characters). | -**notification_url** | **str** | When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored. | [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/StartRecordCall.md b/docs/StartRecordCall.md index eea196c..afacb03 100644 --- a/docs/StartRecordCall.md +++ b/docs/StartRecordCall.md @@ -1,11 +1,29 @@ # StartRecordCall The `StartRecordCall` command records the current call and returns the URL of a file containing the audio recording when recording completes. `StartRecordCall` is non-blocking. After recording of the current call begins, control of the call moves to the PerCL command that follows `StartRecordCall` in the current PerCL script. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.start_record_call import StartRecordCall + +# TODO update the JSON string below +json = "{}" +# create an instance of StartRecordCall from a JSON string +start_record_call_instance = StartRecordCall.from_json(json) +# print the JSON string representation of the object +print(StartRecordCall.to_json()) + +# convert the object into a dict +start_record_call_dict = start_record_call_instance.to_dict() +# create an instance of StartRecordCall from a dict +start_record_call_from_dict = StartRecordCall.from_dict(start_record_call_dict) +``` [[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/TFN.md b/docs/TFN.md index 1cfd2bf..2ad3580 100644 --- a/docs/TFN.md +++ b/docs/TFN.md @@ -1,11 +1,30 @@ # TFN TollFree Campaign details for this number + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **campaign_id** | **str** | alphanumeric identifier for the TollFree campaign associated with this number | +## Example + +```python +from freeclimb.models.tfn import TFN + +# TODO update the JSON string below +json = "{}" +# create an instance of TFN from a JSON string +tfn_instance = TFN.from_json(json) +# print the JSON string representation of the object +print(TFN.to_json()) + +# convert the object into a dict +tfn_dict = tfn_instance.to_dict() +# create an instance of TFN from a dict +tfn_from_dict = TFN.from_dict(tfn_dict) +``` [[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/TerminateConference.md b/docs/TerminateConference.md index b8aa88c..38f14b4 100644 --- a/docs/TerminateConference.md +++ b/docs/TerminateConference.md @@ -1,11 +1,29 @@ # TerminateConference The `TerminateConference` command terminates an existing Conference. Any active participants are hung up on by FreeClimb. If this is not the desired behavior, use the `RemoveFromConference` command to unbridge Calls that should not be hung up. Note: The Call requesting TerminateConference must be on the same Conference for this command to execute. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.terminate_conference import TerminateConference + +# TODO update the JSON string below +json = "{}" +# create an instance of TerminateConference from a JSON string +terminate_conference_instance = TerminateConference.from_json(json) +# print the JSON string representation of the object +print(TerminateConference.to_json()) + +# convert the object into a dict +terminate_conference_dict = terminate_conference_instance.to_dict() +# create an instance of TerminateConference from a dict +terminate_conference_from_dict = TerminateConference.from_dict(terminate_conference_dict) +``` [[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/TerminateConferenceAllOf.md b/docs/TerminateConferenceAllOf.md deleted file mode 100644 index 31c7c60..0000000 --- a/docs/TerminateConferenceAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# TerminateConferenceAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**conference_id** | **str** | ID of the conference to terminate. | - -[[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/TranscribeReason.md b/docs/TranscribeReason.md new file mode 100644 index 0000000..40ad7e6 --- /dev/null +++ b/docs/TranscribeReason.md @@ -0,0 +1,18 @@ +# TranscribeReason + + +## Enum + +* `INTERNALERROR` (value: `'internalError'`) + +* `HANGUP` (value: `'hangup'`) + +* `MAXLENGTH` (value: `'maxLength'`) + +* `DIGIT` (value: `'digit'`) + +* `NOINPUT` (value: `'noInput'`) + +[[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/TranscribeTermReason.md b/docs/TranscribeTermReason.md new file mode 100644 index 0000000..0343384 --- /dev/null +++ b/docs/TranscribeTermReason.md @@ -0,0 +1,12 @@ +# TranscribeTermReason + + +## Enum + +* `ERROR` (value: `'error'`) + +* `COMPLETED` (value: `'completed'`) + +[[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/TranscribeUtterance.md b/docs/TranscribeUtterance.md index 751f911..e12bdb2 100644 --- a/docs/TranscribeUtterance.md +++ b/docs/TranscribeUtterance.md @@ -1,17 +1,35 @@ # TranscribeUtterance The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed. `TranscribeUtterance` is blocking and is a terminal command. As such, the actionUrl property is required, and control of the Call picks up using the `PerCL` returned in response of the `actionUrl`. Recording and Transcription information is returned in the actionUrl request. If the reason this command ended was due to the call hanging up, any PerCL returned will not execute. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | | -**play_beep** | **bool** | | [optional] if omitted the server will use the default value of False -**record** | [**TranscribeUtteranceAllOfRecord**](TranscribeUtteranceAllOfRecord.md) | | [optional] -**privacy_for_logging** | **bool** | | [optional] if omitted the server will use the default value of False -**privacy_for_recording** | **bool** | | [optional] if omitted the server will use the default value of False -**prompts** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | | [optional] -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +**play_beep** | **bool** | | [optional] [default to False] +**record** | [**TranscribeUtteranceRecord**](TranscribeUtteranceRecord.md) | | [optional] +**privacy_for_logging** | **bool** | | [optional] [default to False] +**privacy_for_recording** | **bool** | | [optional] [default to False] +**prompts** | [**List[PerclCommand]**](PerclCommand.md) | | [optional] + +## Example + +```python +from freeclimb.models.transcribe_utterance import TranscribeUtterance + +# TODO update the JSON string below +json = "{}" +# create an instance of TranscribeUtterance from a JSON string +transcribe_utterance_instance = TranscribeUtterance.from_json(json) +# print the JSON string representation of the object +print(TranscribeUtterance.to_json()) +# convert the object into a dict +transcribe_utterance_dict = transcribe_utterance_instance.to_dict() +# create an instance of TranscribeUtterance from a dict +transcribe_utterance_from_dict = TranscribeUtterance.from_dict(transcribe_utterance_dict) +``` [[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/TranscribeUtteranceAllOf.md b/docs/TranscribeUtteranceAllOf.md deleted file mode 100644 index 61c33ee..0000000 --- a/docs/TranscribeUtteranceAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# TranscribeUtteranceAllOf - -The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed. `TranscribeUtterance` is blocking and is a terminal command. As such, the actionUrl property is required, and control of the Call picks up using the `PerCL` returned in response of the `actionUrl`. Recording and Transcription information is returned in the actionUrl request. If the reason this command ended was due to the call hanging up, any PerCL returned will not execute. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_url** | **str** | | -**play_beep** | **bool** | | [optional] if omitted the server will use the default value of False -**record** | [**TranscribeUtteranceAllOfRecord**](TranscribeUtteranceAllOfRecord.md) | | [optional] -**privacy_for_logging** | **bool** | | [optional] if omitted the server will use the default value of False -**privacy_for_recording** | **bool** | | [optional] if omitted the server will use the default value of False -**prompts** | **[bool, date, datetime, dict, float, int, list, str, none_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/TranscribeUtteranceAllOfRecord.md b/docs/TranscribeUtteranceAllOfRecord.md deleted file mode 100644 index 365e97a..0000000 --- a/docs/TranscribeUtteranceAllOfRecord.md +++ /dev/null @@ -1,12 +0,0 @@ -# TranscribeUtteranceAllOfRecord - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**save_recording** | **bool** | | [optional] if omitted the server will use the default value of False -**max_length_sec** | **int** | | [optional] if omitted the server will use the default value of 60 -**rcrd_termination_silence_time_ms** | **int** | | [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/TranscribeUtteranceRecord.md b/docs/TranscribeUtteranceRecord.md index 94bba90..e723637 100644 --- a/docs/TranscribeUtteranceRecord.md +++ b/docs/TranscribeUtteranceRecord.md @@ -1,12 +1,31 @@ # TranscribeUtteranceRecord + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**save_recording** | **bool** | | [optional] if omitted the server will use the default value of False -**max_length_sec** | **int** | | [optional] if omitted the server will use the default value of 60 +**save_recording** | **bool** | | [optional] [default to False] +**max_length_sec** | **int** | | [optional] [default to 60] **rcrd_termination_silence_time_ms** | **int** | | [optional] +## Example + +```python +from freeclimb.models.transcribe_utterance_record import TranscribeUtteranceRecord + +# TODO update the JSON string below +json = "{}" +# create an instance of TranscribeUtteranceRecord from a JSON string +transcribe_utterance_record_instance = TranscribeUtteranceRecord.from_json(json) +# print the JSON string representation of the object +print(TranscribeUtteranceRecord.to_json()) + +# convert the object into a dict +transcribe_utterance_record_dict = transcribe_utterance_record_instance.to_dict() +# create an instance of TranscribeUtteranceRecord from a dict +transcribe_utterance_record_from_dict = TranscribeUtteranceRecord.from_dict(transcribe_utterance_record_dict) +``` [[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/TranscribeWebhook.md b/docs/TranscribeWebhook.md new file mode 100644 index 0000000..958e50a --- /dev/null +++ b/docs/TranscribeWebhook.md @@ -0,0 +1,51 @@ +# TranscribeWebhook + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | The context or reason why this request is being made. Will be transcribe - The TranscribeUtterance command has completed and its actionUrl is being invoked. | [optional] +**account_id** | **str** | Account ID associated with your account. | [optional] +**call_id** | **str** | Unique identifier for this Call, generated by FreeClimb | [optional] +**var_from** | **str** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**to** | **str** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**recording_id** | **str** | The ID of the recording. If no recording was made due to errors or the 'saveRecording' flag being disabled this field will be set to null. | [optional] +**recording_url** | **str** | The URL of the recorded audio file. This URL can be used as is in a Play command to play the recording (no authentication needed). It can also be used to download the recording file via the REST API. | [optional] +**recording_size** | **int** | The size of the recording in bytes. | [optional] +**recording_format** | **str** | The media type of the recording. | [optional] +**recording_duration_ms** | **int** | The duration of the recorded audio in milliseconds. | [optional] +**term_reason** | [**TranscribeTermReason**](TranscribeTermReason.md) | | [optional] +**record_term_reason** | [**RecordUtteranceTermReason**](RecordUtteranceTermReason.md) | | [optional] +**digit** | **str** | If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null. | [optional] +**privacy_for_logging** | **bool** | Echo back of the privacyForLogging flag as specified in the transcribe utterance command – confirmation of logging protection has been applied. Can be used by application to know it should also apply protection when handling this request. | [optional] +**privacy_for_recording** | **bool** | Echo back of the privacyForRecording flag as specified in the transcribe utterance command – confirmation of logging protection has been applied. Can be used by application to know it should also apply protection when handling this request. | [optional] +**barge_in_reason** | [**BargeInReason**](BargeInReason.md) | | [optional] +**barged_in_prompt_no** | **int** | | [optional] +**barged_in_prompt_ms** | **int** | duration in ms bargedInPromptNo prompt was executing until barge-in occurred. | [optional] +**barged_in_prompt_loop_no** | **int** | | [optional] +**barge_in_time_ms** | **int** | epoch time in ms | [optional] +**transcript** | **str** | Transcribed text of the recording. Can be empty or null. null means there was a failure in transcribing the audio, refer to transcribeReason for detailed failure reason. | [optional] +**transcribe_reason** | [**TranscribeReason**](TranscribeReason.md) | | [optional] +**transcription_duration_ms** | **int** | The duration of the audio being transcribed in milliseconds | [optional] + +## Example + +```python +from freeclimb.models.transcribe_webhook import TranscribeWebhook + +# TODO update the JSON string below +json = "{}" +# create an instance of TranscribeWebhook from a JSON string +transcribe_webhook_instance = TranscribeWebhook.from_json(json) +# print the JSON string representation of the object +print(TranscribeWebhook.to_json()) + +# convert the object into a dict +transcribe_webhook_dict = transcribe_webhook_instance.to_dict() +# create an instance of TranscribeWebhook from a dict +transcribe_webhook_from_dict = TranscribeWebhook.from_dict(transcribe_webhook_dict) +``` +[[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/Unpark.md b/docs/Unpark.md index d2daa71..ebcb29b 100644 --- a/docs/Unpark.md +++ b/docs/Unpark.md @@ -1,11 +1,29 @@ # Unpark The `Unpark` command resumes a parked call. Execution continues with the first command in the PerCL scripted returned by the actionUrl specified in the Park command as long as the call is still in progress. If the call is no longer in progress, any returned PerCL will not be executed. Unpark is a terminal command -- any commands following it in the same script are not executed. + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**command** | **str** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] +## Example + +```python +from freeclimb.models.unpark import Unpark + +# TODO update the JSON string below +json = "{}" +# create an instance of Unpark from a JSON string +unpark_instance = Unpark.from_json(json) +# print the JSON string representation of the object +print(Unpark.to_json()) + +# convert the object into a dict +unpark_dict = unpark_instance.to_dict() +# create an instance of Unpark from a dict +unpark_from_dict = Unpark.from_dict(unpark_dict) +``` [[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/UpdateCallRequest.md b/docs/UpdateCallRequest.md index fecc551..31337ee 100644 --- a/docs/UpdateCallRequest.md +++ b/docs/UpdateCallRequest.md @@ -1,10 +1,29 @@ # UpdateCallRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**UpdateCallRequestStatus**](UpdateCallRequestStatus.md) | | +## Example + +```python +from freeclimb.models.update_call_request import UpdateCallRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCallRequest from a JSON string +update_call_request_instance = UpdateCallRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateCallRequest.to_json()) + +# convert the object into a dict +update_call_request_dict = update_call_request_instance.to_dict() +# create an instance of UpdateCallRequest from a dict +update_call_request_from_dict = UpdateCallRequest.from_dict(update_call_request_dict) +``` [[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/UpdateCallRequestStatus.md b/docs/UpdateCallRequestStatus.md index c32b0c0..a8bc36f 100644 --- a/docs/UpdateCallRequestStatus.md +++ b/docs/UpdateCallRequestStatus.md @@ -1,11 +1,12 @@ # UpdateCallRequestStatus Either `canceled` or `completed`. Specifying `canceled` attempts to hang up calls that are queued without affecting calls already in progress. Specifying `completed` attempts to hang up a call already in progress. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **CANCELED** | **UpdateCallRequestStatus** | | Represented in Python as "canceled" | -| **COMPLETED** | **UpdateCallRequestStatus** | | Represented in Python as "completed" | + +## Enum + +* `CANCELED` (value: `'canceled'`) + +* `COMPLETED` (value: `'completed'`) [[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/UpdateConferenceParticipantRequest.md b/docs/UpdateConferenceParticipantRequest.md index d098109..10a2b5b 100644 --- a/docs/UpdateConferenceParticipantRequest.md +++ b/docs/UpdateConferenceParticipantRequest.md @@ -1,12 +1,31 @@ # UpdateConferenceParticipantRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **talk** | **bool** | (Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value. | [optional] **listen** | **bool** | (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value. | [optional] **dtmf_pass_through** | **bool** | (Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value. | [optional] +## Example + +```python +from freeclimb.models.update_conference_participant_request import UpdateConferenceParticipantRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateConferenceParticipantRequest from a JSON string +update_conference_participant_request_instance = UpdateConferenceParticipantRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateConferenceParticipantRequest.to_json()) + +# convert the object into a dict +update_conference_participant_request_dict = update_conference_participant_request_instance.to_dict() +# create an instance of UpdateConferenceParticipantRequest from a dict +update_conference_participant_request_from_dict = UpdateConferenceParticipantRequest.from_dict(update_conference_participant_request_dict) +``` [[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/UpdateConferenceRequest.md b/docs/UpdateConferenceRequest.md index 2fd3b65..d7f507e 100644 --- a/docs/UpdateConferenceRequest.md +++ b/docs/UpdateConferenceRequest.md @@ -1,12 +1,31 @@ # UpdateConferenceRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alias** | **str** | Description for this conference. Maximum 64 characters. | [optional] **play_beep** | [**PlayBeep**](PlayBeep.md) | | [optional] **status** | [**UpdateConferenceRequestStatus**](UpdateConferenceRequestStatus.md) | | [optional] +## Example + +```python +from freeclimb.models.update_conference_request import UpdateConferenceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateConferenceRequest from a JSON string +update_conference_request_instance = UpdateConferenceRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateConferenceRequest.to_json()) + +# convert the object into a dict +update_conference_request_dict = update_conference_request_instance.to_dict() +# create an instance of UpdateConferenceRequest from a dict +update_conference_request_from_dict = UpdateConferenceRequest.from_dict(update_conference_request_dict) +``` [[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/UpdateConferenceRequestStatus.md b/docs/UpdateConferenceRequestStatus.md index 020cc02..18400b4 100644 --- a/docs/UpdateConferenceRequestStatus.md +++ b/docs/UpdateConferenceRequestStatus.md @@ -1,11 +1,12 @@ # UpdateConferenceRequestStatus New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.** -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| **EMPTY** | **UpdateConferenceRequestStatus** | | Represented in Python as "empty" | -| **TERMINATED** | **UpdateConferenceRequestStatus** | | Represented in Python as "terminated" | + +## Enum + +* `EMPTY` (value: `'empty'`) + +* `TERMINATED` (value: `'terminated'`) [[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/Webhook.md b/docs/Webhook.md new file mode 100644 index 0000000..dea27e7 --- /dev/null +++ b/docs/Webhook.md @@ -0,0 +1,29 @@ +# Webhook + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_type** | **str** | Type of webhook request | [optional] + +## Example + +```python +from freeclimb.models.webhook import Webhook + +# TODO update the JSON string below +json = "{}" +# create an instance of Webhook from a JSON string +webhook_instance = Webhook.from_json(json) +# print the JSON string representation of the object +print(Webhook.to_json()) + +# convert the object into a dict +webhook_dict = webhook_instance.to_dict() +# create an instance of Webhook from a dict +webhook_from_dict = Webhook.from_dict(webhook_dict) +``` +[[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/freeclimb/__init__.py b/freeclimb/__init__.py index b30318c..742309e 100644 --- a/freeclimb/__init__.py +++ b/freeclimb/__init__.py @@ -1,179 +1,279 @@ +# coding: utf-8 + # flake8: noqa """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -__version__ = "4.9.0" +__version__ = "5.0.0" + +# import apis into sdk package +from freeclimb.api.default_api import DefaultApi as DefaultApi # import ApiClient +from freeclimb.api_response import ApiResponse from freeclimb.api_client import ApiClient - -# import Configuration from freeclimb.configuration import Configuration - -# Utils -from freeclimb.utils.request_verifier import RequestVerifier - -# import exceptions from freeclimb.exceptions import OpenApiException -from freeclimb.exceptions import ApiAttributeError from freeclimb.exceptions import ApiTypeError from freeclimb.exceptions import ApiValueError from freeclimb.exceptions import ApiKeyError +from freeclimb.exceptions import ApiAttributeError from freeclimb.exceptions import ApiException -from freeclimb.model.account_request import AccountRequest -from freeclimb.model.account_result import AccountResult -from freeclimb.model.account_result_all_of import AccountResultAllOf -from freeclimb.model.account_status import AccountStatus -from freeclimb.model.account_type import AccountType -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.add_to_conference_all_of import AddToConferenceAllOf -from freeclimb.model.answered_by import AnsweredBy -from freeclimb.model.application_list import ApplicationList -from freeclimb.model.application_list_all_of import ApplicationListAllOf -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult -from freeclimb.model.application_result_all_of import ApplicationResultAllOf -from freeclimb.model.available_number import AvailableNumber -from freeclimb.model.available_number_list import AvailableNumberList -from freeclimb.model.available_number_list_all_of import AvailableNumberListAllOf -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.call_direction import CallDirection -from freeclimb.model.call_list import CallList -from freeclimb.model.call_list_all_of import CallListAllOf -from freeclimb.model.call_result import CallResult -from freeclimb.model.call_result_all_of import CallResultAllOf -from freeclimb.model.call_status import CallStatus -from freeclimb.model.capabilities import Capabilities -from freeclimb.model.completion_request import CompletionRequest -from freeclimb.model.completion_result import CompletionResult -from freeclimb.model.conference_list import ConferenceList -from freeclimb.model.conference_list_all_of import ConferenceListAllOf -from freeclimb.model.conference_participant_list import ConferenceParticipantList -from freeclimb.model.conference_participant_list_all_of import ConferenceParticipantListAllOf -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.conference_participant_result_all_of import ConferenceParticipantResultAllOf -from freeclimb.model.conference_result import ConferenceResult -from freeclimb.model.conference_result_all_of import ConferenceResultAllOf -from freeclimb.model.conference_status import ConferenceStatus -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.create_conference_all_of import CreateConferenceAllOf -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.create_web_rtc_token import CreateWebRTCToken -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.enqueue_all_of import EnqueueAllOf -from freeclimb.model.filter_logs_request import FilterLogsRequest -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_digits_all_of import GetDigitsAllOf -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.get_speech_all_of import GetSpeechAllOf -from freeclimb.model.get_speech_reason import GetSpeechReason -from freeclimb.model.grammar_file_built_in import GrammarFileBuiltIn -from freeclimb.model.grammar_type import GrammarType -from freeclimb.model.hangup import Hangup -from freeclimb.model.hangup_all_of import HangupAllOf -from freeclimb.model.if_machine import IfMachine -from freeclimb.model.incoming_number_list import IncomingNumberList -from freeclimb.model.incoming_number_list_all_of import IncomingNumberListAllOf -from freeclimb.model.incoming_number_request import IncomingNumberRequest -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.incoming_number_result_all_of import IncomingNumberResultAllOf -from freeclimb.model.language import Language -from freeclimb.model.log_level import LogLevel -from freeclimb.model.log_list import LogList -from freeclimb.model.log_list_all_of import LogListAllOf -from freeclimb.model.log_result import LogResult -from freeclimb.model.machine_type import MachineType -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.message_direction import MessageDirection -from freeclimb.model.message_request import MessageRequest -from freeclimb.model.message_request_all_of import MessageRequestAllOf -from freeclimb.model.message_result import MessageResult -from freeclimb.model.message_result_all_of import MessageResultAllOf -from freeclimb.model.message_status import MessageStatus -from freeclimb.model.messages_list import MessagesList -from freeclimb.model.messages_list_all_of import MessagesListAllOf -from freeclimb.model.mutable_resource_model import MutableResourceModel -from freeclimb.model.out_dial import OutDial -from freeclimb.model.out_dial_all_of import OutDialAllOf -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.park import Park -from freeclimb.model.park_all_of import ParkAllOf -from freeclimb.model.pause import Pause -from freeclimb.model.pause_all_of import PauseAllOf -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.percl_script import PerclScript -from freeclimb.model.play import Play -from freeclimb.model.play_all_of import PlayAllOf -from freeclimb.model.play_beep import PlayBeep -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.play_early_media_all_of import PlayEarlyMediaAllOf -from freeclimb.model.queue_list import QueueList -from freeclimb.model.queue_list_all_of import QueueListAllOf -from freeclimb.model.queue_member import QueueMember -from freeclimb.model.queue_member_list import QueueMemberList -from freeclimb.model.queue_member_list_all_of import QueueMemberListAllOf -from freeclimb.model.queue_request import QueueRequest -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.queue_result_all_of import QueueResultAllOf -from freeclimb.model.queue_result_status import QueueResultStatus -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.record_utterance_all_of import RecordUtteranceAllOf -from freeclimb.model.record_utterance_term_reason import RecordUtteranceTermReason -from freeclimb.model.recording_list import RecordingList -from freeclimb.model.recording_list_all_of import RecordingListAllOf -from freeclimb.model.recording_result import RecordingResult -from freeclimb.model.recording_result_all_of import RecordingResultAllOf -from freeclimb.model.redirect import Redirect -from freeclimb.model.redirect_all_of import RedirectAllOf -from freeclimb.model.reject import Reject -from freeclimb.model.reject_all_of import RejectAllOf -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.request_type import RequestType -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand -from freeclimb.model.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult -from freeclimb.model.sms_ten_dlc_brands_list_result_all_of import SMSTenDLCBrandsListResultAllOf -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign -from freeclimb.model.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult -from freeclimb.model.sms_ten_dlc_campaigns_list_result_all_of import SMSTenDLCCampaignsListResultAllOf -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign -from freeclimb.model.sms_ten_dlc_partner_campaign_brand import SMSTenDLCPartnerCampaignBrand -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result_all_of import SMSTenDLCPartnerCampaignsListResultAllOf -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign -from freeclimb.model.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult -from freeclimb.model.sms_toll_free_campaigns_list_result_all_of import SMSTollFreeCampaignsListResultAllOf -from freeclimb.model.say import Say -from freeclimb.model.say_all_of import SayAllOf -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.send_digits_all_of import SendDigitsAllOf -from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough -from freeclimb.model.set_dtmf_pass_through_all_of import SetDTMFPassThroughAllOf -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_listen_all_of import SetListenAllOf -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.set_talk_all_of import SetTalkAllOf -from freeclimb.model.sms import Sms -from freeclimb.model.sms_all_of import SmsAllOf -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.tfn import TFN -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.transcribe_utterance_all_of import TranscribeUtteranceAllOf -from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord -from freeclimb.model.unpark import Unpark -from freeclimb.model.update_call_request import UpdateCallRequest -from freeclimb.model.update_call_request_status import UpdateCallRequestStatus -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest -from freeclimb.model.update_conference_request_status import UpdateConferenceRequestStatus +# import models into sdk package +from freeclimb.models.account_request import AccountRequest as AccountRequest +from freeclimb.models.account_result import AccountResult as AccountResult +from freeclimb.models.account_status import AccountStatus as AccountStatus +from freeclimb.models.account_type import AccountType as AccountType +from freeclimb.models.add_to_conference import AddToConference as AddToConference +from freeclimb.models.add_to_conference_notification_webhook import ( + AddToConferenceNotificationWebhook as AddToConferenceNotificationWebhook, +) +from freeclimb.models.add_to_queue_notification_webhook import ( + AddToQueueNotificationWebhook as AddToQueueNotificationWebhook, +) +from freeclimb.models.answered_by import AnsweredBy as AnsweredBy +from freeclimb.models.application_list import ApplicationList as ApplicationList +from freeclimb.models.application_request import ( + ApplicationRequest as ApplicationRequest, +) +from freeclimb.models.application_result import ApplicationResult as ApplicationResult +from freeclimb.models.available_number import AvailableNumber as AvailableNumber +from freeclimb.models.available_number_list import ( + AvailableNumberList as AvailableNumberList, +) +from freeclimb.models.barge_in_reason import BargeInReason as BargeInReason +from freeclimb.models.buy_incoming_number_request import ( + BuyIncomingNumberRequest as BuyIncomingNumberRequest, +) +from freeclimb.models.call_control_webhook import ( + CallControlWebhook as CallControlWebhook, +) +from freeclimb.models.call_direction import CallDirection as CallDirection +from freeclimb.models.call_ended_reason import CallEndedReason as CallEndedReason +from freeclimb.models.call_list import CallList as CallList +from freeclimb.models.call_result import CallResult as CallResult +from freeclimb.models.call_status import CallStatus as CallStatus +from freeclimb.models.call_status_webhook import CallStatusWebhook as CallStatusWebhook +from freeclimb.models.capabilities import Capabilities as Capabilities +from freeclimb.models.completion_request import CompletionRequest as CompletionRequest +from freeclimb.models.completion_result import CompletionResult as CompletionResult +from freeclimb.models.completion_result_status import ( + CompletionResultStatus as CompletionResultStatus, +) +from freeclimb.models.conference_list import ConferenceList as ConferenceList +from freeclimb.models.conference_participant_list import ( + ConferenceParticipantList as ConferenceParticipantList, +) +from freeclimb.models.conference_participant_result import ( + ConferenceParticipantResult as ConferenceParticipantResult, +) +from freeclimb.models.conference_recording_status_webhook import ( + ConferenceRecordingStatusWebhook as ConferenceRecordingStatusWebhook, +) +from freeclimb.models.conference_result import ConferenceResult as ConferenceResult +from freeclimb.models.conference_status import ConferenceStatus as ConferenceStatus +from freeclimb.models.conference_status_webhook import ( + ConferenceStatusWebhook as ConferenceStatusWebhook, +) +from freeclimb.models.create_conference import CreateConference as CreateConference +from freeclimb.models.create_conference_request import ( + CreateConferenceRequest as CreateConferenceRequest, +) +from freeclimb.models.create_conference_webhook import ( + CreateConferenceWebhook as CreateConferenceWebhook, +) +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken as CreateWebRTCToken +from freeclimb.models.dequeue import Dequeue as Dequeue +from freeclimb.models.dequeue_webhook import DequeueWebhook as DequeueWebhook +from freeclimb.models.enqueue import Enqueue as Enqueue +from freeclimb.models.filter_logs_request import FilterLogsRequest as FilterLogsRequest +from freeclimb.models.get_digits import GetDigits as GetDigits +from freeclimb.models.get_digits_reason import GetDigitsReason as GetDigitsReason +from freeclimb.models.get_digits_webhook import GetDigitsWebhook as GetDigitsWebhook +from freeclimb.models.get_speech import GetSpeech as GetSpeech +from freeclimb.models.get_speech_reason import GetSpeechReason as GetSpeechReason +from freeclimb.models.get_speech_webhook import GetSpeechWebhook as GetSpeechWebhook +from freeclimb.models.grammar_file_built_in import ( + GrammarFileBuiltIn as GrammarFileBuiltIn, +) +from freeclimb.models.grammar_type import GrammarType as GrammarType +from freeclimb.models.hangup import Hangup as Hangup +from freeclimb.models.if_machine import IfMachine as IfMachine +from freeclimb.models.inbound_call_webhook import ( + InboundCallWebhook as InboundCallWebhook, +) +from freeclimb.models.incoming_number_list import ( + IncomingNumberList as IncomingNumberList, +) +from freeclimb.models.incoming_number_request import ( + IncomingNumberRequest as IncomingNumberRequest, +) +from freeclimb.models.incoming_number_result import ( + IncomingNumberResult as IncomingNumberResult, +) +from freeclimb.models.language import Language as Language +from freeclimb.models.leave_conference_webhook import ( + LeaveConferenceWebhook as LeaveConferenceWebhook, +) +from freeclimb.models.log_level import LogLevel as LogLevel +from freeclimb.models.log_list import LogList as LogList +from freeclimb.models.log_result import LogResult as LogResult +from freeclimb.models.machine_detected_webhook import ( + MachineDetectedWebhook as MachineDetectedWebhook, +) +from freeclimb.models.machine_type import MachineType as MachineType +from freeclimb.models.make_call_request import MakeCallRequest as MakeCallRequest +from freeclimb.models.message_delivery_webhook import ( + MessageDeliveryWebhook as MessageDeliveryWebhook, +) +from freeclimb.models.message_direction import MessageDirection as MessageDirection +from freeclimb.models.message_request import MessageRequest as MessageRequest +from freeclimb.models.message_result import MessageResult as MessageResult +from freeclimb.models.message_status import MessageStatus as MessageStatus +from freeclimb.models.message_status_webhook import ( + MessageStatusWebhook as MessageStatusWebhook, +) +from freeclimb.models.messages_list import MessagesList as MessagesList +from freeclimb.models.mutable_resource_model import ( + MutableResourceModel as MutableResourceModel, +) +from freeclimb.models.out_dial import OutDial as OutDial +from freeclimb.models.out_dial_api_connect_webhook import ( + OutDialApiConnectWebhook as OutDialApiConnectWebhook, +) +from freeclimb.models.out_dial_connect_webhook import ( + OutDialConnectWebhook as OutDialConnectWebhook, +) +from freeclimb.models.out_dial_start_webhook import ( + OutDialStartWebhook as OutDialStartWebhook, +) +from freeclimb.models.pagination_model import PaginationModel as PaginationModel +from freeclimb.models.park import Park as Park +from freeclimb.models.pause import Pause as Pause +from freeclimb.models.percl_command import PerclCommand as PerclCommand +from freeclimb.models.percl_script import PerclScript as PerclScript +from freeclimb.models.play import Play as Play +from freeclimb.models.play_beep import PlayBeep as PlayBeep +from freeclimb.models.play_early_media import PlayEarlyMedia as PlayEarlyMedia +from freeclimb.models.queue_list import QueueList as QueueList +from freeclimb.models.queue_member import QueueMember as QueueMember +from freeclimb.models.queue_member_list import QueueMemberList as QueueMemberList +from freeclimb.models.queue_request import QueueRequest as QueueRequest +from freeclimb.models.queue_result import QueueResult as QueueResult +from freeclimb.models.queue_result_status import QueueResultStatus as QueueResultStatus +from freeclimb.models.queue_wait_webhook import QueueWaitWebhook as QueueWaitWebhook +from freeclimb.models.record_utterance import RecordUtterance as RecordUtterance +from freeclimb.models.record_utterance_term_reason import ( + RecordUtteranceTermReason as RecordUtteranceTermReason, +) +from freeclimb.models.record_webhook import RecordWebhook as RecordWebhook +from freeclimb.models.recording_list import RecordingList as RecordingList +from freeclimb.models.recording_result import RecordingResult as RecordingResult +from freeclimb.models.redirect import Redirect as Redirect +from freeclimb.models.redirect_webhook import RedirectWebhook as RedirectWebhook +from freeclimb.models.reject import Reject as Reject +from freeclimb.models.remove_from_conference import ( + RemoveFromConference as RemoveFromConference, +) +from freeclimb.models.remove_from_queue_notification_webhook import ( + RemoveFromQueueNotificationWebhook as RemoveFromQueueNotificationWebhook, +) +from freeclimb.models.request_type import RequestType as RequestType +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand as SMSTenDLCBrand +from freeclimb.models.sms_ten_dlc_brand_alt_business_id_type import ( + SMSTenDLCBrandAltBusinessIdType as SMSTenDLCBrandAltBusinessIdType, +) +from freeclimb.models.sms_ten_dlc_brand_entity_type import ( + SMSTenDLCBrandEntityType as SMSTenDLCBrandEntityType, +) +from freeclimb.models.sms_ten_dlc_brand_identity_status import ( + SMSTenDLCBrandIdentityStatus as SMSTenDLCBrandIdentityStatus, +) +from freeclimb.models.sms_ten_dlc_brand_relationship import ( + SMSTenDLCBrandRelationship as SMSTenDLCBrandRelationship, +) +from freeclimb.models.sms_ten_dlc_brand_stock_exchange import ( + SMSTenDLCBrandStockExchange as SMSTenDLCBrandStockExchange, +) +from freeclimb.models.sms_ten_dlc_brands_list_result import ( + SMSTenDLCBrandsListResult as SMSTenDLCBrandsListResult, +) +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign as SMSTenDLCCampaign +from freeclimb.models.sms_ten_dlc_campaign_status import ( + SMSTenDLCCampaignStatus as SMSTenDLCCampaignStatus, +) +from freeclimb.models.sms_ten_dlc_campaigns_list_result import ( + SMSTenDLCCampaignsListResult as SMSTenDLCCampaignsListResult, +) +from freeclimb.models.sms_ten_dlc_partner_campaign import ( + SMSTenDLCPartnerCampaign as SMSTenDLCPartnerCampaign, +) +from freeclimb.models.sms_ten_dlc_partner_campaign_brand import ( + SMSTenDLCPartnerCampaignBrand as SMSTenDLCPartnerCampaignBrand, +) +from freeclimb.models.sms_ten_dlc_partner_campaign_status import ( + SMSTenDLCPartnerCampaignStatus as SMSTenDLCPartnerCampaignStatus, +) +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import ( + SMSTenDLCPartnerCampaignsListResult as SMSTenDLCPartnerCampaignsListResult, +) +from freeclimb.models.sms_toll_free_campaign import ( + SMSTollFreeCampaign as SMSTollFreeCampaign, +) +from freeclimb.models.sms_toll_free_campaign_registration_status import ( + SMSTollFreeCampaignRegistrationStatus as SMSTollFreeCampaignRegistrationStatus, +) +from freeclimb.models.sms_toll_free_campaigns_list_result import ( + SMSTollFreeCampaignsListResult as SMSTollFreeCampaignsListResult, +) +from freeclimb.models.say import Say as Say +from freeclimb.models.send_digits import SendDigits as SendDigits +from freeclimb.models.set_dtmf_pass_through import ( + SetDTMFPassThrough as SetDTMFPassThrough, +) +from freeclimb.models.set_listen import SetListen as SetListen +from freeclimb.models.set_talk import SetTalk as SetTalk +from freeclimb.models.sms import Sms as Sms +from freeclimb.models.start_record_call import StartRecordCall as StartRecordCall +from freeclimb.models.tfn import TFN as TFN +from freeclimb.models.terminate_conference import ( + TerminateConference as TerminateConference, +) +from freeclimb.models.transcribe_reason import TranscribeReason as TranscribeReason +from freeclimb.models.transcribe_term_reason import ( + TranscribeTermReason as TranscribeTermReason, +) +from freeclimb.models.transcribe_utterance import ( + TranscribeUtterance as TranscribeUtterance, +) +from freeclimb.models.transcribe_utterance_record import ( + TranscribeUtteranceRecord as TranscribeUtteranceRecord, +) +from freeclimb.models.transcribe_webhook import TranscribeWebhook as TranscribeWebhook +from freeclimb.models.unpark import Unpark as Unpark +from freeclimb.models.update_call_request import UpdateCallRequest as UpdateCallRequest +from freeclimb.models.update_call_request_status import ( + UpdateCallRequestStatus as UpdateCallRequestStatus, +) +from freeclimb.models.update_conference_participant_request import ( + UpdateConferenceParticipantRequest as UpdateConferenceParticipantRequest, +) +from freeclimb.models.update_conference_request import ( + UpdateConferenceRequest as UpdateConferenceRequest, +) +from freeclimb.models.update_conference_request_status import ( + UpdateConferenceRequestStatus as UpdateConferenceRequestStatus, +) +from freeclimb.models.webhook import Webhook as Webhook diff --git a/freeclimb/api/__init__.py b/freeclimb/api/__init__.py index 2f06ced..9baec2f 100644 --- a/freeclimb/api/__init__.py +++ b/freeclimb/api/__init__.py @@ -1,3 +1,4 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from freeclimb.apis import DefaultApi +# flake8: noqa + +# import apis into api package +from freeclimb.api.default_api import DefaultApi diff --git a/freeclimb/api/default_api.py b/freeclimb/api/default_api.py index fdd87f3..350711c 100644 --- a/freeclimb/api/default_api.py +++ b/freeclimb/api/default_api.py @@ -1,76 +1,86 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator +from typing import List, Optional, Tuple, Union +from typing_extensions import Annotated +from freeclimb.models.account_request import AccountRequest +from freeclimb.models.account_result import AccountResult +from freeclimb.models.application_list import ApplicationList +from freeclimb.models.application_request import ApplicationRequest +from freeclimb.models.application_result import ApplicationResult +from freeclimb.models.available_number_list import AvailableNumberList +from freeclimb.models.buy_incoming_number_request import BuyIncomingNumberRequest +from freeclimb.models.call_list import CallList +from freeclimb.models.call_result import CallResult +from freeclimb.models.call_status import CallStatus +from freeclimb.models.completion_request import CompletionRequest +from freeclimb.models.completion_result import CompletionResult +from freeclimb.models.conference_list import ConferenceList +from freeclimb.models.conference_participant_list import ConferenceParticipantList +from freeclimb.models.conference_participant_result import ConferenceParticipantResult +from freeclimb.models.conference_result import ConferenceResult +from freeclimb.models.create_conference_request import CreateConferenceRequest +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken +from freeclimb.models.filter_logs_request import FilterLogsRequest +from freeclimb.models.incoming_number_list import IncomingNumberList +from freeclimb.models.incoming_number_request import IncomingNumberRequest +from freeclimb.models.incoming_number_result import IncomingNumberResult +from freeclimb.models.log_list import LogList +from freeclimb.models.make_call_request import MakeCallRequest +from freeclimb.models.message_direction import MessageDirection +from freeclimb.models.message_request import MessageRequest +from freeclimb.models.message_result import MessageResult +from freeclimb.models.messages_list import MessagesList +from freeclimb.models.queue_list import QueueList +from freeclimb.models.queue_member import QueueMember +from freeclimb.models.queue_member_list import QueueMemberList +from freeclimb.models.queue_request import QueueRequest +from freeclimb.models.queue_result import QueueResult +from freeclimb.models.recording_list import RecordingList +from freeclimb.models.recording_result import RecordingResult +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand +from freeclimb.models.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign +from freeclimb.models.sms_ten_dlc_campaigns_list_result import ( + SMSTenDLCCampaignsListResult, +) +from freeclimb.models.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import ( + SMSTenDLCPartnerCampaignsListResult, +) +from freeclimb.models.sms_toll_free_campaign import SMSTollFreeCampaign +from freeclimb.models.sms_toll_free_campaigns_list_result import ( + SMSTollFreeCampaignsListResult, +) +from freeclimb.models.update_call_request import UpdateCallRequest +from freeclimb.models.update_conference_participant_request import ( + UpdateConferenceParticipantRequest, +) +from freeclimb.models.update_conference_request import UpdateConferenceRequest -import re # noqa: F401 -import sys # noqa: F401 +from freeclimb.api_client import ApiClient, RequestSerialized +from freeclimb.api_response import ApiResponse +from freeclimb.rest import RESTResponseType -from freeclimb.api_client import ApiClient, Endpoint as _Endpoint -from freeclimb.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) -from freeclimb.model.account_request import AccountRequest -from freeclimb.model.account_result import AccountResult -from freeclimb.model.application_list import ApplicationList -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult -from freeclimb.model.available_number_list import AvailableNumberList -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.call_list import CallList -from freeclimb.model.call_result import CallResult -from freeclimb.model.call_status import CallStatus -from freeclimb.model.completion_request import CompletionRequest -from freeclimb.model.completion_result import CompletionResult -from freeclimb.model.conference_list import ConferenceList -from freeclimb.model.conference_participant_list import ConferenceParticipantList -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.conference_result import ConferenceResult -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.create_web_rtc_token import CreateWebRTCToken -from freeclimb.model.filter_logs_request import FilterLogsRequest -from freeclimb.model.incoming_number_list import IncomingNumberList -from freeclimb.model.incoming_number_request import IncomingNumberRequest -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.log_list import LogList -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.message_direction import MessageDirection -from freeclimb.model.message_request import MessageRequest -from freeclimb.model.message_result import MessageResult -from freeclimb.model.messages_list import MessagesList -from freeclimb.model.queue_list import QueueList -from freeclimb.model.queue_member import QueueMember -from freeclimb.model.queue_member_list import QueueMemberList -from freeclimb.model.queue_request import QueueRequest -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.recording_list import RecordingList -from freeclimb.model.recording_result import RecordingResult -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand -from freeclimb.model.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign -from freeclimb.model.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign -from freeclimb.model.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult -from freeclimb.model.update_call_request import UpdateCallRequest -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest - - -class DefaultApi(object): + +class DefaultApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -79,8574 +89,16898 @@ class DefaultApi(object): def __init__(self, api_client=None, account_id=None): if api_client is None: - api_client = ApiClient() + api_client = ApiClient().get_default() self.api_client = api_client if account_id is None: account_id = self.api_client.configuration.username self.account_id = account_id - self.buy_a_phone_number_endpoint = _Endpoint( - settings={ - 'response_type': (IncomingNumberResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/IncomingPhoneNumbers', - 'operation_id': 'buy_a_phone_number', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'buy_incoming_number_request', - ], - 'required': [ - 'account_id', - 'buy_incoming_number_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'buy_incoming_number_request': - (BuyIncomingNumberRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'buy_incoming_number_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_a_conference_endpoint = _Endpoint( - settings={ - 'response_type': (ConferenceResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences', - 'operation_id': 'create_a_conference', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'create_conference_request', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'create_conference_request': - (CreateConferenceRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'create_conference_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_a_queue_endpoint = _Endpoint( - settings={ - 'response_type': (QueueResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues', - 'operation_id': 'create_a_queue', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_request', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_request': - (QueueRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_an_application_endpoint = _Endpoint( - settings={ - 'response_type': (ApplicationResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Applications', - 'operation_id': 'create_an_application', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'application_request', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'application_request': - (ApplicationRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'application_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.create_knowledge_base_completion_endpoint = _Endpoint( - settings={ - 'response_type': (CompletionResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion', - 'operation_id': 'create_knowledge_base_completion', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'knowledge_base_id', - 'completion_request', - ], - 'required': [ - 'account_id', - 'knowledge_base_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'knowledge_base_id': - (str,), - 'completion_request': - (CompletionRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'knowledge_base_id': 'knowledgeBaseId', - }, - 'location_map': { - 'account_id': 'path', - 'knowledge_base_id': 'path', - 'completion_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.delete_a_recording_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Recordings/{recordingId}', - 'operation_id': 'delete_a_recording', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'recording_id', - ], - 'required': [ - 'account_id', - 'recording_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'recording_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'recording_id': 'recordingId', - }, - 'location_map': { - 'account_id': 'path', - 'recording_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_an_application_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Applications/{applicationId}', - 'operation_id': 'delete_an_application', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'application_id', - ], - 'required': [ - 'account_id', - 'application_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'application_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'application_id': 'applicationId', - }, - 'location_map': { - 'account_id': 'path', - 'application_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.delete_an_incoming_number_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}', - 'operation_id': 'delete_an_incoming_number', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'phone_number_id', - ], - 'required': [ - 'account_id', - 'phone_number_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'phone_number_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'phone_number_id': 'phoneNumberId', - }, - 'location_map': { - 'account_id': 'path', - 'phone_number_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.dequeue_a_member_endpoint = _Endpoint( - settings={ - 'response_type': (QueueMember,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}/Members/{callId}', - 'operation_id': 'dequeue_a_member', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - 'call_id', - ], - 'required': [ - 'account_id', - 'queue_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - 'call_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - 'call_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.dequeue_head_member_endpoint = _Endpoint( - settings={ - 'response_type': (QueueMember,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}/Members/Front', - 'operation_id': 'dequeue_head_member', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - ], - 'required': [ - 'account_id', - 'queue_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.download_a_recording_file_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Recordings/{recordingId}/Download', - 'operation_id': 'download_a_recording_file', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'recording_id', - ], - 'required': [ - 'account_id', - 'recording_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'recording_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'recording_id': 'recordingId', - }, - 'location_map': { - 'account_id': 'path', - 'recording_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'audio/x-wav' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.filter_logs_endpoint = _Endpoint( - settings={ - 'response_type': (LogList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Logs', - 'operation_id': 'filter_logs', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'filter_logs_request', - ], - 'required': [ - 'account_id', - 'filter_logs_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'filter_logs_request': - (FilterLogsRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'filter_logs_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.get_a_call_endpoint = _Endpoint( - settings={ - 'response_type': (CallResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls/{callId}', - 'operation_id': 'get_a_call', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'call_id', - ], - 'required': [ - 'account_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'call_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'call_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_a_conference_endpoint = _Endpoint( - settings={ - 'response_type': (ConferenceResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}', - 'operation_id': 'get_a_conference', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - ], - 'required': [ - 'account_id', - 'conference_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_a_member_endpoint = _Endpoint( - settings={ - 'response_type': (QueueMember,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}/Members/{callId}', - 'operation_id': 'get_a_member', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - 'call_id', - ], - 'required': [ - 'account_id', - 'queue_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - 'call_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - 'call_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_a_participant_endpoint = _Endpoint( - settings={ - 'response_type': (ConferenceParticipantResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}', - 'operation_id': 'get_a_participant', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - 'call_id', - ], - 'required': [ - 'account_id', - 'conference_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - 'call_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - 'call_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_a_queue_endpoint = _Endpoint( - settings={ - 'response_type': (QueueResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}', - 'operation_id': 'get_a_queue', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - ], - 'required': [ - 'account_id', - 'queue_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_a_recording_endpoint = _Endpoint( - settings={ - 'response_type': (RecordingResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Recordings/{recordingId}', - 'operation_id': 'get_a_recording', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'recording_id', - ], - 'required': [ - 'account_id', - 'recording_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'recording_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'recording_id': 'recordingId', - }, - 'location_map': { - 'account_id': 'path', - 'recording_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_an_account_endpoint = _Endpoint( - settings={ - 'response_type': (AccountResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}', - 'operation_id': 'get_an_account', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_an_application_endpoint = _Endpoint( - settings={ - 'response_type': (ApplicationResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Applications/{applicationId}', - 'operation_id': 'get_an_application', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'application_id', - ], - 'required': [ - 'account_id', - 'application_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'application_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'application_id': 'applicationId', - }, - 'location_map': { - 'account_id': 'path', - 'application_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_an_incoming_number_endpoint = _Endpoint( - settings={ - 'response_type': (IncomingNumberResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}', - 'operation_id': 'get_an_incoming_number', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'phone_number_id', - ], - 'required': [ - 'account_id', - 'phone_number_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'phone_number_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'phone_number_id': 'phoneNumberId', - }, - 'location_map': { - 'account_id': 'path', - 'phone_number_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_an_sms_message_endpoint = _Endpoint( - settings={ - 'response_type': (MessageResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/{messageId}', - 'operation_id': 'get_an_sms_message', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'message_id', - ], - 'required': [ - 'account_id', - 'message_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'message_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'message_id': 'messageId', - }, - 'location_map': { - 'account_id': 'path', - 'message_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_head_member_endpoint = _Endpoint( - settings={ - 'response_type': (QueueMember,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}/Members/Front', - 'operation_id': 'get_head_member', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - ], - 'required': [ - 'account_id', - 'queue_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_ten_dlc_sms_brand_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTenDLCBrand,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}', - 'operation_id': 'get_ten_dlc_sms_brand', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'brand_id', - ], - 'required': [ - 'account_id', - 'brand_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'brand_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'brand_id': 'brandId', - }, - 'location_map': { - 'account_id': 'path', - 'brand_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_ten_dlc_sms_brands_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTenDLCBrandsListResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/10DLC/Brands', - 'operation_id': 'get_ten_dlc_sms_brands', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_ten_dlc_sms_campaign_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTenDLCCampaign,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}', - 'operation_id': 'get_ten_dlc_sms_campaign', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'campaign_id', - ], - 'required': [ - 'account_id', - 'campaign_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'campaign_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'campaign_id': 'campaignId', - }, - 'location_map': { - 'account_id': 'path', - 'campaign_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_ten_dlc_sms_campaigns_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTenDLCCampaignsListResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/10DLC/Campaigns', - 'operation_id': 'get_ten_dlc_sms_campaigns', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'brand_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'brand_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'brand_id': 'brandId', - }, - 'location_map': { - 'account_id': 'path', - 'brand_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_ten_dlc_sms_partner_campaign_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTenDLCPartnerCampaign,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}', - 'operation_id': 'get_ten_dlc_sms_partner_campaign', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'campaign_id', - ], - 'required': [ - 'account_id', - 'campaign_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'campaign_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'campaign_id': 'campaignId', - }, - 'location_map': { - 'account_id': 'path', - 'campaign_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_ten_dlc_sms_partner_campaigns_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTenDLCPartnerCampaignsListResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns', - 'operation_id': 'get_ten_dlc_sms_partner_campaigns', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'brand_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'brand_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'brand_id': 'brandId', - }, - 'location_map': { - 'account_id': 'path', - 'brand_id': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_toll_free_sms_campaign_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTollFreeCampaign,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}', - 'operation_id': 'get_toll_free_sms_campaign', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'campaign_id', - ], - 'required': [ - 'account_id', - 'campaign_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'campaign_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'campaign_id': 'campaignId', - }, - 'location_map': { - 'account_id': 'path', - 'campaign_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.get_toll_free_sms_campaigns_endpoint = _Endpoint( - settings={ - 'response_type': (SMSTollFreeCampaignsListResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages/TollFree/Campaigns', - 'operation_id': 'get_toll_free_sms_campaigns', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_active_queues_endpoint = _Endpoint( - settings={ - 'response_type': (QueueList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues', - 'operation_id': 'list_active_queues', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'alias', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'alias': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'alias': 'alias', - }, - 'location_map': { - 'account_id': 'path', - 'alias': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_all_account_logs_endpoint = _Endpoint( - settings={ - 'response_type': (LogList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Logs', - 'operation_id': 'list_all_account_logs', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_applications_endpoint = _Endpoint( - settings={ - 'response_type': (ApplicationList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Applications', - 'operation_id': 'list_applications', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'alias', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'alias': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'alias': 'alias', - }, - 'location_map': { - 'account_id': 'path', - 'alias': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_available_numbers_endpoint = _Endpoint( - settings={ - 'response_type': (AvailableNumberList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/AvailablePhoneNumbers', - 'operation_id': 'list_available_numbers', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'phone_number', - 'region', - 'country', - 'voice_enabled', - 'sms_enabled', - 'capabilities_voice', - 'capabilities_sms', - 'capabilities_toll_free', - 'capabilities_ten_dlc', - 'capabilities_short_code', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'phone_number': - (str,), - 'region': - (str,), - 'country': - (str,), - 'voice_enabled': - (bool,), - 'sms_enabled': - (bool,), - 'capabilities_voice': - (bool,), - 'capabilities_sms': - (bool,), - 'capabilities_toll_free': - (bool,), - 'capabilities_ten_dlc': - (bool,), - 'capabilities_short_code': - (bool,), - }, - 'attribute_map': { - 'phone_number': 'phoneNumber', - 'region': 'region', - 'country': 'country', - 'voice_enabled': 'voiceEnabled', - 'sms_enabled': 'smsEnabled', - 'capabilities_voice': 'capabilities.voice', - 'capabilities_sms': 'capabilities.sms', - 'capabilities_toll_free': 'capabilities.tollFree', - 'capabilities_ten_dlc': 'capabilities.tenDLC', - 'capabilities_short_code': 'capabilities.shortCode', - }, - 'location_map': { - 'phone_number': 'query', - 'region': 'query', - 'country': 'query', - 'voice_enabled': 'query', - 'sms_enabled': 'query', - 'capabilities_voice': 'query', - 'capabilities_sms': 'query', - 'capabilities_toll_free': 'query', - 'capabilities_ten_dlc': 'query', - 'capabilities_short_code': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_call_logs_endpoint = _Endpoint( - settings={ - 'response_type': (LogList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls/{callId}/Logs', - 'operation_id': 'list_call_logs', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'call_id', - ], - 'required': [ - 'account_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'call_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'call_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_call_recordings_endpoint = _Endpoint( - settings={ - 'response_type': (RecordingList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls/{callId}/Recordings', - 'operation_id': 'list_call_recordings', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'call_id', - 'date_created', - ], - 'required': [ - 'account_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'call_id': - (str,), - 'date_created': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'call_id': 'callId', - 'date_created': 'dateCreated', - }, - 'location_map': { - 'account_id': 'path', - 'call_id': 'path', - 'date_created': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_calls_endpoint = _Endpoint( - settings={ - 'response_type': (CallList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls', - 'operation_id': 'list_calls', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'active', - 'to', - '_from', - 'status', - 'start_time', - 'end_time', - 'parent_call_id', - 'application_id', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - 'application_id', - ] - }, - root_map={ - 'validations': { - ('application_id',): { - - 'max_items': 16, - }, - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'active': - (bool,), - 'to': - (str,), - '_from': - (str,), - 'status': - (CallStatus,), - 'start_time': - (str,), - 'end_time': - (str,), - 'parent_call_id': - (str,), - 'application_id': - ([str],), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'active': 'active', - 'to': 'to', - '_from': 'from', - 'status': 'status', - 'start_time': 'startTime', - 'end_time': 'endTime', - 'parent_call_id': 'parentCallId', - 'application_id': 'applicationId', - }, - 'location_map': { - 'account_id': 'path', - 'active': 'query', - 'to': 'query', - '_from': 'query', - 'status': 'query', - 'start_time': 'query', - 'end_time': 'query', - 'parent_call_id': 'query', - 'application_id': 'query', - }, - 'collection_format_map': { - 'application_id': 'multi', - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_conference_recordings_endpoint = _Endpoint( - settings={ - 'response_type': (RecordingList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}/Recordings', - 'operation_id': 'list_conference_recordings', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - 'call_id', - 'date_created', - ], - 'required': [ - 'account_id', - 'conference_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - 'call_id': - (str,), - 'date_created': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - 'call_id': 'callId', - 'date_created': 'dateCreated', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - 'call_id': 'query', - 'date_created': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_conferences_endpoint = _Endpoint( - settings={ - 'response_type': (ConferenceList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences', - 'operation_id': 'list_conferences', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'status', - 'alias', - 'date_created', - 'date_updated', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'status': - (str,), - 'alias': - (str,), - 'date_created': - (str,), - 'date_updated': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'status': 'status', - 'alias': 'alias', - 'date_created': 'dateCreated', - 'date_updated': 'dateUpdated', - }, - 'location_map': { - 'account_id': 'path', - 'status': 'query', - 'alias': 'query', - 'date_created': 'query', - 'date_updated': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_incoming_numbers_endpoint = _Endpoint( - settings={ - 'response_type': (IncomingNumberList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/IncomingPhoneNumbers', - 'operation_id': 'list_incoming_numbers', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'phone_number', - 'alias', - 'region', - 'country', - 'application_id', - 'has_application', - 'voice_enabled', - 'sms_enabled', - 'has_campaign', - 'capabilities_voice', - 'capabilities_sms', - 'capabilities_toll_free', - 'capabilities_ten_dlc', - 'capabilities_short_code', - 'tfn_campaign_id', - 'offnet', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'phone_number': - (str,), - 'alias': - (str,), - 'region': - (str,), - 'country': - (str,), - 'application_id': - (str,), - 'has_application': - (bool,), - 'voice_enabled': - (bool,), - 'sms_enabled': - (bool,), - 'has_campaign': - (bool,), - 'capabilities_voice': - (bool,), - 'capabilities_sms': - (bool,), - 'capabilities_toll_free': - (bool,), - 'capabilities_ten_dlc': - (bool,), - 'capabilities_short_code': - (bool,), - 'tfn_campaign_id': - (str,), - 'offnet': - (bool,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'phone_number': 'phoneNumber', - 'alias': 'alias', - 'region': 'region', - 'country': 'country', - 'application_id': 'applicationId', - 'has_application': 'hasApplication', - 'voice_enabled': 'voiceEnabled', - 'sms_enabled': 'smsEnabled', - 'has_campaign': 'hasCampaign', - 'capabilities_voice': 'capabilities.voice', - 'capabilities_sms': 'capabilities.sms', - 'capabilities_toll_free': 'capabilities.tollFree', - 'capabilities_ten_dlc': 'capabilities.tenDLC', - 'capabilities_short_code': 'capabilities.shortCode', - 'tfn_campaign_id': 'tfn.campaignId', - 'offnet': 'offnet', - }, - 'location_map': { - 'account_id': 'path', - 'phone_number': 'query', - 'alias': 'query', - 'region': 'query', - 'country': 'query', - 'application_id': 'query', - 'has_application': 'query', - 'voice_enabled': 'query', - 'sms_enabled': 'query', - 'has_campaign': 'query', - 'capabilities_voice': 'query', - 'capabilities_sms': 'query', - 'capabilities_toll_free': 'query', - 'capabilities_ten_dlc': 'query', - 'capabilities_short_code': 'query', - 'tfn_campaign_id': 'query', - 'offnet': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_members_endpoint = _Endpoint( - settings={ - 'response_type': (QueueMemberList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}/Members', - 'operation_id': 'list_members', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - ], - 'required': [ - 'account_id', - 'queue_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_participants_endpoint = _Endpoint( - settings={ - 'response_type': (ConferenceParticipantList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}/Participants', - 'operation_id': 'list_participants', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - 'talk', - 'listen', - 'dtmf_pass_through', - ], - 'required': [ - 'account_id', - 'conference_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - 'talk': - (bool,), - 'listen': - (bool,), - 'dtmf_pass_through': - (bool,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - 'talk': 'talk', - 'listen': 'listen', - 'dtmf_pass_through': 'dtmfPassThrough', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - 'talk': 'query', - 'listen': 'query', - 'dtmf_pass_through': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_recordings_endpoint = _Endpoint( - settings={ - 'response_type': (RecordingList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Recordings', - 'operation_id': 'list_recordings', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'call_id', - 'conference_id', - 'date_created', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'call_id': - (str,), - 'conference_id': - (str,), - 'date_created': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'call_id': 'callId', - 'conference_id': 'conferenceId', - 'date_created': 'dateCreated', - }, - 'location_map': { - 'account_id': 'path', - 'call_id': 'query', - 'conference_id': 'query', - 'date_created': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.list_sms_messages_endpoint = _Endpoint( - settings={ - 'response_type': (MessagesList,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages', - 'operation_id': 'list_sms_messages', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'to', - '_from', - 'begin_time', - 'end_time', - 'direction', - 'campaign_id', - 'brand_id', - 'is10_dlc', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'to': - (str,), - '_from': - (str,), - 'begin_time': - (str,), - 'end_time': - (str,), - 'direction': - (MessageDirection,), - 'campaign_id': - (str,), - 'brand_id': - (str,), - 'is10_dlc': - (bool,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'to': 'to', - '_from': 'from', - 'begin_time': 'beginTime', - 'end_time': 'endTime', - 'direction': 'direction', - 'campaign_id': 'campaignId', - 'brand_id': 'brandId', - 'is10_dlc': 'is10DLC', - }, - 'location_map': { - 'account_id': 'path', - 'to': 'query', - '_from': 'query', - 'begin_time': 'query', - 'end_time': 'query', - 'direction': 'query', - 'campaign_id': 'query', - 'brand_id': 'query', - 'is10_dlc': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.make_a_call_endpoint = _Endpoint( - settings={ - 'response_type': (CallResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls', - 'operation_id': 'make_a_call', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'make_call_request', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'make_call_request': - (MakeCallRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'make_call_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.make_a_webrtc_jwt_endpoint = _Endpoint( - settings={ - 'response_type': (str,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls/WebRTC/Token', - 'operation_id': 'make_a_webrtc_jwt', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'create_web_rtc_token', - ], - 'required': [ - 'account_id', - 'create_web_rtc_token', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'create_web_rtc_token': - (CreateWebRTCToken,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'create_web_rtc_token': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'text/plain' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.remove_a_participant_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}', - 'operation_id': 'remove_a_participant', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - 'call_id', - ], - 'required': [ - 'account_id', - 'conference_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - 'call_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - 'call_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [], - }, - api_client=api_client - ) - self.send_an_sms_message_endpoint = _Endpoint( - settings={ - 'response_type': (MessageResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Messages', - 'operation_id': 'send_an_sms_message', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'message_request', - ], - 'required': [ - 'account_id', - 'message_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'message_request': - (MessageRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'message_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.stream_a_recording_file_endpoint = _Endpoint( - settings={ - 'response_type': (file_type,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Recordings/{recordingId}/Stream', - 'operation_id': 'stream_a_recording_file', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'recording_id', - ], - 'required': [ - 'account_id', - 'recording_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'recording_id': - (str,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'recording_id': 'recordingId', - }, - 'location_map': { - 'account_id': 'path', - 'recording_id': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'audio/x-wav' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.update_a_conference_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}', - 'operation_id': 'update_a_conference', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - 'update_conference_request', - ], - 'required': [ - 'account_id', - 'conference_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - 'update_conference_request': - (UpdateConferenceRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - 'update_conference_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_a_live_call_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Calls/{callId}', - 'operation_id': 'update_a_live_call', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'call_id', - 'update_call_request', - ], - 'required': [ - 'account_id', - 'call_id', - 'update_call_request', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'call_id': - (str,), - 'update_call_request': - (UpdateCallRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'call_id': 'path', - 'update_call_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_a_participant_endpoint = _Endpoint( - settings={ - 'response_type': (ConferenceParticipantResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}', - 'operation_id': 'update_a_participant', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'conference_id', - 'call_id', - 'update_conference_participant_request', - ], - 'required': [ - 'account_id', - 'conference_id', - 'call_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'conference_id': - (str,), - 'call_id': - (str,), - 'update_conference_participant_request': - (UpdateConferenceParticipantRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'conference_id': 'conferenceId', - 'call_id': 'callId', - }, - 'location_map': { - 'account_id': 'path', - 'conference_id': 'path', - 'call_id': 'path', - 'update_conference_participant_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_a_queue_endpoint = _Endpoint( - settings={ - 'response_type': (QueueResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Queues/{queueId}', - 'operation_id': 'update_a_queue', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'queue_id', - 'queue_request', - ], - 'required': [ - 'account_id', - 'queue_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'queue_id': - (str,), - 'queue_request': - (QueueRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'queue_id': 'queueId', - }, - 'location_map': { - 'account_id': 'path', - 'queue_id': 'path', - 'queue_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_an_account_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}', - 'operation_id': 'update_an_account', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'account_request', - ], - 'required': [ - 'account_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'account_request': - (AccountRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - }, - 'location_map': { - 'account_id': 'path', - 'account_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_an_application_endpoint = _Endpoint( - settings={ - 'response_type': (ApplicationResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/Applications/{applicationId}', - 'operation_id': 'update_an_application', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'application_id', - 'application_request', - ], - 'required': [ - 'account_id', - 'application_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'application_id': - (str,), - 'application_request': - (ApplicationRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'application_id': 'applicationId', - }, - 'location_map': { - 'account_id': 'path', - 'application_id': 'path', - 'application_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_an_incoming_number_endpoint = _Endpoint( - settings={ - 'response_type': (IncomingNumberResult,), - 'auth': [ - 'fc' - ], - 'endpoint_path': '/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}', - 'operation_id': 'update_an_incoming_number', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'account_id', - 'phone_number_id', - 'incoming_number_request', - ], - 'required': [ - 'account_id', - 'phone_number_id', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'account_id': - (str,), - 'phone_number_id': - (str,), - 'incoming_number_request': - (IncomingNumberRequest,), - }, - 'attribute_map': { - 'account_id': 'accountId', - 'phone_number_id': 'phoneNumberId', - }, - 'location_map': { - 'account_id': 'path', - 'phone_number_id': 'path', - 'incoming_number_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) + def get_next_page( + self, + response, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ): + if not hasattr(response, "next_page_uri") or not response.next_page_uri: + raise ValueError( + "The response object does not have a next_page_uri attribute or it is empty." + ) + _param = self._get_next_page_serialize( + account_id=self.account_id, + resource_path=getattr(response, "next_page_uri"), + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": type(response).__name__, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_next_page_serialize( + self, + account_id, + resource_path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path=resource_path, + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def buy_a_phone_number( self, - buy_incoming_number_request, - **kwargs - ): - """Buy a Phone Number # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.buy_a_phone_number(buy_incoming_number_request, async_req=True) - >>> result = thread.get() - - - Args: - - - buy_incoming_number_request (BuyIncomingNumberRequest): Incoming Number transaction details - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - IncomingNumberResult - 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['account_id'] = \ - self.account_id - - kwargs['buy_incoming_number_request'] = \ - buy_incoming_number_request - - return self.buy_a_phone_number_endpoint.call_with_http_info(**kwargs) - + buy_incoming_number_request: Annotated[ + BuyIncomingNumberRequest, + Field(description="Incoming Number transaction details"), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IncomingNumberResult: + """Buy a Phone Number + + + :param buy_incoming_number_request: Incoming Number transaction details (required) + :type buy_incoming_number_request: BuyIncomingNumberRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._buy_a_phone_number_serialize( + account_id=account_id, + buy_incoming_number_request=buy_incoming_number_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def buy_a_phone_number_with_http_info( + self, + buy_incoming_number_request: Annotated[ + BuyIncomingNumberRequest, + Field(description="Incoming Number transaction details"), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IncomingNumberResult]: + """Buy a Phone Number + + + :param buy_incoming_number_request: Incoming Number transaction details (required) + :type buy_incoming_number_request: BuyIncomingNumberRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._buy_a_phone_number_serialize( + account_id=account_id, + buy_incoming_number_request=buy_incoming_number_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def buy_a_phone_number_without_preload_content( + self, + buy_incoming_number_request: Annotated[ + BuyIncomingNumberRequest, + Field(description="Incoming Number transaction details"), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Buy a Phone Number + + + :param buy_incoming_number_request: Incoming Number transaction details (required) + :type buy_incoming_number_request: BuyIncomingNumberRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._buy_a_phone_number_serialize( + account_id=account_id, + buy_incoming_number_request=buy_incoming_number_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _buy_a_phone_number_serialize( + self, + account_id, + buy_incoming_number_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if buy_incoming_number_request is not None: + _body_params = buy_incoming_number_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/IncomingPhoneNumbers", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def create_a_conference( self, - - **kwargs - ): - """Create a Conference # 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_a_conference(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - create_conference_request (CreateConferenceRequest): Conference to create. [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. - async_req (bool): execute request asynchronously - - Returns: - ConferenceResult - 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['account_id'] = \ - self.account_id - - return self.create_a_conference_endpoint.call_with_http_info(**kwargs) - + create_conference_request: Annotated[ + Optional[CreateConferenceRequest], Field(description="Conference to create") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConferenceResult: + """Create a Conference + + + :param create_conference_request: Conference to create + :type create_conference_request: CreateConferenceRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_a_conference_serialize( + account_id=account_id, + create_conference_request=create_conference_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_a_conference_with_http_info( + self, + create_conference_request: Annotated[ + Optional[CreateConferenceRequest], Field(description="Conference to create") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConferenceResult]: + """Create a Conference + + + :param create_conference_request: Conference to create + :type create_conference_request: CreateConferenceRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_a_conference_serialize( + account_id=account_id, + create_conference_request=create_conference_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_a_conference_without_preload_content( + self, + create_conference_request: Annotated[ + Optional[CreateConferenceRequest], Field(description="Conference to create") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a Conference + + + :param create_conference_request: Conference to create + :type create_conference_request: CreateConferenceRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_a_conference_serialize( + account_id=account_id, + create_conference_request=create_conference_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _create_a_conference_serialize( + self, + account_id, + create_conference_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_conference_request is not None: + _body_params = create_conference_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Conferences", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def create_a_queue( self, - - **kwargs - ): - """Create a Queue # 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_a_queue(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - queue_request (QueueRequest): Queue details used to create a queue. [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. - async_req (bool): execute request asynchronously - - Returns: - QueueResult - 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['account_id'] = \ - self.account_id - - return self.create_a_queue_endpoint.call_with_http_info(**kwargs) - + queue_request: Annotated[ + Optional[QueueRequest], + Field(description="Queue details used to create a queue"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueResult: + """Create a Queue + + + :param queue_request: Queue details used to create a queue + :type queue_request: QueueRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_a_queue_serialize( + account_id=account_id, + queue_request=queue_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_a_queue_with_http_info( + self, + queue_request: Annotated[ + Optional[QueueRequest], + Field(description="Queue details used to create a queue"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueResult]: + """Create a Queue + + + :param queue_request: Queue details used to create a queue + :type queue_request: QueueRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_a_queue_serialize( + account_id=account_id, + queue_request=queue_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_a_queue_without_preload_content( + self, + queue_request: Annotated[ + Optional[QueueRequest], + Field(description="Queue details used to create a queue"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a Queue + + + :param queue_request: Queue details used to create a queue + :type queue_request: QueueRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_a_queue_serialize( + account_id=account_id, + queue_request=queue_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _create_a_queue_serialize( + self, + account_id, + queue_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if queue_request is not None: + _body_params = queue_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Queues", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def create_an_application( self, - - **kwargs - ): - """Create an application # 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_an_application(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - application_request (ApplicationRequest): Application Details. [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. - async_req (bool): execute request asynchronously - - Returns: - ApplicationResult - 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['account_id'] = \ - self.account_id - - return self.create_an_application_endpoint.call_with_http_info(**kwargs) - + application_request: Annotated[ + Optional[ApplicationRequest], Field(description="Application Details") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationResult: + """Create an application + + + :param application_request: Application Details + :type application_request: ApplicationRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_an_application_serialize( + account_id=account_id, + application_request=application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_an_application_with_http_info( + self, + application_request: Annotated[ + Optional[ApplicationRequest], Field(description="Application Details") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationResult]: + """Create an application + + + :param application_request: Application Details + :type application_request: ApplicationRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_an_application_serialize( + account_id=account_id, + application_request=application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_an_application_without_preload_content( + self, + application_request: Annotated[ + Optional[ApplicationRequest], Field(description="Application Details") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an application + + + :param application_request: Application Details + :type application_request: ApplicationRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_an_application_serialize( + account_id=account_id, + application_request=application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _create_an_application_serialize( + self, + account_id, + application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_request is not None: + _body_params = application_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Applications", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def create_knowledge_base_completion( self, - knowledge_base_id, - **kwargs - ): - """Query the knowledge base # 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_knowledge_base_completion(knowledge_base_id, async_req=True) - >>> result = thread.get() - - - Args: - - - knowledge_base_id (str): A string that uniquely identifies the KnowledgeBase resource. - - - - - Keyword Args: - completion_request (CompletionRequest): Completion request details. [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. - async_req (bool): execute request asynchronously - - Returns: - CompletionResult - 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['account_id'] = \ - self.account_id - - kwargs['knowledge_base_id'] = \ - knowledge_base_id - - return self.create_knowledge_base_completion_endpoint.call_with_http_info(**kwargs) - + knowledge_base_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies the KnowledgeBase resource." + ), + ], + completion_request: Annotated[ + Optional[CompletionRequest], Field(description="Completion request details") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompletionResult: + """Query the knowledge base + + + :param knowledge_base_id: A string that uniquely identifies the KnowledgeBase resource. (required) + :type knowledge_base_id: str + + :param completion_request: Completion request details + :type completion_request: CompletionRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_knowledge_base_completion_serialize( + account_id=account_id, + knowledge_base_id=knowledge_base_id, + completion_request=completion_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CompletionResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_knowledge_base_completion_with_http_info( + self, + knowledge_base_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies the KnowledgeBase resource." + ), + ], + completion_request: Annotated[ + Optional[CompletionRequest], Field(description="Completion request details") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompletionResult]: + """Query the knowledge base + + + :param knowledge_base_id: A string that uniquely identifies the KnowledgeBase resource. (required) + :type knowledge_base_id: str + + :param completion_request: Completion request details + :type completion_request: CompletionRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_knowledge_base_completion_serialize( + account_id=account_id, + knowledge_base_id=knowledge_base_id, + completion_request=completion_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CompletionResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_knowledge_base_completion_without_preload_content( + self, + knowledge_base_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies the KnowledgeBase resource." + ), + ], + completion_request: Annotated[ + Optional[CompletionRequest], Field(description="Completion request details") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Query the knowledge base + + + :param knowledge_base_id: A string that uniquely identifies the KnowledgeBase resource. (required) + :type knowledge_base_id: str + + :param completion_request: Completion request details + :type completion_request: CompletionRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_knowledge_base_completion_serialize( + account_id=account_id, + knowledge_base_id=knowledge_base_id, + completion_request=completion_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CompletionResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _create_knowledge_base_completion_serialize( + self, + account_id, + knowledge_base_id, + completion_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if knowledge_base_id is not None: + _path_params["knowledgeBaseId"] = knowledge_base_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if completion_request is not None: + _body_params = completion_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def delete_a_recording( self, - recording_id, - **kwargs - ): - """Delete a Recording # 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_a_recording(recording_id, async_req=True) - >>> result = thread.get() - - - Args: - - - recording_id (str): String that uniquely identifies this recording resource. - - - - - 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. - 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['account_id'] = \ - self.account_id - - kwargs['recording_id'] = \ - recording_id - - return self.delete_a_recording_endpoint.call_with_http_info(**kwargs) - + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a Recording + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_a_recording_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_a_recording_with_http_info( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a Recording + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_a_recording_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_a_recording_without_preload_content( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a Recording + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_a_recording_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_a_recording_serialize( + self, + account_id, + recording_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if recording_id is not None: + _path_params["recordingId"] = recording_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/Accounts/{accountId}/Recordings/{recordingId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def delete_an_application( self, - application_id, - **kwargs - ): - """Delete an application # 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_an_application(application_id, async_req=True) - >>> result = thread.get() - - - Args: - - - application_id (str): String that uniquely identifies this application resource. - - - - - 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. - 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['account_id'] = \ - self.account_id - - kwargs['application_id'] = \ - application_id - - return self.delete_an_application_endpoint.call_with_http_info(**kwargs) - + application_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this application resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an application + + + :param application_id: String that uniquely identifies this application resource. (required) + :type application_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_application_serialize( + account_id=account_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_an_application_with_http_info( + self, + application_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this application resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an application + + + :param application_id: String that uniquely identifies this application resource. (required) + :type application_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_application_serialize( + account_id=account_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_an_application_without_preload_content( + self, + application_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this application resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an application + + + :param application_id: String that uniquely identifies this application resource. (required) + :type application_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_application_serialize( + account_id=account_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_an_application_serialize( + self, + account_id, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if application_id is not None: + _path_params["applicationId"] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/Accounts/{accountId}/Applications/{applicationId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def delete_an_incoming_number( self, - phone_number_id, - **kwargs - ): - """Delete an Incoming Number # 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_an_incoming_number(phone_number_id, async_req=True) - >>> result = thread.get() - - - Args: - - - phone_number_id (str): String that uniquely identifies this phone number resource. - - - - - 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. - 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['account_id'] = \ - self.account_id - - kwargs['phone_number_id'] = \ - phone_number_id - - return self.delete_an_incoming_number_endpoint.call_with_http_info(**kwargs) - + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_an_incoming_number_with_http_info( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_an_incoming_number_without_preload_content( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_an_incoming_number_serialize( + self, + account_id, + phone_number_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if phone_number_id is not None: + _path_params["phoneNumberId"] = phone_number_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def dequeue_a_member( self, - queue_id,call_id, - **kwargs - ): - """Dequeue a Member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.dequeue_a_member(queue_id, call_id, async_req=True) - >>> result = thread.get() - - - - Args: - - - queue_id (str): String that uniquely identifies the Queue that the Member belongs to. - - call_id (str): ID if the Call that the Member belongs to - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - QueueMember - 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['account_id'] = \ - self.account_id - - kwargs['queue_id'] = \ - queue_id - - kwargs['call_id'] = \ - call_id - - return self.dequeue_a_member_endpoint.call_with_http_info(**kwargs) - + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + call_id: Annotated[ + StrictStr, Field(description="ID if the Call that the Member belongs to") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueMember: + """Dequeue a Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param call_id: ID if the Call that the Member belongs to (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._dequeue_a_member_serialize( + account_id=account_id, + queue_id=queue_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def dequeue_a_member_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + call_id: Annotated[ + StrictStr, Field(description="ID if the Call that the Member belongs to") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueMember]: + """Dequeue a Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param call_id: ID if the Call that the Member belongs to (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._dequeue_a_member_serialize( + account_id=account_id, + queue_id=queue_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def dequeue_a_member_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + call_id: Annotated[ + StrictStr, Field(description="ID if the Call that the Member belongs to") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Dequeue a Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param call_id: ID if the Call that the Member belongs to (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._dequeue_a_member_serialize( + account_id=account_id, + queue_id=queue_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _dequeue_a_member_serialize( + self, + account_id, + queue_id, + call_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def dequeue_head_member( self, - queue_id, - **kwargs - ): - """Dequeue Head Member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.dequeue_head_member(queue_id, async_req=True) - >>> result = thread.get() - - - Args: - - - queue_id (str): String that uniquely identifies this queue resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - QueueMember - 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['account_id'] = \ - self.account_id - - kwargs['queue_id'] = \ - queue_id - - return self.dequeue_head_member_endpoint.call_with_http_info(**kwargs) - + queue_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this queue resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueMember: + """Dequeue Head Member + + + :param queue_id: String that uniquely identifies this queue resource. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._dequeue_head_member_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def dequeue_head_member_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this queue resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueMember]: + """Dequeue Head Member + + + :param queue_id: String that uniquely identifies this queue resource. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._dequeue_head_member_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def dequeue_head_member_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this queue resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Dequeue Head Member + + + :param queue_id: String that uniquely identifies this queue resource. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._dequeue_head_member_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _dequeue_head_member_serialize( + self, + account_id, + queue_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Queues/{queueId}/Members/Front", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def download_a_recording_file( self, - recording_id, - **kwargs - ): - """Download a Recording File # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.download_a_recording_file(recording_id, async_req=True) - >>> result = thread.get() - - - Args: - - - recording_id (str): String that uniquely identifies this recording resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - file_type - 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['account_id'] = \ - self.account_id - - kwargs['recording_id'] = \ - recording_id - - return self.download_a_recording_file_endpoint.call_with_http_info(**kwargs) - + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Download a Recording File + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._download_a_recording_file_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def download_a_recording_file_with_http_info( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Download a Recording File + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._download_a_recording_file_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def download_a_recording_file_without_preload_content( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download a Recording File + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._download_a_recording_file_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _download_a_recording_file_serialize( + self, + account_id, + recording_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if recording_id is not None: + _path_params["recordingId"] = recording_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["audio/x-wav"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Recordings/{recordingId}/Download", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def filter_logs( self, - filter_logs_request, - **kwargs - ): - """Filter Logs # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.filter_logs(filter_logs_request, async_req=True) - >>> result = thread.get() - - - Args: - - - filter_logs_request (FilterLogsRequest): Filter logs request paramters - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - LogList - 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['account_id'] = \ - self.account_id - - kwargs['filter_logs_request'] = \ - filter_logs_request - - return self.filter_logs_endpoint.call_with_http_info(**kwargs) - + filter_logs_request: Annotated[ + FilterLogsRequest, Field(description="Filter logs request paramters") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LogList: + """Filter Logs + + + :param filter_logs_request: Filter logs request paramters (required) + :type filter_logs_request: FilterLogsRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._filter_logs_serialize( + account_id=account_id, + filter_logs_request=filter_logs_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def filter_logs_with_http_info( + self, + filter_logs_request: Annotated[ + FilterLogsRequest, Field(description="Filter logs request paramters") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LogList]: + """Filter Logs + + + :param filter_logs_request: Filter logs request paramters (required) + :type filter_logs_request: FilterLogsRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._filter_logs_serialize( + account_id=account_id, + filter_logs_request=filter_logs_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def filter_logs_without_preload_content( + self, + filter_logs_request: Annotated[ + FilterLogsRequest, Field(description="Filter logs request paramters") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Filter Logs + + + :param filter_logs_request: Filter logs request paramters (required) + :type filter_logs_request: FilterLogsRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._filter_logs_serialize( + account_id=account_id, + filter_logs_request=filter_logs_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _filter_logs_serialize( + self, + account_id, + filter_logs_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if filter_logs_request is not None: + _body_params = filter_logs_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Logs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_a_call( self, - call_id, - **kwargs - ): - """Get a 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.get_a_call(call_id, async_req=True) - >>> result = thread.get() - - - Args: - - - call_id (str): String that uniquely identifies this call resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - CallResult - 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['account_id'] = \ - self.account_id - - kwargs['call_id'] = \ - call_id - - return self.get_a_call_endpoint.call_with_http_info(**kwargs) - + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CallResult: + """Get a Call + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_call_serialize( + account_id=account_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_a_call_with_http_info( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CallResult]: + """Get a Call + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_call_serialize( + account_id=account_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_a_call_without_preload_content( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a Call + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_call_serialize( + account_id=account_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_a_call_serialize( + self, + account_id, + call_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Calls/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_a_conference( self, - conference_id, - **kwargs - ): - """Get a Conference # 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_a_conference(conference_id, async_req=True) - >>> result = thread.get() - - - Args: - - - conference_id (str): A string that uniquely identifies this conference resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - ConferenceResult - 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['account_id'] = \ - self.account_id - - kwargs['conference_id'] = \ - conference_id - - return self.get_a_conference_endpoint.call_with_http_info(**kwargs) - + conference_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this conference resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConferenceResult: + """Get a Conference + + + :param conference_id: A string that uniquely identifies this conference resource. (required) + :type conference_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_conference_serialize( + account_id=account_id, + conference_id=conference_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_a_conference_with_http_info( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this conference resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConferenceResult]: + """Get a Conference + + + :param conference_id: A string that uniquely identifies this conference resource. (required) + :type conference_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_conference_serialize( + account_id=account_id, + conference_id=conference_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_a_conference_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this conference resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a Conference + + + :param conference_id: A string that uniquely identifies this conference resource. (required) + :type conference_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_conference_serialize( + account_id=account_id, + conference_id=conference_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_a_conference_serialize( + self, + account_id, + conference_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_a_member( self, - queue_id,call_id, - **kwargs - ): - """Get a Member # 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_a_member(queue_id, call_id, async_req=True) - >>> result = thread.get() - - - - Args: - - - queue_id (str): String that uniquely identifies the Queue that the Member belongs to. - - call_id (str): ID of the Call that the Member belongs to - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - QueueMember - 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['account_id'] = \ - self.account_id - - kwargs['queue_id'] = \ - queue_id - - kwargs['call_id'] = \ - call_id - - return self.get_a_member_endpoint.call_with_http_info(**kwargs) - + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + call_id: Annotated[ + StrictStr, Field(description="ID of the Call that the Member belongs to") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueMember: + """Get a Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param call_id: ID of the Call that the Member belongs to (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_member_serialize( + account_id=account_id, + queue_id=queue_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_a_member_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + call_id: Annotated[ + StrictStr, Field(description="ID of the Call that the Member belongs to") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueMember]: + """Get a Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param call_id: ID of the Call that the Member belongs to (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_member_serialize( + account_id=account_id, + queue_id=queue_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_a_member_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + call_id: Annotated[ + StrictStr, Field(description="ID of the Call that the Member belongs to") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param call_id: ID of the Call that the Member belongs to (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_member_serialize( + account_id=account_id, + queue_id=queue_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_a_member_serialize( + self, + account_id, + queue_id, + call_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_a_participant( self, - conference_id,call_id, - **kwargs - ): - """Get a Participant # 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_a_participant(conference_id, call_id, async_req=True) - >>> result = thread.get() - - - - Args: - - - conference_id (str): ID of the conference this participant is in. - - call_id (str): ID of the Call associated with this participant. - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - ConferenceParticipantResult - 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['account_id'] = \ - self.account_id - - kwargs['conference_id'] = \ - conference_id - - kwargs['call_id'] = \ - call_id - - return self.get_a_participant_endpoint.call_with_http_info(**kwargs) - + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConferenceParticipantResult: + """Get a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_a_participant_with_http_info( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConferenceParticipantResult]: + """Get a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_a_participant_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_a_participant_serialize( + self, + account_id, + conference_id, + call_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_a_queue( self, - queue_id, - **kwargs - ): - """Get a Queue # 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_a_queue(queue_id, async_req=True) - >>> result = thread.get() - - - Args: - - - queue_id (str): A string that uniquely identifies this queue resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - QueueResult - 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['account_id'] = \ - self.account_id - - kwargs['queue_id'] = \ - queue_id - - return self.get_a_queue_endpoint.call_with_http_info(**kwargs) - + queue_id: Annotated[ + StrictStr, + Field(description="A string that uniquely identifies this queue resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueResult: + """Get a Queue + + + :param queue_id: A string that uniquely identifies this queue resource. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_queue_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_a_queue_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field(description="A string that uniquely identifies this queue resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueResult]: + """Get a Queue + + + :param queue_id: A string that uniquely identifies this queue resource. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_queue_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_a_queue_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field(description="A string that uniquely identifies this queue resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a Queue + + + :param queue_id: A string that uniquely identifies this queue resource. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_queue_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_a_queue_serialize( + self, + account_id, + queue_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Queues/{queueId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_a_recording( self, - recording_id, - **kwargs - ): - """Get a Recording # 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_a_recording(recording_id, async_req=True) - >>> result = thread.get() - - - Args: - - - recording_id (str): String that uniquely identifies this recording resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - RecordingResult - 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['account_id'] = \ - self.account_id - - kwargs['recording_id'] = \ - recording_id - - return self.get_a_recording_endpoint.call_with_http_info(**kwargs) - + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecordingResult: + """Get a Recording + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_recording_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_a_recording_with_http_info( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecordingResult]: + """Get a Recording + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_recording_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_a_recording_without_preload_content( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a Recording + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_a_recording_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_a_recording_serialize( + self, + account_id, + recording_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if recording_id is not None: + _path_params["recordingId"] = recording_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Recordings/{recordingId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_an_account( self, - - **kwargs - ): - """Get an 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_an_account(async_req=True) - >>> result = thread.get() - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - AccountResult - 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['account_id'] = \ - self.account_id - - return self.get_an_account_endpoint.call_with_http_info(**kwargs) - + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AccountResult: + """Get an Account + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_account_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_an_account_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AccountResult]: + """Get an Account + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_account_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_an_account_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an Account + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_account_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AccountResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_an_account_serialize( + self, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_an_application( self, - application_id, - **kwargs - ): - """Get an Application # 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_an_application(application_id, async_req=True) - >>> result = thread.get() - - - Args: - - - application_id (str): A string that uniquely identifies this application resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - ApplicationResult - 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['account_id'] = \ - self.account_id - - kwargs['application_id'] = \ - application_id - - return self.get_an_application_endpoint.call_with_http_info(**kwargs) - + application_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this application resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationResult: + """Get an Application + + + :param application_id: A string that uniquely identifies this application resource. (required) + :type application_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_application_serialize( + account_id=account_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_an_application_with_http_info( + self, + application_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this application resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationResult]: + """Get an Application + + + :param application_id: A string that uniquely identifies this application resource. (required) + :type application_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_application_serialize( + account_id=account_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_an_application_without_preload_content( + self, + application_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this application resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an Application + + + :param application_id: A string that uniquely identifies this application resource. (required) + :type application_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_application_serialize( + account_id=account_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_an_application_serialize( + self, + account_id, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if application_id is not None: + _path_params["applicationId"] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Applications/{applicationId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_an_incoming_number( self, - phone_number_id, - **kwargs - ): - """Get an Incoming Number # 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_an_incoming_number(phone_number_id, async_req=True) - >>> result = thread.get() - - - Args: - - - phone_number_id (str): String that uniquely identifies this phone number resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - IncomingNumberResult - 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['account_id'] = \ - self.account_id - - kwargs['phone_number_id'] = \ - phone_number_id - - return self.get_an_incoming_number_endpoint.call_with_http_info(**kwargs) - + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IncomingNumberResult: + """Get an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_an_incoming_number_with_http_info( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IncomingNumberResult]: + """Get an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_an_incoming_number_without_preload_content( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_an_incoming_number_serialize( + self, + account_id, + phone_number_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if phone_number_id is not None: + _path_params["phoneNumberId"] = phone_number_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_an_sms_message( self, - message_id, - **kwargs - ): - """Get an SMS Message # 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_an_sms_message(message_id, async_req=True) - >>> result = thread.get() - - - Args: - - - message_id (str): String that uniquely identifies this Message resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - MessageResult - 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['account_id'] = \ - self.account_id - - kwargs['message_id'] = \ - message_id - - return self.get_an_sms_message_endpoint.call_with_http_info(**kwargs) - + message_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this Message resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResult: + """Get an SMS Message + + + :param message_id: String that uniquely identifies this Message resource. (required) + :type message_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_sms_message_serialize( + account_id=account_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "MessageResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_an_sms_message_with_http_info( + self, + message_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this Message resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResult]: + """Get an SMS Message + + + :param message_id: String that uniquely identifies this Message resource. (required) + :type message_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_sms_message_serialize( + account_id=account_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "MessageResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_an_sms_message_without_preload_content( + self, + message_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this Message resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an SMS Message + + + :param message_id: String that uniquely identifies this Message resource. (required) + :type message_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_sms_message_serialize( + account_id=account_id, + message_id=message_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "MessageResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_an_sms_message_serialize( + self, + account_id, + message_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if message_id is not None: + _path_params["messageId"] = message_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/{messageId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_head_member( self, - queue_id, - **kwargs - ): - """Get Head Member # 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_head_member(queue_id, async_req=True) - >>> result = thread.get() - - - Args: - - - queue_id (str): String that uniquely identifies the Queue that the Member belongs to. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - QueueMember - 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['account_id'] = \ - self.account_id - - kwargs['queue_id'] = \ - queue_id - - return self.get_head_member_endpoint.call_with_http_info(**kwargs) - + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueMember: + """Get Head Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_head_member_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_head_member_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueMember]: + """Get Head Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_head_member_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_head_member_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Head Member + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_head_member_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMember", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_head_member_serialize( + self, + account_id, + queue_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Queues/{queueId}/Members/Front", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_ten_dlc_sms_brand( self, - brand_id, - **kwargs - ): - """Get a 10DLC SMS Brand # 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_ten_dlc_sms_brand(brand_id, async_req=True) - >>> result = thread.get() - - - Args: - - - brand_id (str): String that uniquely identifies this brand resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - SMSTenDLCBrand - 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['account_id'] = \ - self.account_id - - kwargs['brand_id'] = \ - brand_id - - return self.get_ten_dlc_sms_brand_endpoint.call_with_http_info(**kwargs) - + brand_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this brand resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTenDLCBrand: + """Get a 10DLC SMS Brand + + + :param brand_id: String that uniquely identifies this brand resource. (required) + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_brand_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCBrand", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_ten_dlc_sms_brand_with_http_info( + self, + brand_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this brand resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTenDLCBrand]: + """Get a 10DLC SMS Brand + + + :param brand_id: String that uniquely identifies this brand resource. (required) + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_brand_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCBrand", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_ten_dlc_sms_brand_without_preload_content( + self, + brand_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this brand resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a 10DLC SMS Brand + + + :param brand_id: String that uniquely identifies this brand resource. (required) + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_brand_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCBrand", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_ten_dlc_sms_brand_serialize( + self, + account_id, + brand_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if brand_id is not None: + _path_params["brandId"] = brand_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_ten_dlc_sms_brands( self, - - **kwargs - ): - """Get list of SMS 10DLC Brands # 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_ten_dlc_sms_brands(async_req=True) - >>> result = thread.get() - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - SMSTenDLCBrandsListResult - 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['account_id'] = \ - self.account_id - - return self.get_ten_dlc_sms_brands_endpoint.call_with_http_info(**kwargs) - + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTenDLCBrandsListResult: + """Get list of SMS 10DLC Brands + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_brands_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCBrandsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_ten_dlc_sms_brands_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTenDLCBrandsListResult]: + """Get list of SMS 10DLC Brands + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_brands_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCBrandsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_ten_dlc_sms_brands_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of SMS 10DLC Brands + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_brands_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCBrandsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_ten_dlc_sms_brands_serialize( + self, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/10DLC/Brands", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def get_ten_dlc_sms_campaign( self, - campaign_id, - **kwargs - ): - """Get a 10DLC SMS Campaign # 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_ten_dlc_sms_campaign(campaign_id, async_req=True) - >>> result = thread.get() - - - Args: - - - campaign_id (str): String that uniquely identifies this campaign resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - SMSTenDLCCampaign - 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['account_id'] = \ - self.account_id - - kwargs['campaign_id'] = \ - campaign_id - - return self.get_ten_dlc_sms_campaign_endpoint.call_with_http_info(**kwargs) - - def get_ten_dlc_sms_campaigns( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTenDLCCampaign: + """Get a 10DLC SMS Campaign + + + :param campaign_id: String that uniquely identifies this campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_ten_dlc_sms_campaign_with_http_info( self, - - **kwargs - ): - """Get list of SMS 10DLC Campaigns # 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_ten_dlc_sms_campaigns(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - brand_id (str): The unique identifier for a brand. [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. - async_req (bool): execute request asynchronously - - Returns: - SMSTenDLCCampaignsListResult - 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['account_id'] = \ - self.account_id - - return self.get_ten_dlc_sms_campaigns_endpoint.call_with_http_info(**kwargs) - - def get_ten_dlc_sms_partner_campaign( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTenDLCCampaign]: + """Get a 10DLC SMS Campaign + + + :param campaign_id: String that uniquely identifies this campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_ten_dlc_sms_campaign_without_preload_content( self, - campaign_id, - **kwargs - ): - """Get a 10DLC SMS Partner Campaign # 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_ten_dlc_sms_partner_campaign(campaign_id, async_req=True) - >>> result = thread.get() - - - Args: - - - campaign_id (str): String that uniquely identifies this campaign resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - SMSTenDLCPartnerCampaign - 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['account_id'] = \ - self.account_id - - kwargs['campaign_id'] = \ - campaign_id - - return self.get_ten_dlc_sms_partner_campaign_endpoint.call_with_http_info(**kwargs) - - def get_ten_dlc_sms_partner_campaigns( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a 10DLC SMS Campaign + + + :param campaign_id: String that uniquely identifies this campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_ten_dlc_sms_campaign_serialize( self, - - **kwargs - ): - """Get list of SMS 10DLC Partner Campaigns # 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_ten_dlc_sms_partner_campaigns(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - brand_id (str): The unique identifier for a brand. [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. - async_req (bool): execute request asynchronously - - Returns: - SMSTenDLCPartnerCampaignsListResult - 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['account_id'] = \ - self.account_id - - return self.get_ten_dlc_sms_partner_campaigns_endpoint.call_with_http_info(**kwargs) - - def get_toll_free_sms_campaign( + account_id, + campaign_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if campaign_id is not None: + _path_params["campaignId"] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_ten_dlc_sms_campaigns( self, - campaign_id, - **kwargs - ): - """Get a TollFree SMS Campaign # 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_toll_free_sms_campaign(campaign_id, async_req=True) - >>> result = thread.get() - - - Args: - - - campaign_id (str): String that uniquely identifies this TollFree Campaign resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - SMSTollFreeCampaign - 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['account_id'] = \ - self.account_id - - kwargs['campaign_id'] = \ - campaign_id - - return self.get_toll_free_sms_campaign_endpoint.call_with_http_info(**kwargs) - - def get_toll_free_sms_campaigns( + brand_id: Annotated[ + Optional[StrictStr], Field(description="The unique identifier for a brand") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTenDLCCampaignsListResult: + """Get list of SMS 10DLC Campaigns + + + :param brand_id: The unique identifier for a brand + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_campaigns_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_ten_dlc_sms_campaigns_with_http_info( self, - - **kwargs - ): - """Get list of TollFree Campaigns # 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_toll_free_sms_campaigns(async_req=True) - >>> result = thread.get() - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - SMSTollFreeCampaignsListResult - 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['account_id'] = \ - self.account_id - - return self.get_toll_free_sms_campaigns_endpoint.call_with_http_info(**kwargs) - - def list_active_queues( + brand_id: Annotated[ + Optional[StrictStr], Field(description="The unique identifier for a brand") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTenDLCCampaignsListResult]: + """Get list of SMS 10DLC Campaigns + + + :param brand_id: The unique identifier for a brand + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_campaigns_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_ten_dlc_sms_campaigns_without_preload_content( self, - - **kwargs - ): - """List Active Queues # 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_active_queues(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - alias (str): Return only the Queue resources with aliases that exactly match this name.. [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. - async_req (bool): execute request asynchronously - - Returns: - QueueList - 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['account_id'] = \ - self.account_id - - return self.list_active_queues_endpoint.call_with_http_info(**kwargs) - - def list_all_account_logs( + brand_id: Annotated[ + Optional[StrictStr], Field(description="The unique identifier for a brand") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of SMS 10DLC Campaigns + + + :param brand_id: The unique identifier for a brand + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_campaigns_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_ten_dlc_sms_campaigns_serialize( self, - - **kwargs - ): - """List All Account Logs # 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_all_account_logs(async_req=True) - >>> result = thread.get() - - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - LogList - 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['account_id'] = \ - self.account_id - - return self.list_all_account_logs_endpoint.call_with_http_info(**kwargs) - - def list_applications( + account_id, + brand_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if brand_id is not None: + + _query_params.append(("brandId", brand_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/10DLC/Campaigns", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_ten_dlc_sms_partner_campaign( self, - - **kwargs - ): - """List applications # 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_applications(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - alias (str): Return only applications with aliases that exactly match this value.. [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. - async_req (bool): execute request asynchronously - - Returns: - ApplicationList - 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['account_id'] = \ - self.account_id - - return self.list_applications_endpoint.call_with_http_info(**kwargs) - - def list_available_numbers( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTenDLCPartnerCampaign: + """Get a 10DLC SMS Partner Campaign + + + :param campaign_id: String that uniquely identifies this campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_partner_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCPartnerCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_ten_dlc_sms_partner_campaign_with_http_info( self, - - **kwargs - ): - """List available numbers # 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_available_numbers(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - phone_number (str): PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format.. [optional] - region (str): State or province of this phone number.. [optional] - country (str): Country of this phone number.. [optional] - voice_enabled (bool): Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. [optional] if omitted the server will use the default value of True - sms_enabled (bool): Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. [optional] if omitted the server will use the default value of True - capabilities_voice (bool): [optional] - capabilities_sms (bool): [optional] - capabilities_toll_free (bool): [optional] - capabilities_ten_dlc (bool): [optional] - capabilities_short_code (bool): [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. - async_req (bool): execute request asynchronously - - Returns: - AvailableNumberList - 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') - - return self.list_available_numbers_endpoint.call_with_http_info(**kwargs) - - def list_call_logs( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTenDLCPartnerCampaign]: + """Get a 10DLC SMS Partner Campaign + + + :param campaign_id: String that uniquely identifies this campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_partner_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCPartnerCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_ten_dlc_sms_partner_campaign_without_preload_content( self, - call_id, - **kwargs - ): - """List Call Logs # 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_call_logs(call_id, async_req=True) - >>> result = thread.get() - - - Args: - - - call_id (str): String that uniquely identifies this call resource. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - LogList - 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['account_id'] = \ - self.account_id - - kwargs['call_id'] = \ - call_id - - return self.list_call_logs_endpoint.call_with_http_info(**kwargs) - - def list_call_recordings( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a 10DLC SMS Partner Campaign + + + :param campaign_id: String that uniquely identifies this campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_partner_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCPartnerCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_ten_dlc_sms_partner_campaign_serialize( self, - call_id, - **kwargs - ): - """List Call Recordings # 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_call_recordings(call_id, async_req=True) - >>> result = thread.get() - - - Args: - - - call_id (str): String that uniquely identifies this call resource. - - - - - Keyword Args: - date_created (str): Only show recordings created on the specified date, in the form *YYYY-MM-DD*.. [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. - async_req (bool): execute request asynchronously - - Returns: - RecordingList - 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['account_id'] = \ - self.account_id - - kwargs['call_id'] = \ - call_id - - return self.list_call_recordings_endpoint.call_with_http_info(**kwargs) - - def list_calls( + account_id, + campaign_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if campaign_id is not None: + _path_params["campaignId"] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_ten_dlc_sms_partner_campaigns( self, - - **kwargs - ): - """List Calls # 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_calls(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - active (bool): If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query.. [optional] if omitted the server will use the default value of False - to (str): Only show Calls to this phone number.. [optional] - _from (str): Only show Calls from this phone number.. [optional] - status (CallStatus): Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`.. [optional] - start_time (str): Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss.. [optional] - end_time (str): Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss.. [optional] - parent_call_id (str): Only show Calls spawned by the call with this ID.. [optional] - application_id ([str]): Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications.. [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. - async_req (bool): execute request asynchronously - - Returns: - CallList - 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['account_id'] = \ - self.account_id - - return self.list_calls_endpoint.call_with_http_info(**kwargs) - - def list_conference_recordings( + brand_id: Annotated[ + Optional[StrictStr], Field(description="The unique identifier for a brand") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTenDLCPartnerCampaignsListResult: + """Get list of SMS 10DLC Partner Campaigns + + + :param brand_id: The unique identifier for a brand + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_partner_campaigns_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCPartnerCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_ten_dlc_sms_partner_campaigns_with_http_info( self, - conference_id, - **kwargs - ): - """List Conference Recordings # 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_conference_recordings(conference_id, async_req=True) - >>> result = thread.get() - - - Args: - - - conference_id (str): Show only Recordings made during the conference with this ID. - - - - - Keyword Args: - call_id (str): Show only Recordings made during the Call with this ID.. [optional] - date_created (str): Only show Recordings created on this date, formatted as *YYYY-MM-DD*.. [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. - async_req (bool): execute request asynchronously - - Returns: - RecordingList - 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['account_id'] = \ - self.account_id - - kwargs['conference_id'] = \ - conference_id - - return self.list_conference_recordings_endpoint.call_with_http_info(**kwargs) - - def list_conferences( + brand_id: Annotated[ + Optional[StrictStr], Field(description="The unique identifier for a brand") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTenDLCPartnerCampaignsListResult]: + """Get list of SMS 10DLC Partner Campaigns + + + :param brand_id: The unique identifier for a brand + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_partner_campaigns_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCPartnerCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_ten_dlc_sms_partner_campaigns_without_preload_content( self, - - **kwargs - ): - """List Conferences # 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_conferences(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - status (str): Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`.. [optional] - alias (str): List Conferences whose alias exactly matches this string.. [optional] - date_created (str): Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*.. [optional] - date_updated (str): Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*.. [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. - async_req (bool): execute request asynchronously - - Returns: - ConferenceList - 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['account_id'] = \ - self.account_id - - return self.list_conferences_endpoint.call_with_http_info(**kwargs) - - def list_incoming_numbers( + brand_id: Annotated[ + Optional[StrictStr], Field(description="The unique identifier for a brand") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of SMS 10DLC Partner Campaigns + + + :param brand_id: The unique identifier for a brand + :type brand_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_ten_dlc_sms_partner_campaigns_serialize( + account_id=account_id, + brand_id=brand_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTenDLCPartnerCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_ten_dlc_sms_partner_campaigns_serialize( self, - - **kwargs - ): - """List Incoming Numbers # 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_incoming_numbers(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - phone_number (str): Only show incoming phone number resources that match this PCRE-compatible regular expression.. [optional] - alias (str): Only show incoming phone numbers with aliases that exactly match this value.. [optional] - region (str): State or province of this phone number.. [optional] - country (str): Country of this phone number.. [optional] - application_id (str): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] - has_application (bool): Indication of whether the phone number has an application linked to it.. [optional] if omitted the server will use the default value of False - voice_enabled (bool): Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. [optional] if omitted the server will use the default value of True - sms_enabled (bool): Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. [optional] if omitted the server will use the default value of True - has_campaign (bool): Indication of whether the phone number has a campaign associated with it. [optional] - capabilities_voice (bool): [optional] - capabilities_sms (bool): [optional] - capabilities_toll_free (bool): [optional] - capabilities_ten_dlc (bool): [optional] - capabilities_short_code (bool): [optional] - tfn_campaign_id (str): Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID.. [optional] - offnet (bool): Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource.. [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. - async_req (bool): execute request asynchronously - - Returns: - IncomingNumberList - 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['account_id'] = \ - self.account_id - - return self.list_incoming_numbers_endpoint.call_with_http_info(**kwargs) - - def list_members( + account_id, + brand_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if brand_id is not None: + + _query_params.append(("brandId", brand_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_toll_free_sms_campaign( self, - queue_id, - **kwargs - ): - """List Members # 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_members(queue_id, async_req=True) - >>> result = thread.get() - - - Args: - - - queue_id (str): String that uniquely identifies the Queue that the Member belongs to. - - - - - 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. - async_req (bool): execute request asynchronously - - Returns: - QueueMemberList - 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['account_id'] = \ - self.account_id - - kwargs['queue_id'] = \ - queue_id - - return self.list_members_endpoint.call_with_http_info(**kwargs) - - def list_participants( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this TollFree Campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTollFreeCampaign: + """Get a TollFree SMS Campaign + + + :param campaign_id: String that uniquely identifies this TollFree Campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_toll_free_sms_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTollFreeCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_toll_free_sms_campaign_with_http_info( self, - conference_id, - **kwargs - ): - """List Participants # 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_participants(conference_id, async_req=True) - >>> result = thread.get() - - - Args: - - - conference_id (str): ID of the conference this participant is in. - - - - - Keyword Args: - talk (bool): Only show Participants with the talk privilege.. [optional] - listen (bool): Only show Participants with the listen privilege.. [optional] - dtmf_pass_through (bool): Only show Participants with the dtmfPassThrough privilege.. [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. - async_req (bool): execute request asynchronously - - Returns: - ConferenceParticipantList - 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['account_id'] = \ - self.account_id - - kwargs['conference_id'] = \ - conference_id - - return self.list_participants_endpoint.call_with_http_info(**kwargs) - - def list_recordings( + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this TollFree Campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTollFreeCampaign]: + """Get a TollFree SMS Campaign + + + :param campaign_id: String that uniquely identifies this TollFree Campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_toll_free_sms_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTollFreeCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_toll_free_sms_campaign_without_preload_content( + self, + campaign_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this TollFree Campaign resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a TollFree SMS Campaign + + + :param campaign_id: String that uniquely identifies this TollFree Campaign resource. (required) + :type campaign_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_toll_free_sms_campaign_serialize( + account_id=account_id, + campaign_id=campaign_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTollFreeCampaign", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_toll_free_sms_campaign_serialize( self, - - **kwargs - ): - """List Recordings # 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_recordings(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - call_id (str): Show only Recordings made during the Call with this ID.. [optional] - conference_id (str): Show only Recordings made during the conference with this ID.. [optional] - date_created (str): Only show Recordings created on this date, formatted as *YYYY-MM-DD*.. [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. - async_req (bool): execute request asynchronously - - Returns: - RecordingList - 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['account_id'] = \ - self.account_id - - return self.list_recordings_endpoint.call_with_http_info(**kwargs) - - def list_sms_messages( + account_id, + campaign_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if campaign_id is not None: + _path_params["campaignId"] = campaign_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_toll_free_sms_campaigns( self, - - **kwargs - ): - """List SMS Messages # 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_sms_messages(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - to (str): Only show Messages to this phone number.. [optional] - _from (str): Only show Messages from this phone number.. [optional] - begin_time (str): Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*.. [optional] - end_time (str): Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*... [optional] - direction (MessageDirection): Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb.. [optional] - campaign_id (str): Only show messages associated with this campaign ID.. [optional] - brand_id (str): Only show messages associated with this brand ID. [optional] - is10_dlc (bool): Only show messages that were sent as part of a 10DLC campaign.. [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. - async_req (bool): execute request asynchronously - - Returns: - MessagesList - 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['account_id'] = \ - self.account_id - - return self.list_sms_messages_endpoint.call_with_http_info(**kwargs) - - def make_a_call( + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SMSTollFreeCampaignsListResult: + """Get list of TollFree Campaigns + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_toll_free_sms_campaigns_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTollFreeCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_toll_free_sms_campaigns_with_http_info( self, - - **kwargs - ): - """Make a 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.make_a_call(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - make_call_request (MakeCallRequest): Call details for making a call. [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. - async_req (bool): execute request asynchronously - - Returns: - CallResult - 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['account_id'] = \ - self.account_id - - return self.make_a_call_endpoint.call_with_http_info(**kwargs) - - def make_a_webrtc_jwt( + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SMSTollFreeCampaignsListResult]: + """Get list of TollFree Campaigns + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_toll_free_sms_campaigns_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTollFreeCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_toll_free_sms_campaigns_without_preload_content( self, - create_web_rtc_token, - **kwargs - ): - """Make a JWT for WebRTC calling # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get list of TollFree Campaigns + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_toll_free_sms_campaigns_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "SMSTollFreeCampaignsListResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_toll_free_sms_campaigns_serialize( + self, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages/TollFree/Campaigns", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_active_queues( + self, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Return only the Queue resources with aliases that exactly match this name." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueList: + """List Active Queues + + + :param alias: Return only the Queue resources with aliases that exactly match this name. + :type alias: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_active_queues_serialize( + account_id=account_id, + alias=alias, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_active_queues_with_http_info( + self, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Return only the Queue resources with aliases that exactly match this name." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueList]: + """List Active Queues + + + :param alias: Return only the Queue resources with aliases that exactly match this name. + :type alias: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_active_queues_serialize( + account_id=account_id, + alias=alias, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_active_queues_without_preload_content( + self, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Return only the Queue resources with aliases that exactly match this name." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Active Queues + + + :param alias: Return only the Queue resources with aliases that exactly match this name. + :type alias: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_active_queues_serialize( + account_id=account_id, + alias=alias, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_active_queues_serialize( + self, + account_id, + alias, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if alias is not None: + + _query_params.append(("alias", alias)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Queues", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_all_account_logs( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LogList: + """List All Account Logs + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_all_account_logs_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_all_account_logs_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LogList]: + """List All Account Logs + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_all_account_logs_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_all_account_logs_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List All Account Logs + + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_all_account_logs_serialize( + account_id=account_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_all_account_logs_serialize( + self, + account_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Logs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_applications( + self, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Return only applications with aliases that exactly match this value." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationList: + """List applications + + + :param alias: Return only applications with aliases that exactly match this value. + :type alias: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_applications_serialize( + account_id=account_id, + alias=alias, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_applications_with_http_info( + self, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Return only applications with aliases that exactly match this value." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationList]: + """List applications + + + :param alias: Return only applications with aliases that exactly match this value. + :type alias: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_applications_serialize( + account_id=account_id, + alias=alias, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_applications_without_preload_content( + self, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Return only applications with aliases that exactly match this value." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List applications + + + :param alias: Return only applications with aliases that exactly match this value. + :type alias: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_applications_serialize( + account_id=account_id, + alias=alias, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_applications_serialize( + self, + account_id, + alias, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if alias is not None: + + _query_params.append(("alias", alias)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Applications", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_available_numbers( + self, + phone_number: Annotated[ + Optional[StrictStr], + Field( + description="PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format." + ), + ] = None, + region: Annotated[ + Optional[StrictStr], + Field(description="State or province of this phone number."), + ] = None, + country: Annotated[ + Optional[StrictStr], Field(description="Country of this phone number.") + ] = None, + voice_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers." + ), + ] = None, + sms_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers." + ), + ] = None, + capabilities_voice: Optional[StrictBool] = None, + capabilities_sms: Optional[StrictBool] = None, + capabilities_toll_free: Optional[StrictBool] = None, + capabilities_ten_dlc: Optional[StrictBool] = None, + capabilities_short_code: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AvailableNumberList: + """List available numbers + + + :param phone_number: PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. + :type phone_number: str + + :param region: State or province of this phone number. + :type region: str + + :param country: Country of this phone number. + :type country: str + + :param voice_enabled: Indicates whether the phone number can handle Calls. Typically set to true for all numbers. + :type voice_enabled: bool + + :param sms_enabled: Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. + :type sms_enabled: bool + + :param capabilities_voice: + :type capabilities_voice: bool + + :param capabilities_sms: + :type capabilities_sms: bool + + :param capabilities_toll_free: + :type capabilities_toll_free: bool + + :param capabilities_ten_dlc: + :type capabilities_ten_dlc: bool + + :param capabilities_short_code: + :type capabilities_short_code: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_available_numbers_serialize( + phone_number=phone_number, + region=region, + country=country, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AvailableNumberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_available_numbers_with_http_info( + self, + phone_number: Annotated[ + Optional[StrictStr], + Field( + description="PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format." + ), + ] = None, + region: Annotated[ + Optional[StrictStr], + Field(description="State or province of this phone number."), + ] = None, + country: Annotated[ + Optional[StrictStr], Field(description="Country of this phone number.") + ] = None, + voice_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers." + ), + ] = None, + sms_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers." + ), + ] = None, + capabilities_voice: Optional[StrictBool] = None, + capabilities_sms: Optional[StrictBool] = None, + capabilities_toll_free: Optional[StrictBool] = None, + capabilities_ten_dlc: Optional[StrictBool] = None, + capabilities_short_code: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AvailableNumberList]: + """List available numbers + + + :param phone_number: PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. + :type phone_number: str + + :param region: State or province of this phone number. + :type region: str + + :param country: Country of this phone number. + :type country: str + + :param voice_enabled: Indicates whether the phone number can handle Calls. Typically set to true for all numbers. + :type voice_enabled: bool + + :param sms_enabled: Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. + :type sms_enabled: bool + + :param capabilities_voice: + :type capabilities_voice: bool + + :param capabilities_sms: + :type capabilities_sms: bool + + :param capabilities_toll_free: + :type capabilities_toll_free: bool + + :param capabilities_ten_dlc: + :type capabilities_ten_dlc: bool + + :param capabilities_short_code: + :type capabilities_short_code: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_available_numbers_serialize( + phone_number=phone_number, + region=region, + country=country, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AvailableNumberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_available_numbers_without_preload_content( + self, + phone_number: Annotated[ + Optional[StrictStr], + Field( + description="PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format." + ), + ] = None, + region: Annotated[ + Optional[StrictStr], + Field(description="State or province of this phone number."), + ] = None, + country: Annotated[ + Optional[StrictStr], Field(description="Country of this phone number.") + ] = None, + voice_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers." + ), + ] = None, + sms_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers." + ), + ] = None, + capabilities_voice: Optional[StrictBool] = None, + capabilities_sms: Optional[StrictBool] = None, + capabilities_toll_free: Optional[StrictBool] = None, + capabilities_ten_dlc: Optional[StrictBool] = None, + capabilities_short_code: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List available numbers + + + :param phone_number: PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. + :type phone_number: str + + :param region: State or province of this phone number. + :type region: str + + :param country: Country of this phone number. + :type country: str + + :param voice_enabled: Indicates whether the phone number can handle Calls. Typically set to true for all numbers. + :type voice_enabled: bool + + :param sms_enabled: Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. + :type sms_enabled: bool + + :param capabilities_voice: + :type capabilities_voice: bool + + :param capabilities_sms: + :type capabilities_sms: bool + + :param capabilities_toll_free: + :type capabilities_toll_free: bool + + :param capabilities_ten_dlc: + :type capabilities_ten_dlc: bool + + :param capabilities_short_code: + :type capabilities_short_code: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_available_numbers_serialize( + phone_number=phone_number, + region=region, + country=country, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "AvailableNumberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_available_numbers_serialize( + self, + phone_number, + region, + country, + voice_enabled, + sms_enabled, + capabilities_voice, + capabilities_sms, + capabilities_toll_free, + capabilities_ten_dlc, + capabilities_short_code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - >>> thread = api.make_a_webrtc_jwt(create_web_rtc_token, async_req=True) - >>> result = thread.get() + _host = None + _collection_formats: Dict[str, str] = {} - Args: + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + # process the path parameters + # process the query parameters + if phone_number is not None: - create_web_rtc_token (CreateWebRTCToken): Information needed to craft a JWT compatible with the platforms WebRTC APIs + _query_params.append(("phoneNumber", phone_number)) + if region is not None: + _query_params.append(("region", region)) + if country is not None: - 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. - async_req (bool): execute request asynchronously + _query_params.append(("country", country)) - Returns: - str - 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['account_id'] = \ - self.account_id + if voice_enabled is not None: - kwargs['create_web_rtc_token'] = \ - create_web_rtc_token + _query_params.append(("voiceEnabled", voice_enabled)) - return self.make_a_webrtc_jwt_endpoint.call_with_http_info(**kwargs) + if sms_enabled is not None: - def remove_a_participant( - self, - conference_id,call_id, - **kwargs - ): - """Remove a Participant # noqa: E501 + _query_params.append(("smsEnabled", sms_enabled)) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + if capabilities_voice is not None: - >>> thread = api.remove_a_participant(conference_id, call_id, async_req=True) - >>> result = thread.get() + _query_params.append(("capabilities.voice", capabilities_voice)) + if capabilities_sms is not None: + _query_params.append(("capabilities.sms", capabilities_sms)) - Args: + if capabilities_toll_free is not None: + _query_params.append(("capabilities.tollFree", capabilities_toll_free)) - conference_id (str): ID of the conference this participant is in. + if capabilities_ten_dlc is not None: - call_id (str): ID of the Call associated with this participant. + _query_params.append(("capabilities.tenDLC", capabilities_ten_dlc)) + if capabilities_short_code is not None: + _query_params.append(("capabilities.shortCode", capabilities_short_code)) + # process the header parameters + # process the form parameters + # process the body parameter + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) - 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. - async_req (bool): execute request asynchronously + # authentication setting + _auth_settings: List[str] = ["fc"] - 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 + return self.api_client.param_serialize( + method="GET", + resource_path="/AvailablePhoneNumbers", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, ) - 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['account_id'] = \ - self.account_id - kwargs['conference_id'] = \ - conference_id - - kwargs['call_id'] = \ - call_id - - return self.remove_a_participant_endpoint.call_with_http_info(**kwargs) - - def send_an_sms_message( + @validate_call + def list_call_logs( self, - message_request, - **kwargs - ): - """Send an SMS Message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.send_an_sms_message(message_request, async_req=True) - >>> result = thread.get() + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LogList: + """List Call Logs + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_call_logs_serialize( + account_id=account_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_call_logs_with_http_info( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LogList]: + """List Call Logs + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_call_logs_serialize( + account_id=account_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_call_logs_without_preload_content( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Call Logs + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_call_logs_serialize( + account_id=account_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "LogList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_call_logs_serialize( + self, + account_id, + call_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Calls/{callId}/Logs", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_call_recordings( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show recordings created on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecordingList: + """List Call Recordings + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param date_created: Only show recordings created on the specified date, in the form *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_call_recordings_serialize( + account_id=account_id, + call_id=call_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_call_recordings_with_http_info( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show recordings created on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecordingList]: + """List Call Recordings + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param date_created: Only show recordings created on the specified date, in the form *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_call_recordings_serialize( + account_id=account_id, + call_id=call_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_call_recordings_without_preload_content( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show recordings created on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Call Recordings + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param date_created: Only show recordings created on the specified date, in the form *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_call_recordings_serialize( + account_id=account_id, + call_id=call_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_call_recordings_serialize( + self, + account_id, + call_id, + date_created, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + if date_created is not None: + + _query_params.append(("dateCreated", date_created)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Calls/{callId}/Recordings", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_calls( + self, + active: Annotated[ + Optional[StrictBool], + Field( + description="If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query." + ), + ] = None, + to: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls to this phone number."), + ] = None, + var_from: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls from this phone number."), + ] = None, + status: Annotated[ + Optional[CallStatus], + Field( + description="Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`." + ), + ] = None, + start_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss." + ), + ] = None, + end_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss." + ), + ] = None, + parent_call_id: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls spawned by the call with this ID."), + ] = None, + application_id: Annotated[ + Optional[ + Annotated[ + List[Annotated[str, Field(strict=True)]], Field(max_length=16) + ] + ], + Field( + description="Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CallList: + """List Calls + + + :param active: If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. + :type active: bool + + :param to: Only show Calls to this phone number. + :type to: str + + :param var_from: Only show Calls from this phone number. + :type var_from: str + + :param status: Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. + :type status: CallStatus + + :param start_time: Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. + :type start_time: str + + :param end_time: Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. + :type end_time: str + + :param parent_call_id: Only show Calls spawned by the call with this ID. + :type parent_call_id: str + + :param application_id: Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. + :type application_id: List[str] + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_calls_serialize( + account_id=account_id, + active=active, + to=to, + var_from=var_from, + status=status, + start_time=start_time, + end_time=end_time, + parent_call_id=parent_call_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_calls_with_http_info( + self, + active: Annotated[ + Optional[StrictBool], + Field( + description="If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query." + ), + ] = None, + to: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls to this phone number."), + ] = None, + var_from: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls from this phone number."), + ] = None, + status: Annotated[ + Optional[CallStatus], + Field( + description="Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`." + ), + ] = None, + start_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss." + ), + ] = None, + end_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss." + ), + ] = None, + parent_call_id: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls spawned by the call with this ID."), + ] = None, + application_id: Annotated[ + Optional[ + Annotated[ + List[Annotated[str, Field(strict=True)]], Field(max_length=16) + ] + ], + Field( + description="Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CallList]: + """List Calls + + + :param active: If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. + :type active: bool + + :param to: Only show Calls to this phone number. + :type to: str + + :param var_from: Only show Calls from this phone number. + :type var_from: str + + :param status: Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. + :type status: CallStatus + + :param start_time: Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. + :type start_time: str + + :param end_time: Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. + :type end_time: str + + :param parent_call_id: Only show Calls spawned by the call with this ID. + :type parent_call_id: str + + :param application_id: Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. + :type application_id: List[str] + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_calls_serialize( + account_id=account_id, + active=active, + to=to, + var_from=var_from, + status=status, + start_time=start_time, + end_time=end_time, + parent_call_id=parent_call_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_calls_without_preload_content( + self, + active: Annotated[ + Optional[StrictBool], + Field( + description="If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query." + ), + ] = None, + to: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls to this phone number."), + ] = None, + var_from: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls from this phone number."), + ] = None, + status: Annotated[ + Optional[CallStatus], + Field( + description="Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`." + ), + ] = None, + start_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss." + ), + ] = None, + end_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss." + ), + ] = None, + parent_call_id: Annotated[ + Optional[StrictStr], + Field(description="Only show Calls spawned by the call with this ID."), + ] = None, + application_id: Annotated[ + Optional[ + Annotated[ + List[Annotated[str, Field(strict=True)]], Field(max_length=16) + ] + ], + Field( + description="Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Calls + + + :param active: If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. + :type active: bool + + :param to: Only show Calls to this phone number. + :type to: str + + :param var_from: Only show Calls from this phone number. + :type var_from: str + + :param status: Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. + :type status: CallStatus + + :param start_time: Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. + :type start_time: str + + :param end_time: Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. + :type end_time: str + + :param parent_call_id: Only show Calls spawned by the call with this ID. + :type parent_call_id: str + + :param application_id: Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. + :type application_id: List[str] + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_calls_serialize( + account_id=account_id, + active=active, + to=to, + var_from=var_from, + status=status, + start_time=start_time, + end_time=end_time, + parent_call_id=parent_call_id, + application_id=application_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_calls_serialize( + self, + account_id, + active, + to, + var_from, + status, + start_time, + end_time, + parent_call_id, + application_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None - Args: + _collection_formats: Dict[str, str] = { + "applicationId": "multi", + } + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None - message_request (MessageRequest): Details to create a message + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if active is not None: + _query_params.append(("active", active)) + if to is not None: + _query_params.append(("to", to)) - 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. - async_req (bool): execute request asynchronously + if var_from is not None: - Returns: - MessageResult - 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['account_id'] = \ - self.account_id + _query_params.append(("from", var_from)) - kwargs['message_request'] = \ - message_request + if status is not None: - return self.send_an_sms_message_endpoint.call_with_http_info(**kwargs) + _query_params.append(("status", status.value)) - def stream_a_recording_file( - self, - recording_id, - **kwargs - ): - """Stream a Recording File # noqa: E501 + if start_time is not None: - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + _query_params.append(("startTime", start_time)) - >>> thread = api.stream_a_recording_file(recording_id, async_req=True) - >>> result = thread.get() + if end_time is not None: + _query_params.append(("endTime", end_time)) - Args: + if parent_call_id is not None: + _query_params.append(("parentCallId", parent_call_id)) - recording_id (str): String that uniquely identifies this recording resource. + if application_id is not None: + _query_params.append(("applicationId", application_id)) + # process the header parameters + # process the form parameters + # process the body parameter + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) - 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. - async_req (bool): execute request asynchronously + # authentication setting + _auth_settings: List[str] = ["fc"] - Returns: - file_type - 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 + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Calls", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, ) - 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['account_id'] = \ - self.account_id - - kwargs['recording_id'] = \ - recording_id - - return self.stream_a_recording_file_endpoint.call_with_http_info(**kwargs) - def update_a_conference( + @validate_call + def list_conference_recordings( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="Show only Recordings made during the conference with this ID." + ), + ], + call_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the Call with this ID." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecordingList: + """List Conference Recordings + + + :param conference_id: Show only Recordings made during the conference with this ID. (required) + :type conference_id: str + + :param call_id: Show only Recordings made during the Call with this ID. + :type call_id: str + + :param date_created: Only show Recordings created on this date, formatted as *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_conference_recordings_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_conference_recordings_with_http_info( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="Show only Recordings made during the conference with this ID." + ), + ], + call_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the Call with this ID." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecordingList]: + """List Conference Recordings + + + :param conference_id: Show only Recordings made during the conference with this ID. (required) + :type conference_id: str + + :param call_id: Show only Recordings made during the Call with this ID. + :type call_id: str + + :param date_created: Only show Recordings created on this date, formatted as *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_conference_recordings_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_conference_recordings_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="Show only Recordings made during the conference with this ID." + ), + ], + call_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the Call with this ID." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Conference Recordings + + + :param conference_id: Show only Recordings made during the conference with this ID. (required) + :type conference_id: str + + :param call_id: Show only Recordings made during the Call with this ID. + :type call_id: str + + :param date_created: Only show Recordings created on this date, formatted as *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_conference_recordings_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_conference_recordings_serialize( + self, + account_id, + conference_id, + call_id, + date_created, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + # process the query parameters + if call_id is not None: + + _query_params.append(("callId", call_id)) + + if date_created is not None: + + _query_params.append(("dateCreated", date_created)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}/Recordings", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_conferences( + self, + status: Annotated[ + Optional[StrictStr], + Field( + description="Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`." + ), + ] = None, + alias: Annotated[ + Optional[StrictStr], + Field( + description="List Conferences whose alias exactly matches this string." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + date_updated: Annotated[ + Optional[StrictStr], + Field( + description="Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConferenceList: + """List Conferences + + + :param status: Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. + :type status: str + + :param alias: List Conferences whose alias exactly matches this string. + :type alias: str + + :param date_created: Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. + :type date_created: str + + :param date_updated: Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. + :type date_updated: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_conferences_serialize( + account_id=account_id, + status=status, + alias=alias, + date_created=date_created, + date_updated=date_updated, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_conferences_with_http_info( + self, + status: Annotated[ + Optional[StrictStr], + Field( + description="Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`." + ), + ] = None, + alias: Annotated[ + Optional[StrictStr], + Field( + description="List Conferences whose alias exactly matches this string." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + date_updated: Annotated[ + Optional[StrictStr], + Field( + description="Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConferenceList]: + """List Conferences + + + :param status: Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. + :type status: str + + :param alias: List Conferences whose alias exactly matches this string. + :type alias: str + + :param date_created: Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. + :type date_created: str + + :param date_updated: Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. + :type date_updated: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_conferences_serialize( + account_id=account_id, + status=status, + alias=alias, + date_created=date_created, + date_updated=date_updated, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_conferences_without_preload_content( + self, + status: Annotated[ + Optional[StrictStr], + Field( + description="Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`." + ), + ] = None, + alias: Annotated[ + Optional[StrictStr], + Field( + description="List Conferences whose alias exactly matches this string." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + date_updated: Annotated[ + Optional[StrictStr], + Field( + description="Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Conferences + + + :param status: Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. + :type status: str + + :param alias: List Conferences whose alias exactly matches this string. + :type alias: str + + :param date_created: Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. + :type date_created: str + + :param date_updated: Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. + :type date_updated: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_conferences_serialize( + account_id=account_id, + status=status, + alias=alias, + date_created=date_created, + date_updated=date_updated, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_conferences_serialize( + self, + account_id, + status, + alias, + date_created, + date_updated, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if status is not None: + + _query_params.append(("status", status)) + + if alias is not None: + + _query_params.append(("alias", alias)) + + if date_created is not None: + + _query_params.append(("dateCreated", date_created)) + + if date_updated is not None: + + _query_params.append(("dateUpdated", date_updated)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Conferences", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_incoming_numbers( self, - conference_id, - **kwargs - ): - """Update a Conference # noqa: E501 + phone_number: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone number resources that match this PCRE-compatible regular expression." + ), + ] = None, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone numbers with aliases that exactly match this value." + ), + ] = None, + region: Annotated[ + Optional[StrictStr], + Field(description="State or province of this phone number."), + ] = None, + country: Annotated[ + Optional[StrictStr], Field(description="Country of this phone number.") + ] = None, + application_id: Annotated[ + Optional[StrictStr], + Field( + description="ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId." + ), + ] = None, + has_application: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number has an application linked to it." + ), + ] = None, + voice_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers." + ), + ] = None, + sms_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers." + ), + ] = None, + has_campaign: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number has a campaign associated with it" + ), + ] = None, + capabilities_voice: Optional[StrictBool] = None, + capabilities_sms: Optional[StrictBool] = None, + capabilities_toll_free: Optional[StrictBool] = None, + capabilities_ten_dlc: Optional[StrictBool] = None, + capabilities_short_code: Optional[StrictBool] = None, + tfn_campaign_id: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID." + ), + ] = None, + offnet: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IncomingNumberList: + """List Incoming Numbers + + + :param phone_number: Only show incoming phone number resources that match this PCRE-compatible regular expression. + :type phone_number: str + + :param alias: Only show incoming phone numbers with aliases that exactly match this value. + :type alias: str + + :param region: State or province of this phone number. + :type region: str + + :param country: Country of this phone number. + :type country: str + + :param application_id: ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. + :type application_id: str + + :param has_application: Indication of whether the phone number has an application linked to it. + :type has_application: bool + + :param voice_enabled: Indicates whether the phone number can handle Calls. Typically set to true for all numbers. + :type voice_enabled: bool + + :param sms_enabled: Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. + :type sms_enabled: bool + + :param has_campaign: Indication of whether the phone number has a campaign associated with it + :type has_campaign: bool + + :param capabilities_voice: + :type capabilities_voice: bool + + :param capabilities_sms: + :type capabilities_sms: bool + + :param capabilities_toll_free: + :type capabilities_toll_free: bool + + :param capabilities_ten_dlc: + :type capabilities_ten_dlc: bool + + :param capabilities_short_code: + :type capabilities_short_code: bool + + :param tfn_campaign_id: Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. + :type tfn_campaign_id: str + + :param offnet: Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. + :type offnet: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_incoming_numbers_serialize( + account_id=account_id, + phone_number=phone_number, + alias=alias, + region=region, + country=country, + application_id=application_id, + has_application=has_application, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + has_campaign=has_campaign, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + tfn_campaign_id=tfn_campaign_id, + offnet=offnet, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_incoming_numbers_with_http_info( + self, + phone_number: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone number resources that match this PCRE-compatible regular expression." + ), + ] = None, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone numbers with aliases that exactly match this value." + ), + ] = None, + region: Annotated[ + Optional[StrictStr], + Field(description="State or province of this phone number."), + ] = None, + country: Annotated[ + Optional[StrictStr], Field(description="Country of this phone number.") + ] = None, + application_id: Annotated[ + Optional[StrictStr], + Field( + description="ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId." + ), + ] = None, + has_application: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number has an application linked to it." + ), + ] = None, + voice_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers." + ), + ] = None, + sms_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers." + ), + ] = None, + has_campaign: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number has a campaign associated with it" + ), + ] = None, + capabilities_voice: Optional[StrictBool] = None, + capabilities_sms: Optional[StrictBool] = None, + capabilities_toll_free: Optional[StrictBool] = None, + capabilities_ten_dlc: Optional[StrictBool] = None, + capabilities_short_code: Optional[StrictBool] = None, + tfn_campaign_id: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID." + ), + ] = None, + offnet: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IncomingNumberList]: + """List Incoming Numbers + + + :param phone_number: Only show incoming phone number resources that match this PCRE-compatible regular expression. + :type phone_number: str + + :param alias: Only show incoming phone numbers with aliases that exactly match this value. + :type alias: str + + :param region: State or province of this phone number. + :type region: str + + :param country: Country of this phone number. + :type country: str + + :param application_id: ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. + :type application_id: str + + :param has_application: Indication of whether the phone number has an application linked to it. + :type has_application: bool + + :param voice_enabled: Indicates whether the phone number can handle Calls. Typically set to true for all numbers. + :type voice_enabled: bool + + :param sms_enabled: Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. + :type sms_enabled: bool + + :param has_campaign: Indication of whether the phone number has a campaign associated with it + :type has_campaign: bool + + :param capabilities_voice: + :type capabilities_voice: bool + + :param capabilities_sms: + :type capabilities_sms: bool + + :param capabilities_toll_free: + :type capabilities_toll_free: bool + + :param capabilities_ten_dlc: + :type capabilities_ten_dlc: bool + + :param capabilities_short_code: + :type capabilities_short_code: bool + + :param tfn_campaign_id: Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. + :type tfn_campaign_id: str + + :param offnet: Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. + :type offnet: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_incoming_numbers_serialize( + account_id=account_id, + phone_number=phone_number, + alias=alias, + region=region, + country=country, + application_id=application_id, + has_application=has_application, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + has_campaign=has_campaign, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + tfn_campaign_id=tfn_campaign_id, + offnet=offnet, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_incoming_numbers_without_preload_content( + self, + phone_number: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone number resources that match this PCRE-compatible regular expression." + ), + ] = None, + alias: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone numbers with aliases that exactly match this value." + ), + ] = None, + region: Annotated[ + Optional[StrictStr], + Field(description="State or province of this phone number."), + ] = None, + country: Annotated[ + Optional[StrictStr], Field(description="Country of this phone number.") + ] = None, + application_id: Annotated[ + Optional[StrictStr], + Field( + description="ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId." + ), + ] = None, + has_application: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number has an application linked to it." + ), + ] = None, + voice_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers." + ), + ] = None, + sms_enabled: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers." + ), + ] = None, + has_campaign: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number has a campaign associated with it" + ), + ] = None, + capabilities_voice: Optional[StrictBool] = None, + capabilities_sms: Optional[StrictBool] = None, + capabilities_toll_free: Optional[StrictBool] = None, + capabilities_ten_dlc: Optional[StrictBool] = None, + capabilities_short_code: Optional[StrictBool] = None, + tfn_campaign_id: Annotated[ + Optional[StrictStr], + Field( + description="Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID." + ), + ] = None, + offnet: Annotated[ + Optional[StrictBool], + Field( + description="Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Incoming Numbers + + + :param phone_number: Only show incoming phone number resources that match this PCRE-compatible regular expression. + :type phone_number: str + + :param alias: Only show incoming phone numbers with aliases that exactly match this value. + :type alias: str + + :param region: State or province of this phone number. + :type region: str + + :param country: Country of this phone number. + :type country: str + + :param application_id: ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId. + :type application_id: str + + :param has_application: Indication of whether the phone number has an application linked to it. + :type has_application: bool + + :param voice_enabled: Indicates whether the phone number can handle Calls. Typically set to true for all numbers. + :type voice_enabled: bool + + :param sms_enabled: Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. + :type sms_enabled: bool + + :param has_campaign: Indication of whether the phone number has a campaign associated with it + :type has_campaign: bool + + :param capabilities_voice: + :type capabilities_voice: bool + + :param capabilities_sms: + :type capabilities_sms: bool + + :param capabilities_toll_free: + :type capabilities_toll_free: bool + + :param capabilities_ten_dlc: + :type capabilities_ten_dlc: bool + + :param capabilities_short_code: + :type capabilities_short_code: bool + + :param tfn_campaign_id: Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. + :type tfn_campaign_id: str + + :param offnet: Indication of whether the phone number was registered as an offnet number. This field will be rendered only for requests to the IncomingPhone number resource. + :type offnet: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_incoming_numbers_serialize( + account_id=account_id, + phone_number=phone_number, + alias=alias, + region=region, + country=country, + application_id=application_id, + has_application=has_application, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + has_campaign=has_campaign, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + tfn_campaign_id=tfn_campaign_id, + offnet=offnet, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_incoming_numbers_serialize( + self, + account_id, + phone_number, + alias, + region, + country, + application_id, + has_application, + voice_enabled, + sms_enabled, + has_campaign, + capabilities_voice, + capabilities_sms, + capabilities_toll_free, + capabilities_ten_dlc, + capabilities_short_code, + tfn_campaign_id, + offnet, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + _host = None - >>> thread = api.update_a_conference(conference_id, async_req=True) - >>> result = thread.get() + _collection_formats: Dict[str, str] = {} + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None - Args: + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if phone_number is not None: + _query_params.append(("phoneNumber", phone_number)) - conference_id (str): String that uniquely identifies this conference resource. + if alias is not None: + _query_params.append(("alias", alias)) + if region is not None: + _query_params.append(("region", region)) - Keyword Args: - update_conference_request (UpdateConferenceRequest): Conference Details to update. [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. - async_req (bool): execute request asynchronously + if country is not None: - 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['account_id'] = \ - self.account_id + _query_params.append(("country", country)) - kwargs['conference_id'] = \ - conference_id + if application_id is not None: - return self.update_a_conference_endpoint.call_with_http_info(**kwargs) + _query_params.append(("applicationId", application_id)) - def update_a_live_call( - self, - call_id,update_call_request, - **kwargs - ): - """Update a Live Call # noqa: E501 + if has_application is not None: - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + _query_params.append(("hasApplication", has_application)) - >>> thread = api.update_a_live_call(call_id, update_call_request, async_req=True) - >>> result = thread.get() + if voice_enabled is not None: + _query_params.append(("voiceEnabled", voice_enabled)) + if sms_enabled is not None: - Args: + _query_params.append(("smsEnabled", sms_enabled)) + if has_campaign is not None: - call_id (str): String that uniquely identifies this call resource. + _query_params.append(("hasCampaign", has_campaign)) - update_call_request (UpdateCallRequest): Call details to update + if capabilities_voice is not None: + _query_params.append(("capabilities.voice", capabilities_voice)) + if capabilities_sms is not None: + _query_params.append(("capabilities.sms", capabilities_sms)) + if capabilities_toll_free is not None: - 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. - async_req (bool): execute request asynchronously + _query_params.append(("capabilities.tollFree", capabilities_toll_free)) - 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['account_id'] = \ - self.account_id + if capabilities_ten_dlc is not None: - kwargs['call_id'] = \ - call_id + _query_params.append(("capabilities.tenDLC", capabilities_ten_dlc)) - kwargs['update_call_request'] = \ - update_call_request + if capabilities_short_code is not None: - return self.update_a_live_call_endpoint.call_with_http_info(**kwargs) + _query_params.append(("capabilities.shortCode", capabilities_short_code)) - def update_a_participant( - self, - conference_id,call_id, - **kwargs - ): - """Update a Participant # noqa: E501 + if tfn_campaign_id is not None: - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + _query_params.append(("tfn.campaignId", tfn_campaign_id)) - >>> thread = api.update_a_participant(conference_id, call_id, async_req=True) - >>> result = thread.get() + if offnet is not None: + _query_params.append(("offnet", offnet)) + # process the header parameters + # process the form parameters + # process the body parameter - Args: + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + # authentication setting + _auth_settings: List[str] = ["fc"] - conference_id (str): ID of the conference this participant is in. + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/IncomingPhoneNumbers", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) - call_id (str): ID of the Call associated with this participant. + @validate_call + def list_members( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueMemberList: + """List Members + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_members_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMemberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_members_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueMemberList]: + """List Members + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_members_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMemberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_members_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies the Queue that the Member belongs to." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Members + + + :param queue_id: String that uniquely identifies the Queue that the Member belongs to. (required) + :type queue_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_members_serialize( + account_id=account_id, + queue_id=queue_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueMemberList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_members_serialize( + self, + account_id, + queue_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Queues/{queueId}/Members", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_participants( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + talk: Annotated[ + Optional[StrictBool], + Field(description="Only show Participants with the talk privilege."), + ] = None, + listen: Annotated[ + Optional[StrictBool], + Field(description="Only show Participants with the listen privilege."), + ] = None, + dtmf_pass_through: Annotated[ + Optional[StrictBool], + Field( + description="Only show Participants with the dtmfPassThrough privilege." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConferenceParticipantList: + """List Participants + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param talk: Only show Participants with the talk privilege. + :type talk: bool + + :param listen: Only show Participants with the listen privilege. + :type listen: bool + + :param dtmf_pass_through: Only show Participants with the dtmfPassThrough privilege. + :type dtmf_pass_through: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_participants_serialize( + account_id=account_id, + conference_id=conference_id, + talk=talk, + listen=listen, + dtmf_pass_through=dtmf_pass_through, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_participants_with_http_info( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + talk: Annotated[ + Optional[StrictBool], + Field(description="Only show Participants with the talk privilege."), + ] = None, + listen: Annotated[ + Optional[StrictBool], + Field(description="Only show Participants with the listen privilege."), + ] = None, + dtmf_pass_through: Annotated[ + Optional[StrictBool], + Field( + description="Only show Participants with the dtmfPassThrough privilege." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConferenceParticipantList]: + """List Participants + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param talk: Only show Participants with the talk privilege. + :type talk: bool + + :param listen: Only show Participants with the listen privilege. + :type listen: bool + + :param dtmf_pass_through: Only show Participants with the dtmfPassThrough privilege. + :type dtmf_pass_through: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_participants_serialize( + account_id=account_id, + conference_id=conference_id, + talk=talk, + listen=listen, + dtmf_pass_through=dtmf_pass_through, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_participants_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + talk: Annotated[ + Optional[StrictBool], + Field(description="Only show Participants with the talk privilege."), + ] = None, + listen: Annotated[ + Optional[StrictBool], + Field(description="Only show Participants with the listen privilege."), + ] = None, + dtmf_pass_through: Annotated[ + Optional[StrictBool], + Field( + description="Only show Participants with the dtmfPassThrough privilege." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Participants + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param talk: Only show Participants with the talk privilege. + :type talk: bool + + :param listen: Only show Participants with the listen privilege. + :type listen: bool + + :param dtmf_pass_through: Only show Participants with the dtmfPassThrough privilege. + :type dtmf_pass_through: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_participants_serialize( + account_id=account_id, + conference_id=conference_id, + talk=talk, + listen=listen, + dtmf_pass_through=dtmf_pass_through, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_participants_serialize( + self, + account_id, + conference_id, + talk, + listen, + dtmf_pass_through, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + # process the query parameters + if talk is not None: + + _query_params.append(("talk", talk)) + + if listen is not None: + + _query_params.append(("listen", listen)) + + if dtmf_pass_through is not None: + + _query_params.append(("dtmfPassThrough", dtmf_pass_through)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}/Participants", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_recordings( + self, + call_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the Call with this ID." + ), + ] = None, + conference_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the conference with this ID." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecordingList: + """List Recordings + + + :param call_id: Show only Recordings made during the Call with this ID. + :type call_id: str + + :param conference_id: Show only Recordings made during the conference with this ID. + :type conference_id: str + + :param date_created: Only show Recordings created on this date, formatted as *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_recordings_serialize( + account_id=account_id, + call_id=call_id, + conference_id=conference_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_recordings_with_http_info( + self, + call_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the Call with this ID." + ), + ] = None, + conference_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the conference with this ID." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecordingList]: + """List Recordings + + + :param call_id: Show only Recordings made during the Call with this ID. + :type call_id: str + + :param conference_id: Show only Recordings made during the conference with this ID. + :type conference_id: str + + :param date_created: Only show Recordings created on this date, formatted as *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_recordings_serialize( + account_id=account_id, + call_id=call_id, + conference_id=conference_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_recordings_without_preload_content( + self, + call_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the Call with this ID." + ), + ] = None, + conference_id: Annotated[ + Optional[StrictStr], + Field( + description="Show only Recordings made during the conference with this ID." + ), + ] = None, + date_created: Annotated[ + Optional[StrictStr], + Field( + description="Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Recordings + + + :param call_id: Show only Recordings made during the Call with this ID. + :type call_id: str + + :param conference_id: Show only Recordings made during the conference with this ID. + :type conference_id: str + + :param date_created: Only show Recordings created on this date, formatted as *YYYY-MM-DD*. + :type date_created: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_recordings_serialize( + account_id=account_id, + call_id=call_id, + conference_id=conference_id, + date_created=date_created, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "RecordingList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_recordings_serialize( + self, + account_id, + call_id, + conference_id, + date_created, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if call_id is not None: + + _query_params.append(("callId", call_id)) + + if conference_id is not None: + + _query_params.append(("conferenceId", conference_id)) + + if date_created is not None: + + _query_params.append(("dateCreated", date_created)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Recordings", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_sms_messages( + self, + to: Annotated[ + Optional[StrictStr], + Field(description="Only show Messages to this phone number."), + ] = None, + var_from: Annotated[ + Optional[StrictStr], + Field(description="Only show Messages from this phone number."), + ] = None, + begin_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*." + ), + ] = None, + end_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.." + ), + ] = None, + direction: Annotated[ + Optional[MessageDirection], + Field( + description="Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb." + ), + ] = None, + campaign_id: Annotated[ + Optional[StrictStr], + Field(description="Only show messages associated with this campaign ID."), + ] = None, + brand_id: Annotated[ + Optional[StrictStr], + Field(description="Only show messages associated with this brand ID"), + ] = None, + is10_dlc: Annotated[ + Optional[StrictBool], + Field( + description="Only show messages that were sent as part of a 10DLC campaign." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessagesList: + """List SMS Messages + + + :param to: Only show Messages to this phone number. + :type to: str + + :param var_from: Only show Messages from this phone number. + :type var_from: str + + :param begin_time: Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. + :type begin_time: str + + :param end_time: Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. + :type end_time: str + + :param direction: Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. + :type direction: MessageDirection + + :param campaign_id: Only show messages associated with this campaign ID. + :type campaign_id: str + + :param brand_id: Only show messages associated with this brand ID + :type brand_id: str + + :param is10_dlc: Only show messages that were sent as part of a 10DLC campaign. + :type is10_dlc: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_sms_messages_serialize( + account_id=account_id, + to=to, + var_from=var_from, + begin_time=begin_time, + end_time=end_time, + direction=direction, + campaign_id=campaign_id, + brand_id=brand_id, + is10_dlc=is10_dlc, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "MessagesList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_sms_messages_with_http_info( + self, + to: Annotated[ + Optional[StrictStr], + Field(description="Only show Messages to this phone number."), + ] = None, + var_from: Annotated[ + Optional[StrictStr], + Field(description="Only show Messages from this phone number."), + ] = None, + begin_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*." + ), + ] = None, + end_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.." + ), + ] = None, + direction: Annotated[ + Optional[MessageDirection], + Field( + description="Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb." + ), + ] = None, + campaign_id: Annotated[ + Optional[StrictStr], + Field(description="Only show messages associated with this campaign ID."), + ] = None, + brand_id: Annotated[ + Optional[StrictStr], + Field(description="Only show messages associated with this brand ID"), + ] = None, + is10_dlc: Annotated[ + Optional[StrictBool], + Field( + description="Only show messages that were sent as part of a 10DLC campaign." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessagesList]: + """List SMS Messages + + + :param to: Only show Messages to this phone number. + :type to: str + + :param var_from: Only show Messages from this phone number. + :type var_from: str + + :param begin_time: Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. + :type begin_time: str + + :param end_time: Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. + :type end_time: str + + :param direction: Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. + :type direction: MessageDirection + + :param campaign_id: Only show messages associated with this campaign ID. + :type campaign_id: str + + :param brand_id: Only show messages associated with this brand ID + :type brand_id: str + + :param is10_dlc: Only show messages that were sent as part of a 10DLC campaign. + :type is10_dlc: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_sms_messages_serialize( + account_id=account_id, + to=to, + var_from=var_from, + begin_time=begin_time, + end_time=end_time, + direction=direction, + campaign_id=campaign_id, + brand_id=brand_id, + is10_dlc=is10_dlc, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "MessagesList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_sms_messages_without_preload_content( + self, + to: Annotated[ + Optional[StrictStr], + Field(description="Only show Messages to this phone number."), + ] = None, + var_from: Annotated[ + Optional[StrictStr], + Field(description="Only show Messages from this phone number."), + ] = None, + begin_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*." + ), + ] = None, + end_time: Annotated[ + Optional[StrictStr], + Field( + description="Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.." + ), + ] = None, + direction: Annotated[ + Optional[MessageDirection], + Field( + description="Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb." + ), + ] = None, + campaign_id: Annotated[ + Optional[StrictStr], + Field(description="Only show messages associated with this campaign ID."), + ] = None, + brand_id: Annotated[ + Optional[StrictStr], + Field(description="Only show messages associated with this brand ID"), + ] = None, + is10_dlc: Annotated[ + Optional[StrictBool], + Field( + description="Only show messages that were sent as part of a 10DLC campaign." + ), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List SMS Messages + + + :param to: Only show Messages to this phone number. + :type to: str + + :param var_from: Only show Messages from this phone number. + :type var_from: str + + :param begin_time: Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. + :type begin_time: str + + :param end_time: Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. + :type end_time: str + + :param direction: Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. + :type direction: MessageDirection + + :param campaign_id: Only show messages associated with this campaign ID. + :type campaign_id: str + + :param brand_id: Only show messages associated with this brand ID + :type brand_id: str + + :param is10_dlc: Only show messages that were sent as part of a 10DLC campaign. + :type is10_dlc: bool + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_sms_messages_serialize( + account_id=account_id, + to=to, + var_from=var_from, + begin_time=begin_time, + end_time=end_time, + direction=direction, + campaign_id=campaign_id, + brand_id=brand_id, + is10_dlc=is10_dlc, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "MessagesList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_sms_messages_serialize( + self, + account_id, + to, + var_from, + begin_time, + end_time, + direction, + campaign_id, + brand_id, + is10_dlc, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + _collection_formats: Dict[str, str] = {} + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if to is not None: - Keyword Args: - update_conference_participant_request (UpdateConferenceParticipantRequest): Conference participant details to update. [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. - async_req (bool): execute request asynchronously + _query_params.append(("to", to)) - Returns: - ConferenceParticipantResult - 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['account_id'] = \ - self.account_id + if var_from is not None: - kwargs['conference_id'] = \ - conference_id + _query_params.append(("from", var_from)) - kwargs['call_id'] = \ - call_id + if begin_time is not None: - return self.update_a_participant_endpoint.call_with_http_info(**kwargs) + _query_params.append(("beginTime", begin_time)) - def update_a_queue( - self, - queue_id, - **kwargs - ): - """Update a Queue # noqa: E501 + if end_time is not None: - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True + _query_params.append(("endTime", end_time)) - >>> thread = api.update_a_queue(queue_id, async_req=True) - >>> result = thread.get() + if direction is not None: + _query_params.append(("direction", direction.value)) - Args: + if campaign_id is not None: + _query_params.append(("campaignId", campaign_id)) - queue_id (str): A string that uniquely identifies this Queue resource. + if brand_id is not None: + _query_params.append(("brandId", brand_id)) + if is10_dlc is not None: + _query_params.append(("is10DLC", is10_dlc)) - Keyword Args: - queue_request (QueueRequest): Queue Details to update. [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. - async_req (bool): execute request asynchronously + # process the header parameters + # process the form parameters + # process the body parameter - Returns: - QueueResult - 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['account_id'] = \ - self.account_id + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) - kwargs['queue_id'] = \ - queue_id + # authentication setting + _auth_settings: List[str] = ["fc"] - return self.update_a_queue_endpoint.call_with_http_info(**kwargs) + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Messages", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call + def make_a_call( + self, + make_call_request: Annotated[ + Optional[MakeCallRequest], + Field(description="Call details for making a call"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CallResult: + """Make a Call + + + :param make_call_request: Call details for making a call + :type make_call_request: MakeCallRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._make_a_call_serialize( + account_id=account_id, + make_call_request=make_call_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def make_a_call_with_http_info( + self, + make_call_request: Annotated[ + Optional[MakeCallRequest], + Field(description="Call details for making a call"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CallResult]: + """Make a Call + + + :param make_call_request: Call details for making a call + :type make_call_request: MakeCallRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._make_a_call_serialize( + account_id=account_id, + make_call_request=make_call_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def make_a_call_without_preload_content( + self, + make_call_request: Annotated[ + Optional[MakeCallRequest], + Field(description="Call details for making a call"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Make a Call + + + :param make_call_request: Call details for making a call + :type make_call_request: MakeCallRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._make_a_call_serialize( + account_id=account_id, + make_call_request=make_call_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "CallResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _make_a_call_serialize( + self, + account_id, + make_call_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if make_call_request is not None: + _body_params = make_call_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Calls", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def make_a_webrtc_jwt( + self, + create_web_rtc_token: Annotated[ + CreateWebRTCToken, + Field( + description="Information needed to craft a JWT compatible with the platforms WebRTC APIs" + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Make a JWT for WebRTC calling + + + :param create_web_rtc_token: Information needed to craft a JWT compatible with the platforms WebRTC APIs (required) + :type create_web_rtc_token: CreateWebRTCToken + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._make_a_webrtc_jwt_serialize( + account_id=account_id, + create_web_rtc_token=create_web_rtc_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "str", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def make_a_webrtc_jwt_with_http_info( + self, + create_web_rtc_token: Annotated[ + CreateWebRTCToken, + Field( + description="Information needed to craft a JWT compatible with the platforms WebRTC APIs" + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Make a JWT for WebRTC calling + + + :param create_web_rtc_token: Information needed to craft a JWT compatible with the platforms WebRTC APIs (required) + :type create_web_rtc_token: CreateWebRTCToken + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._make_a_webrtc_jwt_serialize( + account_id=account_id, + create_web_rtc_token=create_web_rtc_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "str", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def make_a_webrtc_jwt_without_preload_content( + self, + create_web_rtc_token: Annotated[ + CreateWebRTCToken, + Field( + description="Information needed to craft a JWT compatible with the platforms WebRTC APIs" + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Make a JWT for WebRTC calling + + + :param create_web_rtc_token: Information needed to craft a JWT compatible with the platforms WebRTC APIs (required) + :type create_web_rtc_token: CreateWebRTCToken + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._make_a_webrtc_jwt_serialize( + account_id=account_id, + create_web_rtc_token=create_web_rtc_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "str", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _make_a_webrtc_jwt_serialize( + self, + account_id, + create_web_rtc_token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_web_rtc_token is not None: + _body_params = create_web_rtc_token + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["text/plain"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Calls/WebRTC/Token", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def remove_a_participant( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._remove_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def remove_a_participant_with_http_info( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._remove_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def remove_a_participant_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._remove_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _remove_a_participant_serialize( + self, + account_id, + conference_id, + call_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def send_an_sms_message( + self, + message_request: Annotated[ + MessageRequest, Field(description="Details to create a message") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MessageResult: + """Send an SMS Message + + + :param message_request: Details to create a message (required) + :type message_request: MessageRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._send_an_sms_message_serialize( + account_id=account_id, + message_request=message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "MessageResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def send_an_sms_message_with_http_info( + self, + message_request: Annotated[ + MessageRequest, Field(description="Details to create a message") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MessageResult]: + """Send an SMS Message + + + :param message_request: Details to create a message (required) + :type message_request: MessageRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._send_an_sms_message_serialize( + account_id=account_id, + message_request=message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "MessageResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def send_an_sms_message_without_preload_content( + self, + message_request: Annotated[ + MessageRequest, Field(description="Details to create a message") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send an SMS Message + + + :param message_request: Details to create a message (required) + :type message_request: MessageRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._send_an_sms_message_serialize( + account_id=account_id, + message_request=message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "MessageResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _send_an_sms_message_serialize( + self, + account_id, + message_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if message_request is not None: + _body_params = message_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Messages", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def stream_a_recording_file( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Stream a Recording File + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._stream_a_recording_file_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def stream_a_recording_file_with_http_info( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Stream a Recording File + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._stream_a_recording_file_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def stream_a_recording_file_without_preload_content( + self, + recording_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this recording resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stream a Recording File + + + :param recording_id: String that uniquely identifies this recording resource. (required) + :type recording_id: str + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._stream_a_recording_file_serialize( + account_id=account_id, + recording_id=recording_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "bytearray", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _stream_a_recording_file_serialize( + self, + account_id, + recording_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if recording_id is not None: + _path_params["recordingId"] = recording_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["audio/x-wav"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Recordings/{recordingId}/Stream", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_a_conference( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this conference resource." + ), + ], + update_conference_request: Annotated[ + Optional[UpdateConferenceRequest], + Field(description="Conference Details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Update a Conference + + + :param conference_id: String that uniquely identifies this conference resource. (required) + :type conference_id: str + + :param update_conference_request: Conference Details to update + :type update_conference_request: UpdateConferenceRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_conference_serialize( + account_id=account_id, + conference_id=conference_id, + update_conference_request=update_conference_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_a_conference_with_http_info( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this conference resource." + ), + ], + update_conference_request: Annotated[ + Optional[UpdateConferenceRequest], + Field(description="Conference Details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Update a Conference + + + :param conference_id: String that uniquely identifies this conference resource. (required) + :type conference_id: str + + :param update_conference_request: Conference Details to update + :type update_conference_request: UpdateConferenceRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_conference_serialize( + account_id=account_id, + conference_id=conference_id, + update_conference_request=update_conference_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_a_conference_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this conference resource." + ), + ], + update_conference_request: Annotated[ + Optional[UpdateConferenceRequest], + Field(description="Conference Details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a Conference + + + :param conference_id: String that uniquely identifies this conference resource. (required) + :type conference_id: str + + :param update_conference_request: Conference Details to update + :type update_conference_request: UpdateConferenceRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_conference_serialize( + account_id=account_id, + conference_id=conference_id, + update_conference_request=update_conference_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_a_conference_serialize( + self, + account_id, + conference_id, + update_conference_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_conference_request is not None: + _body_params = update_conference_request + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_a_live_call( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + update_call_request: Annotated[ + UpdateCallRequest, Field(description="Call details to update") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Update a Live Call + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param update_call_request: Call details to update (required) + :type update_call_request: UpdateCallRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_live_call_serialize( + account_id=account_id, + call_id=call_id, + update_call_request=update_call_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_a_live_call_with_http_info( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + update_call_request: Annotated[ + UpdateCallRequest, Field(description="Call details to update") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Update a Live Call + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param update_call_request: Call details to update (required) + :type update_call_request: UpdateCallRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_live_call_serialize( + account_id=account_id, + call_id=call_id, + update_call_request=update_call_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_a_live_call_without_preload_content( + self, + call_id: Annotated[ + StrictStr, + Field(description="String that uniquely identifies this call resource."), + ], + update_call_request: Annotated[ + UpdateCallRequest, Field(description="Call details to update") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a Live Call + + + :param call_id: String that uniquely identifies this call resource. (required) + :type call_id: str + + :param update_call_request: Call details to update (required) + :type update_call_request: UpdateCallRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_live_call_serialize( + account_id=account_id, + call_id=call_id, + update_call_request=update_call_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_a_live_call_serialize( + self, + account_id, + call_id, + update_call_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_call_request is not None: + _body_params = update_call_request + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Calls/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_a_participant( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + update_conference_participant_request: Annotated[ + Optional[UpdateConferenceParticipantRequest], + Field(description="Conference participant details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConferenceParticipantResult: + """Update a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param update_conference_participant_request: Conference participant details to update + :type update_conference_participant_request: UpdateConferenceParticipantRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + update_conference_participant_request=update_conference_participant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_a_participant_with_http_info( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + update_conference_participant_request: Annotated[ + Optional[UpdateConferenceParticipantRequest], + Field(description="Conference participant details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConferenceParticipantResult]: + """Update a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param update_conference_participant_request: Conference participant details to update + :type update_conference_participant_request: UpdateConferenceParticipantRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + update_conference_participant_request=update_conference_participant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_a_participant_without_preload_content( + self, + conference_id: Annotated[ + StrictStr, Field(description="ID of the conference this participant is in.") + ], + call_id: Annotated[ + StrictStr, + Field(description="ID of the Call associated with this participant."), + ], + update_conference_participant_request: Annotated[ + Optional[UpdateConferenceParticipantRequest], + Field(description="Conference participant details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a Participant + + + :param conference_id: ID of the conference this participant is in. (required) + :type conference_id: str + + :param call_id: ID of the Call associated with this participant. (required) + :type call_id: str + + :param update_conference_participant_request: Conference participant details to update + :type update_conference_participant_request: UpdateConferenceParticipantRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_participant_serialize( + account_id=account_id, + conference_id=conference_id, + call_id=call_id, + update_conference_participant_request=update_conference_participant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ConferenceParticipantResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_a_participant_serialize( + self, + account_id, + conference_id, + call_id, + update_conference_participant_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if conference_id is not None: + _path_params["conferenceId"] = conference_id + if call_id is not None: + _path_params["callId"] = call_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_conference_participant_request is not None: + _body_params = update_conference_participant_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_a_queue( + self, + queue_id: Annotated[ + StrictStr, + Field(description="A string that uniquely identifies this Queue resource."), + ], + queue_request: Annotated[ + Optional[QueueRequest], Field(description="Queue Details to update") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> QueueResult: + """Update a Queue + + + :param queue_id: A string that uniquely identifies this Queue resource. (required) + :type queue_id: str + + :param queue_request: Queue Details to update + :type queue_request: QueueRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_queue_serialize( + account_id=account_id, + queue_id=queue_id, + queue_request=queue_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_a_queue_with_http_info( + self, + queue_id: Annotated[ + StrictStr, + Field(description="A string that uniquely identifies this Queue resource."), + ], + queue_request: Annotated[ + Optional[QueueRequest], Field(description="Queue Details to update") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[QueueResult]: + """Update a Queue + + + :param queue_id: A string that uniquely identifies this Queue resource. (required) + :type queue_id: str + + :param queue_request: Queue Details to update + :type queue_request: QueueRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_queue_serialize( + account_id=account_id, + queue_id=queue_id, + queue_request=queue_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_a_queue_without_preload_content( + self, + queue_id: Annotated[ + StrictStr, + Field(description="A string that uniquely identifies this Queue resource."), + ], + queue_request: Annotated[ + Optional[QueueRequest], Field(description="Queue Details to update") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a Queue + + + :param queue_id: A string that uniquely identifies this Queue resource. (required) + :type queue_id: str + + :param queue_request: Queue Details to update + :type queue_request: QueueRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_a_queue_serialize( + account_id=account_id, + queue_id=queue_id, + queue_request=queue_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "QueueResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_a_queue_serialize( + self, + account_id, + queue_id, + queue_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if queue_id is not None: + _path_params["queueId"] = queue_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if queue_request is not None: + _body_params = queue_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Queues/{queueId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def update_an_account( self, - - **kwargs - ): - """Manage an 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.update_an_account(async_req=True) - >>> result = thread.get() - - - - - - Keyword Args: - account_request (AccountRequest): Account details to update. [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. - 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['account_id'] = \ - self.account_id - - return self.update_an_account_endpoint.call_with_http_info(**kwargs) - + account_request: Annotated[ + Optional[AccountRequest], Field(description="Account details to update") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Manage an account + + + :param account_request: Account details to update + :type account_request: AccountRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_account_serialize( + account_id=account_id, + account_request=account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_an_account_with_http_info( + self, + account_request: Annotated[ + Optional[AccountRequest], Field(description="Account details to update") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Manage an account + + + :param account_request: Account details to update + :type account_request: AccountRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_account_serialize( + account_id=account_id, + account_request=account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_an_account_without_preload_content( + self, + account_request: Annotated[ + Optional[AccountRequest], Field(description="Account details to update") + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Manage an account + + + :param account_request: Account details to update + :type account_request: AccountRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_account_serialize( + account_id=account_id, + account_request=account_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_an_account_serialize( + self, + account_id, + account_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if account_request is not None: + _body_params = account_request + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def update_an_application( self, - application_id, - **kwargs - ): - """Update an application # 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_an_application(application_id, async_req=True) - >>> result = thread.get() - - - Args: - - - application_id (str): A string that uniquely identifies this application resource. - - - - - Keyword Args: - application_request (ApplicationRequest): Application details to update.. [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. - async_req (bool): execute request asynchronously - - Returns: - ApplicationResult - 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['account_id'] = \ - self.account_id - - kwargs['application_id'] = \ - application_id - - return self.update_an_application_endpoint.call_with_http_info(**kwargs) - + application_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this application resource." + ), + ], + application_request: Annotated[ + Optional[ApplicationRequest], + Field(description="Application details to update."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApplicationResult: + """Update an application + + + :param application_id: A string that uniquely identifies this application resource. (required) + :type application_id: str + + :param application_request: Application details to update. + :type application_request: ApplicationRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_application_serialize( + account_id=account_id, + application_id=application_id, + application_request=application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_an_application_with_http_info( + self, + application_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this application resource." + ), + ], + application_request: Annotated[ + Optional[ApplicationRequest], + Field(description="Application details to update."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApplicationResult]: + """Update an application + + + :param application_id: A string that uniquely identifies this application resource. (required) + :type application_id: str + + :param application_request: Application details to update. + :type application_request: ApplicationRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_application_serialize( + account_id=account_id, + application_id=application_id, + application_request=application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_an_application_without_preload_content( + self, + application_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this application resource." + ), + ], + application_request: Annotated[ + Optional[ApplicationRequest], + Field(description="Application details to update."), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an application + + + :param application_id: A string that uniquely identifies this application resource. (required) + :type application_id: str + + :param application_request: Application details to update. + :type application_request: ApplicationRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_application_serialize( + account_id=account_id, + application_id=application_id, + application_request=application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ApplicationResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_an_application_serialize( + self, + account_id, + application_id, + application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if application_id is not None: + _path_params["applicationId"] = application_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if application_request is not None: + _body_params = application_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Applications/{applicationId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call def update_an_incoming_number( self, - phone_number_id, - **kwargs - ): - """Update an Incoming Number # 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_an_incoming_number(phone_number_id, async_req=True) - >>> result = thread.get() - - - Args: - - - phone_number_id (str): String that uniquely identifies this phone number resource. - - - - - Keyword Args: - incoming_number_request (IncomingNumberRequest): Incoming Number details to update. [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. - async_req (bool): execute request asynchronously - - Returns: - IncomingNumberResult - 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['account_id'] = \ - self.account_id - - kwargs['phone_number_id'] = \ - phone_number_id - - return self.update_an_incoming_number_endpoint.call_with_http_info(**kwargs) - - - def get_next_page( + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + incoming_number_request: Annotated[ + Optional[IncomingNumberRequest], + Field(description="Incoming Number details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IncomingNumberResult: + """Update an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param incoming_number_request: Incoming Number details to update + :type incoming_number_request: IncomingNumberRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + incoming_number_request=incoming_number_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_an_incoming_number_with_http_info( self, - response, - **kwargs - ): - """Get Next Page - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_next_page(response, async_req=True) - >>> result = thread.get() - - Args: - response (object): Response from previous request to get paginated list resource. - - 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. - async_req (bool): execute request asynchronously - - Returns: - object - 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') - - if not hasattr(response, 'next_page_uri') or not response.next_page_uri: - raise ValueError("The response object does not have a next_page_uri attribute or it is empty.") - - endpoint = _Endpoint( - settings={ - 'response_type': (type(response),), - 'auth': [ - 'fc' - ], - 'endpoint_path': response.next_page_uri, - 'operation_id': 'get_next_page', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [ - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=self.api_client - ) - - return endpoint.call_with_http_info(**kwargs) - \ No newline at end of file + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + incoming_number_request: Annotated[ + Optional[IncomingNumberRequest], + Field(description="Incoming Number details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IncomingNumberResult]: + """Update an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param incoming_number_request: Incoming Number details to update + :type incoming_number_request: IncomingNumberRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + incoming_number_request=incoming_number_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_an_incoming_number_without_preload_content( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + incoming_number_request: Annotated[ + Optional[IncomingNumberRequest], + Field(description="Incoming Number details to update"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :param incoming_number_request: Incoming Number details to update + :type incoming_number_request: IncomingNumberRequest + + :param _request_timeout: 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. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._update_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + incoming_number_request=incoming_number_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _update_an_incoming_number_serialize( + self, + account_id, + phone_number_id, + incoming_number_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if phone_number_id is not None: + _path_params["phoneNumberId"] = phone_number_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if incoming_number_request is not None: + _body_params = incoming_number_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/freeclimb/api_client.py b/freeclimb/api_client.py index 6cde6c1..3266bd4 100644 --- a/freeclimb/api_client.py +++ b/freeclimb/api_client.py @@ -1,46 +1,50 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal import json -import atexit import mimetypes -from multiprocessing.pool import ThreadPool -import io import os import re -import typing -from urllib.parse import quote -from urllib3.fields import RequestField +import tempfile +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr -from freeclimb import rest from freeclimb.configuration import Configuration -from freeclimb.exceptions import ApiTypeError, ApiValueError, ApiException -from freeclimb.model_utils import ( - ModelNormal, - ModelSimple, - ModelComposed, - check_allowed_values, - check_validations, - date, - datetime, - deserialize_file, - file_type, - model_to_dict, - none_type, - validate_and_convert_types +from freeclimb.api_response import ApiResponse, T as ApiResponseT +import freeclimb.models +from freeclimb import rest +from freeclimb.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException, ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + -class ApiClient(object): +class ApiClient: """Generic API client for OpenAPI client library builds. OpenAPI generic API client. This client handles the client- @@ -48,28 +52,35 @@ class ApiClient(object): the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "decimal": decimal.Decimal, + "object": object, + } _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__( + self, configuration=None, header_name=None, header_value=None, cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration.get_default_copy() + configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -77,64 +88,89 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.9.0/python' + self.user_agent = "OpenAPI-Generator/5.0.0/python" + self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool + pass @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api( + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None - ): + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, + auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None, + ) -> RequestSerialized: + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -142,384 +178,287 @@ def __call_api( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict( + self.parameters_to_tuples(header_params, collection_formats) + ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) + "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_query_params(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict) ) + post_params = self.parameters_to_tuples(post_params, collection_formats) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth, + ) # body if body: body = self.sanitize_for_serialization(body) - # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) - # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead url = _host + resource_path + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query(query_params, collection_formats) + url += "?" + url_query + + return method, url, header_params, body, post_params + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None, + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + try: # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = self.rest_client.request( + method, + url, + headers=header_params, + body=body, + post_params=post_params, + _request_timeout=_request_timeout, + ) + except ApiException as e: - e.body = e.body.decode('utf-8') raise e - self.last_response = response_data + return response_data - return_data = response_data + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]] = None, + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ - if not _preload_content: - return (return_data) - return return_data + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if ( + not response_type + and isinstance(response_data.status, int) + and 100 <= response_data.status <= 599 + ): + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get( + str(response_data.status)[0] + "XX", None + ) # deserialize response data - if response_type: - if response_type != (file_type,): - encoding = "utf-8" - content_type = response_data.getheader('content-type') + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader("content-type") if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - if match: - encoding = match.group(1) - response_data.data = response_data.data.decode(encoding) - - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize( + response_text, response_type, content_type + ) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) - def parameters_to_multipart(self, params, collection_types): - """Get parameters as list of tuples, formatting as json if value is collection_types + return ApiResponse( + status_code=response_data.status, + data=return_data, + headers=response_data.getheaders(), + raw_data=response_data.data, + ) - :param params: Parameters as list of two-tuples - :param dict collection_types: Parameter collection types - :return: Parameters as list of tuple or urllib3.fields.RequestField - """ - new_params = [] - if collection_types is None: - collection_types = (dict) - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) - else: - new_params.append((k, v)) - return new_params + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. - @classmethod - def sanitize_for_query_params(cls, obj): - """Prepares data for transmission before it is sent with the rest client If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() - } - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): - return json.dumps(obj) - elif isinstance(obj, (datetime, date)): - return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_query_params(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - @classmethod - def sanitize_for_serialization(cls, obj): - """Prepares data for transmission before it is sent with the rest client - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - If obj is io.IOBase, return the bytes :param obj: The data to serialize. :return: The serialized form of data. """ - if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() - } - elif isinstance(obj, io.IOBase): - return cls.get_file_data_and_close_file(obj) - elif isinstance(obj, (str, int, float, none_type, bool)): + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): return obj - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - elif isinstance(obj, ModelSimple): - return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): - return [cls.sanitize_for_serialization(item) for item in obj] - if isinstance(obj, dict): - return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - def deserialize(self, response, response_type, _check_type): + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() + } + + def deserialize( + self, response_text: str, response_type: str, content_type: Optional[str] + ): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param _check_type: boolean, whether to check the types of the data - received from the server - :type _check_type: bool + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == (file_type,): - content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) # fetch data from response object - try: - received_data = json.loads(response.data) - except ValueError: - received_data = response.data - - # store our data under the key of 'received_data' so users have some - # context if they are deserializing a string and the data type is wrong - deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration - ) - return deserialized_data + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match( + r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", + content_type, + re.IGNORECASE, + ): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, reason="Unsupported content type: {0}".format(content_type) + ) - def call_api( - self, - resource_path: str, - method: str, - path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, - body: typing.Optional[typing.Any] = None, - post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, - files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, - response_type: typing.Optional[typing.Tuple[typing.Any]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - _return_http_data_only: typing.Optional[bool] = None, - collection_formats: typing.Optional[typing.Dict[str, str]] = None, - _preload_content: bool = True, - _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None - ): - """Makes the HTTP request (synchronous) and returns deserialized data. + return self.__deserialize(data, response_type) - To make an async_req request, set the async_req parameter. + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response_type: For the response, a tuple containing: - valid classes - a list containing valid classes (for list schemas) - a dict containing a tuple of valid classes as the value - Example values: - (str,) - (Pet,) - (float, none_type) - ([int, none_type],) - ({str: (bool, str, int, float, date, datetime, str, none_type)},) - :param files: key -> field name, value -> a list of open file - objects for `multipart/form-data`. - :type files: dict - :param async_req bool: execute request asynchronously - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :type collection_formats: dict, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: 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. - :param _check_type: boolean describing if the data back from the server - should have its type checked. - :type _check_type: bool, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith("List["): + m = re.match(r"List\[(.*)]", klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] + + if klass.startswith("Dict["): + m = re.match(r"Dict\[([^,]*), (.*)]", klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(freeclimb.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + return self.__deserialize_model(data, klass) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -528,372 +467,290 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params - @staticmethod - def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: - file_data = file_instance.read() - file_instance.close() - return file_data + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == "multi": + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" + else: # csv is the default + delimiter = "," + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. - :param files: None or a dict with key=param_name and - value is a list of open file objects - :return: List of tuples of form parameters with file data + :param files: File parameters. + :return: Form parameters with files. """ - if files is None: - return [] - params = [] - for param_name, file_instances in files.items(): - if file_instances is None: - # if the file field is nullable, skip None values + for k, v in files.items(): + if isinstance(v, str): + with open(v, "rb") as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) continue - for file_instance in file_instances: - if file_instance is None: - # if the file field is nullable, skip None values - continue - if file_instance.closed is True: - raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name - ) - filename = os.path.basename(file_instance.name) - filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) - + else: + raise ValueError("Unsupported file value") + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params - def select_header_accept(self, accepts): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search("json", accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] - def select_header_content_type(self, content_types, method=None, body=None): + def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] + return None - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + for content_type in content_types: + if re.search("json", content_type, re.IGNORECASE): + return content_type - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] + return content_types[0] - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None, + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' + if request_auth: + self._apply_auth_params( + headers, queries, resource_path, method, body, request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, queries, resource_path, method, body, auth_setting ) + def _apply_auth_params( + self, headers, queries, resource_path, method, body, auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting -class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): - """Creates an endpoint - - Args: - settings (dict): see below key value pairs - 'response_type' (tuple/None): response type - 'auth' (list): a list of auth type keys - 'endpoint_path' (str): the endpoint path - 'operation_id' (str): endpoint string identifier - 'http_method' (str): POST/PUT/PATCH/GET etc - 'servers' (list): list of str servers that this endpoint is at - params_map (dict): see below key value pairs - 'all' (list): list of str endpoint parameter names - 'required' (list): list of required parameter names - 'nullable' (list): list of nullable parameter names - 'enum' (list): list of parameters with enum values - 'validation' (list): list of parameters with validations - root_map - 'validations' (dict): the dict mapping endpoint parameter tuple - paths to their validation dictionaries - 'allowed_values' (dict): the dict mapping endpoint parameter - tuple paths to their allowed_values (enum) dictionaries - 'openapi_types' (dict): param_name to openapi type - 'attribute_map' (dict): param_name to camelCase name - 'location_map' (dict): param_name to 'body', 'file', 'form', - 'header', 'path', 'query' - collection_format_map (dict): param_name to `csv` etc. - headers_map (dict): see below key value pairs - 'accept' (list): list of Accept header strings - 'content_type' (list): list of Content-Type header strings - api_client (ApiClient) api client instance - callable (function): the function which is invoked when the - Endpoint is called + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint """ - self.settings = settings - self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming' - ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] - extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str) - } - self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] - self.headers_map = headers_map - self.api_client = api_client - self.callable = callable - - def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: - if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) + else: + raise ApiValueError("Authentication token must be in `query` or `header`") - for param in self.params_map['validation']: - if param in kwargs: - check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration - ) + def __deserialize_file(self, response): + """Deserializes body to file - if kwargs['_check_input_type'] is False: - return + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. - for key, value in kwargs.items(): - fixed_val = validate_and_convert_types( - value, - self.openapi_types[key], - [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration - ) - kwargs[key] = fixed_val - - def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + handle file downloading + save response body into a tmp file and return the instance - for param_name, param_value in kwargs.items(): - param_location = self.location_map.get(param_name) - if param_location is None: - continue - if param_location: - if param_location == 'body': - params['body'] = param_value - continue - base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): - # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: - param_value_full = (base_name, param_value) - params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: - params[param_location][base_name] = param_value - collection_format = self.collection_format_map.get(param_name) - if collection_format: - params['collection_format'][base_name] = collection_format + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) - return params + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) - def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called - Example: + return path - api_instance = DefaultApi() - api_instance.buy_a_phone_number # this is an instance of the class Endpoint - api_instance.buy_a_phone_number() # this invokes api_instance.buy_a_phone_number.__call__() - which then invokes the callable functions stored in that endpoint at - api_instance.buy_a_phone_number.callable or self.callable in this class + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. """ - return self.callable(self, *args, **kwargs) + return value - def call_with_http_info(self, **kwargs): + def __deserialize_date(self, string): + """Deserializes string to date. + :param string: str. + :return: date. + """ try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] - server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, reason="Failed to parse `{0}` as date object".format(string) ) - _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=("Failed to parse `{0}` as datetime object".format(string)), ) - except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) - _host = None - - for key, value in kwargs.items(): - if key not in self.params_map['all']: - raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) - ) - # only throw this nullable ApiValueError if _check_input_type - # is False, if _check_input_type==True we catch this case - # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): - raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) - ) - for key in self.params_map['required']: - if key not in kwargs.keys(): - raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) - ) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. - self.__validate_inputs(kwargs) + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) + ) - params = self.__gather_params(kwargs) + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. - accept_headers_list = self.headers_map['accept'] - if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] - else: - content_type_headers_list = self.headers_map['content_type'] - if content_type_headers_list: - if params['body'] != "": - header_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - params['header']['Content-Type'] = header_list - - return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], - _host=_host, - collection_formats=params['collection_format']) + return klass.from_dict(data) diff --git a/freeclimb/api_response.py b/freeclimb/api_response.py new file mode 100644 index 0000000..1ce1372 --- /dev/null +++ b/freeclimb/api_response.py @@ -0,0 +1,20 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = {"arbitrary_types_allowed": True} diff --git a/freeclimb/apis/__init__.py b/freeclimb/apis/__init__.py deleted file mode 100644 index 0103b51..0000000 --- a/freeclimb/apis/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ - -# flake8: noqa - -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from .api.default_api import DefaultApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - -# Import APIs into API package: -from freeclimb.api.default_api import DefaultApi diff --git a/freeclimb/configuration.py b/freeclimb/configuration.py index 92b5e26..5be3935 100644 --- a/freeclimb/configuration.py +++ b/freeclimb/configuration.py @@ -1,116 +1,116 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import copy import logging +from logging import FileHandler import multiprocessing import sys +from typing import Optional import urllib3 -from http import client as http_client -from freeclimb.exceptions import ApiValueError - +import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format - - :Example: - - HTTP Basic Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: basic - - Configure API client with HTTP basic authentication: - -conf = freeclimb.Configuration( - username='ACCOUNT_ID', - password='API_KEY', -) +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + + :Example: + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + + conf = freeclimb.Configuration( + username='the-user', + password='the-password', + ) """ _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - access_token=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor - """ - self._base_path = "https://www.freeclimb.com/apiserver" if host is None else host + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + username=None, + password=None, + access_token=None, + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ignore_operation_servers=False, + ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None + ) -> None: + """Constructor""" + self._base_path = ( + "https://www.freeclimb.com/apiserver" if host is None else host + ) """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -121,11 +121,13 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings - self.access_token = access_token self.api_key = {} if api_key: self.api_key = api_key @@ -145,26 +147,30 @@ def __init__(self, host=None, self.password = password """Password for HTTP basic authentication """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations + self.access_token = access_token + """Access token + """ self.logger = {} """Logging Settings """ self.logger["package_logger"] = logging.getLogger("freeclimb") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -185,6 +191,10 @@ def __init__(self, host=None, self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved @@ -194,33 +204,39 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ - self.no_proxy = None - """bypass proxy for host in the no_proxy list. - """ self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation self.client_side_validation = True - # Options to pass down to the underlying urllib3 socket self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -231,13 +247,6 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s @classmethod def set_default(cls, default): @@ -248,21 +257,31 @@ def set_default(cls, default): :param default: object of Configuration """ - cls._default = copy.deepcopy(default) + cls._default = default @classmethod def get_default_copy(cls): - """Return new instance of configuration. + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default - configuration passed by the set_default method. + configuration. :return: The configuration object. """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() + if cls._default is None: + cls._default = Configuration() + return cls._default @property def logger_file(self): @@ -316,15 +335,15 @@ def debug(self, value): # if debug status is True, turn on debug logging for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): @@ -358,7 +377,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + key = self.api_key.get( + identifier, self.api_key.get(alias) if alias is not None else None + ) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -377,9 +398,9 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get( + "authorization" + ) def auth_settings(self): """Gets Auth Settings dict for api client. @@ -388,11 +409,11 @@ def auth_settings(self): """ auth = {} if self.username is not None and self.password is not None: - auth['fc'] = { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() + auth["fc"] = { + "type": "basic", + "in": "header", + "key": "Authorization", + "value": self.get_basic_auth_token(), } return auth @@ -401,12 +422,13 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 4.9.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 1.0.0\n" + "SDK Package Version: 5.0.0".format(env=sys.platform, pyversion=sys.version) + ) def get_host_settings(self): """Gets an array of host settings @@ -415,8 +437,8 @@ def get_host_settings(self): """ return [ { - 'url': "https://www.freeclimb.com/apiserver", - 'description': "No description provided", + "url": "https://www.freeclimb.com/apiserver", + "description": "No description provided", } ] @@ -438,22 +460,22 @@ def get_host_from_settings(self, index, variables=None, servers=None): except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Must be less than {1}".format(index, len(servers)) + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) @@ -462,7 +484,9 @@ def get_host_from_settings(self, index, variables=None, servers=None): @property def host(self): """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) + return self.get_host_from_settings( + self.server_index, variables=self.server_variables + ) @host.setter def host(self, value): diff --git a/freeclimb/exceptions.py b/freeclimb/exceptions.py index 3dedae0..fdca0c1 100644 --- a/freeclimb/exceptions.py +++ b/freeclimb/exceptions.py @@ -1,13 +1,19 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): @@ -15,9 +21,10 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors + def __init__( + self, msg, path_to_item=None, valid_classes=None, key_type=None + ) -> None: + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -44,7 +51,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -62,7 +69,7 @@ def __init__(self, msg, path_to_item=None): class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Raised when an attribute reference or assignment fails. @@ -81,7 +88,7 @@ def __init__(self, msg, path_to_item=None): class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): + def __init__(self, msg, path_to_item=None) -> None: """ Args: msg (str): the exception message @@ -99,54 +106,87 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode("utf-8") + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += "HTTP response headers: {0}\n".format(self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message -class NotFoundException(ApiException): +class BadRequestException(ApiException): + pass + - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) +class NotFoundException(ApiException): + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/freeclimb/model/__init__.py b/freeclimb/model/__init__.py deleted file mode 100644 index cfe32b7..0000000 --- a/freeclimb/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from {{packageName}.models import ModelA, ModelB diff --git a/freeclimb/model/account_request.py b/freeclimb/model/account_request.py deleted file mode 100644 index 7224060..0000000 --- a/freeclimb/model/account_request.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class AccountRequest(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 { - 'alias': (str,), # noqa: E501 - 'label': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alias': 'alias', # noqa: E501 - 'label': 'label', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountRequest - 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,) - alias (str): Description for this account.. [optional] # noqa: E501 - label (str): Group to which this account belongs.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """AccountRequest - 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,) - alias (str): Description for this account.. [optional] # noqa: E501 - label (str): Group to which this account belongs.. [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: - 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/freeclimb/model/account_result.py b/freeclimb/model/account_result.py deleted file mode 100644 index bc1997c..0000000 --- a/freeclimb/model/account_result.py +++ /dev/null @@ -1,359 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.account_result_all_of import AccountResultAllOf - from freeclimb.model.account_status import AccountStatus - from freeclimb.model.account_type import AccountType - from freeclimb.model.mutable_resource_model import MutableResourceModel - globals()['AccountResultAllOf'] = AccountResultAllOf - globals()['AccountStatus'] = AccountStatus - globals()['AccountType'] = AccountType - globals()['MutableResourceModel'] = MutableResourceModel - -class AccountResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'api_key': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'label': (str, none_type,), # noqa: E501 - 'type': (AccountType,), # noqa: E501 - 'status': (AccountStatus,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'api_key': 'apiKey', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'label': 'label', # noqa: E501 - 'type': 'type', # noqa: E501 - 'status': 'status', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - api_key (str, none_type): The API key assigned to this account. This key must be kept a secret by the customer.. [optional] # noqa: E501 - alias (str, none_type): A description for this account.. [optional] # noqa: E501 - label (str, none_type): A string that identifies a category or group to which the account belongs.. [optional] # noqa: E501 - type (AccountType): [optional] # noqa: E501 - status (AccountStatus): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this account.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AccountResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - api_key (str, none_type): The API key assigned to this account. This key must be kept a secret by the customer.. [optional] # noqa: E501 - alias (str, none_type): A description for this account.. [optional] # noqa: E501 - label (str, none_type): A string that identifies a category or group to which the account belongs.. [optional] # noqa: E501 - type (AccountType): [optional] # noqa: E501 - status (AccountStatus): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this account.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - AccountResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/account_result_all_of.py b/freeclimb/model/account_result_all_of.py deleted file mode 100644 index 0c9379e..0000000 --- a/freeclimb/model/account_result_all_of.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.account_status import AccountStatus - from freeclimb.model.account_type import AccountType - globals()['AccountStatus'] = AccountStatus - globals()['AccountType'] = AccountType - - -class AccountResultAllOf(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 { - 'account_id': (str, none_type,), # noqa: E501 - 'api_key': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'label': (str, none_type,), # noqa: E501 - 'type': (AccountType,), # noqa: E501 - 'status': (AccountStatus,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'api_key': 'apiKey', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'label': 'label', # noqa: E501 - 'type': 'type', # noqa: E501 - 'status': 'status', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AccountResultAllOf - 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,) - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - api_key (str, none_type): The API key assigned to this account. This key must be kept a secret by the customer.. [optional] # noqa: E501 - alias (str, none_type): A description for this account.. [optional] # noqa: E501 - label (str, none_type): A string that identifies a category or group to which the account belongs.. [optional] # noqa: E501 - type (AccountType): [optional] # noqa: E501 - status (AccountStatus): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this account.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """AccountResultAllOf - 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,) - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - api_key (str, none_type): The API key assigned to this account. This key must be kept a secret by the customer.. [optional] # noqa: E501 - alias (str, none_type): A description for this account.. [optional] # noqa: E501 - label (str, none_type): A string that identifies a category or group to which the account belongs.. [optional] # noqa: E501 - type (AccountType): [optional] # noqa: E501 - status (AccountStatus): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this account.. [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: - 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/freeclimb/model/add_to_conference.py b/freeclimb/model/add_to_conference.py deleted file mode 100644 index 15bce32..0000000 --- a/freeclimb/model/add_to_conference.py +++ /dev/null @@ -1,415 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.add_to_conference_all_of import AddToConferenceAllOf - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['AddToConferenceAllOf'] = AddToConferenceAllOf - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class AddToConference(ModelComposed): - """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 { - 'conference_id': (str,), # noqa: E501 - 'allow_call_control': (bool,), # noqa: E501 - 'call_control_sequence': (str,), # noqa: E501 - 'call_control_url': (str,), # noqa: E501 - 'leave_conference_url': (str,), # noqa: E501 - 'listen': (bool,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'start_conf_on_enter': (bool,), # noqa: E501 - 'talk': (bool,), # noqa: E501 - 'dtmf_pass_through': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'conference_id': 'conferenceId', # noqa: E501 - 'allow_call_control': 'allowCallControl', # noqa: E501 - 'call_control_sequence': 'callControlSequence', # noqa: E501 - 'call_control_url': 'callControlUrl', # noqa: E501 - 'leave_conference_url': 'leaveConferenceUrl', # noqa: E501 - 'listen': 'listen', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'start_conf_on_enter': 'startConfOnEnter', # noqa: E501 - 'talk': 'talk', # noqa: E501 - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AddToConference - a model defined in OpenAPI - - Keyword Args: - conference_id (str): ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - _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,) - allow_call_control (bool): If `true`, Call control will be enabled for this Participant's Call leg.. [optional] # noqa: E501 - call_control_sequence (str): Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.. [optional] # noqa: E501 - call_control_url (str): URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.. [optional] # noqa: E501 - leave_conference_url (str): URL to be invoked when the Participant leaves the Conference. . [optional] # noqa: E501 - listen (bool): If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.. [optional] # noqa: E501 - notification_url (str): When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.. [optional] # noqa: E501 - start_conf_on_enter (bool): Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.. [optional] # noqa: E501 - talk (bool): If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. . [optional] # noqa: E501 - dtmf_pass_through (bool): If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. . [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AddToConference - a model defined in OpenAPI - - Keyword Args: - conference_id (str): ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - _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,) - allow_call_control (bool): If `true`, Call control will be enabled for this Participant's Call leg.. [optional] # noqa: E501 - call_control_sequence (str): Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.. [optional] # noqa: E501 - call_control_url (str): URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.. [optional] # noqa: E501 - leave_conference_url (str): URL to be invoked when the Participant leaves the Conference. . [optional] # noqa: E501 - listen (bool): If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.. [optional] # noqa: E501 - notification_url (str): When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.. [optional] # noqa: E501 - start_conf_on_enter (bool): Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.. [optional] # noqa: E501 - talk (bool): If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. . [optional] # noqa: E501 - dtmf_pass_through (bool): If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. . [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == AddToConference), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(AddToConference.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - AddToConferenceAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/add_to_conference_all_of.py b/freeclimb/model/add_to_conference_all_of.py deleted file mode 100644 index 1d41b87..0000000 --- a/freeclimb/model/add_to_conference_all_of.py +++ /dev/null @@ -1,301 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class AddToConferenceAllOf(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 { - 'conference_id': (str,), # noqa: E501 - 'allow_call_control': (bool,), # noqa: E501 - 'call_control_sequence': (str,), # noqa: E501 - 'call_control_url': (str,), # noqa: E501 - 'leave_conference_url': (str,), # noqa: E501 - 'listen': (bool,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'start_conf_on_enter': (bool,), # noqa: E501 - 'talk': (bool,), # noqa: E501 - 'dtmf_pass_through': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'conference_id': 'conferenceId', # noqa: E501 - 'allow_call_control': 'allowCallControl', # noqa: E501 - 'call_control_sequence': 'callControlSequence', # noqa: E501 - 'call_control_url': 'callControlUrl', # noqa: E501 - 'leave_conference_url': 'leaveConferenceUrl', # noqa: E501 - 'listen': 'listen', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'start_conf_on_enter': 'startConfOnEnter', # noqa: E501 - 'talk': 'talk', # noqa: E501 - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, conference_id, *args, **kwargs): # noqa: E501 - """AddToConferenceAllOf - a model defined in OpenAPI - - Args: - conference_id (str): ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - - 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,) - allow_call_control (bool): If `true`, Call control will be enabled for this Participant's Call leg.. [optional] # noqa: E501 - call_control_sequence (str): Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.. [optional] # noqa: E501 - call_control_url (str): URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.. [optional] # noqa: E501 - leave_conference_url (str): URL to be invoked when the Participant leaves the Conference. . [optional] # noqa: E501 - listen (bool): If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.. [optional] # noqa: E501 - notification_url (str): When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.. [optional] # noqa: E501 - start_conf_on_enter (bool): Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.. [optional] # noqa: E501 - talk (bool): If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. . [optional] # noqa: E501 - dtmf_pass_through (bool): If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. . [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.conference_id = conference_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, conference_id, *args, **kwargs): # noqa: E501 - """AddToConferenceAllOf - a model defined in OpenAPI - - Args: - conference_id (str): ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - - 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,) - allow_call_control (bool): If `true`, Call control will be enabled for this Participant's Call leg.. [optional] # noqa: E501 - call_control_sequence (str): Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.. [optional] # noqa: E501 - call_control_url (str): URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.. [optional] # noqa: E501 - leave_conference_url (str): URL to be invoked when the Participant leaves the Conference. . [optional] # noqa: E501 - listen (bool): If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.. [optional] # noqa: E501 - notification_url (str): When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.. [optional] # noqa: E501 - start_conf_on_enter (bool): Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.. [optional] # noqa: E501 - talk (bool): If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. . [optional] # noqa: E501 - dtmf_pass_through (bool): If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. . [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: - 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.conference_id = conference_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/freeclimb/model/application_list.py b/freeclimb/model/application_list.py deleted file mode 100644 index df5e371..0000000 --- a/freeclimb/model/application_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.application_list_all_of import ApplicationListAllOf - from freeclimb.model.application_result import ApplicationResult - from freeclimb.model.pagination_model import PaginationModel - globals()['ApplicationListAllOf'] = ApplicationListAllOf - globals()['ApplicationResult'] = ApplicationResult - globals()['PaginationModel'] = PaginationModel - -class ApplicationList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'applications': ([ApplicationResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'applications': 'applications', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplicationList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - applications ([ApplicationResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplicationList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - applications ([ApplicationResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ApplicationListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/application_list_all_of.py b/freeclimb/model/application_list_all_of.py deleted file mode 100644 index b0a190f..0000000 --- a/freeclimb/model/application_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.application_result import ApplicationResult - globals()['ApplicationResult'] = ApplicationResult - - -class ApplicationListAllOf(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 { - 'applications': ([ApplicationResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'applications': 'applications', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplicationListAllOf - 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,) - applications ([ApplicationResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ApplicationListAllOf - 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,) - applications ([ApplicationResult], none_type): [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: - 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/freeclimb/model/application_request.py b/freeclimb/model/application_request.py deleted file mode 100644 index 81c766d..0000000 --- a/freeclimb/model/application_request.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class ApplicationRequest(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 { - 'alias': (str,), # noqa: E501 - 'voice_url': (str, none_type,), # noqa: E501 - 'voice_fallback_url': (str, none_type,), # noqa: E501 - 'call_connect_url': (str, none_type,), # noqa: E501 - 'status_callback_url': (str, none_type,), # noqa: E501 - 'sms_url': (str, none_type,), # noqa: E501 - 'sms_fallback_url': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alias': 'alias', # noqa: E501 - 'voice_url': 'voiceUrl', # noqa: E501 - 'voice_fallback_url': 'voiceFallbackUrl', # noqa: E501 - 'call_connect_url': 'callConnectUrl', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'sms_url': 'smsUrl', # noqa: E501 - 'sms_fallback_url': 'smsFallbackUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplicationRequest - 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,) - alias (str): A human readable description of the application, with maximum length 64 characters.. [optional] # noqa: E501 - voice_url (str, none_type): The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls.. [optional] # noqa: E501 - voice_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. Note: A PerCL response is expected to control the inbound call.. [optional] # noqa: E501 - call_connect_url (str, none_type): The URL that FreeClimb will request when an outbound call request is complete. Used for outbound calls only. Note: A PerCL response is expected if the outbound call is connected (status=InProgress) to control the call.. [optional] # noqa: E501 - status_callback_url (str, none_type): The URL that FreeClimb will request to pass call status (such as call ended) to the application. Note: This is a notification only; any PerCL returned will be ignored.. [optional] # noqa: E501 - sms_url (str, none_type): The URL that FreeClimb will request when a phone number assigned to this application receives an incoming SMS message. Used for inbound SMS only. Note: Any PerCL returned will be ignored.. [optional] # noqa: E501 - sms_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. Note: Any PerCL returned will be ignored.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ApplicationRequest - 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,) - alias (str): A human readable description of the application, with maximum length 64 characters.. [optional] # noqa: E501 - voice_url (str, none_type): The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls.. [optional] # noqa: E501 - voice_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. Note: A PerCL response is expected to control the inbound call.. [optional] # noqa: E501 - call_connect_url (str, none_type): The URL that FreeClimb will request when an outbound call request is complete. Used for outbound calls only. Note: A PerCL response is expected if the outbound call is connected (status=InProgress) to control the call.. [optional] # noqa: E501 - status_callback_url (str, none_type): The URL that FreeClimb will request to pass call status (such as call ended) to the application. Note: This is a notification only; any PerCL returned will be ignored.. [optional] # noqa: E501 - sms_url (str, none_type): The URL that FreeClimb will request when a phone number assigned to this application receives an incoming SMS message. Used for inbound SMS only. Note: Any PerCL returned will be ignored.. [optional] # noqa: E501 - sms_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. Note: Any PerCL returned will be ignored.. [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: - 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/freeclimb/model/application_result.py b/freeclimb/model/application_result.py deleted file mode 100644 index 186cdc0..0000000 --- a/freeclimb/model/application_result.py +++ /dev/null @@ -1,363 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.application_result_all_of import ApplicationResultAllOf - from freeclimb.model.mutable_resource_model import MutableResourceModel - globals()['ApplicationResultAllOf'] = ApplicationResultAllOf - globals()['MutableResourceModel'] = MutableResourceModel - -class ApplicationResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'application_id': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'voice_url': (str, none_type,), # noqa: E501 - 'voice_fallback_url': (str, none_type,), # noqa: E501 - 'call_connect_url': (str, none_type,), # noqa: E501 - 'status_callback_url': (str, none_type,), # noqa: E501 - 'sms_url': (str, none_type,), # noqa: E501 - 'sms_fallback_url': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'voice_url': 'voiceUrl', # noqa: E501 - 'voice_fallback_url': 'voiceFallbackUrl', # noqa: E501 - 'call_connect_url': 'callConnectUrl', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'sms_url': 'smsUrl', # noqa: E501 - 'sms_fallback_url': 'smsFallbackUrl', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplicationResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - voice_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.. [optional] # noqa: E501 - voice_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.. [optional] # noqa: E501 - call_connect_url (str, none_type): The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not.. [optional] # noqa: E501 - status_callback_url (str, none_type): A URL to which FreeClimb will make a POST request when the Call ends to notify this app.. [optional] # noqa: E501 - sms_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.. [optional] # noqa: E501 - sms_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ApplicationResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - voice_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.. [optional] # noqa: E501 - voice_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.. [optional] # noqa: E501 - call_connect_url (str, none_type): The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not.. [optional] # noqa: E501 - status_callback_url (str, none_type): A URL to which FreeClimb will make a POST request when the Call ends to notify this app.. [optional] # noqa: E501 - sms_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.. [optional] # noqa: E501 - sms_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ApplicationResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/application_result_all_of.py b/freeclimb/model/application_result_all_of.py deleted file mode 100644 index ff6e96a..0000000 --- a/freeclimb/model/application_result_all_of.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class ApplicationResultAllOf(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 { - 'account_id': (str, none_type,), # noqa: E501 - 'application_id': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'voice_url': (str, none_type,), # noqa: E501 - 'voice_fallback_url': (str, none_type,), # noqa: E501 - 'call_connect_url': (str, none_type,), # noqa: E501 - 'status_callback_url': (str, none_type,), # noqa: E501 - 'sms_url': (str, none_type,), # noqa: E501 - 'sms_fallback_url': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'voice_url': 'voiceUrl', # noqa: E501 - 'voice_fallback_url': 'voiceFallbackUrl', # noqa: E501 - 'call_connect_url': 'callConnectUrl', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'sms_url': 'smsUrl', # noqa: E501 - 'sms_fallback_url': 'smsFallbackUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ApplicationResultAllOf - 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,) - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - voice_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.. [optional] # noqa: E501 - voice_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.. [optional] # noqa: E501 - call_connect_url (str, none_type): The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not.. [optional] # noqa: E501 - status_callback_url (str, none_type): A URL to which FreeClimb will make a POST request when the Call ends to notify this app.. [optional] # noqa: E501 - sms_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.. [optional] # noqa: E501 - sms_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ApplicationResultAllOf - 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,) - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - voice_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.. [optional] # noqa: E501 - voice_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.. [optional] # noqa: E501 - call_connect_url (str, none_type): The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not.. [optional] # noqa: E501 - status_callback_url (str, none_type): A URL to which FreeClimb will make a POST request when the Call ends to notify this app.. [optional] # noqa: E501 - sms_url (str, none_type): The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.. [optional] # noqa: E501 - sms_fallback_url (str, none_type): The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.. [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: - 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/freeclimb/model/available_number.py b/freeclimb/model/available_number.py deleted file mode 100644 index a5dfa82..0000000 --- a/freeclimb/model/available_number.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.capabilities import Capabilities - globals()['Capabilities'] = Capabilities - - -class AvailableNumber(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 { - 'capabilities': (Capabilities,), # noqa: E501 - 'campaign_id': (str, none_type,), # noqa: E501 - 'phone_number': (str, none_type,), # noqa: E501 - 'voice_enabled': (bool, none_type,), # noqa: E501 - 'sms_enabled': (bool, none_type,), # noqa: E501 - 'region': (str, none_type,), # noqa: E501 - 'country': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'capabilities': 'capabilities', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - 'phone_number': 'phoneNumber', # noqa: E501 - 'voice_enabled': 'voiceEnabled', # noqa: E501 - 'sms_enabled': 'smsEnabled', # noqa: E501 - 'region': 'region', # noqa: E501 - 'country': 'country', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AvailableNumber - 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,) - capabilities (Capabilities): [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [optional] # noqa: E501 - phone_number (str, none_type): The phone number, in E.164 format (+ country code and phone number: +18003608245).. [optional] # noqa: E501 - voice_enabled (bool, none_type): Typically set to true for all numbers.. [optional] # noqa: E501 - sms_enabled (bool, none_type): Indicates whether the phone number can send and receive SMS messages.. [optional] # noqa: E501 - region (str, none_type): The state or province of this phone number.. [optional] # noqa: E501 - country (str, none_type): The country of this phone number.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """AvailableNumber - 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,) - capabilities (Capabilities): [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [optional] # noqa: E501 - phone_number (str, none_type): The phone number, in E.164 format (+ country code and phone number: +18003608245).. [optional] # noqa: E501 - voice_enabled (bool, none_type): Typically set to true for all numbers.. [optional] # noqa: E501 - sms_enabled (bool, none_type): Indicates whether the phone number can send and receive SMS messages.. [optional] # noqa: E501 - region (str, none_type): The state or province of this phone number.. [optional] # noqa: E501 - country (str, none_type): The country of this phone number.. [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: - 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/freeclimb/model/available_number_list.py b/freeclimb/model/available_number_list.py deleted file mode 100644 index a37d730..0000000 --- a/freeclimb/model/available_number_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.available_number import AvailableNumber - from freeclimb.model.available_number_list_all_of import AvailableNumberListAllOf - from freeclimb.model.pagination_model import PaginationModel - globals()['AvailableNumber'] = AvailableNumber - globals()['AvailableNumberListAllOf'] = AvailableNumberListAllOf - globals()['PaginationModel'] = PaginationModel - -class AvailableNumberList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'available_phone_numbers': ([AvailableNumber], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'available_phone_numbers': 'availablePhoneNumbers', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AvailableNumberList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - available_phone_numbers ([AvailableNumber], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """AvailableNumberList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - available_phone_numbers ([AvailableNumber], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - AvailableNumberListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/available_number_list_all_of.py b/freeclimb/model/available_number_list_all_of.py deleted file mode 100644 index baa96ab..0000000 --- a/freeclimb/model/available_number_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.available_number import AvailableNumber - globals()['AvailableNumber'] = AvailableNumber - - -class AvailableNumberListAllOf(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 { - 'available_phone_numbers': ([AvailableNumber], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'available_phone_numbers': 'availablePhoneNumbers', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AvailableNumberListAllOf - 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,) - available_phone_numbers ([AvailableNumber], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """AvailableNumberListAllOf - 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,) - available_phone_numbers ([AvailableNumber], none_type): [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: - 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/freeclimb/model/buy_incoming_number_request.py b/freeclimb/model/buy_incoming_number_request.py deleted file mode 100644 index 17ad08d..0000000 --- a/freeclimb/model/buy_incoming_number_request.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class BuyIncomingNumberRequest(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 { - 'phone_number': (str,), # noqa: E501 - 'alias': (str,), # noqa: E501 - 'application_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'phone_number': 'phoneNumber', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, phone_number, *args, **kwargs): # noqa: E501 - """BuyIncomingNumberRequest - a model defined in OpenAPI - - Args: - phone_number (str): Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). - - 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,) - alias (str): Description for this new incoming phone number (max 64 characters).. [optional] # noqa: E501 - application_id (str): ID of the application that should handle phone calls to the number.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.phone_number = phone_number - 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, phone_number, *args, **kwargs): # noqa: E501 - """BuyIncomingNumberRequest - a model defined in OpenAPI - - Args: - phone_number (str): Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). - - 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,) - alias (str): Description for this new incoming phone number (max 64 characters).. [optional] # noqa: E501 - application_id (str): ID of the application that should handle phone calls to the number.. [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: - 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.phone_number = phone_number - 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/freeclimb/model/call_list.py b/freeclimb/model/call_list.py deleted file mode 100644 index bacc5ab..0000000 --- a/freeclimb/model/call_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.call_list_all_of import CallListAllOf - from freeclimb.model.call_result import CallResult - from freeclimb.model.pagination_model import PaginationModel - globals()['CallListAllOf'] = CallListAllOf - globals()['CallResult'] = CallResult - globals()['PaginationModel'] = PaginationModel - -class CallList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'calls': ([CallResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'calls': 'calls', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CallList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - calls ([CallResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CallList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - calls ([CallResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - CallListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/call_list_all_of.py b/freeclimb/model/call_list_all_of.py deleted file mode 100644 index e60eb3c..0000000 --- a/freeclimb/model/call_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.call_result import CallResult - globals()['CallResult'] = CallResult - - -class CallListAllOf(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 { - 'calls': ([CallResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'calls': 'calls', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CallListAllOf - 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,) - calls ([CallResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """CallListAllOf - 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,) - calls ([CallResult], none_type): [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: - 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/freeclimb/model/call_result.py b/freeclimb/model/call_result.py deleted file mode 100644 index 2a37937..0000000 --- a/freeclimb/model/call_result.py +++ /dev/null @@ -1,397 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.answered_by import AnsweredBy - from freeclimb.model.call_direction import CallDirection - from freeclimb.model.call_result_all_of import CallResultAllOf - from freeclimb.model.call_status import CallStatus - from freeclimb.model.mutable_resource_model import MutableResourceModel - globals()['AnsweredBy'] = AnsweredBy - globals()['CallDirection'] = CallDirection - globals()['CallResultAllOf'] = CallResultAllOf - globals()['CallStatus'] = CallStatus - globals()['MutableResourceModel'] = MutableResourceModel - -class CallResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'parent_call_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - '_from': (str, none_type,), # noqa: E501 - 'to': (str, none_type,), # noqa: E501 - 'phone_number_id': (str, none_type,), # noqa: E501 - 'call_status': (CallStatus,), # noqa: E501 - 'start_time': (str, none_type,), # noqa: E501 - 'connect_time': (str, none_type,), # noqa: E501 - 'end_time': (str, none_type,), # noqa: E501 - 'duration': (int, none_type,), # noqa: E501 - 'connect_duration': (int, none_type,), # noqa: E501 - 'direction': (CallDirection,), # noqa: E501 - 'answered_by': (AnsweredBy,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'application_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'parent_call_id': 'parentCallId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'phone_number_id': 'phoneNumberId', # noqa: E501 - 'call_status': 'callStatus', # noqa: E501 - 'start_time': 'startTime', # noqa: E501 - 'connect_time': 'connectTime', # noqa: E501 - 'end_time': 'endTime', # noqa: E501 - 'duration': 'duration', # noqa: E501 - 'connect_duration': 'connectDuration', # noqa: E501 - 'direction': 'direction', # noqa: E501 - 'answered_by': 'answeredBy', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CallResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - call_id (str, none_type): String that uniquely identifies this Call resource.. [optional] # noqa: E501 - parent_call_id (str, none_type): ID of the Call that created this leg (child Call).. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this Call.. [optional] # noqa: E501 - _from (str, none_type): Phone number that initiated this Call.. [optional] # noqa: E501 - to (str, none_type): Phone number that received this Call.. [optional] # noqa: E501 - phone_number_id (str, none_type): If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).. [optional] # noqa: E501 - call_status (CallStatus): [optional] # noqa: E501 - start_time (str, none_type): Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - connect_time (str, none_type): Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - end_time (str, none_type): End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully.. [optional] # noqa: E501 - duration (int, none_type): Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - connect_duration (int, none_type): Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - direction (CallDirection): [optional] # noqa: E501 - answered_by (AnsweredBy): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Call. These include things like logs and recordings associated with the Call.. [optional] # noqa: E501 - application_id (str, none_type): ApplicationId associated with the Call.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CallResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - call_id (str, none_type): String that uniquely identifies this Call resource.. [optional] # noqa: E501 - parent_call_id (str, none_type): ID of the Call that created this leg (child Call).. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this Call.. [optional] # noqa: E501 - _from (str, none_type): Phone number that initiated this Call.. [optional] # noqa: E501 - to (str, none_type): Phone number that received this Call.. [optional] # noqa: E501 - phone_number_id (str, none_type): If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).. [optional] # noqa: E501 - call_status (CallStatus): [optional] # noqa: E501 - start_time (str, none_type): Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - connect_time (str, none_type): Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - end_time (str, none_type): End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully.. [optional] # noqa: E501 - duration (int, none_type): Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - connect_duration (int, none_type): Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - direction (CallDirection): [optional] # noqa: E501 - answered_by (AnsweredBy): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Call. These include things like logs and recordings associated with the Call.. [optional] # noqa: E501 - application_id (str, none_type): ApplicationId associated with the Call.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - CallResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/call_result_all_of.py b/freeclimb/model/call_result_all_of.py deleted file mode 100644 index d8cd084..0000000 --- a/freeclimb/model/call_result_all_of.py +++ /dev/null @@ -1,329 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.answered_by import AnsweredBy - from freeclimb.model.call_direction import CallDirection - from freeclimb.model.call_status import CallStatus - globals()['AnsweredBy'] = AnsweredBy - globals()['CallDirection'] = CallDirection - globals()['CallStatus'] = CallStatus - - -class CallResultAllOf(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 { - 'call_id': (str, none_type,), # noqa: E501 - 'parent_call_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - '_from': (str, none_type,), # noqa: E501 - 'to': (str, none_type,), # noqa: E501 - 'phone_number_id': (str, none_type,), # noqa: E501 - 'call_status': (CallStatus,), # noqa: E501 - 'start_time': (str, none_type,), # noqa: E501 - 'connect_time': (str, none_type,), # noqa: E501 - 'end_time': (str, none_type,), # noqa: E501 - 'duration': (int, none_type,), # noqa: E501 - 'connect_duration': (int, none_type,), # noqa: E501 - 'direction': (CallDirection,), # noqa: E501 - 'answered_by': (AnsweredBy,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'application_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'call_id': 'callId', # noqa: E501 - 'parent_call_id': 'parentCallId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'phone_number_id': 'phoneNumberId', # noqa: E501 - 'call_status': 'callStatus', # noqa: E501 - 'start_time': 'startTime', # noqa: E501 - 'connect_time': 'connectTime', # noqa: E501 - 'end_time': 'endTime', # noqa: E501 - 'duration': 'duration', # noqa: E501 - 'connect_duration': 'connectDuration', # noqa: E501 - 'direction': 'direction', # noqa: E501 - 'answered_by': 'answeredBy', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CallResultAllOf - 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,) - call_id (str, none_type): String that uniquely identifies this Call resource.. [optional] # noqa: E501 - parent_call_id (str, none_type): ID of the Call that created this leg (child Call).. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this Call.. [optional] # noqa: E501 - _from (str, none_type): Phone number that initiated this Call.. [optional] # noqa: E501 - to (str, none_type): Phone number that received this Call.. [optional] # noqa: E501 - phone_number_id (str, none_type): If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).. [optional] # noqa: E501 - call_status (CallStatus): [optional] # noqa: E501 - start_time (str, none_type): Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - connect_time (str, none_type): Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - end_time (str, none_type): End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully.. [optional] # noqa: E501 - duration (int, none_type): Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - connect_duration (int, none_type): Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - direction (CallDirection): [optional] # noqa: E501 - answered_by (AnsweredBy): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Call. These include things like logs and recordings associated with the Call.. [optional] # noqa: E501 - application_id (str, none_type): ApplicationId associated with the Call.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """CallResultAllOf - 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,) - call_id (str, none_type): String that uniquely identifies this Call resource.. [optional] # noqa: E501 - parent_call_id (str, none_type): ID of the Call that created this leg (child Call).. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this Call.. [optional] # noqa: E501 - _from (str, none_type): Phone number that initiated this Call.. [optional] # noqa: E501 - to (str, none_type): Phone number that received this Call.. [optional] # noqa: E501 - phone_number_id (str, none_type): If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).. [optional] # noqa: E501 - call_status (CallStatus): [optional] # noqa: E501 - start_time (str, none_type): Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - connect_time (str, none_type): Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.. [optional] # noqa: E501 - end_time (str, none_type): End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully.. [optional] # noqa: E501 - duration (int, none_type): Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - connect_duration (int, none_type): Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. [optional] # noqa: E501 - direction (CallDirection): [optional] # noqa: E501 - answered_by (AnsweredBy): [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Call. These include things like logs and recordings associated with the Call.. [optional] # noqa: E501 - application_id (str, none_type): ApplicationId associated with the Call.. [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: - 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/freeclimb/model/call_status.py b/freeclimb/model/call_status.py deleted file mode 100644 index e12ef52..0000000 --- a/freeclimb/model/call_status.py +++ /dev/null @@ -1,47 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -from enum import Enum - -# class syntax -class CallStatus(str, Enum): - QUEUED= "queued", - RINGING= "ringing", - IN_PROGRESS= "inProgress", - CANCELED= "canceled", - COMPLETED= "completed", - FAILED= "failed", - BUSY= "busy", - NO_ANSWER= "noAnswer", - - diff --git a/freeclimb/model/capabilities.py b/freeclimb/model/capabilities.py deleted file mode 100644 index 62c6f5b..0000000 --- a/freeclimb/model/capabilities.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class Capabilities(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 { - 'voice': (bool, none_type,), # noqa: E501 - 'sms': (bool, none_type,), # noqa: E501 - 'toll_free': (bool, none_type,), # noqa: E501 - 'ten_dlc': (bool, none_type,), # noqa: E501 - 'short_code': (bool, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'voice': 'voice', # noqa: E501 - 'sms': 'sms', # noqa: E501 - 'toll_free': 'tollFree', # noqa: E501 - 'ten_dlc': 'tenDLC', # noqa: E501 - 'short_code': 'shortCode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, voice, sms, toll_free, ten_dlc, short_code, *args, **kwargs): # noqa: E501 - """Capabilities - a model defined in OpenAPI - - Args: - voice (bool, none_type): Indicates whether a number can be used for voice calls. Replaces voiceEnabled. - sms (bool, none_type): Indicates whether a number can be used SMS messaging. Replaces smsEnabled. - toll_free (bool, none_type): Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages. - ten_dlc (bool, none_type): Indicates that a number, if sms is true, will be used for 10DLC messaging - short_code (bool, none_type): Indicates that a number is a short code and can be used for short code messaging - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.voice = voice - self.sms = sms - self.toll_free = toll_free - self.ten_dlc = ten_dlc - self.short_code = short_code - 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, voice, sms, toll_free, ten_dlc, short_code, *args, **kwargs): # noqa: E501 - """Capabilities - a model defined in OpenAPI - - Args: - voice (bool, none_type): Indicates whether a number can be used for voice calls. Replaces voiceEnabled. - sms (bool, none_type): Indicates whether a number can be used SMS messaging. Replaces smsEnabled. - toll_free (bool, none_type): Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages. - ten_dlc (bool, none_type): Indicates that a number, if sms is true, will be used for 10DLC messaging - short_code (bool, none_type): Indicates that a number is a short code and can be used for short code messaging - - 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,) - """ - - _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: - 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.voice = voice - self.sms = sms - self.toll_free = toll_free - self.ten_dlc = ten_dlc - self.short_code = short_code - 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/freeclimb/model/completion_request.py b/freeclimb/model/completion_request.py deleted file mode 100644 index 1a5196d..0000000 --- a/freeclimb/model/completion_request.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class CompletionRequest(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 = { - ('query',): { - 'max_length': 2000, - }, - } - - @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 { - 'query': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'query': 'query', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, query, *args, **kwargs): # noqa: E501 - """CompletionRequest - a model defined in OpenAPI - - Args: - query (str): Question to ask the Knowledge Base - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.query = query - 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, query, *args, **kwargs): # noqa: E501 - """CompletionRequest - a model defined in OpenAPI - - Args: - query (str): Question to ask the Knowledge Base - - 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,) - """ - - _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: - 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.query = query - 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/freeclimb/model/completion_result.py b/freeclimb/model/completion_result.py deleted file mode 100644 index cbc7d14..0000000 --- a/freeclimb/model/completion_result.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class CompletionResult(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 = { - ('status',): { - 'SUCCESS': "success", - 'NO_CONTEXT': "no_context", - }, - } - - 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 { - 'response': (str,), # noqa: E501 - 'status': (str, str,), - 'status': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'response': 'response', # noqa: E501 - 'status': 'status', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, response, status, *args, **kwargs): # noqa: E501 - """CompletionResult - a model defined in OpenAPI - - Args: - response (str): The generative response from the KnowledgeBase - status (str): Completion result status. Possible values: success, no_context - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.response = response - self.status = status - 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, response, status, *args, **kwargs): # noqa: E501 - """CompletionResult - a model defined in OpenAPI - - Args: - response (str): The generative response from the KnowledgeBase - status (str): Completion result status. Possible values: success, no_context - - 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,) - """ - - _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: - 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.response = response - self.status = status - 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/freeclimb/model/conference_list.py b/freeclimb/model/conference_list.py deleted file mode 100644 index 3d5c0e6..0000000 --- a/freeclimb/model/conference_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_list_all_of import ConferenceListAllOf - from freeclimb.model.conference_result import ConferenceResult - from freeclimb.model.pagination_model import PaginationModel - globals()['ConferenceListAllOf'] = ConferenceListAllOf - globals()['ConferenceResult'] = ConferenceResult - globals()['PaginationModel'] = PaginationModel - -class ConferenceList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'conferences': ([ConferenceResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'conferences': 'conferences', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - conferences ([ConferenceResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConferenceList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - conferences ([ConferenceResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ConferenceListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/conference_list_all_of.py b/freeclimb/model/conference_list_all_of.py deleted file mode 100644 index 1e52b0d..0000000 --- a/freeclimb/model/conference_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_result import ConferenceResult - globals()['ConferenceResult'] = ConferenceResult - - -class ConferenceListAllOf(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 { - 'conferences': ([ConferenceResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'conferences': 'conferences', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceListAllOf - 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,) - conferences ([ConferenceResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ConferenceListAllOf - 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,) - conferences ([ConferenceResult], none_type): [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: - 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/freeclimb/model/conference_participant_list.py b/freeclimb/model/conference_participant_list.py deleted file mode 100644 index 18edd9e..0000000 --- a/freeclimb/model/conference_participant_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_participant_list_all_of import ConferenceParticipantListAllOf - from freeclimb.model.conference_participant_result import ConferenceParticipantResult - from freeclimb.model.pagination_model import PaginationModel - globals()['ConferenceParticipantListAllOf'] = ConferenceParticipantListAllOf - globals()['ConferenceParticipantResult'] = ConferenceParticipantResult - globals()['PaginationModel'] = PaginationModel - -class ConferenceParticipantList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'participants': ([ConferenceParticipantResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'participants': 'participants', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceParticipantList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - participants ([ConferenceParticipantResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConferenceParticipantList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - participants ([ConferenceParticipantResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ConferenceParticipantListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/conference_participant_list_all_of.py b/freeclimb/model/conference_participant_list_all_of.py deleted file mode 100644 index 9d2e06b..0000000 --- a/freeclimb/model/conference_participant_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_participant_result import ConferenceParticipantResult - globals()['ConferenceParticipantResult'] = ConferenceParticipantResult - - -class ConferenceParticipantListAllOf(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 { - 'participants': ([ConferenceParticipantResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - '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 - """ConferenceParticipantListAllOf - 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,) - participants ([ConferenceParticipantResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ConferenceParticipantListAllOf - 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,) - participants ([ConferenceParticipantResult], none_type): [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: - 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/freeclimb/model/conference_participant_result.py b/freeclimb/model/conference_participant_result.py deleted file mode 100644 index 0e6885e..0000000 --- a/freeclimb/model/conference_participant_result.py +++ /dev/null @@ -1,355 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_participant_result_all_of import ConferenceParticipantResultAllOf - from freeclimb.model.mutable_resource_model import MutableResourceModel - globals()['ConferenceParticipantResultAllOf'] = ConferenceParticipantResultAllOf - globals()['MutableResourceModel'] = MutableResourceModel - -class ConferenceParticipantResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'conference_id': (str, none_type,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'talk': (bool, none_type,), # noqa: E501 - 'listen': (bool, none_type,), # noqa: E501 - 'dtmf_pass_through': (bool, none_type,), # noqa: E501 - 'start_conf_on_enter': (bool, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'conference_id': 'conferenceId', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'talk': 'talk', # noqa: E501 - 'listen': 'listen', # noqa: E501 - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - 'start_conf_on_enter': 'startConfOnEnter', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceParticipantResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this participant.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the conference this participant is in.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with this Participant.. [optional] # noqa: E501 - talk (bool, none_type): True if this Participant has talk privileges in the Conference. False otherwise.. [optional] # noqa: E501 - listen (bool, none_type): True if this Participant has listen privileges in the Conference. False otherwise.. [optional] # noqa: E501 - dtmf_pass_through (bool, none_type): True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.. [optional] # noqa: E501 - start_conf_on_enter (bool, none_type): True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConferenceParticipantResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this participant.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the conference this participant is in.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with this Participant.. [optional] # noqa: E501 - talk (bool, none_type): True if this Participant has talk privileges in the Conference. False otherwise.. [optional] # noqa: E501 - listen (bool, none_type): True if this Participant has listen privileges in the Conference. False otherwise.. [optional] # noqa: E501 - dtmf_pass_through (bool, none_type): True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.. [optional] # noqa: E501 - start_conf_on_enter (bool, none_type): True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ConferenceParticipantResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/conference_participant_result_all_of.py b/freeclimb/model/conference_participant_result_all_of.py deleted file mode 100644 index 8c70a9a..0000000 --- a/freeclimb/model/conference_participant_result_all_of.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class ConferenceParticipantResultAllOf(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 { - 'account_id': (str, none_type,), # noqa: E501 - 'conference_id': (str, none_type,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'talk': (bool, none_type,), # noqa: E501 - 'listen': (bool, none_type,), # noqa: E501 - 'dtmf_pass_through': (bool, none_type,), # noqa: E501 - 'start_conf_on_enter': (bool, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'conference_id': 'conferenceId', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'talk': 'talk', # noqa: E501 - 'listen': 'listen', # noqa: E501 - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - 'start_conf_on_enter': 'startConfOnEnter', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceParticipantResultAllOf - 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,) - account_id (str, none_type): ID of the account that created this participant.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the conference this participant is in.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with this Participant.. [optional] # noqa: E501 - talk (bool, none_type): True if this Participant has talk privileges in the Conference. False otherwise.. [optional] # noqa: E501 - listen (bool, none_type): True if this Participant has listen privileges in the Conference. False otherwise.. [optional] # noqa: E501 - dtmf_pass_through (bool, none_type): True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.. [optional] # noqa: E501 - start_conf_on_enter (bool, none_type): True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ConferenceParticipantResultAllOf - 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,) - account_id (str, none_type): ID of the account that created this participant.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the conference this participant is in.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with this Participant.. [optional] # noqa: E501 - talk (bool, none_type): True if this Participant has talk privileges in the Conference. False otherwise.. [optional] # noqa: E501 - listen (bool, none_type): True if this Participant has listen privileges in the Conference. False otherwise.. [optional] # noqa: E501 - dtmf_pass_through (bool, none_type): True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.. [optional] # noqa: E501 - start_conf_on_enter (bool, none_type): True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.. [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: - 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/freeclimb/model/conference_result.py b/freeclimb/model/conference_result.py deleted file mode 100644 index 8f8dd46..0000000 --- a/freeclimb/model/conference_result.py +++ /dev/null @@ -1,371 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_result_all_of import ConferenceResultAllOf - from freeclimb.model.conference_status import ConferenceStatus - from freeclimb.model.mutable_resource_model import MutableResourceModel - from freeclimb.model.play_beep import PlayBeep - globals()['ConferenceResultAllOf'] = ConferenceResultAllOf - globals()['ConferenceStatus'] = ConferenceStatus - globals()['MutableResourceModel'] = MutableResourceModel - globals()['PlayBeep'] = PlayBeep - -class ConferenceResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'conference_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'play_beep': (PlayBeep,), # noqa: E501 - 'record': (bool, none_type,), # noqa: E501 - 'status': (ConferenceStatus,), # noqa: E501 - 'wait_url': (str, none_type,), # noqa: E501 - 'action_url': (str, none_type,), # noqa: E501 - 'status_callback_url': (str, none_type,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'conference_id': 'conferenceId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'status': 'status', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - 'action_url': 'actionUrl', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - conference_id (str, none_type): A string that uniquely identifies this Conference resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this Conference.. [optional] # noqa: E501 - alias (str, none_type): A description for this Conference.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool, none_type): Flag indicating whether recording is enabled for this Conference.. [optional] # noqa: E501 - status (ConferenceStatus): [optional] # noqa: E501 - wait_url (str, none_type): URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.. [optional] # noqa: E501 - action_url (str, none_type): URL invoked once the Conference is successfully created.. [optional] # noqa: E501 - status_callback_url (str, none_type): URL to inform that the Conference status has changed.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Conference. This includes participants and/or recordings.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """ConferenceResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - conference_id (str, none_type): A string that uniquely identifies this Conference resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this Conference.. [optional] # noqa: E501 - alias (str, none_type): A description for this Conference.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool, none_type): Flag indicating whether recording is enabled for this Conference.. [optional] # noqa: E501 - status (ConferenceStatus): [optional] # noqa: E501 - wait_url (str, none_type): URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.. [optional] # noqa: E501 - action_url (str, none_type): URL invoked once the Conference is successfully created.. [optional] # noqa: E501 - status_callback_url (str, none_type): URL to inform that the Conference status has changed.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Conference. This includes participants and/or recordings.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ConferenceResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/conference_result_all_of.py b/freeclimb/model/conference_result_all_of.py deleted file mode 100644 index 6694670..0000000 --- a/freeclimb/model/conference_result_all_of.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.conference_status import ConferenceStatus - from freeclimb.model.play_beep import PlayBeep - globals()['ConferenceStatus'] = ConferenceStatus - globals()['PlayBeep'] = PlayBeep - - -class ConferenceResultAllOf(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 { - 'conference_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'play_beep': (PlayBeep,), # noqa: E501 - 'record': (bool, none_type,), # noqa: E501 - 'status': (ConferenceStatus,), # noqa: E501 - 'wait_url': (str, none_type,), # noqa: E501 - 'action_url': (str, none_type,), # noqa: E501 - 'status_callback_url': (str, none_type,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'conference_id': 'conferenceId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'status': 'status', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - 'action_url': 'actionUrl', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConferenceResultAllOf - 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,) - conference_id (str, none_type): A string that uniquely identifies this Conference resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this Conference.. [optional] # noqa: E501 - alias (str, none_type): A description for this Conference.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool, none_type): Flag indicating whether recording is enabled for this Conference.. [optional] # noqa: E501 - status (ConferenceStatus): [optional] # noqa: E501 - wait_url (str, none_type): URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.. [optional] # noqa: E501 - action_url (str, none_type): URL invoked once the Conference is successfully created.. [optional] # noqa: E501 - status_callback_url (str, none_type): URL to inform that the Conference status has changed.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Conference. This includes participants and/or recordings.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """ConferenceResultAllOf - 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,) - conference_id (str, none_type): A string that uniquely identifies this Conference resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this Conference.. [optional] # noqa: E501 - alias (str, none_type): A description for this Conference.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool, none_type): Flag indicating whether recording is enabled for this Conference.. [optional] # noqa: E501 - status (ConferenceStatus): [optional] # noqa: E501 - wait_url (str, none_type): URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.. [optional] # noqa: E501 - action_url (str, none_type): URL invoked once the Conference is successfully created.. [optional] # noqa: E501 - status_callback_url (str, none_type): URL to inform that the Conference status has changed.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): The list of subresources for this Conference. This includes participants and/or recordings.. [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: - 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/freeclimb/model/create_conference.py b/freeclimb/model/create_conference.py deleted file mode 100644 index db9d7cc..0000000 --- a/freeclimb/model/create_conference.py +++ /dev/null @@ -1,401 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.create_conference_all_of import CreateConferenceAllOf - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_beep import PlayBeep - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['CreateConferenceAllOf'] = CreateConferenceAllOf - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayBeep'] = PlayBeep - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class CreateConference(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'alias': (bool,), # noqa: E501 - 'play_beep': (PlayBeep,), # noqa: E501 - 'record': (bool,), # noqa: E501 - 'status_callback_url': (str,), # noqa: E501 - 'wait_url': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateConference - a model defined in OpenAPI - - Keyword Args: - action_url (str): This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. - _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,) - alias (bool): Descriptive name for the Conference. . [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool): When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state.. [optional] # noqa: E501 - status_callback_url (str): This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.. [optional] # noqa: E501 - wait_url (str): If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """CreateConference - a model defined in OpenAPI - - Keyword Args: - action_url (str): This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. - _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,) - alias (bool): Descriptive name for the Conference. . [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool): When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state.. [optional] # noqa: E501 - status_callback_url (str): This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.. [optional] # noqa: E501 - wait_url (str): If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == CreateConference), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(CreateConference.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - CreateConferenceAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/create_conference_all_of.py b/freeclimb/model/create_conference_all_of.py deleted file mode 100644 index 8818dcc..0000000 --- a/freeclimb/model/create_conference_all_of.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.play_beep import PlayBeep - globals()['PlayBeep'] = PlayBeep - - -class CreateConferenceAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'alias': (bool,), # noqa: E501 - 'play_beep': (PlayBeep,), # noqa: E501 - 'record': (bool,), # noqa: E501 - 'status_callback_url': (str,), # noqa: E501 - 'wait_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, *args, **kwargs): # noqa: E501 - """CreateConferenceAllOf - a model defined in OpenAPI - - Args: - action_url (str): This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. - - 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,) - alias (bool): Descriptive name for the Conference. . [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool): When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state.. [optional] # noqa: E501 - status_callback_url (str): This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.. [optional] # noqa: E501 - wait_url (str): If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - 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, action_url, *args, **kwargs): # noqa: E501 - """CreateConferenceAllOf - a model defined in OpenAPI - - Args: - action_url (str): This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. - - 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,) - alias (bool): Descriptive name for the Conference. . [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool): When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state.. [optional] # noqa: E501 - status_callback_url (str): This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.. [optional] # noqa: E501 - wait_url (str): If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.. [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: - 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.action_url = action_url - 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/freeclimb/model/create_conference_request.py b/freeclimb/model/create_conference_request.py deleted file mode 100644 index c283ab8..0000000 --- a/freeclimb/model/create_conference_request.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.play_beep import PlayBeep - globals()['PlayBeep'] = PlayBeep - - -class CreateConferenceRequest(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 { - 'alias': (str,), # noqa: E501 - 'play_beep': (PlayBeep,), # noqa: E501 - 'record': (bool,), # noqa: E501 - 'wait_url': (str,), # noqa: E501 - 'status_callback_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alias': 'alias', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """CreateConferenceRequest - 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,) - alias (str): A description for this Conference. Maximum 64 characters.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool): Setting to `true` records the entire Conference.. [optional] # noqa: E501 - wait_url (str): If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once — when the Conference is created.. [optional] # noqa: E501 - status_callback_url (str): This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below).. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """CreateConferenceRequest - 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,) - alias (str): A description for this Conference. Maximum 64 characters.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - record (bool): Setting to `true` records the entire Conference.. [optional] # noqa: E501 - wait_url (str): If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once — when the Conference is created.. [optional] # noqa: E501 - status_callback_url (str): This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below).. [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: - 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/freeclimb/model/create_web_rtc_token.py b/freeclimb/model/create_web_rtc_token.py deleted file mode 100644 index 6cc9bb1..0000000 --- a/freeclimb/model/create_web_rtc_token.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class CreateWebRTCToken(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 = { - ('uses',): { - 'inclusive_minimum': 1, - }, - } - - 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 { - 'to': (str,), # noqa: E501 - '_from': (str,), # noqa: E501 - 'uses': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'to': 'to', # noqa: E501 - '_from': 'from', # noqa: E501 - 'uses': 'uses', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, to, _from, uses, *args, **kwargs): # noqa: E501 - """CreateWebRTCToken - a model defined in OpenAPI - - Args: - to (str): E.164 formatted phone number to which calls using this token will be made. - _from (str): E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. - uses (int): number of times this token may be used for a WebRTC call - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.to = to - self._from = _from - self.uses = uses - 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, to, _from, uses, *args, **kwargs): # noqa: E501 - """CreateWebRTCToken - a model defined in OpenAPI - - Args: - to (str): E.164 formatted phone number to which calls using this token will be made. - _from (str): E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. - uses (int): number of times this token may be used for a WebRTC call - - 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,) - """ - - _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: - 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.to = to - self._from = _from - self.uses = uses - 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/freeclimb/model/dequeue.py b/freeclimb/model/dequeue.py deleted file mode 100644 index 151508a..0000000 --- a/freeclimb/model/dequeue.py +++ /dev/null @@ -1,372 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Dequeue(ModelComposed): - """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 { - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Dequeue - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Dequeue - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Dequeue), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Dequeue.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/enqueue.py b/freeclimb/model/enqueue.py deleted file mode 100644 index 15f6c08..0000000 --- a/freeclimb/model/enqueue.py +++ /dev/null @@ -1,391 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.enqueue_all_of import EnqueueAllOf - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['EnqueueAllOf'] = EnqueueAllOf - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Enqueue(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'queue_id': (str,), # noqa: E501 - 'wait_url': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'queue_id': 'queueId', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Enqueue - a model defined in OpenAPI - - Keyword Args: - action_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - queue_id (str): ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters. - wait_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - _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,) - notification_url (str): URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Enqueue - a model defined in OpenAPI - - Keyword Args: - action_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - queue_id (str): ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters. - wait_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - _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,) - notification_url (str): URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Enqueue), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Enqueue.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - EnqueueAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/enqueue_all_of.py b/freeclimb/model/enqueue_all_of.py deleted file mode 100644 index d9d5c9b..0000000 --- a/freeclimb/model/enqueue_all_of.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class EnqueueAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'queue_id': (str,), # noqa: E501 - 'wait_url': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'queue_id': 'queueId', # noqa: E501 - 'wait_url': 'waitUrl', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, queue_id, wait_url, *args, **kwargs): # noqa: E501 - """EnqueueAllOf - a model defined in OpenAPI - - Args: - action_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - queue_id (str): ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters. - wait_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - - 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,) - notification_url (str): URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - self.queue_id = queue_id - self.wait_url = wait_url - 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, action_url, queue_id, wait_url, *args, **kwargs): # noqa: E501 - """EnqueueAllOf - a model defined in OpenAPI - - Args: - action_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - queue_id (str): ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters. - wait_url (str): A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up. - - 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,) - notification_url (str): URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored.. [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: - 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.action_url = action_url - self.queue_id = queue_id - self.wait_url = wait_url - 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/freeclimb/model/filter_logs_request.py b/freeclimb/model/filter_logs_request.py deleted file mode 100644 index edc5c27..0000000 --- a/freeclimb/model/filter_logs_request.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class FilterLogsRequest(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 { - 'pql': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'pql': 'pql', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, pql, *args, **kwargs): # noqa: E501 - """FilterLogsRequest - a model defined in OpenAPI - - Args: - pql (str): The filter query for retrieving logs. See **Performance Query Language** below. - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.pql = pql - 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, pql, *args, **kwargs): # noqa: E501 - """FilterLogsRequest - a model defined in OpenAPI - - Args: - pql (str): The filter query for retrieving logs. See **Performance Query Language** below. - - 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,) - """ - - _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: - 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.pql = pql - 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/freeclimb/model/get_digits.py b/freeclimb/model/get_digits.py deleted file mode 100644 index 66d5e8b..0000000 --- a/freeclimb/model/get_digits.py +++ /dev/null @@ -1,411 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_digits_all_of import GetDigitsAllOf - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetDigitsAllOf'] = GetDigitsAllOf - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class GetDigits(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'digit_timeout_ms': (int,), # noqa: E501 - 'finish_on_key': (str,), # noqa: E501 - 'flush_buffer': (bool,), # noqa: E501 - 'initial_timeout_ms': (int,), # noqa: E501 - 'max_digits': (int,), # noqa: E501 - 'min_digits': (int,), # noqa: E501 - 'prompts': ([PerclCommand],), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'digit_timeout_ms': 'digitTimeoutMs', # noqa: E501 - 'finish_on_key': 'finishOnKey', # noqa: E501 - 'flush_buffer': 'flushBuffer', # noqa: E501 - 'initial_timeout_ms': 'initialTimeoutMs', # noqa: E501 - 'max_digits': 'maxDigits', # noqa: E501 - 'min_digits': 'minDigits', # noqa: E501 - 'prompts': 'prompts', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """GetDigits - a model defined in OpenAPI - - Keyword Args: - action_url (str): When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL. - _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,) - digit_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered.. [optional] # noqa: E501 - finish_on_key (str): Digit that causes the input sequence to be deemed complete. This attribute defers to the `timeout` attribute – so, if a `timeout` occurs, then the command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - flush_buffer (bool): If set to true, the FreeClimb platform starts with an empty DTMF buffer to store the digits entered by the caller. If set to false, FreeClimb will append the user inputs to the end of the existing digits buffer and will return digits from the start of the digits buffer.. [optional] # noqa: E501 - initial_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed.. [optional] # noqa: E501 - max_digits (int): Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - min_digits (int): Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits.. [optional] # noqa: E501 - prompts ([PerclCommand]): JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """GetDigits - a model defined in OpenAPI - - Keyword Args: - action_url (str): When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL. - _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,) - digit_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered.. [optional] # noqa: E501 - finish_on_key (str): Digit that causes the input sequence to be deemed complete. This attribute defers to the `timeout` attribute – so, if a `timeout` occurs, then the command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - flush_buffer (bool): If set to true, the FreeClimb platform starts with an empty DTMF buffer to store the digits entered by the caller. If set to false, FreeClimb will append the user inputs to the end of the existing digits buffer and will return digits from the start of the digits buffer.. [optional] # noqa: E501 - initial_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed.. [optional] # noqa: E501 - max_digits (int): Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - min_digits (int): Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits.. [optional] # noqa: E501 - prompts ([PerclCommand]): JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == GetDigits), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(GetDigits.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - GetDigitsAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/get_digits_all_of.py b/freeclimb/model/get_digits_all_of.py deleted file mode 100644 index d0829b0..0000000 --- a/freeclimb/model/get_digits_all_of.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.percl_command import PerclCommand - globals()['PerclCommand'] = PerclCommand - - -class GetDigitsAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'digit_timeout_ms': (int,), # noqa: E501 - 'finish_on_key': (str,), # noqa: E501 - 'flush_buffer': (bool,), # noqa: E501 - 'initial_timeout_ms': (int,), # noqa: E501 - 'max_digits': (int,), # noqa: E501 - 'min_digits': (int,), # noqa: E501 - 'prompts': ([PerclCommand],), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'digit_timeout_ms': 'digitTimeoutMs', # noqa: E501 - 'finish_on_key': 'finishOnKey', # noqa: E501 - 'flush_buffer': 'flushBuffer', # noqa: E501 - 'initial_timeout_ms': 'initialTimeoutMs', # noqa: E501 - 'max_digits': 'maxDigits', # noqa: E501 - 'min_digits': 'minDigits', # noqa: E501 - 'prompts': 'prompts', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, *args, **kwargs): # noqa: E501 - """GetDigitsAllOf - a model defined in OpenAPI - - Args: - action_url (str): When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL. - - 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,) - digit_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered.. [optional] # noqa: E501 - finish_on_key (str): Digit that causes the input sequence to be deemed complete. This attribute defers to the `timeout` attribute – so, if a `timeout` occurs, then the command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - flush_buffer (bool): If set to true, the FreeClimb platform starts with an empty DTMF buffer to store the digits entered by the caller. If set to false, FreeClimb will append the user inputs to the end of the existing digits buffer and will return digits from the start of the digits buffer.. [optional] # noqa: E501 - initial_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed.. [optional] # noqa: E501 - max_digits (int): Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - min_digits (int): Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits.. [optional] # noqa: E501 - prompts ([PerclCommand]): JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - 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, action_url, *args, **kwargs): # noqa: E501 - """GetDigitsAllOf - a model defined in OpenAPI - - Args: - action_url (str): When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL. - - 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,) - digit_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered.. [optional] # noqa: E501 - finish_on_key (str): Digit that causes the input sequence to be deemed complete. This attribute defers to the `timeout` attribute – so, if a `timeout` occurs, then the command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - flush_buffer (bool): If set to true, the FreeClimb platform starts with an empty DTMF buffer to store the digits entered by the caller. If set to false, FreeClimb will append the user inputs to the end of the existing digits buffer and will return digits from the start of the digits buffer.. [optional] # noqa: E501 - initial_timeout_ms (int): Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed.. [optional] # noqa: E501 - max_digits (int): Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`.. [optional] # noqa: E501 - min_digits (int): Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits.. [optional] # noqa: E501 - prompts ([PerclCommand]): JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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: - 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.action_url = action_url - 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/freeclimb/model/get_speech.py b/freeclimb/model/get_speech.py deleted file mode 100644 index 5873c13..0000000 --- a/freeclimb/model/get_speech.py +++ /dev/null @@ -1,429 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.get_speech_all_of import GetSpeechAllOf - from freeclimb.model.grammar_type import GrammarType - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['GetSpeechAllOf'] = GetSpeechAllOf - globals()['GrammarType'] = GrammarType - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class GetSpeech(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'grammar_file': (str,), # noqa: E501 - 'grammar_type': (GrammarType,), # noqa: E501 - 'grammar_rule': (str,), # noqa: E501 - 'play_beep': (bool,), # noqa: E501 - 'prompts': ([PerclCommand],), # noqa: E501 - 'no_input_timeout_ms': (int,), # noqa: E501 - 'recognition_timeout_ms': (int,), # noqa: E501 - 'confidence_threshold': (float,), # noqa: E501 - 'sensitivity_level': (float,), # noqa: E501 - 'speech_complete_timeout_ms': (int,), # noqa: E501 - 'speech_incomplete_timeout_ms': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'grammar_file': 'grammarFile', # noqa: E501 - 'grammar_type': 'grammarType', # noqa: E501 - 'grammar_rule': 'grammarRule', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'prompts': 'prompts', # noqa: E501 - 'no_input_timeout_ms': 'noInputTimeoutMs', # noqa: E501 - 'recognition_timeout_ms': 'recognitionTimeoutMs', # noqa: E501 - 'confidence_threshold': 'confidenceThreshold', # noqa: E501 - 'sensitivity_level': 'sensitivityLevel', # noqa: E501 - 'speech_complete_timeout_ms': 'speechCompleteTimeoutMs', # noqa: E501 - 'speech_incomplete_timeout_ms': 'speechIncompleteTimeoutMs', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """GetSpeech - a model defined in OpenAPI - - Keyword Args: - action_url (str): When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call. - grammar_file (str): The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - _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,) - grammar_type (GrammarType): [optional] # noqa: E501 - grammar_rule (str): The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`.. [optional] # noqa: E501 - play_beep (bool): Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.. [optional] # noqa: E501 - prompts ([PerclCommand]): The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech.. [optional] # noqa: E501 - no_input_timeout_ms (int): When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - recognition_timeout_ms (int): When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - confidence_threshold (float): When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0.. [optional] # noqa: E501 - sensitivity_level (float): The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 . [optional] # noqa: E501 - speech_complete_timeout_ms (int): Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.. [optional] # noqa: E501 - speech_incomplete_timeout_ms (int): Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance.. [optional] # noqa: E501 - privacy_mode (bool): Parameter privacyMode will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """GetSpeech - a model defined in OpenAPI - - Keyword Args: - action_url (str): When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call. - grammar_file (str): The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - _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,) - grammar_type (GrammarType): [optional] # noqa: E501 - grammar_rule (str): The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`.. [optional] # noqa: E501 - play_beep (bool): Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.. [optional] # noqa: E501 - prompts ([PerclCommand]): The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech.. [optional] # noqa: E501 - no_input_timeout_ms (int): When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - recognition_timeout_ms (int): When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - confidence_threshold (float): When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0.. [optional] # noqa: E501 - sensitivity_level (float): The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 . [optional] # noqa: E501 - speech_complete_timeout_ms (int): Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.. [optional] # noqa: E501 - speech_incomplete_timeout_ms (int): Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance.. [optional] # noqa: E501 - privacy_mode (bool): Parameter privacyMode will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == GetSpeech), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(GetSpeech.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - GetSpeechAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/get_speech_all_of.py b/freeclimb/model/get_speech_all_of.py deleted file mode 100644 index 0313f8e..0000000 --- a/freeclimb/model/get_speech_all_of.py +++ /dev/null @@ -1,323 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.grammar_type import GrammarType - from freeclimb.model.percl_command import PerclCommand - globals()['GrammarType'] = GrammarType - globals()['PerclCommand'] = PerclCommand - - -class GetSpeechAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'grammar_file': (str,), # noqa: E501 - 'grammar_type': (GrammarType,), # noqa: E501 - 'grammar_rule': (str,), # noqa: E501 - 'play_beep': (bool,), # noqa: E501 - 'prompts': ([PerclCommand],), # noqa: E501 - 'no_input_timeout_ms': (int,), # noqa: E501 - 'recognition_timeout_ms': (int,), # noqa: E501 - 'confidence_threshold': (float,), # noqa: E501 - 'sensitivity_level': (float,), # noqa: E501 - 'speech_complete_timeout_ms': (int,), # noqa: E501 - 'speech_incomplete_timeout_ms': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'grammar_file': 'grammarFile', # noqa: E501 - 'grammar_type': 'grammarType', # noqa: E501 - 'grammar_rule': 'grammarRule', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'prompts': 'prompts', # noqa: E501 - 'no_input_timeout_ms': 'noInputTimeoutMs', # noqa: E501 - 'recognition_timeout_ms': 'recognitionTimeoutMs', # noqa: E501 - 'confidence_threshold': 'confidenceThreshold', # noqa: E501 - 'sensitivity_level': 'sensitivityLevel', # noqa: E501 - 'speech_complete_timeout_ms': 'speechCompleteTimeoutMs', # noqa: E501 - 'speech_incomplete_timeout_ms': 'speechIncompleteTimeoutMs', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, grammar_file, *args, **kwargs): # noqa: E501 - """GetSpeechAllOf - a model defined in OpenAPI - - Args: - action_url (str): When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call. - grammar_file (str): The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - - 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,) - grammar_type (GrammarType): [optional] # noqa: E501 - grammar_rule (str): The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`.. [optional] # noqa: E501 - play_beep (bool): Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.. [optional] # noqa: E501 - prompts ([PerclCommand]): The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech.. [optional] # noqa: E501 - no_input_timeout_ms (int): When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - recognition_timeout_ms (int): When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - confidence_threshold (float): When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0.. [optional] # noqa: E501 - sensitivity_level (float): The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 . [optional] # noqa: E501 - speech_complete_timeout_ms (int): Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.. [optional] # noqa: E501 - speech_incomplete_timeout_ms (int): Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance.. [optional] # noqa: E501 - privacy_mode (bool): Parameter privacyMode will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - self.grammar_file = grammar_file - 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, action_url, grammar_file, *args, **kwargs): # noqa: E501 - """GetSpeechAllOf - a model defined in OpenAPI - - Args: - action_url (str): When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call. - grammar_file (str): The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - - 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,) - grammar_type (GrammarType): [optional] # noqa: E501 - grammar_rule (str): The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`.. [optional] # noqa: E501 - play_beep (bool): Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.. [optional] # noqa: E501 - prompts ([PerclCommand]): The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech.. [optional] # noqa: E501 - no_input_timeout_ms (int): When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - recognition_timeout_ms (int): When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. [optional] # noqa: E501 - confidence_threshold (float): When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0.. [optional] # noqa: E501 - sensitivity_level (float): The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 . [optional] # noqa: E501 - speech_complete_timeout_ms (int): Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.. [optional] # noqa: E501 - speech_incomplete_timeout_ms (int): Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance.. [optional] # noqa: E501 - privacy_mode (bool): Parameter privacyMode will not log the `text` as required by PCI compliance.. [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: - 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.action_url = action_url - self.grammar_file = grammar_file - 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/freeclimb/model/grammar_file_built_in.py b/freeclimb/model/grammar_file_built_in.py deleted file mode 100644 index 75f3a3b..0000000 --- a/freeclimb/model/grammar_file_built_in.py +++ /dev/null @@ -1,54 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -from enum import Enum - -# class syntax -class GrammarFileBuiltIn(str, Enum): - ALPHNUM6= "ALPHNUM6", - ANY_DIG= "ANY_DIG", - DIG1= "DIG1", - DIG2= "DIG2", - DIG3= "DIG3", - DIG4= "DIG4", - DIG5= "DIG5", - DIG6= "DIG6", - DIG7= "DIG7", - DIG8= "DIG8", - DIG9= "DIG9", - DIG10= "DIG10", - DIG11= "DIG11", - UP_TO_20_DIGIT_SEQUENCE= "UP_TO_20_DIGIT_SEQUENCE", - VERSAY_YESNO= "VERSAY_YESNO", - - diff --git a/freeclimb/model/hangup.py b/freeclimb/model/hangup.py deleted file mode 100644 index 8ff76d8..0000000 --- a/freeclimb/model/hangup.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.hangup_all_of import HangupAllOf - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['HangupAllOf'] = HangupAllOf - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Hangup(ModelComposed): - """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 { - 'reason': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'reason': 'reason', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Hangup - 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,) - reason (str): The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Hangup - 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,) - reason (str): The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Hangup), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Hangup.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - HangupAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/hangup_all_of.py b/freeclimb/model/hangup_all_of.py deleted file mode 100644 index 3e27636..0000000 --- a/freeclimb/model/hangup_all_of.py +++ /dev/null @@ -1,259 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class HangupAllOf(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 { - 'reason': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'reason': 'reason', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """HangupAllOf - 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,) - reason (str): The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """HangupAllOf - 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,) - reason (str): The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application.. [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: - 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/freeclimb/model/incoming_number_list.py b/freeclimb/model/incoming_number_list.py deleted file mode 100644 index c15fe6c..0000000 --- a/freeclimb/model/incoming_number_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.incoming_number_list_all_of import IncomingNumberListAllOf - from freeclimb.model.incoming_number_result import IncomingNumberResult - from freeclimb.model.pagination_model import PaginationModel - globals()['IncomingNumberListAllOf'] = IncomingNumberListAllOf - globals()['IncomingNumberResult'] = IncomingNumberResult - globals()['PaginationModel'] = PaginationModel - -class IncomingNumberList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'incoming_phone_numbers': ([IncomingNumberResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'incoming_phone_numbers': 'incomingPhoneNumbers', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IncomingNumberList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - incoming_phone_numbers ([IncomingNumberResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """IncomingNumberList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - incoming_phone_numbers ([IncomingNumberResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - IncomingNumberListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/incoming_number_list_all_of.py b/freeclimb/model/incoming_number_list_all_of.py deleted file mode 100644 index 19b4e69..0000000 --- a/freeclimb/model/incoming_number_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.incoming_number_result import IncomingNumberResult - globals()['IncomingNumberResult'] = IncomingNumberResult - - -class IncomingNumberListAllOf(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 { - 'incoming_phone_numbers': ([IncomingNumberResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'incoming_phone_numbers': 'incomingPhoneNumbers', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IncomingNumberListAllOf - 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,) - incoming_phone_numbers ([IncomingNumberResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """IncomingNumberListAllOf - 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,) - incoming_phone_numbers ([IncomingNumberResult], none_type): [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: - 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/freeclimb/model/incoming_number_request.py b/freeclimb/model/incoming_number_request.py deleted file mode 100644 index 3956944..0000000 --- a/freeclimb/model/incoming_number_request.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class IncomingNumberRequest(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 { - 'application_id': (str,), # noqa: E501 - 'alias': (str,), # noqa: E501 - 'campaign_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'application_id': 'applicationId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IncomingNumberRequest - 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,) - application_id (str): ID of the Application that should handle calls to this number.. [optional] # noqa: E501 - alias (str): Description for this phone number.. [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """IncomingNumberRequest - 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,) - application_id (str): ID of the Application that should handle calls to this number.. [optional] # noqa: E501 - alias (str): Description for this phone number.. [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [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: - 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/freeclimb/model/incoming_number_result.py b/freeclimb/model/incoming_number_result.py deleted file mode 100644 index 2f7e90f..0000000 --- a/freeclimb/model/incoming_number_result.py +++ /dev/null @@ -1,383 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.capabilities import Capabilities - from freeclimb.model.incoming_number_result_all_of import IncomingNumberResultAllOf - from freeclimb.model.mutable_resource_model import MutableResourceModel - from freeclimb.model.tfn import TFN - globals()['Capabilities'] = Capabilities - globals()['IncomingNumberResultAllOf'] = IncomingNumberResultAllOf - globals()['MutableResourceModel'] = MutableResourceModel - globals()['TFN'] = TFN - -class IncomingNumberResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'capabilities': (Capabilities,), # noqa: E501 - 'campaign_id': (str, none_type,), # noqa: E501 - 'phone_number_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'application_id': (str, none_type,), # noqa: E501 - 'phone_number': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'region': (str, none_type,), # noqa: E501 - 'country': (str, none_type,), # noqa: E501 - 'voice_enabled': (bool, none_type,), # noqa: E501 - 'sms_enabled': (bool, none_type,), # noqa: E501 - 'offnet': (bool, none_type,), # noqa: E501 - 'tfn': (TFN,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'capabilities': 'capabilities', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - 'phone_number_id': 'phoneNumberId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - 'phone_number': 'phoneNumber', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'region': 'region', # noqa: E501 - 'country': 'country', # noqa: E501 - 'voice_enabled': 'voiceEnabled', # noqa: E501 - 'sms_enabled': 'smsEnabled', # noqa: E501 - 'offnet': 'offnet', # noqa: E501 - 'tfn': 'tfn', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IncomingNumberResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - capabilities (Capabilities): [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [optional] # noqa: E501 - phone_number_id (str, none_type): String that uniquely identifies this phone number resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - phone_number (str, none_type): Phone number in E.164 format.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - region (str, none_type): State or province of this phone number.. [optional] # noqa: E501 - country (str, none_type): Country of this phone number.. [optional] # noqa: E501 - voice_enabled (bool, none_type): Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. [optional] # noqa: E501 - sms_enabled (bool, none_type): Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. [optional] # noqa: E501 - offnet (bool, none_type): The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource.. [optional] # noqa: E501 - tfn (TFN): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """IncomingNumberResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - capabilities (Capabilities): [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [optional] # noqa: E501 - phone_number_id (str, none_type): String that uniquely identifies this phone number resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - phone_number (str, none_type): Phone number in E.164 format.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - region (str, none_type): State or province of this phone number.. [optional] # noqa: E501 - country (str, none_type): Country of this phone number.. [optional] # noqa: E501 - voice_enabled (bool, none_type): Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. [optional] # noqa: E501 - sms_enabled (bool, none_type): Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. [optional] # noqa: E501 - offnet (bool, none_type): The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource.. [optional] # noqa: E501 - tfn (TFN): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - IncomingNumberResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/incoming_number_result_all_of.py b/freeclimb/model/incoming_number_result_all_of.py deleted file mode 100644 index d79fbb6..0000000 --- a/freeclimb/model/incoming_number_result_all_of.py +++ /dev/null @@ -1,315 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.capabilities import Capabilities - from freeclimb.model.tfn import TFN - globals()['Capabilities'] = Capabilities - globals()['TFN'] = TFN - - -class IncomingNumberResultAllOf(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 { - 'capabilities': (Capabilities,), # noqa: E501 - 'campaign_id': (str, none_type,), # noqa: E501 - 'phone_number_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'application_id': (str, none_type,), # noqa: E501 - 'phone_number': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'region': (str, none_type,), # noqa: E501 - 'country': (str, none_type,), # noqa: E501 - 'voice_enabled': (bool, none_type,), # noqa: E501 - 'sms_enabled': (bool, none_type,), # noqa: E501 - 'offnet': (bool, none_type,), # noqa: E501 - 'tfn': (TFN,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'capabilities': 'capabilities', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - 'phone_number_id': 'phoneNumberId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - 'phone_number': 'phoneNumber', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'region': 'region', # noqa: E501 - 'country': 'country', # noqa: E501 - 'voice_enabled': 'voiceEnabled', # noqa: E501 - 'sms_enabled': 'smsEnabled', # noqa: E501 - 'offnet': 'offnet', # noqa: E501 - 'tfn': 'tfn', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """IncomingNumberResultAllOf - 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,) - capabilities (Capabilities): [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [optional] # noqa: E501 - phone_number_id (str, none_type): String that uniquely identifies this phone number resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - phone_number (str, none_type): Phone number in E.164 format.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - region (str, none_type): State or province of this phone number.. [optional] # noqa: E501 - country (str, none_type): Country of this phone number.. [optional] # noqa: E501 - voice_enabled (bool, none_type): Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. [optional] # noqa: E501 - sms_enabled (bool, none_type): Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. [optional] # noqa: E501 - offnet (bool, none_type): The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource.. [optional] # noqa: E501 - tfn (TFN): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """IncomingNumberResultAllOf - 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,) - capabilities (Capabilities): [optional] # noqa: E501 - campaign_id (str, none_type): The campaign ID generated by the campaign registry. [optional] # noqa: E501 - phone_number_id (str, none_type): String that uniquely identifies this phone number resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that owns this phone number.. [optional] # noqa: E501 - application_id (str, none_type): ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.. [optional] # noqa: E501 - phone_number (str, none_type): Phone number in E.164 format.. [optional] # noqa: E501 - alias (str, none_type): Description for this phone number. Typically the conventionally-formatted version of the phone number.. [optional] # noqa: E501 - region (str, none_type): State or province of this phone number.. [optional] # noqa: E501 - country (str, none_type): Country of this phone number.. [optional] # noqa: E501 - voice_enabled (bool, none_type): Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. [optional] # noqa: E501 - sms_enabled (bool, none_type): Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. [optional] # noqa: E501 - offnet (bool, none_type): The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource.. [optional] # noqa: E501 - tfn (TFN): [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: - 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/freeclimb/model/language.py b/freeclimb/model/language.py deleted file mode 100644 index 1755bbc..0000000 --- a/freeclimb/model/language.py +++ /dev/null @@ -1,65 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -from enum import Enum - -# class syntax -class Language(str, Enum): - CATALAN= "ca-ES", - DANISH= "da-DK", - GERMAN= "de-DE", - ENGLISH_AU= "en-AU", - ENGLISH_CA= "en-CA", - ENGLISH_UK= "en-GB", - ENGLISH_IN= "en-IN", - ENGLISH_US= "en-US", - ENGLISH_ES= "es-ES", - ENGLISH_MX= "es-MX", - FINNISH= "fi-FI", - FRENCH_CA= "fr-CA", - FRENCH_FR= "fr-FR", - ITALIAN= "it-IT", - JAPANESE= "ja-JP", - KOREAN= "ko-KR", - NORWEGIAN= "nb-NO", - DUTCH= "nl-NL", - POLISH= "pl-PL", - PORTUGESE_BR= "pt-BR", - PORTUGESE_PT= "pt-PT", - RUSSIAN= "ru-RU", - SWEDISH= "sv-SE", - CHINESE_CN= "zh-CN", - CHINESE_HK= "zh-HK", - CHINESE_TW= "zh-TW", - - diff --git a/freeclimb/model/log_list.py b/freeclimb/model/log_list.py deleted file mode 100644 index c1ebac5..0000000 --- a/freeclimb/model/log_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.log_list_all_of import LogListAllOf - from freeclimb.model.log_result import LogResult - from freeclimb.model.pagination_model import PaginationModel - globals()['LogListAllOf'] = LogListAllOf - globals()['LogResult'] = LogResult - globals()['PaginationModel'] = PaginationModel - -class LogList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'logs': ([LogResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'logs': 'logs', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LogList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - logs ([LogResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """LogList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - logs ([LogResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - LogListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/log_list_all_of.py b/freeclimb/model/log_list_all_of.py deleted file mode 100644 index 41729a1..0000000 --- a/freeclimb/model/log_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.log_result import LogResult - globals()['LogResult'] = LogResult - - -class LogListAllOf(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 { - 'logs': ([LogResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'logs': 'logs', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LogListAllOf - 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,) - logs ([LogResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """LogListAllOf - 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,) - logs ([LogResult], none_type): [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: - 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/freeclimb/model/log_result.py b/freeclimb/model/log_result.py deleted file mode 100644 index 3423a12..0000000 --- a/freeclimb/model/log_result.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.log_level import LogLevel - globals()['LogLevel'] = LogLevel - - -class LogResult(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 { - 'timestamp': (int, none_type,), # noqa: E501 - 'level': (LogLevel,), # noqa: E501 - 'request_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'message': (str, none_type,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'timestamp': 'timestamp', # noqa: E501 - 'level': 'level', # noqa: E501 - 'request_id': 'requestId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'message': 'message', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LogResult - 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,) - timestamp (int, none_type): Time that the log was generated. The time is represented as microseconds since the Unix Epoch.. [optional] # noqa: E501 - level (LogLevel): [optional] # noqa: E501 - request_id (str, none_type): ID of the request associated with the log. The requestId is propagated across all logs generated by FreeClimb when processing a request.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that this log was generated under.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with the log. Can be set to null if the log was generated without regard to a specific Call.. [optional] # noqa: E501 - message (str, none_type): A simple string describing the event being logged.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): JSON document containing metadata about the event. Some log messages may include request and response header content in this field.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """LogResult - 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,) - timestamp (int, none_type): Time that the log was generated. The time is represented as microseconds since the Unix Epoch.. [optional] # noqa: E501 - level (LogLevel): [optional] # noqa: E501 - request_id (str, none_type): ID of the request associated with the log. The requestId is propagated across all logs generated by FreeClimb when processing a request.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that this log was generated under.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with the log. Can be set to null if the log was generated without regard to a specific Call.. [optional] # noqa: E501 - message (str, none_type): A simple string describing the event being logged.. [optional] # noqa: E501 - metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): JSON document containing metadata about the event. Some log messages may include request and response header content in this field.. [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: - 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/freeclimb/model/make_call_request.py b/freeclimb/model/make_call_request.py deleted file mode 100644 index b8828fa..0000000 --- a/freeclimb/model/make_call_request.py +++ /dev/null @@ -1,303 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class MakeCallRequest(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 { - '_from': (str,), # noqa: E501 - 'to': (str,), # noqa: E501 - 'application_id': (str,), # noqa: E501 - 'send_digits': (str,), # noqa: E501 - 'if_machine': (str,), # noqa: E501 - 'if_machine_url': (str,), # noqa: E501 - 'timeout': (int,), # noqa: E501 - 'parent_call_id': (str,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'call_connect_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'application_id': 'applicationId', # noqa: E501 - 'send_digits': 'sendDigits', # noqa: E501 - 'if_machine': 'ifMachine', # noqa: E501 - 'if_machine_url': 'ifMachineUrl', # noqa: E501 - 'timeout': 'timeout', # noqa: E501 - 'parent_call_id': 'parentCallId', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'call_connect_url': 'callConnectUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, _from, to, *args, **kwargs): # noqa: E501 - """MakeCallRequest - a model defined in OpenAPI - - Args: - _from (str): Phone number to use as the caller ID. This can be: (a) The To or From number provided in FreeClimb's initial request to your app or (b) Any incoming phone number you have purchased from FreeClimb. - to (str): Phone number to place the Call 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,) - application_id (str): Required if no `parentCallId` or `callConnectUrl` has been provided. ID of the application FreeClimb should use to handle this phone call. FreeClimb will use the `callConnectUrl` and `statusCallbackUrl` set on the application unless the `callConnectUrl` attribute is also provided with the request. In this case, the URL specified in that `callConnectUrl` attribute will be used as a replacement of the `callConnectUrl` originally assigned in the application. If the `callConnectUrl` is not set as either an attribute of the request or as part of the specified application, an error will be provided. The application’s voiceUrl parameter is not used for outbound calls.. [optional] # noqa: E501 - send_digits (str): String of digits to dial after connecting to the number. It can include digits `0-9`, `*`, and `#`, and allows embedding a pause between the output of individual digits. The default pause is 500 milliseconds. So, a string such as *1234#* will be played in 2 seconds because of the 4 standard pauses implied within the string. A custom pause is specified by including a positive integer wrapped in curly braces: {n}. For more information, see **sendDigits examples** below.. [optional] # noqa: E501 - if_machine (str): Specifies how FreeClimb should handle this Call if an answering machine answers it.. [optional] # noqa: E501 - if_machine_url (str): This attribute specifies a URL to which FreeClimb will make a POST request when an answering machine or a fax machine is detected. This URL is required if the ifMachine flag is set to redirect. When ifMachine is set to hangup, ifMachineUrl must not be included in the request. For more information, see **ifMachineUrl example** below.. [optional] # noqa: E501 - timeout (int): Number of seconds that FreeClimb should allow the phone to ring before assuming there is no answer. Default is 30 seconds. Maximum allowed ring-time is determined by the target phone's provider. Note that most providers limit ring-time to 120 seconds.. [optional] if omitted the server will use the default value of 30 # noqa: E501 - parent_call_id (str): Required if no `applicationId` or `callConnectUrl` has been provided. The ID of the parent Call in the case that this new Call is meant to be treated as a child of an existing Call. This attribute should be included when possible to reduce latency when adding child calls to Conferences containing the parent Call. A call can only be used as a parent once the call is in progress or as an inbound call that is still ringing. An outbound call is considered to be in progress once the `outdialConnect` or `outdialApiConnect` webhook is invoked. An inbound call is ringing when the inbound webhook is invoked. If a `callConnectUrl` attribute is also included with the `parentCallId` in the request, this URL will be used as a replacement of the `callConnectUrl` originally assigned in the parent call.. [optional] # noqa: E501 - privacy_mode (bool): Activate privacy mode in order to obscure log data that can potentially expose private information.. [optional] # noqa: E501 - call_connect_url (str): The URL that FreeClimb should use to handle this phone call. If an applicationId or parentCallId have already been provided, this callConnectUrl attribute will be used as a replacement of the callConnectUrl originally assigned in the application or parent call.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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._from = _from - self.to = to - 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, _from, to, *args, **kwargs): # noqa: E501 - """MakeCallRequest - a model defined in OpenAPI - - Args: - _from (str): Phone number to use as the caller ID. This can be: (a) The To or From number provided in FreeClimb's initial request to your app or (b) Any incoming phone number you have purchased from FreeClimb. - to (str): Phone number to place the Call 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,) - application_id (str): Required if no `parentCallId` or `callConnectUrl` has been provided. ID of the application FreeClimb should use to handle this phone call. FreeClimb will use the `callConnectUrl` and `statusCallbackUrl` set on the application unless the `callConnectUrl` attribute is also provided with the request. In this case, the URL specified in that `callConnectUrl` attribute will be used as a replacement of the `callConnectUrl` originally assigned in the application. If the `callConnectUrl` is not set as either an attribute of the request or as part of the specified application, an error will be provided. The application’s voiceUrl parameter is not used for outbound calls.. [optional] # noqa: E501 - send_digits (str): String of digits to dial after connecting to the number. It can include digits `0-9`, `*`, and `#`, and allows embedding a pause between the output of individual digits. The default pause is 500 milliseconds. So, a string such as *1234#* will be played in 2 seconds because of the 4 standard pauses implied within the string. A custom pause is specified by including a positive integer wrapped in curly braces: {n}. For more information, see **sendDigits examples** below.. [optional] # noqa: E501 - if_machine (str): Specifies how FreeClimb should handle this Call if an answering machine answers it.. [optional] # noqa: E501 - if_machine_url (str): This attribute specifies a URL to which FreeClimb will make a POST request when an answering machine or a fax machine is detected. This URL is required if the ifMachine flag is set to redirect. When ifMachine is set to hangup, ifMachineUrl must not be included in the request. For more information, see **ifMachineUrl example** below.. [optional] # noqa: E501 - timeout (int): Number of seconds that FreeClimb should allow the phone to ring before assuming there is no answer. Default is 30 seconds. Maximum allowed ring-time is determined by the target phone's provider. Note that most providers limit ring-time to 120 seconds.. [optional] if omitted the server will use the default value of 30 # noqa: E501 - parent_call_id (str): Required if no `applicationId` or `callConnectUrl` has been provided. The ID of the parent Call in the case that this new Call is meant to be treated as a child of an existing Call. This attribute should be included when possible to reduce latency when adding child calls to Conferences containing the parent Call. A call can only be used as a parent once the call is in progress or as an inbound call that is still ringing. An outbound call is considered to be in progress once the `outdialConnect` or `outdialApiConnect` webhook is invoked. An inbound call is ringing when the inbound webhook is invoked. If a `callConnectUrl` attribute is also included with the `parentCallId` in the request, this URL will be used as a replacement of the `callConnectUrl` originally assigned in the parent call.. [optional] # noqa: E501 - privacy_mode (bool): Activate privacy mode in order to obscure log data that can potentially expose private information.. [optional] # noqa: E501 - call_connect_url (str): The URL that FreeClimb should use to handle this phone call. If an applicationId or parentCallId have already been provided, this callConnectUrl attribute will be used as a replacement of the callConnectUrl originally assigned in the application or parent call.. [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: - 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._from = _from - self.to = to - 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/freeclimb/model/message_request.py b/freeclimb/model/message_request.py deleted file mode 100644 index 2335af8..0000000 --- a/freeclimb/model/message_request.py +++ /dev/null @@ -1,347 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.message_request_all_of import MessageRequestAllOf - from freeclimb.model.mutable_resource_model import MutableResourceModel - globals()['MessageRequestAllOf'] = MessageRequestAllOf - globals()['MutableResourceModel'] = MutableResourceModel - -class MessageRequest(ModelComposed): - """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 { - '_from': (str,), # noqa: E501 - 'to': (str,), # noqa: E501 - 'text': (str,), # noqa: E501 - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'media_urls': ([str], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'text': 'text', # noqa: E501 - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'media_urls': 'mediaUrls', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MessageRequest - a model defined in OpenAPI - - Keyword Args: - _from (str): Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - to (str): Phone number to receive the message. Must be within FreeClimb's service area. - text (str): Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - _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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - notification_url (str): When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored.. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """MessageRequest - a model defined in OpenAPI - - Keyword Args: - _from (str): Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - to (str): Phone number to receive the message. Must be within FreeClimb's service area. - text (str): Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - _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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - notification_url (str): When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored.. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - MessageRequestAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/message_request_all_of.py b/freeclimb/model/message_request_all_of.py deleted file mode 100644 index dec48ad..0000000 --- a/freeclimb/model/message_request_all_of.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class MessageRequestAllOf(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 { - '_from': (str,), # noqa: E501 - 'to': (str,), # noqa: E501 - 'text': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'media_urls': ([str], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'text': 'text', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'media_urls': 'mediaUrls', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, _from, to, text, *args, **kwargs): # noqa: E501 - """MessageRequestAllOf - a model defined in OpenAPI - - Args: - _from (str): Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - to (str): Phone number to receive the message. Must be within FreeClimb's service area. - text (str): Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - - 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,) - notification_url (str): When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored.. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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._from = _from - self.to = to - self.text = text - 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, _from, to, text, *args, **kwargs): # noqa: E501 - """MessageRequestAllOf - a model defined in OpenAPI - - Args: - _from (str): Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - to (str): Phone number to receive the message. Must be within FreeClimb's service area. - text (str): Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - - 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,) - notification_url (str): When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored.. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile.. [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: - 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._from = _from - self.to = to - self.text = text - 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/freeclimb/model/message_result.py b/freeclimb/model/message_result.py deleted file mode 100644 index 2c5fcc7..0000000 --- a/freeclimb/model/message_result.py +++ /dev/null @@ -1,377 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.message_result_all_of import MessageResultAllOf - from freeclimb.model.message_status import MessageStatus - from freeclimb.model.mutable_resource_model import MutableResourceModel - globals()['MessageResultAllOf'] = MessageResultAllOf - globals()['MessageStatus'] = MessageStatus - globals()['MutableResourceModel'] = MutableResourceModel - -class MessageResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'message_id': (str, none_type,), # noqa: E501 - 'status': (MessageStatus,), # noqa: E501 - '_from': (str, none_type,), # noqa: E501 - 'to': (str, none_type,), # noqa: E501 - 'text': (str, none_type,), # noqa: E501 - 'direction': (str, none_type,), # noqa: E501 - 'notification_url': (str, none_type,), # noqa: E501 - 'brand_id': (str, none_type,), # noqa: E501 - 'campaign_id': (str, none_type,), # noqa: E501 - 'segment_count': (float, none_type,), # noqa: E501 - 'media_urls': ([str], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'message_id': 'messageId', # noqa: E501 - 'status': 'status', # noqa: E501 - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'text': 'text', # noqa: E501 - 'direction': 'direction', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'brand_id': 'brandId', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - 'segment_count': 'segmentCount', # noqa: E501 - 'media_urls': 'mediaUrls', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MessageResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - message_id (str, none_type): String that uniquely identifies this message resource. [optional] # noqa: E501 - status (MessageStatus): [optional] # noqa: E501 - _from (str, none_type): Phone number in E.164 format that sent the message.. [optional] # noqa: E501 - to (str, none_type): Phone number in E.164 format that received the message.. [optional] # noqa: E501 - text (str, none_type): Message contents. [optional] # noqa: E501 - direction (str, none_type): Noting whether the message was inbound or outbound. [optional] # noqa: E501 - notification_url (str, none_type): URL invoked when message sent. [optional] # noqa: E501 - brand_id (str, none_type): The unique identifier for the brand associated with the message. [optional] # noqa: E501 - campaign_id (str, none_type): The unique identifier for the campaign associated with the message. [optional] # noqa: E501 - segment_count (float, none_type): The number of segments into which the message was split. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which were attached this this message. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """MessageResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - message_id (str, none_type): String that uniquely identifies this message resource. [optional] # noqa: E501 - status (MessageStatus): [optional] # noqa: E501 - _from (str, none_type): Phone number in E.164 format that sent the message.. [optional] # noqa: E501 - to (str, none_type): Phone number in E.164 format that received the message.. [optional] # noqa: E501 - text (str, none_type): Message contents. [optional] # noqa: E501 - direction (str, none_type): Noting whether the message was inbound or outbound. [optional] # noqa: E501 - notification_url (str, none_type): URL invoked when message sent. [optional] # noqa: E501 - brand_id (str, none_type): The unique identifier for the brand associated with the message. [optional] # noqa: E501 - campaign_id (str, none_type): The unique identifier for the campaign associated with the message. [optional] # noqa: E501 - segment_count (float, none_type): The number of segments into which the message was split. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which were attached this this message. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - MessageResultAllOf, - MutableResourceModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/message_result_all_of.py b/freeclimb/model/message_result_all_of.py deleted file mode 100644 index d3802ad..0000000 --- a/freeclimb/model/message_result_all_of.py +++ /dev/null @@ -1,309 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.message_status import MessageStatus - globals()['MessageStatus'] = MessageStatus - - -class MessageResultAllOf(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 { - 'account_id': (str, none_type,), # noqa: E501 - 'message_id': (str, none_type,), # noqa: E501 - 'status': (MessageStatus,), # noqa: E501 - '_from': (str, none_type,), # noqa: E501 - 'to': (str, none_type,), # noqa: E501 - 'text': (str, none_type,), # noqa: E501 - 'direction': (str, none_type,), # noqa: E501 - 'notification_url': (str, none_type,), # noqa: E501 - 'brand_id': (str, none_type,), # noqa: E501 - 'campaign_id': (str, none_type,), # noqa: E501 - 'segment_count': (float, none_type,), # noqa: E501 - 'media_urls': ([str], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'message_id': 'messageId', # noqa: E501 - 'status': 'status', # noqa: E501 - '_from': 'from', # noqa: E501 - 'to': 'to', # noqa: E501 - 'text': 'text', # noqa: E501 - 'direction': 'direction', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'brand_id': 'brandId', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - 'segment_count': 'segmentCount', # noqa: E501 - 'media_urls': 'mediaUrls', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MessageResultAllOf - 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,) - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - message_id (str, none_type): String that uniquely identifies this message resource. [optional] # noqa: E501 - status (MessageStatus): [optional] # noqa: E501 - _from (str, none_type): Phone number in E.164 format that sent the message.. [optional] # noqa: E501 - to (str, none_type): Phone number in E.164 format that received the message.. [optional] # noqa: E501 - text (str, none_type): Message contents. [optional] # noqa: E501 - direction (str, none_type): Noting whether the message was inbound or outbound. [optional] # noqa: E501 - notification_url (str, none_type): URL invoked when message sent. [optional] # noqa: E501 - brand_id (str, none_type): The unique identifier for the brand associated with the message. [optional] # noqa: E501 - campaign_id (str, none_type): The unique identifier for the campaign associated with the message. [optional] # noqa: E501 - segment_count (float, none_type): The number of segments into which the message was split. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which were attached this this message. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """MessageResultAllOf - 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,) - account_id (str, none_type): String that uniquely identifies this account resource.. [optional] # noqa: E501 - message_id (str, none_type): String that uniquely identifies this message resource. [optional] # noqa: E501 - status (MessageStatus): [optional] # noqa: E501 - _from (str, none_type): Phone number in E.164 format that sent the message.. [optional] # noqa: E501 - to (str, none_type): Phone number in E.164 format that received the message.. [optional] # noqa: E501 - text (str, none_type): Message contents. [optional] # noqa: E501 - direction (str, none_type): Noting whether the message was inbound or outbound. [optional] # noqa: E501 - notification_url (str, none_type): URL invoked when message sent. [optional] # noqa: E501 - brand_id (str, none_type): The unique identifier for the brand associated with the message. [optional] # noqa: E501 - campaign_id (str, none_type): The unique identifier for the campaign associated with the message. [optional] # noqa: E501 - segment_count (float, none_type): The number of segments into which the message was split. [optional] # noqa: E501 - media_urls ([str], none_type): an array of HTTP URLs which were attached this this message. [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: - 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/freeclimb/model/message_status.py b/freeclimb/model/message_status.py deleted file mode 100644 index ea3af97..0000000 --- a/freeclimb/model/message_status.py +++ /dev/null @@ -1,50 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -from enum import Enum - -# class syntax -class MessageStatus(str, Enum): - NEW= "new", - QUEUED= "queued", - REJECTED= "rejected", - SENDING= "sending", - SENT= "sent", - FAILED= "failed", - RECEIVED= "received", - UNDELIVERED= "undelivered", - EXPIRED= "expired", - DELETED= "deleted", - UNKNOWN= "unknown", - - diff --git a/freeclimb/model/messages_list.py b/freeclimb/model/messages_list.py deleted file mode 100644 index 085fc22..0000000 --- a/freeclimb/model/messages_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.message_result import MessageResult - from freeclimb.model.messages_list_all_of import MessagesListAllOf - from freeclimb.model.pagination_model import PaginationModel - globals()['MessageResult'] = MessageResult - globals()['MessagesListAllOf'] = MessagesListAllOf - globals()['PaginationModel'] = PaginationModel - -class MessagesList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'messages': ([MessageResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'messages': 'messages', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MessagesList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - messages ([MessageResult], none_type): Array of messages. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """MessagesList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - messages ([MessageResult], none_type): Array of messages. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - MessagesListAllOf, - PaginationModel, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/messages_list_all_of.py b/freeclimb/model/messages_list_all_of.py deleted file mode 100644 index 26c82f9..0000000 --- a/freeclimb/model/messages_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.message_result import MessageResult - globals()['MessageResult'] = MessageResult - - -class MessagesListAllOf(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 { - 'messages': ([MessageResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'messages': 'messages', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MessagesListAllOf - 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,) - messages ([MessageResult], none_type): Array of messages. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """MessagesListAllOf - 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,) - messages ([MessageResult], none_type): Array of messages. [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: - 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/freeclimb/model/mutable_resource_model.py b/freeclimb/model/mutable_resource_model.py deleted file mode 100644 index b428e5e..0000000 --- a/freeclimb/model/mutable_resource_model.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class MutableResourceModel(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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """MutableResourceModel - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """MutableResourceModel - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [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: - 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/freeclimb/model/out_dial.py b/freeclimb/model/out_dial.py deleted file mode 100644 index 58b1590..0000000 --- a/freeclimb/model/out_dial.py +++ /dev/null @@ -1,417 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.if_machine import IfMachine - from freeclimb.model.out_dial import OutDial - from freeclimb.model.out_dial_all_of import OutDialAllOf - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['IfMachine'] = IfMachine - globals()['OutDial'] = OutDial - globals()['OutDialAllOf'] = OutDialAllOf - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class OutDial(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'call_connect_url': (str,), # noqa: E501 - 'calling_number': (str,), # noqa: E501 - 'destination': (str,), # noqa: E501 - 'if_machine': (IfMachine,), # noqa: E501 - 'if_machine_url': (str,), # noqa: E501 - 'send_digits': (str,), # noqa: E501 - 'status_callback_url': (str,), # noqa: E501 - 'timeout': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'call_connect_url': 'callConnectUrl', # noqa: E501 - 'calling_number': 'callingNumber', # noqa: E501 - 'destination': 'destination', # noqa: E501 - 'if_machine': 'ifMachine', # noqa: E501 - 'if_machine_url': 'ifMachineUrl', # noqa: E501 - 'send_digits': 'sendDigits', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'timeout': 'timeout', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OutDial - a model defined in OpenAPI - - Keyword Args: - action_url (str): URL to which FreeClimb sends an HTTP POST request. - call_connect_url (str): URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - calling_number (str): he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb. - destination (str): E.164 representation of the phone number to Call. - _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,) - if_machine (IfMachine): [optional] # noqa: E501 - if_machine_url (str): When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included.. [optional] # noqa: E501 - send_digits (str): DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension.. [optional] # noqa: E501 - status_callback_url (str): When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored.. [optional] # noqa: E501 - timeout (int): Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """OutDial - a model defined in OpenAPI - - Keyword Args: - action_url (str): URL to which FreeClimb sends an HTTP POST request. - call_connect_url (str): URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - calling_number (str): he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb. - destination (str): E.164 representation of the phone number to Call. - _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,) - if_machine (IfMachine): [optional] # noqa: E501 - if_machine_url (str): When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included.. [optional] # noqa: E501 - send_digits (str): DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension.. [optional] # noqa: E501 - status_callback_url (str): When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored.. [optional] # noqa: E501 - timeout (int): Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == OutDial), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(OutDial.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - OutDialAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/out_dial_all_of.py b/freeclimb/model/out_dial_all_of.py deleted file mode 100644 index 07d1a7f..0000000 --- a/freeclimb/model/out_dial_all_of.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.if_machine import IfMachine - globals()['IfMachine'] = IfMachine - - -class OutDialAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'call_connect_url': (str,), # noqa: E501 - 'calling_number': (str,), # noqa: E501 - 'destination': (str,), # noqa: E501 - 'if_machine': (IfMachine,), # noqa: E501 - 'if_machine_url': (str,), # noqa: E501 - 'send_digits': (str,), # noqa: E501 - 'status_callback_url': (str,), # noqa: E501 - 'timeout': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'call_connect_url': 'callConnectUrl', # noqa: E501 - 'calling_number': 'callingNumber', # noqa: E501 - 'destination': 'destination', # noqa: E501 - 'if_machine': 'ifMachine', # noqa: E501 - 'if_machine_url': 'ifMachineUrl', # noqa: E501 - 'send_digits': 'sendDigits', # noqa: E501 - 'status_callback_url': 'statusCallbackUrl', # noqa: E501 - 'timeout': 'timeout', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, call_connect_url, calling_number, destination, *args, **kwargs): # noqa: E501 - """OutDialAllOf - a model defined in OpenAPI - - Args: - action_url (str): URL to which FreeClimb sends an HTTP POST request. - call_connect_url (str): URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - calling_number (str): he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb. - destination (str): E.164 representation of the phone number to Call. - - 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,) - if_machine (IfMachine): [optional] # noqa: E501 - if_machine_url (str): When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included.. [optional] # noqa: E501 - send_digits (str): DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension.. [optional] # noqa: E501 - status_callback_url (str): When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored.. [optional] # noqa: E501 - timeout (int): Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - self.call_connect_url = call_connect_url - self.calling_number = calling_number - self.destination = destination - 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, action_url, call_connect_url, calling_number, destination, *args, **kwargs): # noqa: E501 - """OutDialAllOf - a model defined in OpenAPI - - Args: - action_url (str): URL to which FreeClimb sends an HTTP POST request. - call_connect_url (str): URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - calling_number (str): he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb. - destination (str): E.164 representation of the phone number to Call. - - 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,) - if_machine (IfMachine): [optional] # noqa: E501 - if_machine_url (str): When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included.. [optional] # noqa: E501 - send_digits (str): DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension.. [optional] # noqa: E501 - status_callback_url (str): When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored.. [optional] # noqa: E501 - timeout (int): Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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: - 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.action_url = action_url - self.call_connect_url = call_connect_url - self.calling_number = calling_number - self.destination = destination - 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/freeclimb/model/pagination_model.py b/freeclimb/model/pagination_model.py deleted file mode 100644 index 455fbab..0000000 --- a/freeclimb/model/pagination_model.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class PaginationModel(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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaginationModel - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """PaginationModel - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [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: - 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/freeclimb/model/park.py b/freeclimb/model/park.py deleted file mode 100644 index 67a48a8..0000000 --- a/freeclimb/model/park.py +++ /dev/null @@ -1,387 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.park_all_of import ParkAllOf - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['ParkAllOf'] = ParkAllOf - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Park(ModelComposed): - """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 { - 'wait_url': (str,), # noqa: E501 - 'action_url': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'wait_url': 'waitUrl', # noqa: E501 - 'action_url': 'actionUrl', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Park - a model defined in OpenAPI - - Keyword Args: - wait_url (str): Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. - action_url (str): A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call. - _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,) - notification_url (str): URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Park - a model defined in OpenAPI - - Keyword Args: - wait_url (str): Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. - action_url (str): A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call. - _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,) - notification_url (str): URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Park), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Park.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ParkAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/park_all_of.py b/freeclimb/model/park_all_of.py deleted file mode 100644 index ebb266c..0000000 --- a/freeclimb/model/park_all_of.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class ParkAllOf(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 { - 'wait_url': (str,), # noqa: E501 - 'action_url': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'wait_url': 'waitUrl', # noqa: E501 - 'action_url': 'actionUrl', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, wait_url, action_url, *args, **kwargs): # noqa: E501 - """ParkAllOf - a model defined in OpenAPI - - Args: - wait_url (str): Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. - action_url (str): A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call. - - 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,) - notification_url (str): URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.wait_url = wait_url - self.action_url = action_url - 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, wait_url, action_url, *args, **kwargs): # noqa: E501 - """ParkAllOf - a model defined in OpenAPI - - Args: - wait_url (str): Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely. - action_url (str): A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call. - - 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,) - notification_url (str): URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.. [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: - 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.wait_url = wait_url - self.action_url = action_url - 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/freeclimb/model/pause.py b/freeclimb/model/pause.py deleted file mode 100644 index 9bceb97..0000000 --- a/freeclimb/model/pause.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.pause_all_of import PauseAllOf - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PauseAllOf'] = PauseAllOf - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Pause(ModelComposed): - """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 { - 'length': (int,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'length': 'length', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Pause - a model defined in OpenAPI - - Keyword Args: - length (int): Length in milliseconds. FreeClimb will wait silently before continuing on. - _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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Pause - a model defined in OpenAPI - - Keyword Args: - length (int): Length in milliseconds. FreeClimb will wait silently before continuing on. - _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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Pause), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Pause.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PauseAllOf, - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/pause_all_of.py b/freeclimb/model/pause_all_of.py deleted file mode 100644 index 8058ebe..0000000 --- a/freeclimb/model/pause_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class PauseAllOf(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 { - 'length': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'length': 'length', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, length, *args, **kwargs): # noqa: E501 - """PauseAllOf - a model defined in OpenAPI - - Args: - length (int): Length in milliseconds. FreeClimb will wait silently before continuing on. - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.length = length - 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, length, *args, **kwargs): # noqa: E501 - """PauseAllOf - a model defined in OpenAPI - - Args: - length (int): Length in milliseconds. FreeClimb will wait silently before continuing on. - - 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,) - """ - - _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: - 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.length = length - 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/freeclimb/model/percl_command.py b/freeclimb/model/percl_command.py deleted file mode 100644 index 324801e..0000000 --- a/freeclimb/model/percl_command.py +++ /dev/null @@ -1,346 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - - -class PerclCommand(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 { - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'AddToConference': AddToConference, - 'CreateConference': CreateConference, - 'Dequeue': Dequeue, - 'Enqueue': Enqueue, - 'GetDigits': GetDigits, - 'GetSpeech': GetSpeech, - 'Hangup': Hangup, - 'OutDial': OutDial, - 'Park': Park, - 'Pause': Pause, - 'Play': Play, - 'PlayEarlyMedia': PlayEarlyMedia, - 'RecordUtterance': RecordUtterance, - 'Redirect': Redirect, - 'Reject': Reject, - 'RemoveFromConference': RemoveFromConference, - 'Say': Say, - 'SendDigits': SendDigits, - 'SetDTMFPassThrough': SetDTMFPassThrough, - 'SetListen': SetListen, - 'SetTalk': SetTalk, - 'Sms': Sms, - 'StartRecordCall': StartRecordCall, - 'TerminateConference': TerminateConference, - 'TranscribeUtterance': TranscribeUtterance, - 'Unpark': Unpark, - } - if not val: - return None - return {'command': val} - - - attribute_map = { - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PerclCommand - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """PerclCommand - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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/freeclimb/model/percl_script.py b/freeclimb/model/percl_script.py deleted file mode 100644 index 3b64000..0000000 --- a/freeclimb/model/percl_script.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - -import json - - -def lazy_import(): - from freeclimb.model.percl_command import PerclCommand - globals()['PerclCommand'] = PerclCommand - - -class PerclScript(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 { - 'commands': ([PerclCommand],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'commands': 'commands', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PerclScript - 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,) - commands ([PerclCommand]): A JSON array of PerCL commands. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """PerclScript - 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,) - commands ([PerclCommand]): A JSON array of PerCL commands. [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: - 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.") - - - def to_percl_dict(self, percl_command_inst): - if hasattr(percl_command_inst, 'command') == False: - raise ApiAttributeError("{0} has no attribute '{1}'".format(percl_command_inst.__class__.name, 'command')) - command = getattr(percl_command_inst, 'command') - attributes = [attribute for attribute in percl_command_inst.openapi_types if attribute != 'command'] - attribute_map = {} - for attribute in attributes: - key = percl_command_inst.attribute_map.get(attribute) - val = percl_command_inst.get(attribute) - if val is None: - continue - if hasattr(val, 'command'): - attribute_map[key] = self.to_percl_dict(val) - continue - if isinstance(val, list): - attribute_map[key] = [self.to_percl_dict(item) if hasattr(item, 'command') else item for item in val] - continue - attribute_map[key] = val - percl_dict = { - command: attribute_map - } - return percl_dict - - def to_json(self): - return json.dumps([self.to_percl_dict(command) for command in self.commands]) diff --git a/freeclimb/model/play.py b/freeclimb/model/play.py deleted file mode 100644 index e830fe1..0000000 --- a/freeclimb/model/play.py +++ /dev/null @@ -1,387 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_all_of import PlayAllOf - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayAllOf'] = PlayAllOf - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Play(ModelComposed): - """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 { - 'file': (str,), # noqa: E501 - 'loop': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'file': 'file', # noqa: E501 - 'loop': 'loop', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Play - a model defined in OpenAPI - - Keyword Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. - _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,) - loop (int): Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Play - a model defined in OpenAPI - - Keyword Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. - _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,) - loop (int): Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Play), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Play.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - PlayAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/play_all_of.py b/freeclimb/model/play_all_of.py deleted file mode 100644 index f975788..0000000 --- a/freeclimb/model/play_all_of.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class PlayAllOf(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 { - 'file': (str,), # noqa: E501 - 'loop': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'file': 'file', # noqa: E501 - 'loop': 'loop', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, file, *args, **kwargs): # noqa: E501 - """PlayAllOf - a model defined in OpenAPI - - Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. - - 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,) - loop (int): Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.file = file - 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, file, *args, **kwargs): # noqa: E501 - """PlayAllOf - a model defined in OpenAPI - - Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. - - 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,) - loop (int): Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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: - 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.file = file - 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/freeclimb/model/play_early_media.py b/freeclimb/model/play_early_media.py deleted file mode 100644 index 07ca7ff..0000000 --- a/freeclimb/model/play_early_media.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.play_early_media_all_of import PlayEarlyMediaAllOf - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['PlayEarlyMediaAllOf'] = PlayEarlyMediaAllOf - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class PlayEarlyMedia(ModelComposed): - """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 { - 'file': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'file': 'file', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PlayEarlyMedia - a model defined in OpenAPI - - Keyword Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default. - _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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PlayEarlyMedia - a model defined in OpenAPI - - Keyword Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default. - _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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == PlayEarlyMedia), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(PlayEarlyMedia.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - PlayEarlyMediaAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/play_early_media_all_of.py b/freeclimb/model/play_early_media_all_of.py deleted file mode 100644 index a947c4b..0000000 --- a/freeclimb/model/play_early_media_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class PlayEarlyMediaAllOf(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 { - 'file': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'file': 'file', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, file, *args, **kwargs): # noqa: E501 - """PlayEarlyMediaAllOf - a model defined in OpenAPI - - Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default. - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.file = file - 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, file, *args, **kwargs): # noqa: E501 - """PlayEarlyMediaAllOf - a model defined in OpenAPI - - Args: - file (str): RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default. - - 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,) - """ - - _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: - 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.file = file - 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/freeclimb/model/queue_list.py b/freeclimb/model/queue_list.py deleted file mode 100644 index 1a4eb61..0000000 --- a/freeclimb/model/queue_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.queue_list_all_of import QueueListAllOf - from freeclimb.model.queue_result import QueueResult - globals()['PaginationModel'] = PaginationModel - globals()['QueueListAllOf'] = QueueListAllOf - globals()['QueueResult'] = QueueResult - -class QueueList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'queues': ([QueueResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'queues': 'queues', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - queues ([QueueResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """QueueList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - queues ([QueueResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - QueueListAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/queue_list_all_of.py b/freeclimb/model/queue_list_all_of.py deleted file mode 100644 index 8802d32..0000000 --- a/freeclimb/model/queue_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.queue_result import QueueResult - globals()['QueueResult'] = QueueResult - - -class QueueListAllOf(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 { - 'queues': ([QueueResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'queues': 'queues', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueListAllOf - 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,) - queues ([QueueResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """QueueListAllOf - 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,) - queues ([QueueResult], none_type): [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: - 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/freeclimb/model/queue_member.py b/freeclimb/model/queue_member.py deleted file mode 100644 index 2ad2ace..0000000 --- a/freeclimb/model/queue_member.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class QueueMember(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 { - 'uri': (str, none_type,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'wait_time': (int, none_type,), # noqa: E501 - 'position': (int, none_type,), # noqa: E501 - 'date_enqueued': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'wait_time': 'waitTime', # noqa: E501 - 'position': 'position', # noqa: E501 - 'date_enqueued': 'dateEnqueued', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueMember - 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,) - uri (str, none_type): URI for this Queue Member resource, relative to the API base URL.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with this Queue Member.. [optional] # noqa: E501 - wait_time (int, none_type): Number of seconds the Member has been in the queue.. [optional] # noqa: E501 - position (int, none_type): Member's current position in the Queue, 1 indexed.. [optional] # noqa: E501 - date_enqueued (str, none_type): Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """QueueMember - 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,) - uri (str, none_type): URI for this Queue Member resource, relative to the API base URL.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call associated with this Queue Member.. [optional] # noqa: E501 - wait_time (int, none_type): Number of seconds the Member has been in the queue.. [optional] # noqa: E501 - position (int, none_type): Member's current position in the Queue, 1 indexed.. [optional] # noqa: E501 - date_enqueued (str, none_type): Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [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: - 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/freeclimb/model/queue_member_list.py b/freeclimb/model/queue_member_list.py deleted file mode 100644 index d8ecb6b..0000000 --- a/freeclimb/model/queue_member_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.queue_member import QueueMember - from freeclimb.model.queue_member_list_all_of import QueueMemberListAllOf - globals()['PaginationModel'] = PaginationModel - globals()['QueueMember'] = QueueMember - globals()['QueueMemberListAllOf'] = QueueMemberListAllOf - -class QueueMemberList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'queue_members': ([QueueMember], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'queue_members': 'queueMembers', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueMemberList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - queue_members ([QueueMember], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """QueueMemberList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - queue_members ([QueueMember], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - QueueMemberListAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/queue_member_list_all_of.py b/freeclimb/model/queue_member_list_all_of.py deleted file mode 100644 index 5698b57..0000000 --- a/freeclimb/model/queue_member_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.queue_member import QueueMember - globals()['QueueMember'] = QueueMember - - -class QueueMemberListAllOf(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 { - 'queue_members': ([QueueMember], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'queue_members': 'queueMembers', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueMemberListAllOf - 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,) - queue_members ([QueueMember], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """QueueMemberListAllOf - 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,) - queue_members ([QueueMember], none_type): [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: - 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/freeclimb/model/queue_request.py b/freeclimb/model/queue_request.py deleted file mode 100644 index b7c2489..0000000 --- a/freeclimb/model/queue_request.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class QueueRequest(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 { - 'alias': (str,), # noqa: E501 - 'max_size': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alias': 'alias', # noqa: E501 - 'max_size': 'maxSize', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueRequest - 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,) - alias (str): Description for this Queue. Max length is 64 characters.. [optional] # noqa: E501 - max_size (int): Maximum number of calls this queue can hold. Default is 100. Maximum is 1000. **Note:** Reducing the maxSize of a Queue causes the Queue to reject incoming requests until it shrinks below the new value of maxSize.. [optional] if omitted the server will use the default value of 100 # 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """QueueRequest - 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,) - alias (str): Description for this Queue. Max length is 64 characters.. [optional] # noqa: E501 - max_size (int): Maximum number of calls this queue can hold. Default is 100. Maximum is 1000. **Note:** Reducing the maxSize of a Queue causes the Queue to reject incoming requests until it shrinks below the new value of maxSize.. [optional] if omitted the server will use the default value of 100 # 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: - 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/freeclimb/model/queue_result.py b/freeclimb/model/queue_result.py deleted file mode 100644 index eca63b5..0000000 --- a/freeclimb/model/queue_result.py +++ /dev/null @@ -1,355 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.mutable_resource_model import MutableResourceModel - from freeclimb.model.queue_result_all_of import QueueResultAllOf - globals()['MutableResourceModel'] = MutableResourceModel - globals()['QueueResultAllOf'] = QueueResultAllOf - -class QueueResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'queue_id': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'max_size': (int, none_type,), # noqa: E501 - 'current_size': (int, none_type,), # noqa: E501 - 'average_queue_removal_time': (int, none_type,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'queue_id': 'queueId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'max_size': 'maxSize', # noqa: E501 - 'current_size': 'currentSize', # noqa: E501 - 'average_queue_removal_time': 'averageQueueRemovalTime', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - queue_id (str, none_type): A string that uniquely identifies this Queue resource.. [optional] # noqa: E501 - alias (str, none_type): A description for this Queue.. [optional] # noqa: E501 - max_size (int, none_type): The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000.. [optional] # noqa: E501 - current_size (int, none_type): Count of Calls currently in the Queue.. [optional] # noqa: E501 - average_queue_removal_time (int, none_type): The average amount of time (in seconds) for a call to be removed from the queue.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): List of subresources for this Queue (which includes Queue members).. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """QueueResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - queue_id (str, none_type): A string that uniquely identifies this Queue resource.. [optional] # noqa: E501 - alias (str, none_type): A description for this Queue.. [optional] # noqa: E501 - max_size (int, none_type): The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000.. [optional] # noqa: E501 - current_size (int, none_type): Count of Calls currently in the Queue.. [optional] # noqa: E501 - average_queue_removal_time (int, none_type): The average amount of time (in seconds) for a call to be removed from the queue.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): List of subresources for this Queue (which includes Queue members).. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - MutableResourceModel, - QueueResultAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/queue_result_all_of.py b/freeclimb/model/queue_result_all_of.py deleted file mode 100644 index 1ecd802..0000000 --- a/freeclimb/model/queue_result_all_of.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class QueueResultAllOf(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 { - 'account_id': (str, none_type,), # noqa: E501 - 'queue_id': (str, none_type,), # noqa: E501 - 'alias': (str, none_type,), # noqa: E501 - 'max_size': (int, none_type,), # noqa: E501 - 'current_size': (int, none_type,), # noqa: E501 - 'average_queue_removal_time': (int, none_type,), # noqa: E501 - 'subresource_uris': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'queue_id': 'queueId', # noqa: E501 - 'alias': 'alias', # noqa: E501 - 'max_size': 'maxSize', # noqa: E501 - 'current_size': 'currentSize', # noqa: E501 - 'average_queue_removal_time': 'averageQueueRemovalTime', # noqa: E501 - 'subresource_uris': 'subresourceUris', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """QueueResultAllOf - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - queue_id (str, none_type): A string that uniquely identifies this Queue resource.. [optional] # noqa: E501 - alias (str, none_type): A description for this Queue.. [optional] # noqa: E501 - max_size (int, none_type): The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000.. [optional] # noqa: E501 - current_size (int, none_type): Count of Calls currently in the Queue.. [optional] # noqa: E501 - average_queue_removal_time (int, none_type): The average amount of time (in seconds) for a call to be removed from the queue.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): List of subresources for this Queue (which includes Queue members).. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """QueueResultAllOf - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - queue_id (str, none_type): A string that uniquely identifies this Queue resource.. [optional] # noqa: E501 - alias (str, none_type): A description for this Queue.. [optional] # noqa: E501 - max_size (int, none_type): The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000.. [optional] # noqa: E501 - current_size (int, none_type): Count of Calls currently in the Queue.. [optional] # noqa: E501 - average_queue_removal_time (int, none_type): The average amount of time (in seconds) for a call to be removed from the queue.. [optional] # noqa: E501 - subresource_uris ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): List of subresources for this Queue (which includes Queue members).. [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: - 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/freeclimb/model/record_utterance.py b/freeclimb/model/record_utterance.py deleted file mode 100644 index 7e79d31..0000000 --- a/freeclimb/model/record_utterance.py +++ /dev/null @@ -1,403 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.record_utterance_all_of import RecordUtteranceAllOf - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['RecordUtteranceAllOf'] = RecordUtteranceAllOf - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class RecordUtterance(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'silence_timeout_ms': (int,), # noqa: E501 - 'finish_on_key': (str,), # noqa: E501 - 'max_length_sec': (int,), # noqa: E501 - 'play_beep': (bool,), # noqa: E501 - 'auto_start': (bool,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'silence_timeout_ms': 'silenceTimeoutMs', # noqa: E501 - 'finish_on_key': 'finishOnKey', # noqa: E501 - 'max_length_sec': 'maxLengthSec', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'auto_start': 'autoStart', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RecordUtterance - a model defined in OpenAPI - - Keyword Args: - action_url (str): URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - _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,) - silence_timeout_ms (int): Interval of silence that should elapse before ending the recording.. [optional] # noqa: E501 - finish_on_key (str): Key that triggers the end of the recording. any digit, '#', or '*'. [optional] # noqa: E501 - max_length_sec (int): Maximum length for the command execution in seconds.. [optional] # noqa: E501 - play_beep (bool): Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played.. [optional] # noqa: E501 - auto_start (bool): If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RecordUtterance - a model defined in OpenAPI - - Keyword Args: - action_url (str): URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - _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,) - silence_timeout_ms (int): Interval of silence that should elapse before ending the recording.. [optional] # noqa: E501 - finish_on_key (str): Key that triggers the end of the recording. any digit, '#', or '*'. [optional] # noqa: E501 - max_length_sec (int): Maximum length for the command execution in seconds.. [optional] # noqa: E501 - play_beep (bool): Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played.. [optional] # noqa: E501 - auto_start (bool): If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == RecordUtterance), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(RecordUtterance.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - RecordUtteranceAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/record_utterance_all_of.py b/freeclimb/model/record_utterance_all_of.py deleted file mode 100644 index 5cc0d88..0000000 --- a/freeclimb/model/record_utterance_all_of.py +++ /dev/null @@ -1,289 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class RecordUtteranceAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'silence_timeout_ms': (int,), # noqa: E501 - 'finish_on_key': (str,), # noqa: E501 - 'max_length_sec': (int,), # noqa: E501 - 'play_beep': (bool,), # noqa: E501 - 'auto_start': (bool,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'silence_timeout_ms': 'silenceTimeoutMs', # noqa: E501 - 'finish_on_key': 'finishOnKey', # noqa: E501 - 'max_length_sec': 'maxLengthSec', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'auto_start': 'autoStart', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, *args, **kwargs): # noqa: E501 - """RecordUtteranceAllOf - a model defined in OpenAPI - - Args: - action_url (str): URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - - 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,) - silence_timeout_ms (int): Interval of silence that should elapse before ending the recording.. [optional] # noqa: E501 - finish_on_key (str): Key that triggers the end of the recording. any digit, '#', or '*'. [optional] # noqa: E501 - max_length_sec (int): Maximum length for the command execution in seconds.. [optional] # noqa: E501 - play_beep (bool): Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played.. [optional] # noqa: E501 - auto_start (bool): If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - 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, action_url, *args, **kwargs): # noqa: E501 - """RecordUtteranceAllOf - a model defined in OpenAPI - - Args: - action_url (str): URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - - 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,) - silence_timeout_ms (int): Interval of silence that should elapse before ending the recording.. [optional] # noqa: E501 - finish_on_key (str): Key that triggers the end of the recording. any digit, '#', or '*'. [optional] # noqa: E501 - max_length_sec (int): Maximum length for the command execution in seconds.. [optional] # noqa: E501 - play_beep (bool): Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played.. [optional] # noqa: E501 - auto_start (bool): If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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: - 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.action_url = action_url - 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/freeclimb/model/recording_list.py b/freeclimb/model/recording_list.py deleted file mode 100644 index 7550210..0000000 --- a/freeclimb/model/recording_list.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.recording_list_all_of import RecordingListAllOf - from freeclimb.model.recording_result import RecordingResult - globals()['PaginationModel'] = PaginationModel - globals()['RecordingListAllOf'] = RecordingListAllOf - globals()['RecordingResult'] = RecordingResult - -class RecordingList(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'recordings': ([RecordingResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'recordings': 'recordings', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RecordingList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - recordings ([RecordingResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RecordingList - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - recordings ([RecordingResult], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - RecordingListAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/recording_list_all_of.py b/freeclimb/model/recording_list_all_of.py deleted file mode 100644 index 70cccbc..0000000 --- a/freeclimb/model/recording_list_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.recording_result import RecordingResult - globals()['RecordingResult'] = RecordingResult - - -class RecordingListAllOf(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 { - 'recordings': ([RecordingResult], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'recordings': 'recordings', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RecordingListAllOf - 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,) - recordings ([RecordingResult], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """RecordingListAllOf - 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,) - recordings ([RecordingResult], none_type): [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: - 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/freeclimb/model/recording_result.py b/freeclimb/model/recording_result.py deleted file mode 100644 index e6e7a26..0000000 --- a/freeclimb/model/recording_result.py +++ /dev/null @@ -1,347 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.mutable_resource_model import MutableResourceModel - from freeclimb.model.recording_result_all_of import RecordingResultAllOf - globals()['MutableResourceModel'] = MutableResourceModel - globals()['RecordingResultAllOf'] = RecordingResultAllOf - -class RecordingResult(ModelComposed): - """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 { - 'uri': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - 'recording_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'duration_sec': (int, none_type,), # noqa: E501 - 'conference_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'uri': 'uri', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - 'recording_id': 'recordingId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'duration_sec': 'durationSec', # noqa: E501 - 'conference_id': 'conferenceId', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RecordingResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - recording_id (str, none_type): String that uniquely identifies this recording resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this recording.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.. [optional] # noqa: E501 - duration_sec (int, none_type): Length of the recording in seconds.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RecordingResult - 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,) - uri (str): The URI for this resource, relative to /apiserver.. [optional] # noqa: E501 - date_created (str): The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - date_updated (str): The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. [optional] # noqa: E501 - revision (int): Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. [optional] # noqa: E501 - recording_id (str, none_type): String that uniquely identifies this recording resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this recording.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.. [optional] # noqa: E501 - duration_sec (int, none_type): Length of the recording in seconds.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.. [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - MutableResourceModel, - RecordingResultAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/recording_result_all_of.py b/freeclimb/model/recording_result_all_of.py deleted file mode 100644 index 32180d7..0000000 --- a/freeclimb/model/recording_result_all_of.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class RecordingResultAllOf(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 { - 'recording_id': (str, none_type,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'call_id': (str, none_type,), # noqa: E501 - 'duration_sec': (int, none_type,), # noqa: E501 - 'conference_id': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'recording_id': 'recordingId', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'call_id': 'callId', # noqa: E501 - 'duration_sec': 'durationSec', # noqa: E501 - 'conference_id': 'conferenceId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RecordingResultAllOf - 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,) - recording_id (str, none_type): String that uniquely identifies this recording resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this recording.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.. [optional] # noqa: E501 - duration_sec (int, none_type): Length of the recording in seconds.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """RecordingResultAllOf - 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,) - recording_id (str, none_type): String that uniquely identifies this recording resource.. [optional] # noqa: E501 - account_id (str, none_type): ID of the account that created this recording.. [optional] # noqa: E501 - call_id (str, none_type): ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.. [optional] # noqa: E501 - duration_sec (int, none_type): Length of the recording in seconds.. [optional] # noqa: E501 - conference_id (str, none_type): ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.. [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: - 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/freeclimb/model/redirect.py b/freeclimb/model/redirect.py deleted file mode 100644 index 6adf854..0000000 --- a/freeclimb/model/redirect.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.redirect_all_of import RedirectAllOf - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['RedirectAllOf'] = RedirectAllOf - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Redirect(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Redirect - a model defined in OpenAPI - - Keyword Args: - action_url (str): URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call. - _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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Redirect - a model defined in OpenAPI - - Keyword Args: - action_url (str): URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call. - _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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Redirect), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Redirect.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - RedirectAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/redirect_all_of.py b/freeclimb/model/redirect_all_of.py deleted file mode 100644 index d06eadf..0000000 --- a/freeclimb/model/redirect_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class RedirectAllOf(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 { - 'action_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, *args, **kwargs): # noqa: E501 - """RedirectAllOf - a model defined in OpenAPI - - Args: - action_url (str): URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call. - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - 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, action_url, *args, **kwargs): # noqa: E501 - """RedirectAllOf - a model defined in OpenAPI - - Args: - action_url (str): URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call. - - 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,) - """ - - _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: - 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.action_url = action_url - 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/freeclimb/model/reject.py b/freeclimb/model/reject.py deleted file mode 100644 index 6c61b66..0000000 --- a/freeclimb/model/reject.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.reject_all_of import RejectAllOf - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RejectAllOf'] = RejectAllOf - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Reject(ModelComposed): - """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 { - 'reason': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'reason': 'reason', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Reject - 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,) - reason (str): Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Reject - 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,) - reason (str): Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Reject), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Reject.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - RejectAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/reject_all_of.py b/freeclimb/model/reject_all_of.py deleted file mode 100644 index d73d7cc..0000000 --- a/freeclimb/model/reject_all_of.py +++ /dev/null @@ -1,259 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class RejectAllOf(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 { - 'reason': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'reason': 'reason', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RejectAllOf - 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,) - reason (str): Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """RejectAllOf - 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,) - reason (str): Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application.. [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: - 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/freeclimb/model/remove_from_conference.py b/freeclimb/model/remove_from_conference.py deleted file mode 100644 index be4b934..0000000 --- a/freeclimb/model/remove_from_conference.py +++ /dev/null @@ -1,372 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class RemoveFromConference(ModelComposed): - """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 { - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RemoveFromConference - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """RemoveFromConference - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == RemoveFromConference), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(RemoveFromConference.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/request_type.py b/freeclimb/model/request_type.py deleted file mode 100644 index 12cec24..0000000 --- a/freeclimb/model/request_type.py +++ /dev/null @@ -1,62 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -from enum import Enum - -# class syntax -class RequestType(str, Enum): - INBOUND_CALL= "inboundCall", - RECORD= "record", - GET_DIGITS= "getDigits", - GET_SPEECH= "getSpeech", - REDIRECT= "redirect", - PAUSE= "pause", - OUT_DIAL_START= "outDialStart", - OUT_DIAL_CONNECT= "outDialConnect", - OUT_DIAL_API_CONNECT= "outDialApiConnect", - MACHINE_DETECTED= "machineDetected", - DEQUEUE= "dequeue", - QUEUE_WAIT= "queueWait", - ADD_TO_QUEUE_NOTIFICATION= "addToQueueNotification", - REMOVE_FROM_QUEUE_NOTIFICATION= "removeFromQueueNotification", - CALL_STATUS= "callStatus", - CREATE_CONFERENCE= "createConference", - CONFERENCE_STATUS= "conferenceStatus", - LEAVE_CONFERENCE= "leaveConference", - ADD_TO_CONFERENCE_NOTIFICATION= "addToConferenceNotification", - CONFERENCE_RECORDING_STATUS= "conferenceRecordingStatus", - CONFERENCE_CALL_CONTROL= "conferenceCallControl", - MESSAGE_DELIVERY= "messageDelivery", - MESSAGE_STATUS= "messageStatus", - - diff --git a/freeclimb/model/say.py b/freeclimb/model/say.py deleted file mode 100644 index 21a1d53..0000000 --- a/freeclimb/model/say.py +++ /dev/null @@ -1,391 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.say_all_of import SayAllOf - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SayAllOf'] = SayAllOf - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Say(ModelComposed): - """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 { - 'text': (str,), # noqa: E501 - 'language': (str,), # noqa: E501 - 'loop': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'text': 'text', # noqa: E501 - 'language': 'language', # noqa: E501 - 'loop': 'loop', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Say - a model defined in OpenAPI - - Keyword Args: - text (str): The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. - _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,) - language (str): Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below.. [optional] # noqa: E501 - loop (int): Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up.. [optional] if omitted the server will use the default value of 1 # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Say - a model defined in OpenAPI - - Keyword Args: - text (str): The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. - _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,) - language (str): Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below.. [optional] # noqa: E501 - loop (int): Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up.. [optional] if omitted the server will use the default value of 1 # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Say), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Say.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - SayAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/say_all_of.py b/freeclimb/model/say_all_of.py deleted file mode 100644 index c96be38..0000000 --- a/freeclimb/model/say_all_of.py +++ /dev/null @@ -1,277 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SayAllOf(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 { - 'text': (str,), # noqa: E501 - 'language': (str,), # noqa: E501 - 'loop': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'text': 'text', # noqa: E501 - 'language': 'language', # noqa: E501 - 'loop': 'loop', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, text, *args, **kwargs): # noqa: E501 - """SayAllOf - a model defined in OpenAPI - - Args: - text (str): The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. - - 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,) - language (str): Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below.. [optional] # noqa: E501 - loop (int): Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up.. [optional] if omitted the server will use the default value of 1 # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.text = text - 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, text, *args, **kwargs): # noqa: E501 - """SayAllOf - a model defined in OpenAPI - - Args: - text (str): The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped. - - 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,) - language (str): Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below.. [optional] # noqa: E501 - loop (int): Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up.. [optional] if omitted the server will use the default value of 1 # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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: - 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.text = text - 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/freeclimb/model/send_digits.py b/freeclimb/model/send_digits.py deleted file mode 100644 index a643e8c..0000000 --- a/freeclimb/model/send_digits.py +++ /dev/null @@ -1,387 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.send_digits_all_of import SendDigitsAllOf - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SendDigitsAllOf'] = SendDigitsAllOf - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class SendDigits(ModelComposed): - """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 { - 'digits': (str,), # noqa: E501 - 'pause_ms': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'digits': 'digits', # noqa: E501 - 'pause_ms': 'pauseMs', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SendDigits - a model defined in OpenAPI - - Keyword Args: - digits (str): String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits. - _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,) - pause_ms (int): Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SendDigits - a model defined in OpenAPI - - Keyword Args: - digits (str): String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits. - _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,) - pause_ms (int): Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == SendDigits), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(SendDigits.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - SendDigitsAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/send_digits_all_of.py b/freeclimb/model/send_digits_all_of.py deleted file mode 100644 index dc3d962..0000000 --- a/freeclimb/model/send_digits_all_of.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SendDigitsAllOf(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 { - 'digits': (str,), # noqa: E501 - 'pause_ms': (int,), # noqa: E501 - 'privacy_mode': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'digits': 'digits', # noqa: E501 - 'pause_ms': 'pauseMs', # noqa: E501 - 'privacy_mode': 'privacyMode', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, digits, *args, **kwargs): # noqa: E501 - """SendDigitsAllOf - a model defined in OpenAPI - - Args: - digits (str): String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits. - - 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,) - pause_ms (int): Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.digits = digits - 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, digits, *args, **kwargs): # noqa: E501 - """SendDigitsAllOf - a model defined in OpenAPI - - Args: - digits (str): String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits. - - 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,) - pause_ms (int): Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.. [optional] # noqa: E501 - privacy_mode (bool): Parameter `privacyMode` will not log the `text` as required by PCI compliance.. [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: - 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.digits = digits - 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/freeclimb/model/set_dtmf_pass_through.py b/freeclimb/model/set_dtmf_pass_through.py deleted file mode 100644 index 739f093..0000000 --- a/freeclimb/model/set_dtmf_pass_through.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_dtmf_pass_through_all_of import SetDTMFPassThroughAllOf - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetDTMFPassThroughAllOf'] = SetDTMFPassThroughAllOf - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class SetDTMFPassThrough(ModelComposed): - """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 { - 'dtmf_pass_through': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SetDTMFPassThrough - 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,) - dtmf_pass_through (bool): Specifying `false` mutes the Participant's dtmf audio.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SetDTMFPassThrough - 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,) - dtmf_pass_through (bool): Specifying `false` mutes the Participant's dtmf audio.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == SetDTMFPassThrough), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(SetDTMFPassThrough.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - SetDTMFPassThroughAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/set_dtmf_pass_through_all_of.py b/freeclimb/model/set_dtmf_pass_through_all_of.py deleted file mode 100644 index c4b0800..0000000 --- a/freeclimb/model/set_dtmf_pass_through_all_of.py +++ /dev/null @@ -1,259 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SetDTMFPassThroughAllOf(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 { - 'dtmf_pass_through': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SetDTMFPassThroughAllOf - 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,) - dtmf_pass_through (bool): Specifying `false` mutes the Participant's dtmf audio.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SetDTMFPassThroughAllOf - 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,) - dtmf_pass_through (bool): Specifying `false` mutes the Participant's dtmf audio.. [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: - 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/freeclimb/model/set_listen.py b/freeclimb/model/set_listen.py deleted file mode 100644 index 5ac912e..0000000 --- a/freeclimb/model/set_listen.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_listen_all_of import SetListenAllOf - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetListenAllOf'] = SetListenAllOf - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class SetListen(ModelComposed): - """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 { - 'listen': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'listen': 'listen', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SetListen - 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,) - listen (bool): Specifying `false` will silence the Conference for this Participant.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SetListen - 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,) - listen (bool): Specifying `false` will silence the Conference for this Participant.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == SetListen), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(SetListen.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - SetListenAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/set_listen_all_of.py b/freeclimb/model/set_listen_all_of.py deleted file mode 100644 index 93dafdf..0000000 --- a/freeclimb/model/set_listen_all_of.py +++ /dev/null @@ -1,259 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SetListenAllOf(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 { - 'listen': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'listen': 'listen', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SetListenAllOf - 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,) - listen (bool): Specifying `false` will silence the Conference for this 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SetListenAllOf - 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,) - listen (bool): Specifying `false` will silence the Conference for this 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: - 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/freeclimb/model/set_talk.py b/freeclimb/model/set_talk.py deleted file mode 100644 index 6c908e5..0000000 --- a/freeclimb/model/set_talk.py +++ /dev/null @@ -1,379 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.set_talk_all_of import SetTalkAllOf - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['SetTalkAllOf'] = SetTalkAllOf - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class SetTalk(ModelComposed): - """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 { - 'talk': (bool,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'talk': 'talk', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SetTalk - 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,) - talk (bool): Specifying `false` mutes the Participant.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SetTalk - 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,) - talk (bool): Specifying `false` mutes the Participant.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == SetTalk), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(SetTalk.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - SetTalkAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/set_talk_all_of.py b/freeclimb/model/set_talk_all_of.py deleted file mode 100644 index 89a4e06..0000000 --- a/freeclimb/model/set_talk_all_of.py +++ /dev/null @@ -1,259 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SetTalkAllOf(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 { - 'talk': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'talk': 'talk', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SetTalkAllOf - 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,) - talk (bool): Specifying `false` mutes the 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SetTalkAllOf - 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,) - talk (bool): Specifying `false` mutes the 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: - 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/freeclimb/model/sms.py b/freeclimb/model/sms.py deleted file mode 100644 index 3fd3c95..0000000 --- a/freeclimb/model/sms.py +++ /dev/null @@ -1,391 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.sms_all_of import SmsAllOf - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['SmsAllOf'] = SmsAllOf - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Sms(ModelComposed): - """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 { - 'to': (str,), # noqa: E501 - '_from': (str,), # noqa: E501 - 'text': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'to': 'to', # noqa: E501 - '_from': 'from', # noqa: E501 - 'text': 'text', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Sms - a model defined in OpenAPI - - Keyword Args: - to (str): E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). - _from (str): E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - text (str): Text contained in the message (maximum 160 characters). - _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,) - notification_url (str): When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Sms - a model defined in OpenAPI - - Keyword Args: - to (str): E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). - _from (str): E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - text (str): Text contained in the message (maximum 160 characters). - _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,) - notification_url (str): When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored.. [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Sms), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Sms.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - SmsAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/sms_all_of.py b/freeclimb/model/sms_all_of.py deleted file mode 100644 index 6b880b8..0000000 --- a/freeclimb/model/sms_all_of.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SmsAllOf(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 { - 'to': (str,), # noqa: E501 - '_from': (str,), # noqa: E501 - 'text': (str,), # noqa: E501 - 'notification_url': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'to': 'to', # noqa: E501 - '_from': 'from', # noqa: E501 - 'text': 'text', # noqa: E501 - 'notification_url': 'notificationUrl', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, to, _from, text, *args, **kwargs): # noqa: E501 - """SmsAllOf - a model defined in OpenAPI - - Args: - to (str): E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). - _from (str): E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - text (str): Text contained in the message (maximum 160 characters). - - 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,) - notification_url (str): When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.to = to - self._from = _from - self.text = text - 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, to, _from, text, *args, **kwargs): # noqa: E501 - """SmsAllOf - a model defined in OpenAPI - - Args: - to (str): E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245). - _from (str): E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - text (str): Text contained in the message (maximum 160 characters). - - 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,) - notification_url (str): When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored.. [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: - 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.to = to - self._from = _from - self.text = text - 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/freeclimb/model/sms_ten_dlc_brand.py b/freeclimb/model/sms_ten_dlc_brand.py deleted file mode 100644 index 171350e..0000000 --- a/freeclimb/model/sms_ten_dlc_brand.py +++ /dev/null @@ -1,524 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SMSTenDLCBrand(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 = { - ('entity_type',): { - 'PRIVATE_PROFIT': "PRIVATE_PROFIT", - 'PUBLIC_PROFIT': "PUBLIC_PROFIT", - 'NON_PROFIT': "NON_PROFIT", - 'GOVERNMENT': "GOVERNMENT", - 'SOLE_PROPRIETOR': "SOLE_PROPRIETOR", - }, - ('brand_relationship',): { - 'BASIC_ACCOUNT': "BASIC_ACCOUNT", - 'SMALL_ACCOUNT': "SMALL_ACCOUNT", - 'MEDIUM_ACCOUNT': "MEDIUM_ACCOUNT", - 'LARGE_ACCOUNT': "LARGE_ACCOUNT", - 'KEY_ACCOUNT': "KEY_ACCOUNT", - }, - ('identity_status',): { - 'SELF_DECLARED': "SELF_DECLARED", - 'UNVERIFIED': "UNVERIFIED", - 'VERIFIED': "VERIFIED", - 'VETTED_VERIFIED': "VETTED_VERIFIED", - }, - ('stock_exchange',): { - 'NONE': "NONE", - 'NASDAQ': "NASDAQ", - 'NYSE': "NYSE", - 'AMEX': "AMEX", - 'AMX': "AMX", - 'ASX': "ASX", - 'B3': "B3", - 'BME': "BME", - 'BSE': "BSE", - 'FRA': "FRA", - 'ICEX': "ICEX", - 'JPX': "JPX", - 'JSE': "JSE", - 'KRX': "KRX", - 'LON': "LON", - 'NSE': "NSE", - 'OMX': "OMX", - 'SEHK': "SEHK", - 'SGX': "SGX", - 'SSE': "SSE", - 'STO': "STO", - 'SWX': "SWX", - 'SZSE': "SZSE", - 'TSX': "TSX", - 'TWSE': "TWSE", - 'VSE': "VSE", - 'OTHER': "OTHER", - }, - ('alt_business_id_type',): { - 'NONE': "NONE", - 'DUNS': "DUNS", - 'GIIN': "GIIN", - 'LEI': "LEI", - }, - } - - validations = { - ('entity_type',): { - 'max_length': 20, - }, - ('display_name',): { - 'max_length': 255, - }, - ('phone',): { - 'max_length': 20, - }, - ('country',): { - 'max_length': 2, - }, - ('email',): { - 'max_length': 100, - }, - ('vertical',): { - 'max_length': 50, - }, - ('first_name',): { - 'max_length': 100, - }, - ('last_name',): { - 'max_length': 100, - }, - ('company_name',): { - 'max_length': 255, - }, - ('ein',): { - 'max_length': 21, - }, - ('ein_issuing_country',): { - 'max_length': 2, - }, - ('street',): { - 'max_length': 100, - }, - ('city',): { - 'max_length': 100, - }, - ('state',): { - 'max_length': 20, - }, - ('postal_code',): { - 'max_length': 10, - }, - ('stock_symbol',): { - 'max_length': 10, - }, - ('ip_address',): { - 'max_length': 50, - }, - ('website',): { - 'max_length': 100, - }, - ('alt_business_id',): { - 'max_length': 50, - }, - ('reference_id',): { - 'max_length': 50, - }, - } - - @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 { - 'entity_type': (str, str,), - 'entity_type': (str,), # noqa: E501 - 'display_name': (str,), # noqa: E501 - 'phone': (str,), # noqa: E501 - 'country': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'brand_relationship': (str, str,), - 'brand_relationship': (str,), # noqa: E501 - 'vertical': (str,), # noqa: E501 - 'mock': (bool,), # noqa: E501 - 'identity_status': (str, str,), - 'identity_status': (str,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'csp_id': (str,), # noqa: E501 - 'brand_id': (str,), # noqa: E501 - 'first_name': (str,), # noqa: E501 - 'last_name': (str,), # noqa: E501 - 'company_name': (str,), # noqa: E501 - 'ein': (str,), # noqa: E501 - 'ein_issuing_country': (str,), # noqa: E501 - 'street': (str,), # noqa: E501 - 'city': (str,), # noqa: E501 - 'state': (str,), # noqa: E501 - 'postal_code': (str,), # noqa: E501 - 'stock_symbol': (str,), # noqa: E501 - 'stock_exchange': (str, str,), - 'stock_exchange': (str,), # noqa: E501 - 'ip_address': (str,), # noqa: E501 - 'website': (str,), # noqa: E501 - 'alt_business_id': (str,), # noqa: E501 - 'alt_business_id_type': (str, str,), - 'alt_business_id_type': (str,), # noqa: E501 - 'universal_ein': (str,), # noqa: E501 - 'reference_id': (str,), # noqa: E501 - 'optional_attributes': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},), # noqa: E501 - 'create_date': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'entity_type': 'entityType', # noqa: E501 - 'display_name': 'displayName', # noqa: E501 - 'phone': 'phone', # noqa: E501 - 'country': 'country', # noqa: E501 - 'email': 'email', # noqa: E501 - 'brand_relationship': 'brandRelationship', # noqa: E501 - 'vertical': 'vertical', # noqa: E501 - 'mock': 'mock', # noqa: E501 - 'identity_status': 'identityStatus', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'csp_id': 'cspId', # noqa: E501 - 'brand_id': 'brandId', # noqa: E501 - 'first_name': 'firstName', # noqa: E501 - 'last_name': 'lastName', # noqa: E501 - 'company_name': 'companyName', # noqa: E501 - 'ein': 'ein', # noqa: E501 - 'ein_issuing_country': 'einIssuingCountry', # noqa: E501 - 'street': 'street', # noqa: E501 - 'city': 'city', # noqa: E501 - 'state': 'state', # noqa: E501 - 'postal_code': 'postalCode', # noqa: E501 - 'stock_symbol': 'stockSymbol', # noqa: E501 - 'stock_exchange': 'stockExchange', # noqa: E501 - 'ip_address': 'ipAddress', # noqa: E501 - 'website': 'website', # noqa: E501 - 'alt_business_id': 'altBusinessId', # noqa: E501 - 'alt_business_id_type': 'altBusinessIdType', # noqa: E501 - 'universal_ein': 'universalEin', # noqa: E501 - 'reference_id': 'referenceId', # noqa: E501 - 'optional_attributes': 'optionalAttributes', # noqa: E501 - 'create_date': 'createDate', # noqa: E501 - } - - read_only_vars = { - 'csp_id', # noqa: E501 - 'brand_id', # noqa: E501 - 'universal_ein', # noqa: E501 - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, entity_type, display_name, phone, country, email, brand_relationship, vertical, mock, identity_status, *args, **kwargs): # noqa: E501 - """SMSTenDLCBrand - a model defined in OpenAPI - - Args: - entity_type (str): Entity type behind the brand. This is the form of business establishment. - display_name (str): Display or marketing name of the brand. - phone (str): Valid phone number in e.164 international format. - country (str): ISO2 2 characters country code. Example: US - United States - email (str): Valid email address of brand support contact. - brand_relationship (str): Brand relationship to the CSP - vertical (str): Vertical or industry segment of the brand. - mock (bool): Test brand. - identity_status (str): TCR assessment of the brand identification status. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - csp_id (str): Unique identifier assigned to the csp by the registry.. [optional] # noqa: E501 - brand_id (str): Unique identifier assigned to the brand by the registry.. [optional] # noqa: E501 - first_name (str): First or given name. . [optional] # noqa: E501 - last_name (str): Last or Surname.. [optional] # noqa: E501 - company_name (str): (Required for Non-profit/private/public) Legal company name.. [optional] # noqa: E501 - ein (str): (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S.. [optional] # noqa: E501 - ein_issuing_country (str): ISO2 2 characters country code. Example: US - United States. [optional] # noqa: E501 - street (str): Street number and name.. [optional] # noqa: E501 - city (str): City name. [optional] # noqa: E501 - state (str): State. Must be 2 letters code for United States.. [optional] # noqa: E501 - postal_code (str): Postal codes. Use 5 digit zipcode for United States. [optional] # noqa: E501 - stock_symbol (str): (Required for public company) stock symbol.. [optional] # noqa: E501 - stock_exchange (str): (Required for public company) stock exchange.. [optional] # noqa: E501 - ip_address (str): IP address of the browser requesting to create brand identity.. [optional] # noqa: E501 - website (str): Brand website URL.. [optional] # noqa: E501 - alt_business_id (str): Alternate business identifier such as DUNS, LEI, or GIIN. [optional] # noqa: E501 - alt_business_id_type (str): The type of the Alternative business identifier. [optional] # noqa: E501 - universal_ein (str): Universal EIN of Brand, Read Only.. [optional] # noqa: E501 - reference_id (str): Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations.. [optional] # noqa: E501 - optional_attributes ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}): Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.. [optional] # noqa: E501 - create_date (datetime): Unix timestamp when brand was created.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.entity_type = entity_type - self.display_name = display_name - self.phone = phone - self.country = country - self.email = email - self.brand_relationship = brand_relationship - self.vertical = vertical - self.mock = mock - self.identity_status = identity_status - 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, entity_type, display_name, phone, country, email, brand_relationship, vertical, mock, identity_status, *args, **kwargs): # noqa: E501 - """SMSTenDLCBrand - a model defined in OpenAPI - - Args: - entity_type (str): Entity type behind the brand. This is the form of business establishment. - display_name (str): Display or marketing name of the brand. - phone (str): Valid phone number in e.164 international format. - country (str): ISO2 2 characters country code. Example: US - United States - email (str): Valid email address of brand support contact. - brand_relationship (str): Brand relationship to the CSP - vertical (str): Vertical or industry segment of the brand. - mock (bool): Test brand. - identity_status (str): TCR assessment of the brand identification status. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - csp_id (str): Unique identifier assigned to the csp by the registry.. [optional] # noqa: E501 - brand_id (str): Unique identifier assigned to the brand by the registry.. [optional] # noqa: E501 - first_name (str): First or given name. . [optional] # noqa: E501 - last_name (str): Last or Surname.. [optional] # noqa: E501 - company_name (str): (Required for Non-profit/private/public) Legal company name.. [optional] # noqa: E501 - ein (str): (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S.. [optional] # noqa: E501 - ein_issuing_country (str): ISO2 2 characters country code. Example: US - United States. [optional] # noqa: E501 - street (str): Street number and name.. [optional] # noqa: E501 - city (str): City name. [optional] # noqa: E501 - state (str): State. Must be 2 letters code for United States.. [optional] # noqa: E501 - postal_code (str): Postal codes. Use 5 digit zipcode for United States. [optional] # noqa: E501 - stock_symbol (str): (Required for public company) stock symbol.. [optional] # noqa: E501 - stock_exchange (str): (Required for public company) stock exchange.. [optional] # noqa: E501 - ip_address (str): IP address of the browser requesting to create brand identity.. [optional] # noqa: E501 - website (str): Brand website URL.. [optional] # noqa: E501 - alt_business_id (str): Alternate business identifier such as DUNS, LEI, or GIIN. [optional] # noqa: E501 - alt_business_id_type (str): The type of the Alternative business identifier. [optional] # noqa: E501 - universal_ein (str): Universal EIN of Brand, Read Only.. [optional] # noqa: E501 - reference_id (str): Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations.. [optional] # noqa: E501 - optional_attributes ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}): Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.. [optional] # noqa: E501 - create_date (datetime): Unix timestamp when brand was created.. [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: - 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.entity_type = entity_type - self.display_name = display_name - self.phone = phone - self.country = country - self.email = email - self.brand_relationship = brand_relationship - self.vertical = vertical - self.mock = mock - self.identity_status = identity_status - 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/freeclimb/model/sms_ten_dlc_brands_list_result.py b/freeclimb/model/sms_ten_dlc_brands_list_result.py deleted file mode 100644 index 9e39586..0000000 --- a/freeclimb/model/sms_ten_dlc_brands_list_result.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand - from freeclimb.model.sms_ten_dlc_brands_list_result_all_of import SMSTenDLCBrandsListResultAllOf - globals()['PaginationModel'] = PaginationModel - globals()['SMSTenDLCBrand'] = SMSTenDLCBrand - globals()['SMSTenDLCBrandsListResultAllOf'] = SMSTenDLCBrandsListResultAllOf - -class SMSTenDLCBrandsListResult(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'brands': ([SMSTenDLCBrand], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'brands': 'brands', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTenDLCBrandsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - brands ([SMSTenDLCBrand], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SMSTenDLCBrandsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - brands ([SMSTenDLCBrand], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - SMSTenDLCBrandsListResultAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/sms_ten_dlc_brands_list_result_all_of.py b/freeclimb/model/sms_ten_dlc_brands_list_result_all_of.py deleted file mode 100644 index 418b02b..0000000 --- a/freeclimb/model/sms_ten_dlc_brands_list_result_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand - globals()['SMSTenDLCBrand'] = SMSTenDLCBrand - - -class SMSTenDLCBrandsListResultAllOf(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 { - 'brands': ([SMSTenDLCBrand], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'brands': 'brands', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTenDLCBrandsListResultAllOf - 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,) - brands ([SMSTenDLCBrand], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SMSTenDLCBrandsListResultAllOf - 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,) - brands ([SMSTenDLCBrand], none_type): [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: - 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/freeclimb/model/sms_ten_dlc_campaign.py b/freeclimb/model/sms_ten_dlc_campaign.py deleted file mode 100644 index 64c53b8..0000000 --- a/freeclimb/model/sms_ten_dlc_campaign.py +++ /dev/null @@ -1,475 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SMSTenDLCCampaign(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 = { - ('status',): { - 'ACTIVE': "ACTIVE", - 'EXPIRED': "EXPIRED", - }, - } - - validations = { - ('brand_id',): { - 'max_length': 8, - }, - ('usecase',): { - 'max_length': 20, - }, - ('sub_usecases',): { - }, - ('description',): { - 'max_length': 4096, - }, - ('reseller_id',): { - 'max_length': 8, - }, - ('sample1',): { - 'max_length': 1024, - }, - ('sample2',): { - 'max_length': 1024, - }, - ('sample3',): { - 'max_length': 1024, - }, - ('sample4',): { - 'max_length': 1024, - }, - ('sample5',): { - 'max_length': 1024, - }, - ('message_flow',): { - 'max_length': 2048, - }, - ('help_message',): { - 'max_length': 255, - }, - ('optin_keywords',): { - 'max_length': 255, - }, - ('optout_keywords',): { - 'max_length': 255, - }, - ('help_keywords',): { - 'max_length': 255, - }, - ('optin_message',): { - 'max_length': 255, - }, - ('optout_message',): { - 'max_length': 255, - }, - ('reference_id',): { - 'max_length': 50, - }, - } - - @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 { - 'campaign_id': (str,), # noqa: E501 - 'csp_id': (str,), # noqa: E501 - 'brand_id': (str,), # noqa: E501 - 'usecase': (str,), # noqa: E501 - 'sub_usecases': ([str],), # noqa: E501 - 'description': (str,), # noqa: E501 - 'mock': (bool,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'reseller_id': (str, none_type,), # noqa: E501 - 'status': (str, str,), - 'status': (str,), # noqa: E501 - 'create_date': (datetime,), # noqa: E501 - 'auto_renewal': (bool,), # noqa: E501 - 'billed_date': (datetime, none_type,), # noqa: E501 - 'embedded_link': (bool,), # noqa: E501 - 'embedded_phone': (bool,), # noqa: E501 - 'affiliate_marketing': (bool,), # noqa: E501 - 'number_pool': (bool,), # noqa: E501 - 'age_gated': (bool,), # noqa: E501 - 'direct_lending': (bool,), # noqa: E501 - 'subscriber_optin': (bool,), # noqa: E501 - 'subscriber_optout': (bool,), # noqa: E501 - 'subscriber_help': (bool,), # noqa: E501 - 'sample1': (str,), # noqa: E501 - 'sample2': (str, none_type,), # noqa: E501 - 'sample3': (str, none_type,), # noqa: E501 - 'sample4': (str, none_type,), # noqa: E501 - 'sample5': (str, none_type,), # noqa: E501 - 'message_flow': (str, none_type,), # noqa: E501 - 'help_message': (str, none_type,), # noqa: E501 - 'optin_keywords': (str,), # noqa: E501 - 'optout_keywords': (str,), # noqa: E501 - 'help_keywords': (str,), # noqa: E501 - 'optin_message': (str,), # noqa: E501 - 'optout_message': (str,), # noqa: E501 - 'reference_id': (str, none_type,), # noqa: E501 - 'next_renewal_or_expiration_date': (date, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'campaign_id': 'campaignId', # noqa: E501 - 'csp_id': 'cspId', # noqa: E501 - 'brand_id': 'brandId', # noqa: E501 - 'usecase': 'usecase', # noqa: E501 - 'sub_usecases': 'subUsecases', # noqa: E501 - 'description': 'description', # noqa: E501 - 'mock': 'mock', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'reseller_id': 'resellerId', # noqa: E501 - 'status': 'status', # noqa: E501 - 'create_date': 'createDate', # noqa: E501 - 'auto_renewal': 'autoRenewal', # noqa: E501 - 'billed_date': 'billedDate', # noqa: E501 - 'embedded_link': 'embeddedLink', # noqa: E501 - 'embedded_phone': 'embeddedPhone', # noqa: E501 - 'affiliate_marketing': 'affiliateMarketing', # noqa: E501 - 'number_pool': 'numberPool', # noqa: E501 - 'age_gated': 'ageGated', # noqa: E501 - 'direct_lending': 'directLending', # noqa: E501 - 'subscriber_optin': 'subscriberOptin', # noqa: E501 - 'subscriber_optout': 'subscriberOptout', # noqa: E501 - 'subscriber_help': 'subscriberHelp', # noqa: E501 - 'sample1': 'sample1', # noqa: E501 - 'sample2': 'sample2', # noqa: E501 - 'sample3': 'sample3', # noqa: E501 - 'sample4': 'sample4', # noqa: E501 - 'sample5': 'sample5', # noqa: E501 - 'message_flow': 'messageFlow', # noqa: E501 - 'help_message': 'helpMessage', # noqa: E501 - 'optin_keywords': 'optinKeywords', # noqa: E501 - 'optout_keywords': 'optoutKeywords', # noqa: E501 - 'help_keywords': 'helpKeywords', # noqa: E501 - 'optin_message': 'optinMessage', # noqa: E501 - 'optout_message': 'optoutMessage', # noqa: E501 - 'reference_id': 'referenceId', # noqa: E501 - 'next_renewal_or_expiration_date': 'nextRenewalOrExpirationDate', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, campaign_id, csp_id, brand_id, usecase, sub_usecases, description, mock, *args, **kwargs): # noqa: E501 - """SMSTenDLCCampaign - a model defined in OpenAPI - - Args: - campaign_id (str): Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. - csp_id (str): Alphanumeric identifier of the CSP associated with this campaign. - brand_id (str): Alphanumeric identifier of the brand associated with this campaign. - usecase (str): Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. - sub_usecases ([str]): Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases - description (str): Summary description of this campaign. - mock (bool): Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - reseller_id (str, none_type): Alphanumeric identifier of the reseller that you want to associate with this campaign.. [optional] # noqa: E501 - status (str): Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. . [optional] # noqa: E501 - create_date (datetime): Unix timestamp when campaign was created.. [optional] # noqa: E501 - auto_renewal (bool): Campaign subscription auto-renewal status.. [optional] # noqa: E501 - billed_date (datetime, none_type): Campaign recent billed date.. [optional] # noqa: E501 - embedded_link (bool): Does message generated by the campaign include URL link in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - embedded_phone (bool): Does message generated by the campaign include phone number in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - affiliate_marketing (bool): Does message content controlled by affiliate marketing other than the brand?. [optional] # noqa: E501 - number_pool (bool): Does campaign utilize pool of phone nubers?. [optional] if omitted the server will use the default value of False # noqa: E501 - age_gated (bool): Age gated content in campaign.. [optional] # noqa: E501 - direct_lending (bool): [optional] # noqa: E501 - subscriber_optin (bool): Does campaign require subscriber to opt-in before SMS is sent to subscriber?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_optout (bool): Does campaign support subscriber opt-out keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_help (bool): Does campaign responds to help keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - sample1 (str): Message sample. Some campaign tiers require 1 or more message samples.. [optional] # noqa: E501 - sample2 (str, none_type): Message sample. Some campaign tiers require 2 or more message samples.. [optional] # noqa: E501 - sample3 (str, none_type): Message sample. Some campaign tiers require 3 or more message samples.. [optional] # noqa: E501 - sample4 (str, none_type): Message sample. Some campaign tiers require 4 or more message samples.. [optional] # noqa: E501 - sample5 (str, none_type): Message sample. Some campaign tiers require 5 or more message samples.. [optional] # noqa: E501 - message_flow (str, none_type): Message flow description.. [optional] # noqa: E501 - help_message (str, none_type): Help message of the campaign.. [optional] # noqa: E501 - optin_keywords (str): Subscriber opt-in keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optout_keywords (str): Subscriber opt-out keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - help_keywords (str): Subscriber help keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optin_message (str): Subscriber opt-in message.. [optional] # noqa: E501 - optout_message (str): Subscriber opt-out message.. [optional] # noqa: E501 - reference_id (str, none_type): Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.. [optional] # noqa: E501 - next_renewal_or_expiration_date (date, none_type): When the campaign would be due for its next renew/bill date.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.campaign_id = campaign_id - self.csp_id = csp_id - self.brand_id = brand_id - self.usecase = usecase - self.sub_usecases = sub_usecases - self.description = description - self.mock = mock - 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, campaign_id, csp_id, brand_id, usecase, sub_usecases, description, mock, *args, **kwargs): # noqa: E501 - """SMSTenDLCCampaign - a model defined in OpenAPI - - Args: - campaign_id (str): Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. - csp_id (str): Alphanumeric identifier of the CSP associated with this campaign. - brand_id (str): Alphanumeric identifier of the brand associated with this campaign. - usecase (str): Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. - sub_usecases ([str]): Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases - description (str): Summary description of this campaign. - mock (bool): Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - reseller_id (str, none_type): Alphanumeric identifier of the reseller that you want to associate with this campaign.. [optional] # noqa: E501 - status (str): Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. . [optional] # noqa: E501 - create_date (datetime): Unix timestamp when campaign was created.. [optional] # noqa: E501 - auto_renewal (bool): Campaign subscription auto-renewal status.. [optional] # noqa: E501 - billed_date (datetime, none_type): Campaign recent billed date.. [optional] # noqa: E501 - embedded_link (bool): Does message generated by the campaign include URL link in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - embedded_phone (bool): Does message generated by the campaign include phone number in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - affiliate_marketing (bool): Does message content controlled by affiliate marketing other than the brand?. [optional] # noqa: E501 - number_pool (bool): Does campaign utilize pool of phone nubers?. [optional] if omitted the server will use the default value of False # noqa: E501 - age_gated (bool): Age gated content in campaign.. [optional] # noqa: E501 - direct_lending (bool): [optional] # noqa: E501 - subscriber_optin (bool): Does campaign require subscriber to opt-in before SMS is sent to subscriber?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_optout (bool): Does campaign support subscriber opt-out keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_help (bool): Does campaign responds to help keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - sample1 (str): Message sample. Some campaign tiers require 1 or more message samples.. [optional] # noqa: E501 - sample2 (str, none_type): Message sample. Some campaign tiers require 2 or more message samples.. [optional] # noqa: E501 - sample3 (str, none_type): Message sample. Some campaign tiers require 3 or more message samples.. [optional] # noqa: E501 - sample4 (str, none_type): Message sample. Some campaign tiers require 4 or more message samples.. [optional] # noqa: E501 - sample5 (str, none_type): Message sample. Some campaign tiers require 5 or more message samples.. [optional] # noqa: E501 - message_flow (str, none_type): Message flow description.. [optional] # noqa: E501 - help_message (str, none_type): Help message of the campaign.. [optional] # noqa: E501 - optin_keywords (str): Subscriber opt-in keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optout_keywords (str): Subscriber opt-out keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - help_keywords (str): Subscriber help keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optin_message (str): Subscriber opt-in message.. [optional] # noqa: E501 - optout_message (str): Subscriber opt-out message.. [optional] # noqa: E501 - reference_id (str, none_type): Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.. [optional] # noqa: E501 - next_renewal_or_expiration_date (date, none_type): When the campaign would be due for its next renew/bill date.. [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: - 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.campaign_id = campaign_id - self.csp_id = csp_id - self.brand_id = brand_id - self.usecase = usecase - self.sub_usecases = sub_usecases - self.description = description - self.mock = mock - 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/freeclimb/model/sms_ten_dlc_campaigns_list_result.py b/freeclimb/model/sms_ten_dlc_campaigns_list_result.py deleted file mode 100644 index 1fe1dfa..0000000 --- a/freeclimb/model/sms_ten_dlc_campaigns_list_result.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign - from freeclimb.model.sms_ten_dlc_campaigns_list_result_all_of import SMSTenDLCCampaignsListResultAllOf - globals()['PaginationModel'] = PaginationModel - globals()['SMSTenDLCCampaign'] = SMSTenDLCCampaign - globals()['SMSTenDLCCampaignsListResultAllOf'] = SMSTenDLCCampaignsListResultAllOf - -class SMSTenDLCCampaignsListResult(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'campaigns': ([SMSTenDLCCampaign], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'campaigns': 'campaigns', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTenDLCCampaignsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - campaigns ([SMSTenDLCCampaign], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SMSTenDLCCampaignsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - campaigns ([SMSTenDLCCampaign], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - SMSTenDLCCampaignsListResultAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/sms_ten_dlc_campaigns_list_result_all_of.py b/freeclimb/model/sms_ten_dlc_campaigns_list_result_all_of.py deleted file mode 100644 index b353bf6..0000000 --- a/freeclimb/model/sms_ten_dlc_campaigns_list_result_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign - globals()['SMSTenDLCCampaign'] = SMSTenDLCCampaign - - -class SMSTenDLCCampaignsListResultAllOf(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 { - 'campaigns': ([SMSTenDLCCampaign], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'campaigns': 'campaigns', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTenDLCCampaignsListResultAllOf - 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,) - campaigns ([SMSTenDLCCampaign], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SMSTenDLCCampaignsListResultAllOf - 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,) - campaigns ([SMSTenDLCCampaign], none_type): [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: - 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/freeclimb/model/sms_ten_dlc_partner_campaign.py b/freeclimb/model/sms_ten_dlc_partner_campaign.py deleted file mode 100644 index 0a3a01f..0000000 --- a/freeclimb/model/sms_ten_dlc_partner_campaign.py +++ /dev/null @@ -1,439 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.sms_ten_dlc_partner_campaign_brand import SMSTenDLCPartnerCampaignBrand - globals()['SMSTenDLCPartnerCampaignBrand'] = SMSTenDLCPartnerCampaignBrand - - -class SMSTenDLCPartnerCampaign(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 = { - ('status',): { - 'ACTIVE': "ACTIVE", - 'EXPIRED': "EXPIRED", - }, - } - - validations = { - ('brand_id',): { - 'max_length': 8, - }, - ('usecase',): { - 'max_length': 20, - }, - ('description',): { - 'max_length': 4096, - }, - ('sample1',): { - 'max_length': 1024, - }, - ('sample2',): { - 'max_length': 1024, - }, - ('sample3',): { - 'max_length': 1024, - }, - ('sample4',): { - 'max_length': 1024, - }, - ('sample5',): { - 'max_length': 1024, - }, - ('message_flow',): { - 'max_length': 2048, - }, - ('help_message',): { - 'max_length': 255, - }, - ('optin_keywords',): { - 'max_length': 255, - }, - ('optout_keywords',): { - 'max_length': 255, - }, - ('help_keywords',): { - 'max_length': 255, - }, - ('optin_message',): { - 'max_length': 255, - }, - ('optout_message',): { - 'max_length': 255, - }, - } - - @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 { - 'campaign_id': (str,), # noqa: E501 - 'brand_id': (str,), # noqa: E501 - 'usecase': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'status': (str, str,), - 'status': (str,), # noqa: E501 - 'create_date': (datetime,), # noqa: E501 - 'embedded_link': (bool,), # noqa: E501 - 'embedded_phone': (bool,), # noqa: E501 - 'affiliate_marketing': (bool,), # noqa: E501 - 'number_pool': (bool,), # noqa: E501 - 'age_gated': (bool,), # noqa: E501 - 'direct_lending': (bool,), # noqa: E501 - 'subscriber_optin': (bool,), # noqa: E501 - 'subscriber_optout': (bool,), # noqa: E501 - 'subscriber_help': (bool,), # noqa: E501 - 'sample1': (str,), # noqa: E501 - 'sample2': (str, none_type,), # noqa: E501 - 'sample3': (str, none_type,), # noqa: E501 - 'sample4': (str, none_type,), # noqa: E501 - 'sample5': (str, none_type,), # noqa: E501 - 'message_flow': (str, none_type,), # noqa: E501 - 'help_message': (str, none_type,), # noqa: E501 - 'optin_keywords': (str,), # noqa: E501 - 'optout_keywords': (str,), # noqa: E501 - 'help_keywords': (str,), # noqa: E501 - 'optin_message': (str,), # noqa: E501 - 'optout_message': (str,), # noqa: E501 - 'brand': (SMSTenDLCPartnerCampaignBrand,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'campaign_id': 'campaignId', # noqa: E501 - 'brand_id': 'brandId', # noqa: E501 - 'usecase': 'usecase', # noqa: E501 - 'description': 'description', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'status': 'status', # noqa: E501 - 'create_date': 'createDate', # noqa: E501 - 'embedded_link': 'embeddedLink', # noqa: E501 - 'embedded_phone': 'embeddedPhone', # noqa: E501 - 'affiliate_marketing': 'affiliateMarketing', # noqa: E501 - 'number_pool': 'numberPool', # noqa: E501 - 'age_gated': 'ageGated', # noqa: E501 - 'direct_lending': 'directLending', # noqa: E501 - 'subscriber_optin': 'subscriberOptin', # noqa: E501 - 'subscriber_optout': 'subscriberOptout', # noqa: E501 - 'subscriber_help': 'subscriberHelp', # noqa: E501 - 'sample1': 'sample1', # noqa: E501 - 'sample2': 'sample2', # noqa: E501 - 'sample3': 'sample3', # noqa: E501 - 'sample4': 'sample4', # noqa: E501 - 'sample5': 'sample5', # noqa: E501 - 'message_flow': 'messageFlow', # noqa: E501 - 'help_message': 'helpMessage', # noqa: E501 - 'optin_keywords': 'optinKeywords', # noqa: E501 - 'optout_keywords': 'optoutKeywords', # noqa: E501 - 'help_keywords': 'helpKeywords', # noqa: E501 - 'optin_message': 'optinMessage', # noqa: E501 - 'optout_message': 'optoutMessage', # noqa: E501 - 'brand': 'brand', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, campaign_id, brand_id, usecase, description, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaign - a model defined in OpenAPI - - Args: - campaign_id (str): Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. - brand_id (str): Alphanumeric identifier of the brand associated with this campaign. - usecase (str): Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. - description (str): Summary description of this campaign. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - status (str): Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. . [optional] # noqa: E501 - create_date (datetime): Unix timestamp when campaign was created.. [optional] # noqa: E501 - embedded_link (bool): Does message generated by the campaign include URL link in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - embedded_phone (bool): Does message generated by the campaign include phone number in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - affiliate_marketing (bool): Does message content controlled by affiliate marketing other than the brand?. [optional] # noqa: E501 - number_pool (bool): Does campaign utilize pool of phone nubers?. [optional] if omitted the server will use the default value of False # noqa: E501 - age_gated (bool): Age gated content in campaign.. [optional] # noqa: E501 - direct_lending (bool): [optional] # noqa: E501 - subscriber_optin (bool): Does campaign require subscriber to opt-in before SMS is sent to subscriber?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_optout (bool): Does campaign support subscriber opt-out keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_help (bool): Does campaign responds to help keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - sample1 (str): Message sample. Some campaign tiers require 1 or more message samples.. [optional] # noqa: E501 - sample2 (str, none_type): Message sample. Some campaign tiers require 2 or more message samples.. [optional] # noqa: E501 - sample3 (str, none_type): Message sample. Some campaign tiers require 3 or more message samples.. [optional] # noqa: E501 - sample4 (str, none_type): Message sample. Some campaign tiers require 4 or more message samples.. [optional] # noqa: E501 - sample5 (str, none_type): Message sample. Some campaign tiers require 5 or more message samples.. [optional] # noqa: E501 - message_flow (str, none_type): Message flow description.. [optional] # noqa: E501 - help_message (str, none_type): Help message of the campaign.. [optional] # noqa: E501 - optin_keywords (str): Subscriber opt-in keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optout_keywords (str): Subscriber opt-out keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - help_keywords (str): Subscriber help keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optin_message (str): Subscriber opt-in message.. [optional] # noqa: E501 - optout_message (str): Subscriber opt-out message.. [optional] # noqa: E501 - brand (SMSTenDLCPartnerCampaignBrand): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.campaign_id = campaign_id - self.brand_id = brand_id - self.usecase = usecase - self.description = description - 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, campaign_id, brand_id, usecase, description, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaign - a model defined in OpenAPI - - Args: - campaign_id (str): Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. - brand_id (str): Alphanumeric identifier of the brand associated with this campaign. - usecase (str): Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. - description (str): Summary description of this campaign. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - status (str): Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. . [optional] # noqa: E501 - create_date (datetime): Unix timestamp when campaign was created.. [optional] # noqa: E501 - embedded_link (bool): Does message generated by the campaign include URL link in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - embedded_phone (bool): Does message generated by the campaign include phone number in SMS?. [optional] if omitted the server will use the default value of False # noqa: E501 - affiliate_marketing (bool): Does message content controlled by affiliate marketing other than the brand?. [optional] # noqa: E501 - number_pool (bool): Does campaign utilize pool of phone nubers?. [optional] if omitted the server will use the default value of False # noqa: E501 - age_gated (bool): Age gated content in campaign.. [optional] # noqa: E501 - direct_lending (bool): [optional] # noqa: E501 - subscriber_optin (bool): Does campaign require subscriber to opt-in before SMS is sent to subscriber?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_optout (bool): Does campaign support subscriber opt-out keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - subscriber_help (bool): Does campaign responds to help keyword(s)?. [optional] if omitted the server will use the default value of False # noqa: E501 - sample1 (str): Message sample. Some campaign tiers require 1 or more message samples.. [optional] # noqa: E501 - sample2 (str, none_type): Message sample. Some campaign tiers require 2 or more message samples.. [optional] # noqa: E501 - sample3 (str, none_type): Message sample. Some campaign tiers require 3 or more message samples.. [optional] # noqa: E501 - sample4 (str, none_type): Message sample. Some campaign tiers require 4 or more message samples.. [optional] # noqa: E501 - sample5 (str, none_type): Message sample. Some campaign tiers require 5 or more message samples.. [optional] # noqa: E501 - message_flow (str, none_type): Message flow description.. [optional] # noqa: E501 - help_message (str, none_type): Help message of the campaign.. [optional] # noqa: E501 - optin_keywords (str): Subscriber opt-in keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optout_keywords (str): Subscriber opt-out keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - help_keywords (str): Subscriber help keywords. Multiple keywords are comma separated without space.. [optional] # noqa: E501 - optin_message (str): Subscriber opt-in message.. [optional] # noqa: E501 - optout_message (str): Subscriber opt-out message.. [optional] # noqa: E501 - brand (SMSTenDLCPartnerCampaignBrand): [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: - 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.campaign_id = campaign_id - self.brand_id = brand_id - self.usecase = usecase - self.description = description - 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/freeclimb/model/sms_ten_dlc_partner_campaign_brand.py b/freeclimb/model/sms_ten_dlc_partner_campaign_brand.py deleted file mode 100644 index a9346ec..0000000 --- a/freeclimb/model/sms_ten_dlc_partner_campaign_brand.py +++ /dev/null @@ -1,329 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SMSTenDLCPartnerCampaignBrand(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 = { - ('phone',): { - 'max_length': 20, - }, - ('email',): { - 'max_length': 100, - }, - ('first_name',): { - 'max_length': 100, - }, - ('last_name',): { - 'max_length': 100, - }, - ('display_name',): { - 'max_length': 255, - }, - ('company_name',): { - 'max_length': 255, - }, - ('website',): { - 'max_length': 100, - }, - } - - @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 { - 'phone': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'account_id': (str, none_type,), # noqa: E501 - 'brand_id': (str,), # noqa: E501 - 'first_name': (str,), # noqa: E501 - 'last_name': (str,), # noqa: E501 - 'display_name': (str,), # noqa: E501 - 'company_name': (str,), # noqa: E501 - 'website': (str,), # noqa: E501 - 'optional_attributes': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)},), # noqa: E501 - 'evp_vetting_score': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'phone': 'phone', # noqa: E501 - 'email': 'email', # noqa: E501 - 'account_id': 'accountId', # noqa: E501 - 'brand_id': 'brandId', # noqa: E501 - 'first_name': 'firstName', # noqa: E501 - 'last_name': 'lastName', # noqa: E501 - 'display_name': 'displayName', # noqa: E501 - 'company_name': 'companyName', # noqa: E501 - 'website': 'website', # noqa: E501 - 'optional_attributes': 'optionalAttributes', # noqa: E501 - 'evp_vetting_score': 'evpVettingScore', # noqa: E501 - } - - read_only_vars = { - 'brand_id', # noqa: E501 - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, phone, email, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaignBrand - a model defined in OpenAPI - - Args: - phone (str): Valid phone number in e.164 international format. - email (str): Valid email address of brand support contact. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - brand_id (str): Unique identifier assigned to the brand by the registry.. [optional] # noqa: E501 - first_name (str): First or given name. . [optional] # noqa: E501 - last_name (str): Last or Surname.. [optional] # noqa: E501 - display_name (str): Display or marketing name of the brand.. [optional] # noqa: E501 - company_name (str): (Required for Non-profit/private/public) Legal company name.. [optional] # noqa: E501 - website (str): Brand website URL.. [optional] # noqa: E501 - optional_attributes ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}): Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.. [optional] # noqa: E501 - evp_vetting_score (int): External vetting score.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.phone = phone - self.email = email - 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, phone, email, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaignBrand - a model defined in OpenAPI - - Args: - phone (str): Valid phone number in e.164 international format. - email (str): Valid email address of brand support contact. - - 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,) - account_id (str, none_type): ID of the account that created this Queue.. [optional] # noqa: E501 - brand_id (str): Unique identifier assigned to the brand by the registry.. [optional] # noqa: E501 - first_name (str): First or given name. . [optional] # noqa: E501 - last_name (str): Last or Surname.. [optional] # noqa: E501 - display_name (str): Display or marketing name of the brand.. [optional] # noqa: E501 - company_name (str): (Required for Non-profit/private/public) Legal company name.. [optional] # noqa: E501 - website (str): Brand website URL.. [optional] # noqa: E501 - optional_attributes ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}): Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.. [optional] # noqa: E501 - evp_vetting_score (int): External vetting score.. [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: - 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.phone = phone - self.email = email - 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/freeclimb/model/sms_ten_dlc_partner_campaigns_list_result.py b/freeclimb/model/sms_ten_dlc_partner_campaigns_list_result.py deleted file mode 100644 index c34ac7f..0000000 --- a/freeclimb/model/sms_ten_dlc_partner_campaigns_list_result.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign - from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result_all_of import SMSTenDLCPartnerCampaignsListResultAllOf - globals()['PaginationModel'] = PaginationModel - globals()['SMSTenDLCPartnerCampaign'] = SMSTenDLCPartnerCampaign - globals()['SMSTenDLCPartnerCampaignsListResultAllOf'] = SMSTenDLCPartnerCampaignsListResultAllOf - -class SMSTenDLCPartnerCampaignsListResult(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'partner_campaigns': ([SMSTenDLCPartnerCampaign], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'partner_campaigns': 'partnerCampaigns', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaignsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - partner_campaigns ([SMSTenDLCPartnerCampaign], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaignsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - partner_campaigns ([SMSTenDLCPartnerCampaign], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - SMSTenDLCPartnerCampaignsListResultAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/sms_ten_dlc_partner_campaigns_list_result_all_of.py b/freeclimb/model/sms_ten_dlc_partner_campaigns_list_result_all_of.py deleted file mode 100644 index 75edabf..0000000 --- a/freeclimb/model/sms_ten_dlc_partner_campaigns_list_result_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign - globals()['SMSTenDLCPartnerCampaign'] = SMSTenDLCPartnerCampaign - - -class SMSTenDLCPartnerCampaignsListResultAllOf(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 { - 'partner_campaigns': ([SMSTenDLCPartnerCampaign], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'partner_campaigns': 'partnerCampaigns', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTenDLCPartnerCampaignsListResultAllOf - 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,) - partner_campaigns ([SMSTenDLCPartnerCampaign], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SMSTenDLCPartnerCampaignsListResultAllOf - 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,) - partner_campaigns ([SMSTenDLCPartnerCampaign], none_type): [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: - 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/freeclimb/model/sms_toll_free_campaign.py b/freeclimb/model/sms_toll_free_campaign.py deleted file mode 100644 index 57227e0..0000000 --- a/freeclimb/model/sms_toll_free_campaign.py +++ /dev/null @@ -1,309 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class SMSTollFreeCampaign(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 = { - ('registration_status',): { - 'UNREGISTERED': "UNREGISTERED", - 'INITIATED': "INITIATED", - 'PENDING': "PENDING", - 'DECLINED': "DECLINED", - 'REGISTERED': "REGISTERED", - }, - } - - 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 { - 'account_id': (str, none_type,), # noqa: E501 - 'campaign_id': (str,), # noqa: E501 - 'use_case': (str,), # noqa: E501 - 'registration_status': (str, str,), - 'registration_status': (str,), # noqa: E501 - 'date_created': (str,), # noqa: E501 - 'date_updated': (str,), # noqa: E501 - 'revision': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'account_id': 'accountId', # noqa: E501 - 'campaign_id': 'campaignId', # noqa: E501 - 'use_case': 'useCase', # noqa: E501 - 'registration_status': 'registrationStatus', # noqa: E501 - 'date_created': 'dateCreated', # noqa: E501 - 'date_updated': 'dateUpdated', # noqa: E501 - 'revision': 'revision', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, account_id, campaign_id, use_case, registration_status, date_created, date_updated, revision, *args, **kwargs): # noqa: E501 - """SMSTollFreeCampaign - a model defined in OpenAPI - - Args: - account_id (str, none_type): ID of the account that created this toll-free campaign - campaign_id (str): Alphanumeric identifier used by the platform to identify this toll-free campaign - use_case (str): - registration_status (str): Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. - date_created (str): - date_updated (str): - revision (int): - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.account_id = account_id - self.campaign_id = campaign_id - self.use_case = use_case - self.registration_status = registration_status - self.date_created = date_created - self.date_updated = date_updated - self.revision = revision - 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, account_id, campaign_id, use_case, registration_status, date_created, date_updated, revision, *args, **kwargs): # noqa: E501 - """SMSTollFreeCampaign - a model defined in OpenAPI - - Args: - account_id (str, none_type): ID of the account that created this toll-free campaign - campaign_id (str): Alphanumeric identifier used by the platform to identify this toll-free campaign - use_case (str): - registration_status (str): Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. - date_created (str): - date_updated (str): - revision (int): - - 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,) - """ - - _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: - 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.account_id = account_id - self.campaign_id = campaign_id - self.use_case = use_case - self.registration_status = registration_status - self.date_created = date_created - self.date_updated = date_updated - self.revision = revision - 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/freeclimb/model/sms_toll_free_campaigns_list_result.py b/freeclimb/model/sms_toll_free_campaigns_list_result.py deleted file mode 100644 index 6b11542..0000000 --- a/freeclimb/model/sms_toll_free_campaigns_list_result.py +++ /dev/null @@ -1,345 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.pagination_model import PaginationModel - from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign - from freeclimb.model.sms_toll_free_campaigns_list_result_all_of import SMSTollFreeCampaignsListResultAllOf - globals()['PaginationModel'] = PaginationModel - globals()['SMSTollFreeCampaign'] = SMSTollFreeCampaign - globals()['SMSTollFreeCampaignsListResultAllOf'] = SMSTollFreeCampaignsListResultAllOf - -class SMSTollFreeCampaignsListResult(ModelComposed): - """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 { - 'total': (int, none_type,), # noqa: E501 - 'start': (int, none_type,), # noqa: E501 - 'end': (int, none_type,), # noqa: E501 - 'page': (int, none_type,), # noqa: E501 - 'num_pages': (int, none_type,), # noqa: E501 - 'page_size': (int, none_type,), # noqa: E501 - 'next_page_uri': (str, none_type,), # noqa: E501 - 'brands': ([SMSTollFreeCampaign], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'total': 'total', # noqa: E501 - 'start': 'start', # noqa: E501 - 'end': 'end', # noqa: E501 - 'page': 'page', # noqa: E501 - 'num_pages': 'numPages', # noqa: E501 - 'page_size': 'pageSize', # noqa: E501 - 'next_page_uri': 'nextPageUri', # noqa: E501 - 'brands': 'brands', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTollFreeCampaignsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - brands ([SMSTollFreeCampaign], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SMSTollFreeCampaignsListResult - 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,) - total (int, none_type): Total amount of requested resource.. [optional] # noqa: E501 - start (int, none_type): Resource index at start of current page. [optional] # noqa: E501 - end (int, none_type): Resource index at end of current page. [optional] # noqa: E501 - page (int, none_type): Current page. [optional] # noqa: E501 - num_pages (int, none_type): Total number of pages. [optional] # noqa: E501 - page_size (int, none_type): Number of items per page. [optional] # noqa: E501 - next_page_uri (str, none_type): Uri to retrieve the next page of items. [optional] # noqa: E501 - brands ([SMSTollFreeCampaign], none_type): [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PaginationModel, - SMSTollFreeCampaignsListResultAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/sms_toll_free_campaigns_list_result_all_of.py b/freeclimb/model/sms_toll_free_campaigns_list_result_all_of.py deleted file mode 100644 index ca0a69a..0000000 --- a/freeclimb/model/sms_toll_free_campaigns_list_result_all_of.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign - globals()['SMSTollFreeCampaign'] = SMSTollFreeCampaign - - -class SMSTollFreeCampaignsListResultAllOf(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 { - 'brands': ([SMSTollFreeCampaign], none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'brands': 'brands', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SMSTollFreeCampaignsListResultAllOf - 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,) - brands ([SMSTollFreeCampaign], none_type): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """SMSTollFreeCampaignsListResultAllOf - 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,) - brands ([SMSTollFreeCampaign], none_type): [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: - 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/freeclimb/model/start_record_call.py b/freeclimb/model/start_record_call.py deleted file mode 100644 index 1feb5af..0000000 --- a/freeclimb/model/start_record_call.py +++ /dev/null @@ -1,372 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class StartRecordCall(ModelComposed): - """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 { - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """StartRecordCall - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """StartRecordCall - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == StartRecordCall), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(StartRecordCall.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/terminate_conference.py b/freeclimb/model/terminate_conference.py deleted file mode 100644 index afd8cb0..0000000 --- a/freeclimb/model/terminate_conference.py +++ /dev/null @@ -1,372 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class TerminateConference(ModelComposed): - """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 { - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TerminateConference - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TerminateConference - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == TerminateConference), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(TerminateConference.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/tfn.py b/freeclimb/model/tfn.py deleted file mode 100644 index 915f8ed..0000000 --- a/freeclimb/model/tfn.py +++ /dev/null @@ -1,265 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class TFN(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 { - 'campaign_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'campaign_id': 'campaignId', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, campaign_id, *args, **kwargs): # noqa: E501 - """TFN - a model defined in OpenAPI - - Args: - campaign_id (str): alphanumeric identifier for the TollFree campaign associated with this number - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.campaign_id = campaign_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, campaign_id, *args, **kwargs): # noqa: E501 - """TFN - a model defined in OpenAPI - - Args: - campaign_id (str): alphanumeric identifier for the TollFree campaign associated with this number - - 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,) - """ - - _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: - 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.campaign_id = campaign_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/freeclimb/model/transcribe_utterance.py b/freeclimb/model/transcribe_utterance.py deleted file mode 100644 index c692f57..0000000 --- a/freeclimb/model/transcribe_utterance.py +++ /dev/null @@ -1,401 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.transcribe_utterance_all_of import TranscribeUtteranceAllOf - from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['TranscribeUtteranceAllOf'] = TranscribeUtteranceAllOf - globals()['TranscribeUtteranceAllOfRecord'] = TranscribeUtteranceAllOfRecord - globals()['Unpark'] = Unpark - -class TranscribeUtterance(ModelComposed): - """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 { - 'action_url': (str,), # noqa: E501 - 'play_beep': (bool,), # noqa: E501 - 'record': (TranscribeUtteranceAllOfRecord,), # noqa: E501 - 'privacy_for_logging': (bool,), # noqa: E501 - 'privacy_for_recording': (bool,), # noqa: E501 - 'prompts': ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'privacy_for_logging': 'privacyForLogging', # noqa: E501 - 'privacy_for_recording': 'privacyForRecording', # noqa: E501 - 'prompts': 'prompts', # noqa: E501 - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TranscribeUtterance - a model defined in OpenAPI - - Keyword Args: - action_url (str): - _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,) - play_beep (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - record (TranscribeUtteranceAllOfRecord): [optional] # noqa: E501 - privacy_for_logging (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - privacy_for_recording (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - prompts ([bool, date, datetime, dict, float, int, list, str, none_type]): [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """TranscribeUtterance - a model defined in OpenAPI - - Keyword Args: - action_url (str): - _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,) - play_beep (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - record (TranscribeUtteranceAllOfRecord): [optional] # noqa: E501 - privacy_for_logging (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - privacy_for_recording (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - prompts ([bool, date, datetime, dict, float, int, list, str, none_type]): [optional] # noqa: E501 - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == TranscribeUtterance), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(TranscribeUtterance.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - TranscribeUtteranceAllOf, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/transcribe_utterance_all_of.py b/freeclimb/model/transcribe_utterance_all_of.py deleted file mode 100644 index 96c8aa8..0000000 --- a/freeclimb/model/transcribe_utterance_all_of.py +++ /dev/null @@ -1,291 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord - globals()['TranscribeUtteranceAllOfRecord'] = TranscribeUtteranceAllOfRecord - - -class TranscribeUtteranceAllOf(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 { - 'action_url': (str,), # noqa: E501 - 'play_beep': (bool,), # noqa: E501 - 'record': (TranscribeUtteranceAllOfRecord,), # noqa: E501 - 'privacy_for_logging': (bool,), # noqa: E501 - 'privacy_for_recording': (bool,), # noqa: E501 - 'prompts': ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'action_url': 'actionUrl', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'record': 'record', # noqa: E501 - 'privacy_for_logging': 'privacyForLogging', # noqa: E501 - 'privacy_for_recording': 'privacyForRecording', # noqa: E501 - 'prompts': 'prompts', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, action_url, *args, **kwargs): # noqa: E501 - """TranscribeUtteranceAllOf - a model defined in OpenAPI - - Args: - action_url (str): - - 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,) - play_beep (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - record (TranscribeUtteranceAllOfRecord): [optional] # noqa: E501 - privacy_for_logging (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - privacy_for_recording (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - prompts ([bool, date, datetime, dict, float, int, list, str, none_type]): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.action_url = action_url - 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, action_url, *args, **kwargs): # noqa: E501 - """TranscribeUtteranceAllOf - a model defined in OpenAPI - - Args: - action_url (str): - - 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,) - play_beep (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - record (TranscribeUtteranceAllOfRecord): [optional] # noqa: E501 - privacy_for_logging (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - privacy_for_recording (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - prompts ([bool, date, datetime, dict, float, int, list, str, none_type]): [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: - 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.action_url = action_url - 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/freeclimb/model/transcribe_utterance_all_of_record.py b/freeclimb/model/transcribe_utterance_all_of_record.py deleted file mode 100644 index 51b1118..0000000 --- a/freeclimb/model/transcribe_utterance_all_of_record.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class TranscribeUtteranceAllOfRecord(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 = { - ('max_length_sec',): { - 'inclusive_maximum': 60, - 'inclusive_minimum': 1, - }, - ('rcrd_termination_silence_time_ms',): { - 'inclusive_maximum': 3000, - 'exclusive_minimum''inclusive_minimum': 0, - }, - } - - @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 { - 'save_recording': (bool,), # noqa: E501 - 'max_length_sec': (int,), # noqa: E501 - 'rcrd_termination_silence_time_ms': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'save_recording': 'saveRecording', # noqa: E501 - 'max_length_sec': 'maxLengthSec', # noqa: E501 - 'rcrd_termination_silence_time_ms': 'rcrdTerminationSilenceTimeMs', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TranscribeUtteranceAllOfRecord - 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,) - save_recording (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - max_length_sec (int): [optional] if omitted the server will use the default value of 60 # noqa: E501 - rcrd_termination_silence_time_ms (int): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """TranscribeUtteranceAllOfRecord - 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,) - save_recording (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - max_length_sec (int): [optional] if omitted the server will use the default value of 60 # noqa: E501 - rcrd_termination_silence_time_ms (int): [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: - 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/freeclimb/model/unpark.py b/freeclimb/model/unpark.py deleted file mode 100644 index 74b110a..0000000 --- a/freeclimb/model/unpark.py +++ /dev/null @@ -1,372 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.add_to_conference import AddToConference - from freeclimb.model.create_conference import CreateConference - from freeclimb.model.dequeue import Dequeue - from freeclimb.model.enqueue import Enqueue - from freeclimb.model.get_digits import GetDigits - from freeclimb.model.get_speech import GetSpeech - from freeclimb.model.hangup import Hangup - from freeclimb.model.out_dial import OutDial - from freeclimb.model.park import Park - from freeclimb.model.pause import Pause - from freeclimb.model.percl_command import PerclCommand - from freeclimb.model.play import Play - from freeclimb.model.play_early_media import PlayEarlyMedia - from freeclimb.model.record_utterance import RecordUtterance - from freeclimb.model.redirect import Redirect - from freeclimb.model.reject import Reject - from freeclimb.model.remove_from_conference import RemoveFromConference - from freeclimb.model.say import Say - from freeclimb.model.send_digits import SendDigits - from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough - from freeclimb.model.set_listen import SetListen - from freeclimb.model.set_talk import SetTalk - from freeclimb.model.sms import Sms - from freeclimb.model.start_record_call import StartRecordCall - from freeclimb.model.terminate_conference import TerminateConference - from freeclimb.model.transcribe_utterance import TranscribeUtterance - from freeclimb.model.unpark import Unpark - globals()['AddToConference'] = AddToConference - globals()['CreateConference'] = CreateConference - globals()['Dequeue'] = Dequeue - globals()['Enqueue'] = Enqueue - globals()['GetDigits'] = GetDigits - globals()['GetSpeech'] = GetSpeech - globals()['Hangup'] = Hangup - globals()['OutDial'] = OutDial - globals()['Park'] = Park - globals()['Pause'] = Pause - globals()['PerclCommand'] = PerclCommand - globals()['Play'] = Play - globals()['PlayEarlyMedia'] = PlayEarlyMedia - globals()['RecordUtterance'] = RecordUtterance - globals()['Redirect'] = Redirect - globals()['Reject'] = Reject - globals()['RemoveFromConference'] = RemoveFromConference - globals()['Say'] = Say - globals()['SendDigits'] = SendDigits - globals()['SetDTMFPassThrough'] = SetDTMFPassThrough - globals()['SetListen'] = SetListen - globals()['SetTalk'] = SetTalk - globals()['Sms'] = Sms - globals()['StartRecordCall'] = StartRecordCall - globals()['TerminateConference'] = TerminateConference - globals()['TranscribeUtterance'] = TranscribeUtterance - globals()['Unpark'] = Unpark - -class Unpark(ModelComposed): - """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 { - 'command': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'command': 'command', # noqa: E501 - } - - read_only_vars = { - } - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Unpark - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """Unpark - 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,) - command (str): Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments). [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: - 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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - composed_info = validate_get_composed_info( - constant_args, kwargs, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - discarded_args = composed_info[3] - - for var_name, var_value in kwargs.items(): - if var_name in discarded_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self._additional_properties_model_instances: - # 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.") - - @cached_property - def command(): - mappings = PerclCommand.discriminator['command'] - mapping = next((mapping for mapping,schema in mappings.items() if schema == Unpark), None) - if mapping == None: - raise ApiAttributeError("{0} has no mapping '{1}'".format(Unpark.__class__.name, 'command')) - return mapping - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - PerclCommand, - ], - 'oneOf': [ - ], - } diff --git a/freeclimb/model/update_call_request.py b/freeclimb/model/update_call_request.py deleted file mode 100644 index 3326bcf..0000000 --- a/freeclimb/model/update_call_request.py +++ /dev/null @@ -1,271 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.update_call_request_status import UpdateCallRequestStatus - globals()['UpdateCallRequestStatus'] = UpdateCallRequestStatus - - -class UpdateCallRequest(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 { - 'status': (UpdateCallRequestStatus,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'status': 'status', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, status, *args, **kwargs): # noqa: E501 - """UpdateCallRequest - a model defined in OpenAPI - - Args: - status (UpdateCallRequestStatus): - - 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,) - """ - - _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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.status = status - 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, status, *args, **kwargs): # noqa: E501 - """UpdateCallRequest - a model defined in OpenAPI - - Args: - status (UpdateCallRequestStatus): - - 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,) - """ - - _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: - 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.status = status - 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/freeclimb/model/update_conference_participant_request.py b/freeclimb/model/update_conference_participant_request.py deleted file mode 100644 index dd9545b..0000000 --- a/freeclimb/model/update_conference_participant_request.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - - -class UpdateConferenceParticipantRequest(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 { - 'talk': (bool,), # noqa: E501 - 'listen': (bool,), # noqa: E501 - 'dtmf_pass_through': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'talk': 'talk', # noqa: E501 - 'listen': 'listen', # noqa: E501 - 'dtmf_pass_through': 'dtmfPassThrough', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateConferenceParticipantRequest - 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,) - talk (bool): (Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value.. [optional] # noqa: E501 - listen (bool): (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value.. [optional] # noqa: E501 - dtmf_pass_through (bool): (Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """UpdateConferenceParticipantRequest - 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,) - talk (bool): (Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value.. [optional] # noqa: E501 - listen (bool): (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value.. [optional] # noqa: E501 - dtmf_pass_through (bool): (Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value.. [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: - 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/freeclimb/model/update_conference_request.py b/freeclimb/model/update_conference_request.py deleted file mode 100644 index 4bc0307..0000000 --- a/freeclimb/model/update_conference_request.py +++ /dev/null @@ -1,275 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError - - - -def lazy_import(): - from freeclimb.model.play_beep import PlayBeep - from freeclimb.model.update_conference_request_status import UpdateConferenceRequestStatus - globals()['PlayBeep'] = PlayBeep - globals()['UpdateConferenceRequestStatus'] = UpdateConferenceRequestStatus - - -class UpdateConferenceRequest(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 { - 'alias': (str,), # noqa: E501 - 'play_beep': (PlayBeep,), # noqa: E501 - 'status': (UpdateConferenceRequestStatus,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'alias': 'alias', # noqa: E501 - 'play_beep': 'playBeep', # noqa: E501 - 'status': 'status', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UpdateConferenceRequest - 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,) - alias (str): Description for this conference. Maximum 64 characters.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - status (UpdateConferenceRequestStatus): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """UpdateConferenceRequest - 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,) - alias (str): Description for this conference. Maximum 64 characters.. [optional] # noqa: E501 - play_beep (PlayBeep): [optional] # noqa: E501 - status (UpdateConferenceRequestStatus): [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: - 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/freeclimb/model_utils.py b/freeclimb/model_utils.py index 443122a..c263c78 100644 --- a/freeclimb/model_utils.py +++ b/freeclimb/model_utils.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - from datetime import date, datetime # noqa: F401 from copy import deepcopy import inspect @@ -34,6 +33,7 @@ def convert_js_args_to_python_args(fn): from functools import wraps + @wraps(fn) def wrapped_init(_self, *args, **kwargs): """ @@ -41,10 +41,13 @@ def wrapped_init(_self, *args, **kwargs): parameter of a class method. During generation, `self` attributes are mapped to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. """ - spec_property_naming = kwargs.get('_spec_property_naming', False) + spec_property_naming = kwargs.get("_spec_property_naming", False) if spec_property_naming: - kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) + kwargs = change_keys_js_to_python( + kwargs, _self if isinstance(_self, type) else _self.__class__ + ) return fn(_self, *args, **kwargs) + return wrapped_init @@ -52,7 +55,7 @@ class cached_property(object): # this caches the result of the function call for fn with no inputs # use this as a decorator on function methods that you want converted # into cached properties - result_key = '_results' + result_key = "_results" def __init__(self, fn): self._fn = fn @@ -68,6 +71,7 @@ def __get__(self, instance, cls=None): PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + def allows_single_value_input(cls): """ This function returns True if the input composed schema model or any @@ -81,17 +85,15 @@ def allows_single_value_input(cls): - null TODO: lru_cache this """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: return True elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: + if not cls._composed_schemas["oneOf"]: return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return any(allows_single_value_input(c) for c in cls._composed_schemas["oneOf"]) return False + def composed_model_input_classes(cls): """ This function returns a list of the possible models that can be accepted as @@ -106,11 +108,11 @@ def composed_model_input_classes(cls): else: return get_discriminated_classes(cls) elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: + if not cls._composed_schemas["oneOf"]: return [] if cls.discriminator is None: input_classes = [] - for c in cls._composed_schemas['oneOf']: + for c in cls._composed_schemas["oneOf"]: input_classes.extend(composed_model_input_classes(c)) return input_classes else: @@ -133,45 +135,37 @@ def set_attribute(self, name, value): required_types_mixed = self.openapi_types[name] elif self.additional_properties_type is None: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item + "{0} has no attribute '{1}'".format(type(self).__name__, name), + path_to_item, ) elif self.additional_properties_type is not None: required_types_mixed = self.additional_properties_type if get_simple_class(name) != str: error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True + var_name=name, var_value=name, valid_classes=(str,), key_type=True ) raise ApiTypeError( error_msg, path_to_item=path_to_item, valid_classes=(str,), - key_type=True + key_type=True, ) if self._check_type: value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), value, - self._configuration + required_types_mixed, + path_to_item, + self._spec_property_naming, + self._check_type, + configuration=self._configuration, ) - self.__dict__['_data_store'][name] = value + if (name,) in self.allowed_values: + check_allowed_values(self.allowed_values, (name,), value) + if (name,) in self.validations: + check_validations(self.validations, (name,), value, self._configuration) + self.__dict__["_data_store"][name] = value def __repr__(self): """For `print` and `pprint`""" @@ -208,7 +202,6 @@ def __deepcopy__(self, memo): setattr(new_inst, k, deepcopy(v, memo)) return new_inst - def __new__(cls, *args, **kwargs): # this function uses the discriminator to # pick a new schema/class to instantiate because a discriminator @@ -222,15 +215,13 @@ def __new__(cls, *args, **kwargs): if issubclass(cls, ModelComposed) and allows_single_value_input(cls): model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + oneof_instance = get_oneof_instance( + cls, model_kwargs, kwargs, model_arg=arg + ) return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): + visited_composed_classes = kwargs.get("_visited_composed_classes", ()) + if cls.discriminator is None or cls in visited_composed_classes: # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -254,7 +245,11 @@ def __new__(cls, *args, **kwargs): # and the discriminator value is obtained from the input data. discr_propertyname_py = list(cls.discriminator.keys())[0] discr_propertyname_js = cls.attribute_map.get(discr_propertyname_py) - cls_with_attr = [c for c in list(visited_composed_classes) + [cls] if hasattr(c, discr_propertyname_py)] + cls_with_attr = [ + c + for c in list(visited_composed_classes) + [cls] + if hasattr(c, discr_propertyname_py) + ] if discr_propertyname_js in kwargs: discr_value = kwargs[discr_propertyname_js] elif discr_propertyname_py in kwargs: @@ -264,28 +259,28 @@ def __new__(cls, *args, **kwargs): kwargs[discr_propertyname_py] = discr_value else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" + % (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) + discr_propertyname_js, kwargs.get(discr_propertyname_py) + ) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" + % (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -310,13 +305,13 @@ def __new__(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) + oneof_anyof_classes = cls._composed_schemas.get( + "oneOf", () + ) + cls._composed_schemas.get("anyOf", ()) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) - if cls._composed_schemas.get('allOf') and oneof_anyof_child: + if cls._composed_schemas.get("allOf") and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = super(OpenApiModel, cls).__new__(cls) @@ -331,7 +326,6 @@ def __new__(cls, *args, **kwargs): return new_inst - @classmethod @convert_js_args_to_python_args def _new_from_openapi_data(cls, *args, **kwargs): @@ -347,15 +341,13 @@ def _new_from_openapi_data(cls, *args, **kwargs): if issubclass(cls, ModelComposed) and allows_single_value_input(cls): model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + oneof_instance = get_oneof_instance( + cls, model_kwargs, kwargs, model_arg=arg + ) return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): + visited_composed_classes = kwargs.get("_visited_composed_classes", ()) + if cls.discriminator is None or cls in visited_composed_classes: # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -385,28 +377,28 @@ def _new_from_openapi_data(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" + % (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) + discr_propertyname_js, kwargs.get(discr_propertyname_py) + ) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" + % (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -431,18 +423,17 @@ def _new_from_openapi_data(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) + oneof_anyof_classes = cls._composed_schemas.get( + "oneOf", () + ) + cls._composed_schemas.get("anyOf", ()) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) - if cls._composed_schemas.get('allOf') and oneof_anyof_child: + if cls._composed_schemas.get("allOf") and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = cls._from_openapi_data(*args, **kwargs) - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) return new_inst @@ -464,7 +455,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__['_data_store'].get(name, default) + return self.__dict__["_data_store"].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -472,9 +463,8 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), + [e for e in [self._path_to_item, name] if e], ) def __contains__(self, name): @@ -482,7 +472,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__['_data_store'] + return name in self.__dict__["_data_store"] def to_str(self): """Returns the string representation of the model""" @@ -493,8 +483,8 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - this_val = self._data_store['value'] - that_val = other._data_store['value'] + this_val = self._data_store["value"] + that_val = other._data_store["value"] types = set() types.add(this_val.__class__) types.add(that_val.__class__) @@ -519,7 +509,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__['_data_store'].get(name, default) + return self.__dict__["_data_store"].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -527,9 +517,8 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), + [e for e in [self._path_to_item, name] if e], ) def __contains__(self, name): @@ -537,7 +526,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__['_data_store'] + return name in self.__dict__["_data_store"] def to_dict(self): """Returns the model properties as a dict""" @@ -622,9 +611,8 @@ def __setitem__(self, name, value): """ if name not in self.openapi_types: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), + [e for e in [self._path_to_item, name] if e], ) # attribute must be set on self and composed instances self.set_attribute(name, value) @@ -632,7 +620,9 @@ def __setitem__(self, name, value): setattr(model_instance, name, value) if name not in self._var_name_to_model_instances: # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + self.__dict__["_var_name_to_model_instances"][name] = ( + self._composed_instances + [self] + ) return None __unset_attribute_value__ = object() @@ -665,7 +655,7 @@ def get(self, name, default=None): "Values stored for property {0} in {1} differ when looking " "at self and self's composed instances. All values must be " "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] + [e for e in [self._path_to_item, name] if e], ) def __getitem__(self, name): @@ -673,9 +663,8 @@ def __getitem__(self, name): value = self.get(name, self.__unset_attribute_value__) if value is self.__unset_attribute_value__: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), + [e for e in [self._path_to_item, name] if e], ) return value @@ -686,7 +675,8 @@ def __contains__(self, name): return name in self.__dict__ model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) + name, self._additional_properties_model_instances + ) if model_instances: for model_instance in model_instances: @@ -725,7 +715,7 @@ def __eq__(self, other): ModelComposed: 0, ModelNormal: 1, ModelSimple: 2, - none_type: 3, # The type of 'None'. + none_type: 3, # The type of 'None'. list: 4, dict: 5, float: 6, @@ -734,7 +724,7 @@ def __eq__(self, other): datetime: 9, date: 10, str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. } # these are used to limit what type conversions we try to do @@ -743,7 +733,10 @@ def __eq__(self, other): UPCONVERSION_TYPE_PAIRS = ( (str, datetime), (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + ( + int, + float, + ), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. (list, ModelComposed), (dict, ModelComposed), (str, ModelComposed), @@ -790,7 +783,7 @@ def __eq__(self, other): (str, date), # (int, str), # (float, str), - (str, file_type) + (str, file_type), ), } @@ -847,41 +840,41 @@ def check_allowed_values(allowed_values, input_variable_path, input_values): are checking to see if they are in allowed_values """ these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), + if isinstance(input_values, list) and not set(input_values).issubset( + set(these_allowed_values) + ): + invalid_values = ( + ", ".join(map(str, set(input_values) - set(these_allowed_values))), + ) raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( + "Invalid values for `%s` [%s], must be a subset of [%s]" + % ( input_variable_path[0], invalid_values, - ", ".join(map(str, these_allowed_values)) + ", ".join(map(str, these_allowed_values)), ) ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): + elif isinstance(input_values, dict) and not set(input_values.keys()).issubset( + set(these_allowed_values) + ): invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) + map(str, set(input_values.keys()) - set(these_allowed_values)) + ) raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( + "Invalid keys in `%s` [%s], must be a subset of [%s]" + % ( input_variable_path[0], invalid_values, - ", ".join(map(str, these_allowed_values)) + ", ".join(map(str, these_allowed_values)), ) ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): + elif ( + not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values + ): raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) + "Invalid value for `%s` (%s), must be one of %s" + % (input_variable_path[0], input_values, these_allowed_values) ) @@ -895,14 +888,16 @@ def is_json_validation_enabled(schema_keyword, configuration=None): configuration (Configuration): the configuration class. """ - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) + return ( + configuration is None + or not hasattr(configuration, "_disabled_client_side_validations") + or schema_keyword not in configuration._disabled_client_side_validations + ) def check_validations( - validations, input_variable_path, input_values, - configuration=None): + validations, input_variable_path, input_values, configuration=None +): """Raises an exception if the input_values are invalid Args: @@ -917,66 +912,65 @@ def check_validations( return current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): + if ( + is_json_validation_enabled("multipleOf", configuration) + and "multiple_of" in current_validations + and isinstance(input_values, (int, float)) + and not (float(input_values) / current_validations["multiple_of"]).is_integer() + ): # Note 'multipleOf' will be as good as the floating point arithmetic. raise ApiValueError( "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) + "`%s`" % (input_variable_path[0], current_validations["multiple_of"]) ) - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): + if ( + is_json_validation_enabled("maxLength", configuration) + and "max_length" in current_validations + and len(input_values) > current_validations["max_length"] + ): raise ApiValueError( "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) + "`%s`" % (input_variable_path[0], current_validations["max_length"]) ) - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): + if ( + is_json_validation_enabled("minLength", configuration) + and "min_length" in current_validations + and len(input_values) < current_validations["min_length"] + ): raise ApiValueError( "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) + "`%s`" % (input_variable_path[0], current_validations["min_length"]) ) - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): + if ( + is_json_validation_enabled("maxItems", configuration) + and "max_items" in current_validations + and len(input_values) > current_validations["max_items"] + ): raise ApiValueError( "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) + "equal to `%s`" % (input_variable_path[0], current_validations["max_items"]) ) - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): + if ( + is_json_validation_enabled("minItems", configuration) + and "min_items" in current_validations + and len(input_values) < current_validations["min_items"] + ): raise ValueError( "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) + "equal to `%s`" % (input_variable_path[0], current_validations["min_items"]) ) - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): + items = ( + "exclusive_maximum", + "inclusive_maximum", + "exclusive_minimum", + "inclusive_minimum", + ) + if any(item in current_validations for item in items): if isinstance(input_values, list): max_val = max(input_values) min_val = min(input_values) @@ -987,57 +981,58 @@ def check_validations( max_val = input_values min_val = input_values - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): + if ( + is_json_validation_enabled("exclusiveMaximum", configuration) + and "exclusive_maximum" in current_validations + and max_val >= current_validations["exclusive_maximum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) + "Invalid value for `%s`, must be a value less than `%s`" + % (input_variable_path[0], current_validations["exclusive_maximum"]) ) - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): + if ( + is_json_validation_enabled("maximum", configuration) + and "inclusive_maximum" in current_validations + and max_val > current_validations["inclusive_maximum"] + ): raise ApiValueError( "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) + "`%s`" % (input_variable_path[0], current_validations["inclusive_maximum"]) ) - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): + if ( + is_json_validation_enabled("exclusiveMinimum", configuration) + and "exclusive_minimum" in current_validations + and min_val <= current_validations["exclusive_minimum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) + "Invalid value for `%s`, must be a value greater than `%s`" + % (input_variable_path[0], current_validations["exclusive_maximum"]) ) - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): + if ( + is_json_validation_enabled("minimum", configuration) + and "inclusive_minimum" in current_validations + and min_val < current_validations["inclusive_minimum"] + ): raise ApiValueError( "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) + "to `%s`" + % (input_variable_path[0], current_validations["inclusive_minimum"]) ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): + flags = current_validations.get("regex", {}).get("flags", 0) + if ( + is_json_validation_enabled("pattern", configuration) + and "regex" in current_validations + and not re.search( + current_validations["regex"]["pattern"], input_values, flags=flags + ) + ): err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) + input_variable_path[0], + current_validations["regex"]["pattern"], + ) if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. @@ -1062,28 +1057,31 @@ def index_getter(class_or_instance): return COERCION_INDEX_BY_TYPE[list] elif isinstance(class_or_instance, dict): return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): + elif inspect.isclass(class_or_instance) and issubclass( + class_or_instance, ModelComposed + ): return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): + elif inspect.isclass(class_or_instance) and issubclass( + class_or_instance, ModelNormal + ): return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): + elif inspect.isclass(class_or_instance) and issubclass( + class_or_instance, ModelSimple + ): return COERCION_INDEX_BY_TYPE[ModelSimple] elif class_or_instance in COERCION_INDEX_BY_TYPE: return COERCION_INDEX_BY_TYPE[class_or_instance] raise ApiValueError("Unsupported type: %s" % class_or_instance) sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) + required_types, key=lambda class_or_instance: index_getter(class_or_instance) ) return sorted_types -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): +def remove_uncoercible( + required_types_classes, current_item, spec_property_naming, must_convert=True +): """Only keeps the type conversions that are possible Args: @@ -1128,6 +1126,7 @@ def remove_uncoercible(required_types_classes, current_item, spec_property_namin results_classes.append(required_type_class) return results_classes + def get_discriminated_classes(cls): """ Returns all the classes that a discriminator converts to @@ -1138,7 +1137,7 @@ def get_discriminated_classes(cls): if is_type_nullable(cls): possible_classes.append(cls) for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + if hasattr(discr_cls, "discriminator") and discr_cls.discriminator is not None: possible_classes.extend(get_discriminated_classes(discr_cls)) else: possible_classes.append(discr_cls) @@ -1150,7 +1149,7 @@ def get_possible_classes(cls, from_server_context): possible_classes = [cls] if from_server_context: return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: + if hasattr(cls, "discriminator") and cls.discriminator is not None: possible_classes = [] possible_classes.extend(get_discriminated_classes(cls)) elif issubclass(cls, ModelComposed): @@ -1192,7 +1191,9 @@ def get_required_type_classes(required_types_mixed, spec_property_naming): valid_classes.append(dict) child_req_types_by_current_type[dict] = required_type[str] else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) + valid_classes.extend( + get_possible_classes(required_type, spec_property_naming) + ) return tuple(valid_classes), child_req_types_by_current_type @@ -1206,11 +1207,10 @@ def change_keys_js_to_python(input_dict, model_class): document). """ - if getattr(model_class, 'attribute_map', None) is None: + if getattr(model_class, "attribute_map", None) is None: return input_dict output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} + reversed_attr_map = {value: key for key, value in model_class.attribute_map.items()} for javascript_key, value in input_dict.items(): python_key = reversed_attr_map.get(javascript_key) if python_key is None: @@ -1226,13 +1226,13 @@ def get_type_error(var_value, path_to_item, valid_classes, key_type=False): var_name=path_to_item[-1], var_value=var_value, valid_classes=valid_classes, - key_type=key_type + key_type=key_type, ) return ApiTypeError( error_msg, path_to_item=path_to_item, valid_classes=valid_classes, - key_type=key_type + key_type=key_type, ) @@ -1258,11 +1258,11 @@ def deserialize_primitive(data, klass, path_to_item): # The string should be in iso8601 datetime format. parsed_datetime = parse(data) date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 + parsed_datetime.hour == 0 + and parsed_datetime.minute == 0 + and parsed_datetime.second == 0 + and parsed_datetime.tzinfo is None + and 8 <= len(data) <= 10 ) if date_only: raise ValueError("This is a date, not a datetime") @@ -1276,7 +1276,7 @@ def deserialize_primitive(data, klass, path_to_item): if isinstance(data, str) and klass == float: if str(converted_value) != data: # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') + raise ValueError("This is not a float") return converted_value except (OverflowError, ValueError) as ex: # parse can raise OverflowError @@ -1284,13 +1284,11 @@ def deserialize_primitive(data, klass, path_to_item): "{0}Failed to parse {1} as {2}".format( additional_message, repr(data), klass.__name__ ), - path_to_item=path_to_item + path_to_item=path_to_item, ) from ex -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): +def get_discriminator_class(model_class, discr_name, discr_value, cls_visited): """Returns the child class specified by the discriminator. Args: @@ -1326,22 +1324,30 @@ def get_discriminator_class(model_class, # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig # if we try to make BasquePig from mammal, we need to travel through # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) + descendant_classes = model_class._composed_schemas.get( + "oneOf", () + ) + model_class._composed_schemas.get("anyOf", ()) + ancestor_classes = model_class._composed_schemas.get("allOf", ()) possible_classes = descendant_classes + ancestor_classes for cls in possible_classes: # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: + if hasattr(cls, "discriminator") and cls.discriminator is not None: used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) + cls, discr_name, discr_value, cls_visited + ) if used_model_class is not None: return used_model_class return used_model_class -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): +def deserialize_model( + model_data, + model_class, + path_to_item, + check_type, + configuration, + spec_property_naming, +): """Deserializes model_data to model instance. Args: @@ -1365,10 +1371,12 @@ def deserialize_model(model_data, model_class, path_to_item, check_type, ApiKeyError """ - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) + kw_args = dict( + _check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming, + ) if issubclass(model_class, ModelSimple): return model_class._new_from_openapi_data(model_data, **kw_args) @@ -1404,23 +1412,31 @@ def deserialize_file(response_data, configuration, content_disposition=None): os.remove(path) if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + filename = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition + ).group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: if isinstance(response_data, str): # change str to bytes so we can write it - response_data = response_data.encode('utf-8') + response_data = response_data.encode("utf-8") f.write(response_data) f = open(path, "rb") return f -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): +def attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=True, +): """ Args: input_value (any): the data to convert @@ -1446,23 +1462,29 @@ def attempt_convert_item(input_value, valid_classes, path_to_item, """ valid_classes_ordered = order_response_types(valid_classes) valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) + valid_classes_ordered, input_value, spec_property_naming + ) if not valid_classes_coercible or key_type: # we do not handle keytype errors, json will take care # of this for us if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) + raise get_type_error( + input_value, path_to_item, valid_classes, key_type=key_type + ) for valid_class in valid_classes_coercible: try: if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) + return deserialize_model( + input_value, + valid_class, + path_to_item, + check_type, + configuration, + spec_property_naming, + ) elif valid_class == file_type: return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) + return deserialize_primitive(input_value, valid_class, path_to_item) except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: if must_convert: raise conversion_exc @@ -1494,10 +1516,12 @@ def is_type_nullable(input_type): return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): return True + for t in input_type._composed_schemas.get("oneOf", ()): + if is_type_nullable(t): + return True + for t in input_type._composed_schemas.get("anyOf", ()): + if is_type_nullable(t): + return True return False @@ -1511,34 +1535,55 @@ def is_valid_type(input_class_simple, valid_classes): Returns: bool """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,) or \ - "enum" in str(valid_classes): + if ( + issubclass(input_class_simple, OpenApiModel) + and valid_classes + == ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) + or "enum" in str(valid_classes) + ): return True valid_type = input_class_simple in valid_classes if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): + issubclass(input_class_simple, OpenApiModel) or input_class_simple is none_type + ): for valid_class in valid_classes: if input_class_simple is none_type and is_type_nullable(valid_class): # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. return True if issubclass(input_class_simple, valid_class): return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): + if not ( + issubclass(valid_class, OpenApiModel) and valid_class.discriminator + ): continue discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) + discriminator_classes = valid_class.discriminator[ + discr_propertyname_py + ].values() valid_type = is_valid_type(input_class_simple, discriminator_classes) if valid_type: return True return valid_type -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): +def validate_and_convert_types( + input_value, + required_types_mixed, + path_to_item, + spec_property_naming, + _check_type, + configuration=None, +): """Raises a TypeError is there is a problem, otherwise returns value Args: @@ -1583,18 +1628,20 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, spec_property_naming, key_type=False, must_convert=True, - check_type=_check_type + check_type=_check_type, ) return converted_instance else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) + raise get_type_error( + input_value, path_to_item, valid_classes, key_type=False + ) # input_value's type is in valid_classes if len(valid_classes) > 1 and configuration: # there are valid classes which are not the current class valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) + valid_classes, input_value, spec_property_naming, must_convert=False + ) if valid_classes_coercible: converted_instance = attempt_convert_item( input_value, @@ -1604,7 +1651,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, spec_property_naming, key_type=False, must_convert=False, - check_type=_check_type + check_type=_check_type, ) return converted_instance @@ -1612,9 +1659,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, # all types are of the required types and there are no more inner # variables left to look at return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) + inner_required_types = child_req_types_by_current_type.get(type(input_value)) if inner_required_types is None: # for this type, there are not more inner variables left to look at return input_value @@ -1631,7 +1676,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, inner_path, spec_property_naming, _check_type, - configuration=configuration + configuration=configuration, ) elif isinstance(input_value, dict): if input_value == {}: @@ -1641,15 +1686,16 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, inner_path = list(path_to_item) inner_path.append(inner_key) if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) + raise get_type_error( + inner_key, inner_path, valid_classes, key_type=True + ) input_value[inner_key] = validate_and_convert_types( inner_val, inner_required_types, inner_path, spec_property_naming, _check_type, - configuration=configuration + configuration=configuration, ) return input_value @@ -1666,7 +1712,11 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} - extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item + extract_item = lambda item: ( + (item[0], model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], "_data_store") + else item + ) model_instances = [model_instance] if model_instance._composed_schemas: @@ -1681,39 +1731,33 @@ def model_to_dict(model_instance, serialize=True): # exist in attribute_map try: attr = model_instance.attribute_map.get(attr) - if (attr == None): + if attr == None: continue py_to_json_map.update(model_instance.attribute_map) seen_json_attribute_names.add(attr) except KeyError: used_fallback_python_attribute_names.add(attr) if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map(extract_item, v.items()))) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) + result[attr] = dict(map(extract_item, value.items())) elif isinstance(value, ModelSimple): result[attr] = value.value - elif hasattr(value, '_data_store'): + elif hasattr(value, "_data_store"): result[attr] = model_to_dict(value, serialize=serialize) else: result[attr] = value @@ -1724,15 +1768,18 @@ def model_to_dict(model_instance, serialize=True): continue if python_key == json_key: continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + json_key_assigned_no_need_for_python_key = ( + json_key in seen_json_attribute_names + ) if json_key_assigned_no_need_for_python_key: del result[python_key] return result -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): +def type_error_message( + var_value=None, var_name=None, valid_classes=None, key_type=None +): """ Keyword Args: var_value (any): the variable which has the type_error @@ -1743,9 +1790,9 @@ def type_error_message(var_value=None, var_name=None, valid_classes=None, True if it is a key in a dict False if our item is an item in a list """ - key_or_value = 'value' + key_or_value = "value" if key_type: - key_or_value = 'key' + key_or_value = "key" valid_classes_phrase = get_valid_classes_phrase(valid_classes) msg = ( "Invalid type for variable '{0}'. Required {1} type {2} and " @@ -1760,13 +1807,12 @@ def type_error_message(var_value=None, var_name=None, valid_classes=None, def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ + """Returns a string phrase describing what types are allowed""" all_classes = list(input_classes) all_classes = sorted(all_classes, key=lambda cls: cls.__name__) all_class_names = [cls.__name__ for cls in all_classes] if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) + return "is {0}".format(all_class_names[0]) return "is one of [{0}]".format(", ".join(all_class_names)) @@ -1788,11 +1834,13 @@ def get_allof_instances(self, model_args, constant_args): composed_instances (list) """ composed_instances = [] - for allof_class in self._composed_schemas['allOf']: + for allof_class in self._composed_schemas["allOf"]: try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) + if constant_args.get("_spec_property_naming"): + allof_instance = allof_class._from_openapi_data( + **model_args, **constant_args + ) else: allof_instance = allof_class(**model_args, **constant_args) composed_instances.append(allof_instance) @@ -1800,11 +1848,12 @@ def get_allof_instances(self, model_args, constant_args): raise ApiValueError( "Invalid inputs given to generate an instance of '%s'. The " "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( + "schema '%s'. Error=%s" + % ( allof_class.__name__, allof_class.__name__, self.__class__.__name__, - str(ex) + str(ex), ) ) from ex return composed_instances @@ -1838,13 +1887,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): Returns oneof_instance (instance) """ - if len(cls._composed_schemas['oneOf']) == 0: + if len(cls._composed_schemas["oneOf"]) == 0: return None oneof_instances = [] # Iterate over each oneOf schema and determine if the input data # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: + for oneof_class in cls._composed_schemas["oneOf"]: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if oneof_class is none_type: @@ -1856,24 +1905,28 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): try: if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) + if constant_kwargs.get("_spec_property_naming"): + oneof_instance = oneof_class._from_openapi_data( + **model_kwargs, **constant_kwargs + ) else: oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) else: if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) + if constant_kwargs.get("_spec_property_naming"): + oneof_instance = oneof_class._from_openapi_data( + model_arg, **constant_kwargs + ) else: oneof_instance = oneof_class(model_arg, **constant_kwargs) elif oneof_class in PRIMITIVE_TYPES: oneof_instance = validate_and_convert_types( model_arg, (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] + constant_kwargs["_path_to_item"], + constant_kwargs["_spec_property_naming"], + constant_kwargs["_check_type"], + configuration=constant_kwargs["_configuration"], ) oneof_instances.append(oneof_instance) except Exception: @@ -1881,14 +1934,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): if len(oneof_instances) == 0: raise ApiValueError( "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ + "of the oneOf schemas matched the input data." % cls.__name__ ) elif len(oneof_instances) > 1: raise ApiValueError( "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ + "oneOf schemas matched the inputs, but a max of one is allowed." + % cls.__name__ ) return oneof_instances[0] @@ -1908,10 +1960,10 @@ def get_anyof_instances(self, model_args, constant_args): anyof_instances (list) """ anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: + if len(self._composed_schemas["anyOf"]) == 0: return anyof_instances - for anyof_class in self._composed_schemas['anyOf']: + for anyof_class in self._composed_schemas["anyOf"]: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if anyof_class is none_type: @@ -1920,8 +1972,10 @@ def get_anyof_instances(self, model_args, constant_args): continue try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) + if constant_args.get("_spec_property_naming"): + anyof_instance = anyof_class._from_openapi_data( + **model_args, **constant_args + ) else: anyof_instance = anyof_class(**model_args, **constant_args) anyof_instances.append(anyof_instance) @@ -1930,8 +1984,7 @@ def get_anyof_instances(self, model_args, constant_args): if len(anyof_instances) == 0: raise ApiValueError( "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ + "anyOf schemas matched the inputs." % self.__class__.__name__ ) return anyof_instances @@ -1945,7 +1998,7 @@ def get_discarded_args(self, composed_instances, model_args): # arguments passed to self were already converted to python names # before __init__ was called for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: + if instance.__class__ in self._composed_schemas["allOf"]: try: keys = instance.to_dict().keys() discarded_keys = model_args - keys @@ -2041,8 +2094,8 @@ def validate_get_composed_info(constant_args, model_args, self): var_name_to_model_instances[prop_name] = [self] + composed_instances return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args, ] diff --git a/freeclimb/models/__init__.py b/freeclimb/models/__init__.py index 85197ce..361615f 100644 --- a/freeclimb/models/__init__.py +++ b/freeclimb/models/__init__.py @@ -1,158 +1,262 @@ +# coding: utf-8 + # flake8: noqa +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from freeclimb.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) -from freeclimb.model.account_request import AccountRequest -from freeclimb.model.account_result import AccountResult -from freeclimb.model.account_result_all_of import AccountResultAllOf -from freeclimb.model.account_status import AccountStatus -from freeclimb.model.account_type import AccountType -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.add_to_conference_all_of import AddToConferenceAllOf -from freeclimb.model.answered_by import AnsweredBy -from freeclimb.model.application_list import ApplicationList -from freeclimb.model.application_list_all_of import ApplicationListAllOf -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult -from freeclimb.model.application_result_all_of import ApplicationResultAllOf -from freeclimb.model.available_number import AvailableNumber -from freeclimb.model.available_number_list import AvailableNumberList -from freeclimb.model.available_number_list_all_of import AvailableNumberListAllOf -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.call_direction import CallDirection -from freeclimb.model.call_list import CallList -from freeclimb.model.call_list_all_of import CallListAllOf -from freeclimb.model.call_result import CallResult -from freeclimb.model.call_result_all_of import CallResultAllOf -from freeclimb.model.call_status import CallStatus -from freeclimb.model.capabilities import Capabilities -from freeclimb.model.completion_request import CompletionRequest -from freeclimb.model.completion_result import CompletionResult -from freeclimb.model.conference_list import ConferenceList -from freeclimb.model.conference_list_all_of import ConferenceListAllOf -from freeclimb.model.conference_participant_list import ConferenceParticipantList -from freeclimb.model.conference_participant_list_all_of import ConferenceParticipantListAllOf -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.conference_participant_result_all_of import ConferenceParticipantResultAllOf -from freeclimb.model.conference_result import ConferenceResult -from freeclimb.model.conference_result_all_of import ConferenceResultAllOf -from freeclimb.model.conference_status import ConferenceStatus -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.create_conference_all_of import CreateConferenceAllOf -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.create_web_rtc_token import CreateWebRTCToken -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.enqueue_all_of import EnqueueAllOf -from freeclimb.model.filter_logs_request import FilterLogsRequest -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_digits_all_of import GetDigitsAllOf -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.get_speech_all_of import GetSpeechAllOf -from freeclimb.model.get_speech_reason import GetSpeechReason -from freeclimb.model.grammar_file_built_in import GrammarFileBuiltIn -from freeclimb.model.grammar_type import GrammarType -from freeclimb.model.hangup import Hangup -from freeclimb.model.hangup_all_of import HangupAllOf -from freeclimb.model.if_machine import IfMachine -from freeclimb.model.incoming_number_list import IncomingNumberList -from freeclimb.model.incoming_number_list_all_of import IncomingNumberListAllOf -from freeclimb.model.incoming_number_request import IncomingNumberRequest -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.incoming_number_result_all_of import IncomingNumberResultAllOf -from freeclimb.model.language import Language -from freeclimb.model.log_level import LogLevel -from freeclimb.model.log_list import LogList -from freeclimb.model.log_list_all_of import LogListAllOf -from freeclimb.model.log_result import LogResult -from freeclimb.model.machine_type import MachineType -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.message_direction import MessageDirection -from freeclimb.model.message_request import MessageRequest -from freeclimb.model.message_request_all_of import MessageRequestAllOf -from freeclimb.model.message_result import MessageResult -from freeclimb.model.message_result_all_of import MessageResultAllOf -from freeclimb.model.message_status import MessageStatus -from freeclimb.model.messages_list import MessagesList -from freeclimb.model.messages_list_all_of import MessagesListAllOf -from freeclimb.model.mutable_resource_model import MutableResourceModel -from freeclimb.model.out_dial import OutDial -from freeclimb.model.out_dial_all_of import OutDialAllOf -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.park import Park -from freeclimb.model.park_all_of import ParkAllOf -from freeclimb.model.pause import Pause -from freeclimb.model.pause_all_of import PauseAllOf -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.percl_script import PerclScript -from freeclimb.model.play import Play -from freeclimb.model.play_all_of import PlayAllOf -from freeclimb.model.play_beep import PlayBeep -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.play_early_media_all_of import PlayEarlyMediaAllOf -from freeclimb.model.queue_list import QueueList -from freeclimb.model.queue_list_all_of import QueueListAllOf -from freeclimb.model.queue_member import QueueMember -from freeclimb.model.queue_member_list import QueueMemberList -from freeclimb.model.queue_member_list_all_of import QueueMemberListAllOf -from freeclimb.model.queue_request import QueueRequest -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.queue_result_all_of import QueueResultAllOf -from freeclimb.model.queue_result_status import QueueResultStatus -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.record_utterance_all_of import RecordUtteranceAllOf -from freeclimb.model.record_utterance_term_reason import RecordUtteranceTermReason -from freeclimb.model.recording_list import RecordingList -from freeclimb.model.recording_list_all_of import RecordingListAllOf -from freeclimb.model.recording_result import RecordingResult -from freeclimb.model.recording_result_all_of import RecordingResultAllOf -from freeclimb.model.redirect import Redirect -from freeclimb.model.redirect_all_of import RedirectAllOf -from freeclimb.model.reject import Reject -from freeclimb.model.reject_all_of import RejectAllOf -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.request_type import RequestType -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand -from freeclimb.model.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult -from freeclimb.model.sms_ten_dlc_brands_list_result_all_of import SMSTenDLCBrandsListResultAllOf -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign -from freeclimb.model.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult -from freeclimb.model.sms_ten_dlc_campaigns_list_result_all_of import SMSTenDLCCampaignsListResultAllOf -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign -from freeclimb.model.sms_ten_dlc_partner_campaign_brand import SMSTenDLCPartnerCampaignBrand -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result_all_of import SMSTenDLCPartnerCampaignsListResultAllOf -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign -from freeclimb.model.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult -from freeclimb.model.sms_toll_free_campaigns_list_result_all_of import SMSTollFreeCampaignsListResultAllOf -from freeclimb.model.say import Say -from freeclimb.model.say_all_of import SayAllOf -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.send_digits_all_of import SendDigitsAllOf -from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough -from freeclimb.model.set_dtmf_pass_through_all_of import SetDTMFPassThroughAllOf -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_listen_all_of import SetListenAllOf -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.set_talk_all_of import SetTalkAllOf -from freeclimb.model.sms import Sms -from freeclimb.model.sms_all_of import SmsAllOf -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.tfn import TFN -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.transcribe_utterance_all_of import TranscribeUtteranceAllOf -from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord -from freeclimb.model.unpark import Unpark -from freeclimb.model.update_call_request import UpdateCallRequest -from freeclimb.model.update_call_request_status import UpdateCallRequestStatus -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest -from freeclimb.model.update_conference_request_status import UpdateConferenceRequestStatus +# import models into model package +from freeclimb.models.account_request import AccountRequest as AccountRequest +from freeclimb.models.account_result import AccountResult as AccountResult +from freeclimb.models.account_status import AccountStatus as AccountStatus +from freeclimb.models.account_type import AccountType as AccountType +from freeclimb.models.add_to_conference import AddToConference as AddToConference +from freeclimb.models.add_to_conference_notification_webhook import ( + AddToConferenceNotificationWebhook as AddToConferenceNotificationWebhook, +) +from freeclimb.models.add_to_queue_notification_webhook import ( + AddToQueueNotificationWebhook as AddToQueueNotificationWebhook, +) +from freeclimb.models.answered_by import AnsweredBy as AnsweredBy +from freeclimb.models.application_list import ApplicationList as ApplicationList +from freeclimb.models.application_request import ( + ApplicationRequest as ApplicationRequest, +) +from freeclimb.models.application_result import ApplicationResult as ApplicationResult +from freeclimb.models.available_number import AvailableNumber as AvailableNumber +from freeclimb.models.available_number_list import ( + AvailableNumberList as AvailableNumberList, +) +from freeclimb.models.barge_in_reason import BargeInReason as BargeInReason +from freeclimb.models.buy_incoming_number_request import ( + BuyIncomingNumberRequest as BuyIncomingNumberRequest, +) +from freeclimb.models.call_control_webhook import ( + CallControlWebhook as CallControlWebhook, +) +from freeclimb.models.call_direction import CallDirection as CallDirection +from freeclimb.models.call_ended_reason import CallEndedReason as CallEndedReason +from freeclimb.models.call_list import CallList as CallList +from freeclimb.models.call_result import CallResult as CallResult +from freeclimb.models.call_status import CallStatus as CallStatus +from freeclimb.models.call_status_webhook import CallStatusWebhook as CallStatusWebhook +from freeclimb.models.capabilities import Capabilities as Capabilities +from freeclimb.models.completion_request import CompletionRequest as CompletionRequest +from freeclimb.models.completion_result import CompletionResult as CompletionResult +from freeclimb.models.completion_result_status import ( + CompletionResultStatus as CompletionResultStatus, +) +from freeclimb.models.conference_list import ConferenceList as ConferenceList +from freeclimb.models.conference_participant_list import ( + ConferenceParticipantList as ConferenceParticipantList, +) +from freeclimb.models.conference_participant_result import ( + ConferenceParticipantResult as ConferenceParticipantResult, +) +from freeclimb.models.conference_recording_status_webhook import ( + ConferenceRecordingStatusWebhook as ConferenceRecordingStatusWebhook, +) +from freeclimb.models.conference_result import ConferenceResult as ConferenceResult +from freeclimb.models.conference_status import ConferenceStatus as ConferenceStatus +from freeclimb.models.conference_status_webhook import ( + ConferenceStatusWebhook as ConferenceStatusWebhook, +) +from freeclimb.models.create_conference import CreateConference as CreateConference +from freeclimb.models.create_conference_request import ( + CreateConferenceRequest as CreateConferenceRequest, +) +from freeclimb.models.create_conference_webhook import ( + CreateConferenceWebhook as CreateConferenceWebhook, +) +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken as CreateWebRTCToken +from freeclimb.models.dequeue import Dequeue as Dequeue +from freeclimb.models.dequeue_webhook import DequeueWebhook as DequeueWebhook +from freeclimb.models.enqueue import Enqueue as Enqueue +from freeclimb.models.filter_logs_request import FilterLogsRequest as FilterLogsRequest +from freeclimb.models.get_digits import GetDigits as GetDigits +from freeclimb.models.get_digits_reason import GetDigitsReason as GetDigitsReason +from freeclimb.models.get_digits_webhook import GetDigitsWebhook as GetDigitsWebhook +from freeclimb.models.get_speech import GetSpeech as GetSpeech +from freeclimb.models.get_speech_reason import GetSpeechReason as GetSpeechReason +from freeclimb.models.get_speech_webhook import GetSpeechWebhook as GetSpeechWebhook +from freeclimb.models.grammar_file_built_in import ( + GrammarFileBuiltIn as GrammarFileBuiltIn, +) +from freeclimb.models.grammar_type import GrammarType as GrammarType +from freeclimb.models.hangup import Hangup as Hangup +from freeclimb.models.if_machine import IfMachine as IfMachine +from freeclimb.models.inbound_call_webhook import ( + InboundCallWebhook as InboundCallWebhook, +) +from freeclimb.models.incoming_number_list import ( + IncomingNumberList as IncomingNumberList, +) +from freeclimb.models.incoming_number_request import ( + IncomingNumberRequest as IncomingNumberRequest, +) +from freeclimb.models.incoming_number_result import ( + IncomingNumberResult as IncomingNumberResult, +) +from freeclimb.models.language import Language as Language +from freeclimb.models.leave_conference_webhook import ( + LeaveConferenceWebhook as LeaveConferenceWebhook, +) +from freeclimb.models.log_level import LogLevel as LogLevel +from freeclimb.models.log_list import LogList as LogList +from freeclimb.models.log_result import LogResult as LogResult +from freeclimb.models.machine_detected_webhook import ( + MachineDetectedWebhook as MachineDetectedWebhook, +) +from freeclimb.models.machine_type import MachineType as MachineType +from freeclimb.models.make_call_request import MakeCallRequest as MakeCallRequest +from freeclimb.models.message_delivery_webhook import ( + MessageDeliveryWebhook as MessageDeliveryWebhook, +) +from freeclimb.models.message_direction import MessageDirection as MessageDirection +from freeclimb.models.message_request import MessageRequest as MessageRequest +from freeclimb.models.message_result import MessageResult as MessageResult +from freeclimb.models.message_status import MessageStatus as MessageStatus +from freeclimb.models.message_status_webhook import ( + MessageStatusWebhook as MessageStatusWebhook, +) +from freeclimb.models.messages_list import MessagesList as MessagesList +from freeclimb.models.mutable_resource_model import ( + MutableResourceModel as MutableResourceModel, +) +from freeclimb.models.out_dial import OutDial as OutDial +from freeclimb.models.out_dial_api_connect_webhook import ( + OutDialApiConnectWebhook as OutDialApiConnectWebhook, +) +from freeclimb.models.out_dial_connect_webhook import ( + OutDialConnectWebhook as OutDialConnectWebhook, +) +from freeclimb.models.out_dial_start_webhook import ( + OutDialStartWebhook as OutDialStartWebhook, +) +from freeclimb.models.pagination_model import PaginationModel as PaginationModel +from freeclimb.models.park import Park as Park +from freeclimb.models.pause import Pause as Pause +from freeclimb.models.percl_command import PerclCommand as PerclCommand +from freeclimb.models.percl_script import PerclScript as PerclScript +from freeclimb.models.play import Play as Play +from freeclimb.models.play_beep import PlayBeep as PlayBeep +from freeclimb.models.play_early_media import PlayEarlyMedia as PlayEarlyMedia +from freeclimb.models.queue_list import QueueList as QueueList +from freeclimb.models.queue_member import QueueMember as QueueMember +from freeclimb.models.queue_member_list import QueueMemberList as QueueMemberList +from freeclimb.models.queue_request import QueueRequest as QueueRequest +from freeclimb.models.queue_result import QueueResult as QueueResult +from freeclimb.models.queue_result_status import QueueResultStatus as QueueResultStatus +from freeclimb.models.queue_wait_webhook import QueueWaitWebhook as QueueWaitWebhook +from freeclimb.models.record_utterance import RecordUtterance as RecordUtterance +from freeclimb.models.record_utterance_term_reason import ( + RecordUtteranceTermReason as RecordUtteranceTermReason, +) +from freeclimb.models.record_webhook import RecordWebhook as RecordWebhook +from freeclimb.models.recording_list import RecordingList as RecordingList +from freeclimb.models.recording_result import RecordingResult as RecordingResult +from freeclimb.models.redirect import Redirect as Redirect +from freeclimb.models.redirect_webhook import RedirectWebhook as RedirectWebhook +from freeclimb.models.reject import Reject as Reject +from freeclimb.models.remove_from_conference import ( + RemoveFromConference as RemoveFromConference, +) +from freeclimb.models.remove_from_queue_notification_webhook import ( + RemoveFromQueueNotificationWebhook as RemoveFromQueueNotificationWebhook, +) +from freeclimb.models.request_type import RequestType as RequestType +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand as SMSTenDLCBrand +from freeclimb.models.sms_ten_dlc_brand_alt_business_id_type import ( + SMSTenDLCBrandAltBusinessIdType as SMSTenDLCBrandAltBusinessIdType, +) +from freeclimb.models.sms_ten_dlc_brand_entity_type import ( + SMSTenDLCBrandEntityType as SMSTenDLCBrandEntityType, +) +from freeclimb.models.sms_ten_dlc_brand_identity_status import ( + SMSTenDLCBrandIdentityStatus as SMSTenDLCBrandIdentityStatus, +) +from freeclimb.models.sms_ten_dlc_brand_relationship import ( + SMSTenDLCBrandRelationship as SMSTenDLCBrandRelationship, +) +from freeclimb.models.sms_ten_dlc_brand_stock_exchange import ( + SMSTenDLCBrandStockExchange as SMSTenDLCBrandStockExchange, +) +from freeclimb.models.sms_ten_dlc_brands_list_result import ( + SMSTenDLCBrandsListResult as SMSTenDLCBrandsListResult, +) +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign as SMSTenDLCCampaign +from freeclimb.models.sms_ten_dlc_campaign_status import ( + SMSTenDLCCampaignStatus as SMSTenDLCCampaignStatus, +) +from freeclimb.models.sms_ten_dlc_campaigns_list_result import ( + SMSTenDLCCampaignsListResult as SMSTenDLCCampaignsListResult, +) +from freeclimb.models.sms_ten_dlc_partner_campaign import ( + SMSTenDLCPartnerCampaign as SMSTenDLCPartnerCampaign, +) +from freeclimb.models.sms_ten_dlc_partner_campaign_brand import ( + SMSTenDLCPartnerCampaignBrand as SMSTenDLCPartnerCampaignBrand, +) +from freeclimb.models.sms_ten_dlc_partner_campaign_status import ( + SMSTenDLCPartnerCampaignStatus as SMSTenDLCPartnerCampaignStatus, +) +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import ( + SMSTenDLCPartnerCampaignsListResult as SMSTenDLCPartnerCampaignsListResult, +) +from freeclimb.models.sms_toll_free_campaign import ( + SMSTollFreeCampaign as SMSTollFreeCampaign, +) +from freeclimb.models.sms_toll_free_campaign_registration_status import ( + SMSTollFreeCampaignRegistrationStatus as SMSTollFreeCampaignRegistrationStatus, +) +from freeclimb.models.sms_toll_free_campaigns_list_result import ( + SMSTollFreeCampaignsListResult as SMSTollFreeCampaignsListResult, +) +from freeclimb.models.say import Say as Say +from freeclimb.models.send_digits import SendDigits as SendDigits +from freeclimb.models.set_dtmf_pass_through import ( + SetDTMFPassThrough as SetDTMFPassThrough, +) +from freeclimb.models.set_listen import SetListen as SetListen +from freeclimb.models.set_talk import SetTalk as SetTalk +from freeclimb.models.sms import Sms as Sms +from freeclimb.models.start_record_call import StartRecordCall as StartRecordCall +from freeclimb.models.tfn import TFN as TFN +from freeclimb.models.terminate_conference import ( + TerminateConference as TerminateConference, +) +from freeclimb.models.transcribe_reason import TranscribeReason as TranscribeReason +from freeclimb.models.transcribe_term_reason import ( + TranscribeTermReason as TranscribeTermReason, +) +from freeclimb.models.transcribe_utterance import ( + TranscribeUtterance as TranscribeUtterance, +) +from freeclimb.models.transcribe_utterance_record import ( + TranscribeUtteranceRecord as TranscribeUtteranceRecord, +) +from freeclimb.models.transcribe_webhook import TranscribeWebhook as TranscribeWebhook +from freeclimb.models.unpark import Unpark as Unpark +from freeclimb.models.update_call_request import UpdateCallRequest as UpdateCallRequest +from freeclimb.models.update_call_request_status import ( + UpdateCallRequestStatus as UpdateCallRequestStatus, +) +from freeclimb.models.update_conference_participant_request import ( + UpdateConferenceParticipantRequest as UpdateConferenceParticipantRequest, +) +from freeclimb.models.update_conference_request import ( + UpdateConferenceRequest as UpdateConferenceRequest, +) +from freeclimb.models.update_conference_request_status import ( + UpdateConferenceRequestStatus as UpdateConferenceRequestStatus, +) +from freeclimb.models.webhook import Webhook as Webhook diff --git a/freeclimb/models/account_request.py b/freeclimb/models/account_request.py new file mode 100644 index 0000000..d5ec448 --- /dev/null +++ b/freeclimb/models/account_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AccountRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + AccountRequest + """ # noqa: E501 + + alias: Optional[StrictStr] = Field( + default=None, description="Description for this account." + ) + label: Optional[StrictStr] = Field( + default=None, description="Group to which this account belongs." + ) + + __properties: ClassVar[List[str]] = ["alias", "label"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"alias": obj.get("alias"), "label": obj.get("label")} + ) + return _obj diff --git a/freeclimb/models/account_result.py b/freeclimb/models/account_result.py new file mode 100644 index 0000000..40dc88e --- /dev/null +++ b/freeclimb/models/account_result.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.account_status import AccountStatus +from freeclimb.models.account_type import AccountType +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AccountResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + AccountResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies this account resource.", + alias="accountId", + ) + api_key: Optional[StrictStr] = Field( + default=None, + description="The API key assigned to this account. This key must be kept a secret by the customer.", + alias="apiKey", + ) + alias: Optional[StrictStr] = Field( + default=None, description="A description for this account." + ) + label: Optional[StrictStr] = Field( + default=None, + description="A string that identifies a category or group to which the account belongs.", + ) + type: Optional[AccountType] = None + status: Optional[AccountStatus] = None + subresource_uris: Optional[Dict[str, Any]] = Field( + default=None, + description="The list of subresources for this account.", + alias="subresourceUris", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "accountId", + "apiKey", + "alias", + "label", + "type", + "status", + "subresourceUris", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if api_key (nullable) is None + # and model_fields_set contains the field + if self.api_key is None and "api_key" in self.model_fields_set: + _dict["apiKey"] = None + + # set to None if alias (nullable) is None + # and model_fields_set contains the field + if self.alias is None and "alias" in self.model_fields_set: + _dict["alias"] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict["label"] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict["type"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if subresource_uris (nullable) is None + # and model_fields_set contains the field + if ( + self.subresource_uris is None + and "subresource_uris" in self.model_fields_set + ): + _dict["subresourceUris"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "accountId": obj.get("accountId"), + "apiKey": obj.get("apiKey"), + "alias": obj.get("alias"), + "label": obj.get("label"), + "type": obj.get("type"), + "status": obj.get("status"), + "subresourceUris": obj.get("subresourceUris"), + } + ) + return _obj diff --git a/freeclimb/model/account_status.py b/freeclimb/models/account_status.py similarity index 56% rename from freeclimb/model/account_status.py rename to freeclimb/models/account_status.py index e830f69..8aa21c9 100644 --- a/freeclimb/model/account_status.py +++ b/freeclimb/models/account_status.py @@ -1,42 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class AccountStatus(str, Enum): - CLOSED= "closed", - SUSPENDED= "suspended", - ACTIVE= "active", +from typing_extensions import Self +class AccountStatus(str, Enum): + """ + The status of this account. It is one of: active, suspended, or closed. + """ + + """ + allowed enum values + """ + CLOSED = "closed" + SUSPENDED = "suspended" + ACTIVE = "active" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AccountStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/model/account_type.py b/freeclimb/models/account_type.py similarity index 59% rename from freeclimb/model/account_type.py rename to freeclimb/models/account_type.py index e660444..678568f 100644 --- a/freeclimb/model/account_type.py +++ b/freeclimb/models/account_type.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class AccountType(str, Enum): - TRIAL= "trial", - FULL= "full", +from typing_extensions import Self +class AccountType(str, Enum): + """ + The type of this account. It is one of: trial or full. + """ + + """ + allowed enum values + """ + TRIAL = "trial" + FULL = "full" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AccountType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/add_to_conference.py b/freeclimb/models/add_to_conference.py new file mode 100644 index 0000000..7458779 --- /dev/null +++ b/freeclimb/models/add_to_conference.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AddToConference( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `AddToConference` command adds a Participant to a Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`. + """ # noqa: E501 + + allow_call_control: Optional[StrictBool] = Field( + default=None, + description="If `true`, Call control will be enabled for this Participant's Call leg.", + alias="allowCallControl", + ) + call_control_sequence: Optional[StrictStr] = Field( + default=None, + description="Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.", + alias="callControlSequence", + ) + call_control_url: Optional[StrictStr] = Field( + default=None, + description="URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.", + alias="callControlUrl", + ) + conference_id: StrictStr = Field( + description="ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result.", + alias="conferenceId", + ) + leave_conference_url: Optional[StrictStr] = Field( + default=None, + description="URL to be invoked when the Participant leaves the Conference. ", + alias="leaveConferenceUrl", + ) + listen: Optional[StrictBool] = Field( + default=None, + description="If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.", + ) + notification_url: Optional[StrictStr] = Field( + default=None, + description="When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.", + alias="notificationUrl", + ) + start_conf_on_enter: Optional[StrictBool] = Field( + default=None, + description="Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.", + alias="startConfOnEnter", + ) + talk: Optional[StrictBool] = Field( + default=None, + description="If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. ", + ) + dtmf_pass_through: Optional[StrictBool] = Field( + default=None, + description="If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. ", + alias="dtmfPassThrough", + ) + command: StrictStr = "AddToConference" + + __properties: ClassVar[List[str]] = [ + "command", + "allowCallControl", + "callControlSequence", + "callControlUrl", + "conferenceId", + "leaveConferenceUrl", + "listen", + "notificationUrl", + "startConfOnEnter", + "talk", + "dtmfPassThrough", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddToConference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddToConference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "allowCallControl": obj.get("allowCallControl"), + "callControlSequence": obj.get("callControlSequence"), + "callControlUrl": obj.get("callControlUrl"), + "conferenceId": obj.get("conferenceId"), + "leaveConferenceUrl": obj.get("leaveConferenceUrl"), + "listen": obj.get("listen"), + "notificationUrl": obj.get("notificationUrl"), + "startConfOnEnter": obj.get("startConfOnEnter"), + "talk": obj.get("talk"), + "dtmfPassThrough": obj.get("dtmfPassThrough"), + } + ) + return _obj diff --git a/freeclimb/models/add_to_conference_notification_webhook.py b/freeclimb/models/add_to_conference_notification_webhook.py new file mode 100644 index 0000000..f5037a1 --- /dev/null +++ b/freeclimb/models/add_to_conference_notification_webhook.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.conference_status import ConferenceStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AddToConferenceNotificationWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A Call has been bridged to a Conference and the AddToConference command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be addToConferenceNotification - A Call has been bridged to a conference and the addToConference command’s notificationUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + status: Optional[ConferenceStatus] = None + recording_url: Optional[StrictStr] = Field( + default=None, + description="URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied.", + alias="recordingUrl", + ) + recording_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied.", + alias="recordingId", + ) + recording_duration_sec: Optional[StrictInt] = Field( + default=None, + description="Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied.", + alias="recordingDurationSec", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "status", + "recordingUrl", + "recordingId", + "recordingDurationSec", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddToConferenceNotificationWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddToConferenceNotificationWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "status": obj.get("status"), + "recordingUrl": obj.get("recordingUrl"), + "recordingId": obj.get("recordingId"), + "recordingDurationSec": obj.get("recordingDurationSec"), + } + ) + return _obj diff --git a/freeclimb/models/add_to_queue_notification_webhook.py b/freeclimb/models/add_to_queue_notification_webhook.py new file mode 100644 index 0000000..8e2c7cd --- /dev/null +++ b/freeclimb/models/add_to_queue_notification_webhook.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AddToQueueNotificationWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A Call has been added to a Queue and the Enqueue command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be addToQueueNotification - A call has been added to a queue and the Enqueue command’s notificationUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddToQueueNotificationWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddToQueueNotificationWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + } + ) + return _obj diff --git a/freeclimb/models/answered_by.py b/freeclimb/models/answered_by.py new file mode 100644 index 0000000..88ca681 --- /dev/null +++ b/freeclimb/models/answered_by.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AnsweredBy(str, Enum): + """ + If this Call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise. + """ + + """ + allowed enum values + """ + HUMAN = "human" + MACHINE = "machine" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AnsweredBy from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/application_list.py b/freeclimb/models/application_list.py new file mode 100644 index 0000000..f45d9e7 --- /dev/null +++ b/freeclimb/models/application_list.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.application_result import ApplicationResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ApplicationList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ApplicationList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + applications: Optional[List[ApplicationResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "applications", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in applications (list) + _items = [] + if self.applications: + for _item_applications in self.applications: + if _item_applications: + _items.append(_item_applications.to_dict()) + _dict["applications"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if applications (nullable) is None + # and model_fields_set contains the field + if self.applications is None and "applications" in self.model_fields_set: + _dict["applications"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "applications": ( + [ + ApplicationResult.from_dict(_item) + for _item in obj["applications"] + ] + if obj.get("applications") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/application_request.py b/freeclimb/models/application_request.py new file mode 100644 index 0000000..47c1c0e --- /dev/null +++ b/freeclimb/models/application_request.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ApplicationRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ApplicationRequest + """ # noqa: E501 + + alias: Optional[StrictStr] = Field( + default=None, + description="A human readable description of the application, with maximum length 64 characters.", + ) + voice_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls.", + alias="voiceUrl", + ) + voice_fallback_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. Note: A PerCL response is expected to control the inbound call.", + alias="voiceFallbackUrl", + ) + call_connect_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request when an outbound call request is complete. Used for outbound calls only. Note: A PerCL response is expected if the outbound call is connected (status=InProgress) to control the call.", + alias="callConnectUrl", + ) + status_callback_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request to pass call status (such as call ended) to the application. Note: This is a notification only; any PerCL returned will be ignored.", + alias="statusCallbackUrl", + ) + sms_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request when a phone number assigned to this application receives an incoming SMS message. Used for inbound SMS only. Note: Any PerCL returned will be ignored.", + alias="smsUrl", + ) + sms_fallback_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. Note: Any PerCL returned will be ignored.", + alias="smsFallbackUrl", + ) + + __properties: ClassVar[List[str]] = [ + "alias", + "voiceUrl", + "voiceFallbackUrl", + "callConnectUrl", + "statusCallbackUrl", + "smsUrl", + "smsFallbackUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if voice_url (nullable) is None + # and model_fields_set contains the field + if self.voice_url is None and "voice_url" in self.model_fields_set: + _dict["voiceUrl"] = None + + # set to None if voice_fallback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.voice_fallback_url is None + and "voice_fallback_url" in self.model_fields_set + ): + _dict["voiceFallbackUrl"] = None + + # set to None if call_connect_url (nullable) is None + # and model_fields_set contains the field + if ( + self.call_connect_url is None + and "call_connect_url" in self.model_fields_set + ): + _dict["callConnectUrl"] = None + + # set to None if status_callback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.status_callback_url is None + and "status_callback_url" in self.model_fields_set + ): + _dict["statusCallbackUrl"] = None + + # set to None if sms_url (nullable) is None + # and model_fields_set contains the field + if self.sms_url is None and "sms_url" in self.model_fields_set: + _dict["smsUrl"] = None + + # set to None if sms_fallback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.sms_fallback_url is None + and "sms_fallback_url" in self.model_fields_set + ): + _dict["smsFallbackUrl"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "alias": obj.get("alias"), + "voiceUrl": obj.get("voiceUrl"), + "voiceFallbackUrl": obj.get("voiceFallbackUrl"), + "callConnectUrl": obj.get("callConnectUrl"), + "statusCallbackUrl": obj.get("statusCallbackUrl"), + "smsUrl": obj.get("smsUrl"), + "smsFallbackUrl": obj.get("smsFallbackUrl"), + } + ) + return _obj diff --git a/freeclimb/models/application_result.py b/freeclimb/models/application_result.py new file mode 100644 index 0000000..22a382f --- /dev/null +++ b/freeclimb/models/application_result.py @@ -0,0 +1,229 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ApplicationResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ApplicationResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that owns this phone number.", + alias="accountId", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.", + alias="applicationId", + ) + alias: Optional[StrictStr] = Field( + default=None, + description="Description for this phone number. Typically the conventionally-formatted version of the phone number.", + ) + voice_url: Optional[StrictStr] = Field( + default=None, + description="The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.", + alias="voiceUrl", + ) + voice_fallback_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.", + alias="voiceFallbackUrl", + ) + call_connect_url: Optional[StrictStr] = Field( + default=None, + description="The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not.", + alias="callConnectUrl", + ) + status_callback_url: Optional[StrictStr] = Field( + default=None, + description="A URL to which FreeClimb will make a POST request when the Call ends to notify this app.", + alias="statusCallbackUrl", + ) + sms_url: Optional[StrictStr] = Field( + default=None, + description="The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.", + alias="smsUrl", + ) + sms_fallback_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.", + alias="smsFallbackUrl", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "accountId", + "applicationId", + "alias", + "voiceUrl", + "voiceFallbackUrl", + "callConnectUrl", + "statusCallbackUrl", + "smsUrl", + "smsFallbackUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if application_id (nullable) is None + # and model_fields_set contains the field + if self.application_id is None and "application_id" in self.model_fields_set: + _dict["applicationId"] = None + + # set to None if alias (nullable) is None + # and model_fields_set contains the field + if self.alias is None and "alias" in self.model_fields_set: + _dict["alias"] = None + + # set to None if voice_url (nullable) is None + # and model_fields_set contains the field + if self.voice_url is None and "voice_url" in self.model_fields_set: + _dict["voiceUrl"] = None + + # set to None if voice_fallback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.voice_fallback_url is None + and "voice_fallback_url" in self.model_fields_set + ): + _dict["voiceFallbackUrl"] = None + + # set to None if call_connect_url (nullable) is None + # and model_fields_set contains the field + if ( + self.call_connect_url is None + and "call_connect_url" in self.model_fields_set + ): + _dict["callConnectUrl"] = None + + # set to None if status_callback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.status_callback_url is None + and "status_callback_url" in self.model_fields_set + ): + _dict["statusCallbackUrl"] = None + + # set to None if sms_url (nullable) is None + # and model_fields_set contains the field + if self.sms_url is None and "sms_url" in self.model_fields_set: + _dict["smsUrl"] = None + + # set to None if sms_fallback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.sms_fallback_url is None + and "sms_fallback_url" in self.model_fields_set + ): + _dict["smsFallbackUrl"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "accountId": obj.get("accountId"), + "applicationId": obj.get("applicationId"), + "alias": obj.get("alias"), + "voiceUrl": obj.get("voiceUrl"), + "voiceFallbackUrl": obj.get("voiceFallbackUrl"), + "callConnectUrl": obj.get("callConnectUrl"), + "statusCallbackUrl": obj.get("statusCallbackUrl"), + "smsUrl": obj.get("smsUrl"), + "smsFallbackUrl": obj.get("smsFallbackUrl"), + } + ) + return _obj diff --git a/freeclimb/models/available_number.py b/freeclimb/models/available_number.py new file mode 100644 index 0000000..fbba0c8 --- /dev/null +++ b/freeclimb/models/available_number.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.capabilities import Capabilities +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AvailableNumber( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + AvailableNumber + """ # noqa: E501 + + capabilities: Optional[Capabilities] = None + campaign_id: Optional[StrictStr] = Field( + default=None, + description="The campaign ID generated by the campaign registry", + alias="campaignId", + ) + phone_number: Optional[StrictStr] = Field( + default=None, + description="The phone number, in E.164 format (+ country code and phone number: +18003608245).", + alias="phoneNumber", + ) + voice_enabled: Optional[StrictBool] = Field( + default=None, + description="Typically set to true for all numbers.", + alias="voiceEnabled", + ) + sms_enabled: Optional[StrictBool] = Field( + default=None, + description="Indicates whether the phone number can send and receive SMS messages.", + alias="smsEnabled", + ) + region: Optional[StrictStr] = Field( + default=None, description="The state or province of this phone number." + ) + country: Optional[StrictStr] = Field( + default=None, description="The country of this phone number." + ) + + __properties: ClassVar[List[str]] = [ + "capabilities", + "campaignId", + "phoneNumber", + "voiceEnabled", + "smsEnabled", + "region", + "country", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AvailableNumber from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict["capabilities"] = self.capabilities.to_dict() + # set to None if campaign_id (nullable) is None + # and model_fields_set contains the field + if self.campaign_id is None and "campaign_id" in self.model_fields_set: + _dict["campaignId"] = None + + # set to None if phone_number (nullable) is None + # and model_fields_set contains the field + if self.phone_number is None and "phone_number" in self.model_fields_set: + _dict["phoneNumber"] = None + + # set to None if voice_enabled (nullable) is None + # and model_fields_set contains the field + if self.voice_enabled is None and "voice_enabled" in self.model_fields_set: + _dict["voiceEnabled"] = None + + # set to None if sms_enabled (nullable) is None + # and model_fields_set contains the field + if self.sms_enabled is None and "sms_enabled" in self.model_fields_set: + _dict["smsEnabled"] = None + + # set to None if region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict["region"] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict["country"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AvailableNumber from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "capabilities": ( + Capabilities.from_dict(obj["capabilities"]) + if obj.get("capabilities") is not None + else None + ), + "campaignId": obj.get("campaignId"), + "phoneNumber": obj.get("phoneNumber"), + "voiceEnabled": obj.get("voiceEnabled"), + "smsEnabled": obj.get("smsEnabled"), + "region": obj.get("region"), + "country": obj.get("country"), + } + ) + return _obj diff --git a/freeclimb/models/available_number_list.py b/freeclimb/models/available_number_list.py new file mode 100644 index 0000000..f6618fa --- /dev/null +++ b/freeclimb/models/available_number_list.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.available_number import AvailableNumber +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class AvailableNumberList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + AvailableNumberList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + available_phone_numbers: Optional[List[AvailableNumber]] = Field( + default=None, alias="availablePhoneNumbers" + ) + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "availablePhoneNumbers", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AvailableNumberList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in available_phone_numbers (list) + _items = [] + if self.available_phone_numbers: + for _item_available_phone_numbers in self.available_phone_numbers: + if _item_available_phone_numbers: + _items.append(_item_available_phone_numbers.to_dict()) + _dict["availablePhoneNumbers"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if available_phone_numbers (nullable) is None + # and model_fields_set contains the field + if ( + self.available_phone_numbers is None + and "available_phone_numbers" in self.model_fields_set + ): + _dict["availablePhoneNumbers"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AvailableNumberList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "availablePhoneNumbers": ( + [ + AvailableNumber.from_dict(_item) + for _item in obj["availablePhoneNumbers"] + ] + if obj.get("availablePhoneNumbers") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/model/grammar_type.py b/freeclimb/models/barge_in_reason.py similarity index 55% rename from freeclimb/model/grammar_type.py rename to freeclimb/models/barge_in_reason.py index f62e517..5ef706e 100644 --- a/freeclimb/model/grammar_type.py +++ b/freeclimb/models/barge_in_reason.py @@ -1,41 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum +from typing_extensions import Self + -# class syntax -class GrammarType(str, Enum): - URL= "URL", - BUILT_IN= "BUILTIN", +class BargeInReason(str, Enum): + """ + BargeInReason + """ + """ + allowed enum values + """ + NO_BARGE_IN = "noBargeIn" + BARGE_IN_BY_DTMF = "bargeInByDTMF" + BARGE_IN_BY_ENERGY = "bargeInByEnergy" + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BargeInReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/buy_incoming_number_request.py b/freeclimb/models/buy_incoming_number_request.py new file mode 100644 index 0000000..b26ee1a --- /dev/null +++ b/freeclimb/models/buy_incoming_number_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class BuyIncomingNumberRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + BuyIncomingNumberRequest + """ # noqa: E501 + + phone_number: StrictStr = Field( + description="Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers).", + alias="phoneNumber", + ) + alias: Optional[StrictStr] = Field( + default=None, + description="Description for this new incoming phone number (max 64 characters).", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="ID of the application that should handle phone calls to the number.", + alias="applicationId", + ) + + __properties: ClassVar[List[str]] = ["phoneNumber", "alias", "applicationId"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BuyIncomingNumberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BuyIncomingNumberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "phoneNumber": obj.get("phoneNumber"), + "alias": obj.get("alias"), + "applicationId": obj.get("applicationId"), + } + ) + return _obj diff --git a/freeclimb/models/call_control_webhook.py b/freeclimb/models/call_control_webhook.py new file mode 100644 index 0000000..cf71cb6 --- /dev/null +++ b/freeclimb/models/call_control_webhook.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CallControlWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The digit sequence defined in the callControlSequence attribute of the AddToConference PerCL command has been entered by the Conference participant. A PerCL response is expected. If invalid PerCL is provided, the call leg which triggered this webhook will terminate. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be callControl.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + digits: Optional[StrictStr] = Field( + default=None, description="String of digits entered by the participant." + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "conferenceId", + "digits", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallControlWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallControlWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "conferenceId": obj.get("conferenceId"), + "digits": obj.get("digits"), + } + ) + return _obj diff --git a/freeclimb/models/call_direction.py b/freeclimb/models/call_direction.py new file mode 100644 index 0000000..e26dccb --- /dev/null +++ b/freeclimb/models/call_direction.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CallDirection(str, Enum): + """ + Direction of the Call. `inbound` for Calls into FreeClimb, `outboundAPI` for Calls initiated via the REST API, `outboundDial` for Calls initiated by the `OutDial` PerCL command. + """ + + """ + allowed enum values + """ + INBOUND = "inbound" + OUTBOUND_API = "outboundAPI" + OUTBOUND_DIAL = "outboundDial" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CallDirection from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/call_ended_reason.py b/freeclimb/models/call_ended_reason.py new file mode 100644 index 0000000..6860e68 --- /dev/null +++ b/freeclimb/models/call_ended_reason.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CallEndedReason(str, Enum): + """ + Enhanced status for the Call with additional information where available. + """ + + """ + allowed enum values + """ + BUSY = "busy" + FAILED = "failed" + NO_ANSWER = "noAnswer" + CALL_CANCELED = "callCanceled" + FAR_END_HANGUP = "farEndHangup" + APP_HANGUP = "appHangup" + APP_REJECT = "appReject" + APP_NO_PERCL = "appNoPercl" + APP_INVALID_PERCL = "appInvalidPercl" + CONFERENCE_TERMINATED = "conferenceTerminated" + CONFERENCE_EMPTIED = "conferenceEmptied" + REMOVED_FROM_CONFERENCE = "removedFromConference" + MACHINE_DETECTED = "machineDetected" + WEBHOOK_FAILED = "webhookFailed" + WEBHOOK_INVALID_RESPONSE = "webhookInvalidResponse" + VOICE_DISABLED = "voiceDisabled" + CONFIG_ERROR_NO_APPLICATION = "configErrorNoApplication" + CONFIG_ERROR_NO_VOICE_URL = "configErrorNoVoiceUrl" + MAX_REDIRECTS_ERROR = "maxRedirectsError" + PERCL_PROCESSING_ERROR = "perclProcessingError" + INTERNAL_ERROR = "internalError" + GRPC_HANGUP = "grpcHangup" + MAX_DURATION = "maxDuration" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CallEndedReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/call_list.py b/freeclimb/models/call_list.py new file mode 100644 index 0000000..6dc8d83 --- /dev/null +++ b/freeclimb/models/call_list.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_result import CallResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CallList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + CallList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + calls: Optional[List[CallResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "calls", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in calls (list) + _items = [] + if self.calls: + for _item_calls in self.calls: + if _item_calls: + _items.append(_item_calls.to_dict()) + _dict["calls"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if calls (nullable) is None + # and model_fields_set contains the field + if self.calls is None and "calls" in self.model_fields_set: + _dict["calls"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "calls": ( + [CallResult.from_dict(_item) for _item in obj["calls"]] + if obj.get("calls") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/call_result.py b/freeclimb/models/call_result.py new file mode 100644 index 0000000..9096259 --- /dev/null +++ b/freeclimb/models/call_result.py @@ -0,0 +1,294 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.answered_by import AnsweredBy +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CallResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + CallResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies this Call resource.", + alias="callId", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child Call).", + alias="parentCallId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that owns this Call.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, description="Phone number that initiated this Call.", alias="from" + ) + to: Optional[StrictStr] = Field( + default=None, description="Phone number that received this Call." + ) + phone_number_id: Optional[StrictStr] = Field( + default=None, + description="If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).", + alias="phoneNumberId", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + start_time: Optional[StrictStr] = Field( + default=None, + description="Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.", + alias="startTime", + ) + connect_time: Optional[StrictStr] = Field( + default=None, + description="Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.", + alias="connectTime", + ) + end_time: Optional[StrictStr] = Field( + default=None, + description="End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully.", + alias="endTime", + ) + duration: Optional[StrictInt] = Field( + default=None, + description="Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.", + ) + connect_duration: Optional[StrictInt] = Field( + default=None, + description="Length of time that the Call was connected in seconds. Measures time between connectTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.", + alias="connectDuration", + ) + direction: Optional[CallDirection] = None + answered_by: Optional[AnsweredBy] = Field(default=None, alias="answeredBy") + subresource_uris: Optional[Dict[str, Any]] = Field( + default=None, + description="The list of subresources for this Call. These include things like logs and recordings associated with the Call.", + alias="subresourceUris", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="ApplicationId associated with the Call.", + alias="applicationId", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "callId", + "parentCallId", + "accountId", + "from", + "to", + "phoneNumberId", + "callStatus", + "startTime", + "connectTime", + "endTime", + "duration", + "connectDuration", + "direction", + "answeredBy", + "subresourceUris", + "applicationId", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_id (nullable) is None + # and model_fields_set contains the field + if self.call_id is None and "call_id" in self.model_fields_set: + _dict["callId"] = None + + # set to None if parent_call_id (nullable) is None + # and model_fields_set contains the field + if self.parent_call_id is None and "parent_call_id" in self.model_fields_set: + _dict["parentCallId"] = None + + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict["from"] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict["to"] = None + + # set to None if phone_number_id (nullable) is None + # and model_fields_set contains the field + if self.phone_number_id is None and "phone_number_id" in self.model_fields_set: + _dict["phoneNumberId"] = None + + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if start_time (nullable) is None + # and model_fields_set contains the field + if self.start_time is None and "start_time" in self.model_fields_set: + _dict["startTime"] = None + + # set to None if connect_time (nullable) is None + # and model_fields_set contains the field + if self.connect_time is None and "connect_time" in self.model_fields_set: + _dict["connectTime"] = None + + # set to None if end_time (nullable) is None + # and model_fields_set contains the field + if self.end_time is None and "end_time" in self.model_fields_set: + _dict["endTime"] = None + + # set to None if duration (nullable) is None + # and model_fields_set contains the field + if self.duration is None and "duration" in self.model_fields_set: + _dict["duration"] = None + + # set to None if connect_duration (nullable) is None + # and model_fields_set contains the field + if ( + self.connect_duration is None + and "connect_duration" in self.model_fields_set + ): + _dict["connectDuration"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if answered_by (nullable) is None + # and model_fields_set contains the field + if self.answered_by is None and "answered_by" in self.model_fields_set: + _dict["answeredBy"] = None + + # set to None if subresource_uris (nullable) is None + # and model_fields_set contains the field + if ( + self.subresource_uris is None + and "subresource_uris" in self.model_fields_set + ): + _dict["subresourceUris"] = None + + # set to None if application_id (nullable) is None + # and model_fields_set contains the field + if self.application_id is None and "application_id" in self.model_fields_set: + _dict["applicationId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "callId": obj.get("callId"), + "parentCallId": obj.get("parentCallId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "phoneNumberId": obj.get("phoneNumberId"), + "callStatus": obj.get("callStatus"), + "startTime": obj.get("startTime"), + "connectTime": obj.get("connectTime"), + "endTime": obj.get("endTime"), + "duration": obj.get("duration"), + "connectDuration": obj.get("connectDuration"), + "direction": obj.get("direction"), + "answeredBy": obj.get("answeredBy"), + "subresourceUris": obj.get("subresourceUris"), + "applicationId": obj.get("applicationId"), + } + ) + return _obj diff --git a/freeclimb/models/call_status.py b/freeclimb/models/call_status.py new file mode 100644 index 0000000..8e3d97a --- /dev/null +++ b/freeclimb/models/call_status.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CallStatus(str, Enum): + """ + * `queued` – Call is ready and waiting in line before going out. * `ringing` – Call is currently ringing. * `inProgress` – Call was answered and is currently in progress. * `canceled` – Call was hung up while it was queued or ringing. * `completed` – Call was answered and has ended normally. * `busy` – Caller received a busy signal. * `failed` – Call could not be completed as dialed, most likely because the phone number was non-existent. * `noAnswer` – Call ended without being answered. + """ + + """ + allowed enum values + """ + QUEUED = "queued" + RINGING = "ringing" + IN_PROGRESS = "inProgress" + CANCELED = "canceled" + COMPLETED = "completed" + FAILED = "failed" + BUSY = "busy" + NO_ANSWER = "noAnswer" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CallStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/call_status_webhook.py b/freeclimb/models/call_status_webhook.py new file mode 100644 index 0000000..91916bb --- /dev/null +++ b/freeclimb/models/call_status_webhook.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_ended_reason import CallEndedReason +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CallStatusWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A Call has ended and the statusCallbackUrl is being invoked. This is a notification only; All PerCL commands will be ignored. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be callStatus - A Call has ended and the statusCallbackUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + call_ended_reason: Optional[CallEndedReason] = Field( + default=None, alias="callEndedReason" + ) + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "callEndedReason", + "direction", + "conferenceId", + "queueId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallStatusWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if call_ended_reason (nullable) is None + # and model_fields_set contains the field + if ( + self.call_ended_reason is None + and "call_ended_reason" in self.model_fields_set + ): + _dict["callEndedReason"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallStatusWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "callEndedReason": obj.get("callEndedReason"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + } + ) + return _obj diff --git a/freeclimb/models/capabilities.py b/freeclimb/models/capabilities.py new file mode 100644 index 0000000..c796cf2 --- /dev/null +++ b/freeclimb/models/capabilities.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Capabilities( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + Details for which features this number may be used. + """ # noqa: E501 + + voice: Optional[StrictBool] = Field( + description="Indicates whether a number can be used for voice calls. Replaces voiceEnabled." + ) + sms: Optional[StrictBool] = Field( + description="Indicates whether a number can be used SMS messaging. Replaces smsEnabled." + ) + toll_free: Optional[StrictBool] = Field( + description="Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages.", + alias="tollFree", + ) + ten_dlc: Optional[StrictBool] = Field( + description="Indicates that a number, if sms is true, will be used for 10DLC messaging", + alias="tenDLC", + ) + short_code: Optional[StrictBool] = Field( + description="Indicates that a number is a short code and can be used for short code messaging", + alias="shortCode", + ) + + __properties: ClassVar[List[str]] = [ + "voice", + "sms", + "tollFree", + "tenDLC", + "shortCode", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Capabilities from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if voice (nullable) is None + # and model_fields_set contains the field + if self.voice is None and "voice" in self.model_fields_set: + _dict["voice"] = None + + # set to None if sms (nullable) is None + # and model_fields_set contains the field + if self.sms is None and "sms" in self.model_fields_set: + _dict["sms"] = None + + # set to None if toll_free (nullable) is None + # and model_fields_set contains the field + if self.toll_free is None and "toll_free" in self.model_fields_set: + _dict["tollFree"] = None + + # set to None if ten_dlc (nullable) is None + # and model_fields_set contains the field + if self.ten_dlc is None and "ten_dlc" in self.model_fields_set: + _dict["tenDLC"] = None + + # set to None if short_code (nullable) is None + # and model_fields_set contains the field + if self.short_code is None and "short_code" in self.model_fields_set: + _dict["shortCode"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Capabilities from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "voice": obj.get("voice"), + "sms": obj.get("sms"), + "tollFree": obj.get("tollFree"), + "tenDLC": obj.get("tenDLC"), + "shortCode": obj.get("shortCode"), + } + ) + return _obj diff --git a/freeclimb/models/completion_request.py b/freeclimb/models/completion_request.py new file mode 100644 index 0000000..9d4ab2f --- /dev/null +++ b/freeclimb/models/completion_request.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CompletionRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + CompletionRequest + """ # noqa: E501 + + query: Annotated[str, Field(strict=True, max_length=2000)] = Field( + description="Question to ask the Knowledge Base" + ) + + __properties: ClassVar[List[str]] = ["query"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CompletionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CompletionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"query": obj.get("query")}) + return _obj diff --git a/freeclimb/models/completion_result.py b/freeclimb/models/completion_result.py new file mode 100644 index 0000000..a412c03 --- /dev/null +++ b/freeclimb/models/completion_result.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from freeclimb.models.completion_result_status import CompletionResultStatus +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CompletionResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + CompletionResult + """ # noqa: E501 + + response: StrictStr = Field( + description="The generative response from the KnowledgeBase" + ) + status: CompletionResultStatus + + __properties: ClassVar[List[str]] = ["response", "status"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CompletionResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CompletionResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"response": obj.get("response"), "status": obj.get("status")} + ) + return _obj diff --git a/freeclimb/model/call_direction.py b/freeclimb/models/completion_result_status.py similarity index 54% rename from freeclimb/model/call_direction.py rename to freeclimb/models/completion_result_status.py index bcf4f26..3652fd4 100644 --- a/freeclimb/model/call_direction.py +++ b/freeclimb/models/completion_result_status.py @@ -1,42 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum +from typing_extensions import Self + -# class syntax -class CallDirection(str, Enum): - INBOUND= "inbound", - OUTBOUND_API= "outboundAPI", - OUTBOUND_DIAL= "outboundDial", +class CompletionResultStatus(str, Enum): + """ + Completion result status. Possible values: success, no_context + """ + """ + allowed enum values + """ + SUCCESS = "success" + NO_CONTEXT = "no_context" + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CompletionResultStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/conference_list.py b/freeclimb/models/conference_list.py new file mode 100644 index 0000000..156fc45 --- /dev/null +++ b/freeclimb/models/conference_list.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.conference_result import ConferenceResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ConferenceList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ConferenceList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + conferences: Optional[List[ConferenceResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "conferences", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConferenceList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in conferences (list) + _items = [] + if self.conferences: + for _item_conferences in self.conferences: + if _item_conferences: + _items.append(_item_conferences.to_dict()) + _dict["conferences"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if conferences (nullable) is None + # and model_fields_set contains the field + if self.conferences is None and "conferences" in self.model_fields_set: + _dict["conferences"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConferenceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "conferences": ( + [ConferenceResult.from_dict(_item) for _item in obj["conferences"]] + if obj.get("conferences") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/conference_participant_list.py b/freeclimb/models/conference_participant_list.py new file mode 100644 index 0000000..5020b31 --- /dev/null +++ b/freeclimb/models/conference_participant_list.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.conference_participant_result import ConferenceParticipantResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ConferenceParticipantList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ConferenceParticipantList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + participants: Optional[List[ConferenceParticipantResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "participants", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConferenceParticipantList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in participants (list) + _items = [] + if self.participants: + for _item_participants in self.participants: + if _item_participants: + _items.append(_item_participants.to_dict()) + _dict["participants"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if participants (nullable) is None + # and model_fields_set contains the field + if self.participants is None and "participants" in self.model_fields_set: + _dict["participants"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConferenceParticipantList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "participants": ( + [ + ConferenceParticipantResult.from_dict(_item) + for _item in obj["participants"] + ] + if obj.get("participants") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/conference_participant_result.py b/freeclimb/models/conference_participant_result.py new file mode 100644 index 0000000..d0d8669 --- /dev/null +++ b/freeclimb/models/conference_participant_result.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ConferenceParticipantResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ConferenceParticipantResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this participant.", + alias="accountId", + ) + conference_id: Optional[StrictStr] = Field( + default=None, + description="ID of the conference this participant is in.", + alias="conferenceId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call associated with this Participant.", + alias="callId", + ) + talk: Optional[StrictBool] = Field( + default=None, + description="True if this Participant has talk privileges in the Conference. False otherwise.", + ) + listen: Optional[StrictBool] = Field( + default=None, + description="True if this Participant has listen privileges in the Conference. False otherwise.", + ) + dtmf_pass_through: Optional[StrictBool] = Field( + default=None, + description="True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.", + alias="dtmfPassThrough", + ) + start_conf_on_enter: Optional[StrictBool] = Field( + default=None, + description="True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.", + alias="startConfOnEnter", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "accountId", + "conferenceId", + "callId", + "talk", + "listen", + "dtmfPassThrough", + "startConfOnEnter", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConferenceParticipantResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if call_id (nullable) is None + # and model_fields_set contains the field + if self.call_id is None and "call_id" in self.model_fields_set: + _dict["callId"] = None + + # set to None if talk (nullable) is None + # and model_fields_set contains the field + if self.talk is None and "talk" in self.model_fields_set: + _dict["talk"] = None + + # set to None if listen (nullable) is None + # and model_fields_set contains the field + if self.listen is None and "listen" in self.model_fields_set: + _dict["listen"] = None + + # set to None if dtmf_pass_through (nullable) is None + # and model_fields_set contains the field + if ( + self.dtmf_pass_through is None + and "dtmf_pass_through" in self.model_fields_set + ): + _dict["dtmfPassThrough"] = None + + # set to None if start_conf_on_enter (nullable) is None + # and model_fields_set contains the field + if ( + self.start_conf_on_enter is None + and "start_conf_on_enter" in self.model_fields_set + ): + _dict["startConfOnEnter"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConferenceParticipantResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "accountId": obj.get("accountId"), + "conferenceId": obj.get("conferenceId"), + "callId": obj.get("callId"), + "talk": obj.get("talk"), + "listen": obj.get("listen"), + "dtmfPassThrough": obj.get("dtmfPassThrough"), + "startConfOnEnter": obj.get("startConfOnEnter"), + } + ) + return _obj diff --git a/freeclimb/models/conference_recording_status_webhook.py b/freeclimb/models/conference_recording_status_webhook.py new file mode 100644 index 0000000..e92bab7 --- /dev/null +++ b/freeclimb/models/conference_recording_status_webhook.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.conference_status import ConferenceStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ConferenceRecordingStatusWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The statusCallbackUrl request includes Recording information for a Conference that ended. This is a notification only; any PerCL returned will be ignored. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + status: Optional[ConferenceStatus] = None + recording_url: Optional[StrictStr] = Field( + default=None, + description="URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied.", + alias="recordingUrl", + ) + recording_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied.", + alias="recordingId", + ) + recording_duration_sec: Optional[StrictInt] = Field( + default=None, + description="Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied.", + alias="recordingDurationSec", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "status", + "recordingUrl", + "recordingId", + "recordingDurationSec", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConferenceRecordingStatusWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConferenceRecordingStatusWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "status": obj.get("status"), + "recordingUrl": obj.get("recordingUrl"), + "recordingId": obj.get("recordingId"), + "recordingDurationSec": obj.get("recordingDurationSec"), + } + ) + return _obj diff --git a/freeclimb/models/conference_result.py b/freeclimb/models/conference_result.py new file mode 100644 index 0000000..54e6595 --- /dev/null +++ b/freeclimb/models/conference_result.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.conference_status import ConferenceStatus +from freeclimb.models.play_beep import PlayBeep +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ConferenceResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ConferenceResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + conference_id: Optional[StrictStr] = Field( + default=None, + description="A string that uniquely identifies this Conference resource.", + alias="conferenceId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this Conference.", + alias="accountId", + ) + alias: Optional[StrictStr] = Field( + default=None, description="A description for this Conference." + ) + play_beep: Optional[PlayBeep] = Field(default=None, alias="playBeep") + record: Optional[StrictBool] = Field( + default=None, + description="Flag indicating whether recording is enabled for this Conference.", + ) + status: Optional[ConferenceStatus] = None + wait_url: Optional[StrictStr] = Field( + default=None, + description="URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.", + alias="waitUrl", + ) + action_url: Optional[StrictStr] = Field( + default=None, + description="URL invoked once the Conference is successfully created.", + alias="actionUrl", + ) + status_callback_url: Optional[StrictStr] = Field( + default=None, + description="URL to inform that the Conference status has changed.", + alias="statusCallbackUrl", + ) + subresource_uris: Optional[Dict[str, Any]] = Field( + default=None, + description="The list of subresources for this Conference. This includes participants and/or recordings.", + alias="subresourceUris", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "conferenceId", + "accountId", + "alias", + "playBeep", + "record", + "status", + "waitUrl", + "actionUrl", + "statusCallbackUrl", + "subresourceUris", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConferenceResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if alias (nullable) is None + # and model_fields_set contains the field + if self.alias is None and "alias" in self.model_fields_set: + _dict["alias"] = None + + # set to None if play_beep (nullable) is None + # and model_fields_set contains the field + if self.play_beep is None and "play_beep" in self.model_fields_set: + _dict["playBeep"] = None + + # set to None if record (nullable) is None + # and model_fields_set contains the field + if self.record is None and "record" in self.model_fields_set: + _dict["record"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if wait_url (nullable) is None + # and model_fields_set contains the field + if self.wait_url is None and "wait_url" in self.model_fields_set: + _dict["waitUrl"] = None + + # set to None if action_url (nullable) is None + # and model_fields_set contains the field + if self.action_url is None and "action_url" in self.model_fields_set: + _dict["actionUrl"] = None + + # set to None if status_callback_url (nullable) is None + # and model_fields_set contains the field + if ( + self.status_callback_url is None + and "status_callback_url" in self.model_fields_set + ): + _dict["statusCallbackUrl"] = None + + # set to None if subresource_uris (nullable) is None + # and model_fields_set contains the field + if ( + self.subresource_uris is None + and "subresource_uris" in self.model_fields_set + ): + _dict["subresourceUris"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConferenceResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "conferenceId": obj.get("conferenceId"), + "accountId": obj.get("accountId"), + "alias": obj.get("alias"), + "playBeep": obj.get("playBeep"), + "record": obj.get("record"), + "status": obj.get("status"), + "waitUrl": obj.get("waitUrl"), + "actionUrl": obj.get("actionUrl"), + "statusCallbackUrl": obj.get("statusCallbackUrl"), + "subresourceUris": obj.get("subresourceUris"), + } + ) + return _obj diff --git a/freeclimb/model/conference_status.py b/freeclimb/models/conference_status.py similarity index 54% rename from freeclimb/model/conference_status.py rename to freeclimb/models/conference_status.py index f9d7178..f1389b8 100644 --- a/freeclimb/model/conference_status.py +++ b/freeclimb/models/conference_status.py @@ -1,43 +1,38 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class ConferenceStatus(str, Enum): - EMPTY= "empty", - POPULATED= "populated", - IN_PROGRESS= "inProgress", - TERMINATED= "terminated", +from typing_extensions import Self +class ConferenceStatus(str, Enum): + """ + The status of the Conference. One of: creating, empty, populated, inProgress, or terminated. + """ + + """ + allowed enum values + """ + EMPTY = "empty" + POPULATED = "populated" + IN_PROGRESS = "inProgress" + TERMINATED = "terminated" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ConferenceStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/conference_status_webhook.py b/freeclimb/models/conference_status_webhook.py new file mode 100644 index 0000000..e3a8d13 --- /dev/null +++ b/freeclimb/models/conference_status_webhook.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.conference_status import ConferenceStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ConferenceStatusWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The context or reason why this request is being made. Will be conferenceStatus - A Conference's status changed and its statusCallbackUrl is being invoked. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + status: Optional[ConferenceStatus] = None + recording_url: Optional[StrictStr] = Field( + default=None, + description="The URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + alias="recordingUrl", + ) + recording_id: Optional[StrictStr] = Field( + default=None, + description="The unique ID of the Recording from this Conference. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + alias="recordingId", + ) + recording_duration_sec: Optional[StrictInt] = Field( + default=None, + description="The duration of the recorded audio rounded up to the nearest second (in seconds). Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + alias="recordingDurationSec", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "status", + "recordingUrl", + "recordingId", + "recordingDurationSec", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConferenceStatusWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if recording_url (nullable) is None + # and model_fields_set contains the field + if self.recording_url is None and "recording_url" in self.model_fields_set: + _dict["recordingUrl"] = None + + # set to None if recording_id (nullable) is None + # and model_fields_set contains the field + if self.recording_id is None and "recording_id" in self.model_fields_set: + _dict["recordingId"] = None + + # set to None if recording_duration_sec (nullable) is None + # and model_fields_set contains the field + if ( + self.recording_duration_sec is None + and "recording_duration_sec" in self.model_fields_set + ): + _dict["recordingDurationSec"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConferenceStatusWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "status": obj.get("status"), + "recordingUrl": obj.get("recordingUrl"), + "recordingId": obj.get("recordingId"), + "recordingDurationSec": obj.get("recordingDurationSec"), + } + ) + return _obj diff --git a/freeclimb/models/create_conference.py b/freeclimb/models/create_conference.py new file mode 100644 index 0000000..f8aeb61 --- /dev/null +++ b/freeclimb/models/create_conference.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from freeclimb.models.play_beep import PlayBeep +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CreateConference( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `CreateConference` command does exactly what its name implies — it creates an unpopulated Conference (one without any Participants). Once created, a Conference remains in FreeClimb until explicitly terminated by a customer. Once a Conference has been terminated, it can no longer be used. + """ # noqa: E501 + + action_url: StrictStr = Field( + description=" This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. ", + alias="actionUrl", + ) + alias: Optional[StrictBool] = Field( + default=None, description="Descriptive name for the Conference. " + ) + play_beep: Optional[PlayBeep] = Field(default=None, alias="playBeep") + record: Optional[StrictBool] = Field( + default=None, + description="When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state.", + ) + status_callback_url: Optional[StrictStr] = Field( + default=None, + description="This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.", + alias="statusCallbackUrl", + ) + wait_url: Optional[StrictStr] = Field( + default=None, + description="If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.", + alias="waitUrl", + ) + command: StrictStr = "CreateConference" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "alias", + "playBeep", + "record", + "statusCallbackUrl", + "waitUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateConference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if play_beep (nullable) is None + # and model_fields_set contains the field + if self.play_beep is None and "play_beep" in self.model_fields_set: + _dict["playBeep"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateConference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "alias": obj.get("alias"), + "playBeep": obj.get("playBeep"), + "record": obj.get("record"), + "statusCallbackUrl": obj.get("statusCallbackUrl"), + "waitUrl": obj.get("waitUrl"), + } + ) + return _obj diff --git a/freeclimb/models/create_conference_request.py b/freeclimb/models/create_conference_request.py new file mode 100644 index 0000000..6a45cf2 --- /dev/null +++ b/freeclimb/models/create_conference_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.play_beep import PlayBeep +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CreateConferenceRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + CreateConferenceRequest + """ # noqa: E501 + + alias: Optional[StrictStr] = Field( + default=None, + description="A description for this Conference. Maximum 64 characters.", + ) + play_beep: Optional[PlayBeep] = Field(default=None, alias="playBeep") + record: Optional[StrictBool] = Field( + default=None, description="Setting to `true` records the entire Conference." + ) + wait_url: Optional[StrictStr] = Field( + default=None, + description="If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once — when the Conference is created.", + alias="waitUrl", + ) + status_callback_url: Optional[StrictStr] = Field( + default=None, + description="This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below).", + alias="statusCallbackUrl", + ) + + __properties: ClassVar[List[str]] = [ + "alias", + "playBeep", + "record", + "waitUrl", + "statusCallbackUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateConferenceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if play_beep (nullable) is None + # and model_fields_set contains the field + if self.play_beep is None and "play_beep" in self.model_fields_set: + _dict["playBeep"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateConferenceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "alias": obj.get("alias"), + "playBeep": obj.get("playBeep"), + "record": obj.get("record"), + "waitUrl": obj.get("waitUrl"), + "statusCallbackUrl": obj.get("statusCallbackUrl"), + } + ) + return _obj diff --git a/freeclimb/models/create_conference_webhook.py b/freeclimb/models/create_conference_webhook.py new file mode 100644 index 0000000..df4eefd --- /dev/null +++ b/freeclimb/models/create_conference_webhook.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.conference_status import ConferenceStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CreateConferenceWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. A PerCL response is expected if the actionUrl is being invoked. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be createConference - A Conference has been created and its statusCallbackUrl or actionUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + status: Optional[ConferenceStatus] = None + recording_url: Optional[StrictStr] = Field( + default=None, + description="The URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + alias="recordingUrl", + ) + recording_id: Optional[StrictStr] = Field( + default=None, + description="The unique ID of the Recording from this Conference. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + alias="recordingId", + ) + recording_duration_sec: Optional[StrictInt] = Field( + default=None, + description="The duration of the recorded audio rounded up to the nearest second (in seconds). Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + alias="recordingDurationSec", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "status", + "recordingUrl", + "recordingId", + "recordingDurationSec", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateConferenceWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if recording_url (nullable) is None + # and model_fields_set contains the field + if self.recording_url is None and "recording_url" in self.model_fields_set: + _dict["recordingUrl"] = None + + # set to None if recording_id (nullable) is None + # and model_fields_set contains the field + if self.recording_id is None and "recording_id" in self.model_fields_set: + _dict["recordingId"] = None + + # set to None if recording_duration_sec (nullable) is None + # and model_fields_set contains the field + if ( + self.recording_duration_sec is None + and "recording_duration_sec" in self.model_fields_set + ): + _dict["recordingDurationSec"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateConferenceWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "status": obj.get("status"), + "recordingUrl": obj.get("recordingUrl"), + "recordingId": obj.get("recordingId"), + "recordingDurationSec": obj.get("recordingDurationSec"), + } + ) + return _obj diff --git a/freeclimb/models/create_web_rtc_token.py b/freeclimb/models/create_web_rtc_token.py new file mode 100644 index 0000000..84402b1 --- /dev/null +++ b/freeclimb/models/create_web_rtc_token.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class CreateWebRTCToken( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + CreateWebRTCToken + """ # noqa: E501 + + to: StrictStr = Field( + description="E.164 formatted phone number to which calls using this token will be made." + ) + var_from: StrictStr = Field( + description="E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made.", + alias="from", + ) + uses: Annotated[int, Field(strict=True, ge=1)] = Field( + description="number of times this token may be used for a WebRTC call" + ) + + __properties: ClassVar[List[str]] = ["to", "from", "uses"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateWebRTCToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateWebRTCToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"to": obj.get("to"), "from": obj.get("from"), "uses": obj.get("uses")} + ) + return _obj diff --git a/freeclimb/models/dequeue.py b/freeclimb/models/dequeue.py new file mode 100644 index 0000000..d2b8034 --- /dev/null +++ b/freeclimb/models/dequeue.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Dequeue( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Dequeue` command transfers control of a Call that is in a Queue so that the waiting caller exits the Queue. Execution continues with the first command in the PerCL script returned by the `actionUrl` specified in the `Enqueue` command. + """ # noqa: E501 + + command: StrictStr = "Dequeue" + + __properties: ClassVar[List[str]] = ["command"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Dequeue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Dequeue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"command": obj.get("command")}) + return _obj diff --git a/freeclimb/models/dequeue_webhook.py b/freeclimb/models/dequeue_webhook.py new file mode 100644 index 0000000..be58681 --- /dev/null +++ b/freeclimb/models/dequeue_webhook.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class DequeueWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. A PerCL response is expected. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be dequeue - A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + queue_result: Optional[StrictStr] = Field( + default=None, + description="The final result of the enqueued Call. Valid values are: •dequeued - Enqueued caller exited the Queue via a Dequeue action (Dequeue command or Queue Members POST REST API).", + alias="queueResult", + ) + queue_time: Optional[StrictInt] = Field( + default=None, + description="Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued.", + alias="queueTime", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "queueResult", + "queueTime", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DequeueWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if queue_time (nullable) is None + # and model_fields_set contains the field + if self.queue_time is None and "queue_time" in self.model_fields_set: + _dict["queueTime"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DequeueWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "queueResult": obj.get("queueResult"), + "queueTime": obj.get("queueTime"), + } + ) + return _obj diff --git a/freeclimb/models/enqueue.py b/freeclimb/models/enqueue.py new file mode 100644 index 0000000..a753ffc --- /dev/null +++ b/freeclimb/models/enqueue.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Enqueue( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Enqueue` command adds the current Call to a call Queue. If the specified Queue does not exist, it is created and then the Call is added to it. The default maximum length of the queue is 100. This can be modified using the REST API. + """ # noqa: E501 + + action_url: StrictStr = Field( + description="A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up.", + alias="actionUrl", + ) + notification_url: Optional[StrictStr] = Field( + default=None, + description="URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored.", + alias="notificationUrl", + ) + queue_id: StrictStr = Field( + description="ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters.", + alias="queueId", + ) + wait_url: StrictStr = Field( + description="A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up.", + alias="waitUrl", + ) + command: StrictStr = "Enqueue" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "notificationUrl", + "queueId", + "waitUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Enqueue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Enqueue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "notificationUrl": obj.get("notificationUrl"), + "queueId": obj.get("queueId"), + "waitUrl": obj.get("waitUrl"), + } + ) + return _obj diff --git a/freeclimb/models/filter_logs_request.py b/freeclimb/models/filter_logs_request.py new file mode 100644 index 0000000..0fc2f5c --- /dev/null +++ b/freeclimb/models/filter_logs_request.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class FilterLogsRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + FilterLogsRequest + """ # noqa: E501 + + pql: StrictStr = Field( + description="The filter query for retrieving logs. See **Performance Query Language** below." + ) + + __properties: ClassVar[List[str]] = ["pql"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FilterLogsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FilterLogsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"pql": obj.get("pql")}) + return _obj diff --git a/freeclimb/models/get_digits.py b/freeclimb/models/get_digits.py new file mode 100644 index 0000000..6d91303 --- /dev/null +++ b/freeclimb/models/get_digits.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class GetDigits( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `GetDigits` command collects DTMF inputs from the caller. It is only supported only when there is a single party on the Call. `GetDigits` is a Terminal Command — any actions following it are never executed. When the Caller is done entering the digits, FreeClimb submits that data to the provided `actionUrl` using an HTTP POST request. Your server will be required to respond to the FreeClimb Webhook with PerCL to continue handling the call. + """ # noqa: E501 + + action_url: StrictStr = Field( + description="When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL.", + alias="actionUrl", + ) + digit_timeout_ms: Optional[StrictInt] = Field( + default=None, + description=" Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered.", + alias="digitTimeoutMs", + ) + finish_on_key: Optional[StrictStr] = Field( + default=None, + description="Digit that causes the input sequence to be deemed complete. This attribute defers to the `timeout` attribute – so, if a `timeout` occurs, then the command terminates regardless of the value of `finishOnKey`.", + alias="finishOnKey", + ) + flush_buffer: Optional[StrictBool] = Field( + default=None, + description="If set to true, the FreeClimb platform starts with an empty DTMF buffer to store the digits entered by the caller. If set to false, FreeClimb will append the user inputs to the end of the existing digits buffer and will return digits from the start of the digits buffer.", + alias="flushBuffer", + ) + initial_timeout_ms: Optional[StrictInt] = Field( + default=None, + description="Maximum time in milliseconds that FreeClimb will wait for the Caller to press the first digit before making a determination that a `timeout` has occurred and moving on to make the request to the `actionUrl` to submit the results of the `GetDigits` command. This timeout interval begins when all nested commands have been fully executed.", + alias="initialTimeoutMs", + ) + max_digits: Optional[StrictInt] = Field( + default=None, + description="Maximum number of digits expected in the input. If the terminating digit is not entered and the caller has entered the maximum number of digits allowed, the `GetDigits` command terminates regardless of the value of `finishOnKey`.", + alias="maxDigits", + ) + min_digits: Optional[StrictInt] = Field( + default=None, + description="Minimum number of digits expected in the input. If specified, FreeClimb will return the collected digits only if the Caller has entered at least that many digits.", + alias="minDigits", + ) + prompts: Optional[List[PerclCommand]] = Field( + default=None, + description="JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller.", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter `privacyMode` will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "GetDigits" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "digitTimeoutMs", + "finishOnKey", + "flushBuffer", + "initialTimeoutMs", + "maxDigits", + "minDigits", + "prompts", + "privacyMode", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDigits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in prompts (list) + _items = [] + if self.prompts: + for _item_prompts in self.prompts: + if _item_prompts: + _items.append(_item_prompts.to_dict()) + _dict["prompts"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDigits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "digitTimeoutMs": obj.get("digitTimeoutMs"), + "finishOnKey": obj.get("finishOnKey"), + "flushBuffer": obj.get("flushBuffer"), + "initialTimeoutMs": obj.get("initialTimeoutMs"), + "maxDigits": obj.get("maxDigits"), + "minDigits": obj.get("minDigits"), + "prompts": ( + [PerclCommand.from_dict(_item) for _item in obj["prompts"]] + if obj.get("prompts") is not None + else None + ), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/models/get_digits_reason.py b/freeclimb/models/get_digits_reason.py new file mode 100644 index 0000000..a57b299 --- /dev/null +++ b/freeclimb/models/get_digits_reason.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class GetDigitsReason(str, Enum): + """ + This field explains how the GetDigits action ended. The value is one of the below: •finishKey - The finish key as specified had been pressed by the caller. Digit string has all keys up to, but not including, the finish key. •timeout - The timeout limit was reached prior to any other criteria being met. If any digits were collected, they will be included. •maxDigits - The maximum number of digits was reached and digit collection ended. •tone - Answering machine or fax tone detection occurred, interrupting digit collection. Any digits received up to this point are included in this webhook. + """ + + """ + allowed enum values + """ + FINISH_KEY = "finishKey" + TIMEOUT = "timeout" + MAX_DIGITS = "maxDigits" + TONE = "tone" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of GetDigitsReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/get_digits_webhook.py b/freeclimb/models/get_digits_webhook.py new file mode 100644 index 0000000..d38c144 --- /dev/null +++ b/freeclimb/models/get_digits_webhook.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.get_digits_reason import GetDigitsReason +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class GetDigitsWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A POST request with the following fields will be sent to the actionUrl provided in your GetDigits command. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be getDigits - The GetDigits command has completed and its actionUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + digits: Optional[StrictStr] = Field( + default=None, + description="tring of digits entered by the Caller, excluding the terminating digit (if used). The string of digits will be replaced by 'xxxxx' when privacyMode is set to true", + ) + reason: Optional[GetDigitsReason] = None + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child call).", + alias="parentCallId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "digits", + "reason", + "parentCallId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDigitsWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDigitsWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "digits": obj.get("digits"), + "reason": obj.get("reason"), + "parentCallId": obj.get("parentCallId"), + } + ) + return _obj diff --git a/freeclimb/models/get_speech.py b/freeclimb/models/get_speech.py new file mode 100644 index 0000000..71e2b89 --- /dev/null +++ b/freeclimb/models/get_speech.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from freeclimb.models.grammar_type import GrammarType +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class GetSpeech( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `GetSpeech` command enables the Caller to respond to the application using a supported language. Unlike DTMF entry, which implicitly restricts the user to using the available buttons on the phone key pad, speech input allows for flexible audio inputs based on grammar. FreeClimb supports grammars written using GRXML compatible with the Microsoft Speech Platform. `GetSpeech` is only supported on a single call leg. It is not supported when there are two or more call legs connected (as in within a Conference). + """ # noqa: E501 + + action_url: StrictStr = Field( + description="When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call.", + alias="actionUrl", + ) + grammar_type: Optional[GrammarType] = Field(default=None, alias="grammarType") + grammar_file: StrictStr = Field( + description="The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL.", + alias="grammarFile", + ) + grammar_rule: Optional[StrictStr] = Field( + default=None, + description="The grammar rule within the specified grammar file to use for speech recognition. This attribute is optional if `grammarType` is `URL` and ignored if `grammarType` is `BUILTIN`.", + alias="grammarRule", + ) + play_beep: Optional[StrictBool] = Field( + default=None, + description="Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.", + alias="playBeep", + ) + prompts: Optional[List[PerclCommand]] = Field( + default=None, + description="The JSON array of PerCL commands to nest within the `GetSpeech` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the caller. This allows for playing menu options to the caller and to prompt for the expected input. These commands stop executing when the caller begins to input speech.", + ) + no_input_timeout_ms: Optional[StrictInt] = Field( + default=None, + description="When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.", + alias="noInputTimeoutMs", + ) + recognition_timeout_ms: Optional[StrictInt] = Field( + default=None, + description="When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.", + alias="recognitionTimeoutMs", + ) + confidence_threshold: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, + description="When a recognition resource recognizes a spoken phrase, it associates a confidence level with that match. Parameter `confidenceThreshold` specifies what confidence level is considered a successful match. Values are between 0.0 and 1.0.", + alias="confidenceThreshold", + ) + sensitivity_level: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, + description="The speech recognizer supports a variable level of sound sensitivity. The sensitivityLevel attribute allows for filtering out background noise, so it is not mistaken for speech. Values are between 0.0 and 1.0 ", + alias="sensitivityLevel", + ) + speech_complete_timeout_ms: Optional[StrictInt] = Field( + default=None, + description="Parameter `speechCompleteTimeoutMs` specifies the length of silence required following user speech before the speech recognizer finalizes a result. This timeout applies when the recognizer currently has a complete match against an active grammar. Reasonable speech complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.", + alias="speechCompleteTimeoutMs", + ) + speech_incomplete_timeout_ms: Optional[StrictInt] = Field( + default=None, + description="Parameter `speechIncompleteTimeoutMs` specifies the length of silence following user speech after which a recognizer finalizes a result. This timeout applies when the speech prior to the silence is an incomplete match of all active grammars. Timeout `speechIncompleteTimeoutMs` is usually longer than `speechCompleteTimeoutMs` to allow users to pause mid-utterance.", + alias="speechIncompleteTimeoutMs", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter privacyMode will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "GetSpeech" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "grammarType", + "grammarFile", + "grammarRule", + "playBeep", + "prompts", + "noInputTimeoutMs", + "recognitionTimeoutMs", + "confidenceThreshold", + "sensitivityLevel", + "speechCompleteTimeoutMs", + "speechIncompleteTimeoutMs", + "privacyMode", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetSpeech from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in prompts (list) + _items = [] + if self.prompts: + for _item_prompts in self.prompts: + if _item_prompts: + _items.append(_item_prompts.to_dict()) + _dict["prompts"] = _items + # set to None if grammar_type (nullable) is None + # and model_fields_set contains the field + if self.grammar_type is None and "grammar_type" in self.model_fields_set: + _dict["grammarType"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSpeech from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "grammarType": obj.get("grammarType"), + "grammarFile": obj.get("grammarFile"), + "grammarRule": obj.get("grammarRule"), + "playBeep": obj.get("playBeep"), + "prompts": ( + [PerclCommand.from_dict(_item) for _item in obj["prompts"]] + if obj.get("prompts") is not None + else None + ), + "noInputTimeoutMs": obj.get("noInputTimeoutMs"), + "recognitionTimeoutMs": obj.get("recognitionTimeoutMs"), + "confidenceThreshold": obj.get("confidenceThreshold"), + "sensitivityLevel": obj.get("sensitivityLevel"), + "speechCompleteTimeoutMs": obj.get("speechCompleteTimeoutMs"), + "speechIncompleteTimeoutMs": obj.get("speechIncompleteTimeoutMs"), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/model/get_speech_reason.py b/freeclimb/models/get_speech_reason.py similarity index 55% rename from freeclimb/model/get_speech_reason.py rename to freeclimb/models/get_speech_reason.py index d0529b9..4efdb40 100644 --- a/freeclimb/model/get_speech_reason.py +++ b/freeclimb/models/get_speech_reason.py @@ -1,45 +1,40 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class GetSpeechReason(str, Enum): - ERROR= "error", - HANGUP= "hangup", - DIGIT= "digit", - NO_INPUT= "noInput", - NO_MATCH= "noMatch", - RECOGNITION= "recognition", +from typing_extensions import Self +class GetSpeechReason(str, Enum): + """ + GetSpeechReason + """ + + """ + allowed enum values + """ + ERROR = "error" + HANGUP = "hangup" + DIGIT = "digit" + NO_INPUT = "noInput" + NO_MATCH = "noMatch" + RECOGNITION = "recognition" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of GetSpeechReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/get_speech_webhook.py b/freeclimb/models/get_speech_webhook.py new file mode 100644 index 0000000..c705207 --- /dev/null +++ b/freeclimb/models/get_speech_webhook.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.get_speech_reason import GetSpeechReason +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class GetSpeechWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The GetSpeech command has completed and its actionUrl is being invoked. A PerCL response is expected, unless reason is hangup. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be getSpeech - The GetSpeech command has completed and its actionUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, description="Unique ID of the Conference.", alias="conferenceId" + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + reason: Optional[GetSpeechReason] = None + recognition_result: Optional[StrictStr] = Field( + default=None, + description="Semantic content (either a string if speech was recognized or a digit if a digit was input instead of speech) returned from the entry or tag that was recognized within the grammar. The content will be replaced by 'xxxxx' when privacyMode is set to true. This field is populated only if the reason field is set to recognition or digit.", + alias="recognitionResult", + ) + confidence: Optional[StrictInt] = Field( + default=None, + description="Level of confidence in the obtained result. This is a value in the range 0 to 100 – with 0 being total lack of confidence and 100 being absolute certainty in the recognition. This field is populated only if the reason field is set to recognition.", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child call).", + alias="parentCallId", + ) + completion_reason: Optional[StrictStr] = Field( + default=None, + description="Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition.", + alias="completionReason", + ) + completion_cause: Optional[StrictStr] = Field( + default=None, + description="Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition.", + alias="completionCause", + ) + mrcp_code: Optional[StrictInt] = Field( + default=None, + description="Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification.", + alias="mrcpCode", + ) + mrcp_diagnostic: Optional[StrictStr] = Field( + default=None, + description="Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification.", + alias="mrcpDiagnostic", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "reason", + "recognitionResult", + "confidence", + "parentCallId", + "completionReason", + "completionCause", + "mrcpCode", + "mrcpDiagnostic", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetSpeechWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSpeechWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "reason": obj.get("reason"), + "recognitionResult": obj.get("recognitionResult"), + "confidence": obj.get("confidence"), + "parentCallId": obj.get("parentCallId"), + "completionReason": obj.get("completionReason"), + "completionCause": obj.get("completionCause"), + "mrcpCode": obj.get("mrcpCode"), + "mrcpDiagnostic": obj.get("mrcpDiagnostic"), + } + ) + return _obj diff --git a/freeclimb/models/grammar_file_built_in.py b/freeclimb/models/grammar_file_built_in.py new file mode 100644 index 0000000..8839c49 --- /dev/null +++ b/freeclimb/models/grammar_file_built_in.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class GrammarFileBuiltIn(str, Enum): + """ + GrammarFileBuiltIn + """ + + """ + allowed enum values + """ + ALPHNUM6 = "ALPHNUM6" + ANY_DIG = "ANY_DIG" + DIG1 = "DIG1" + DIG2 = "DIG2" + DIG3 = "DIG3" + DIG4 = "DIG4" + DIG5 = "DIG5" + DIG6 = "DIG6" + DIG7 = "DIG7" + DIG8 = "DIG8" + DIG9 = "DIG9" + DIG10 = "DIG10" + DIG11 = "DIG11" + UP_TO_20_DIGIT_SEQUENCE = "UP_TO_20_DIGIT_SEQUENCE" + VERSAY_YESNO = "VERSAY_YESNO" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of GrammarFileBuiltIn from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/grammar_type.py b/freeclimb/models/grammar_type.py new file mode 100644 index 0000000..7f64e6a --- /dev/null +++ b/freeclimb/models/grammar_type.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class GrammarType(str, Enum): + """ + The grammar file type to use for speech recognition. A value of 'URL' indicates the grammarFile attribute specifies a URL that points to the grammar file. A value of `BUILTIN` indicates the grammarFile attribute specifies the name of one of the platform built-in grammar files. + """ + + """ + allowed enum values + """ + URL = "URL" + BUILT_IN = "BUILTIN" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of GrammarType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/hangup.py b/freeclimb/models/hangup.py new file mode 100644 index 0000000..080c759 --- /dev/null +++ b/freeclimb/models/hangup.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Hangup( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Hangup` command terminates a Call. If `Hangup` is used as the first action in a PerCL response, it does not prevent FreeClimb from answering the Call and billing your account. See the `Reject` command to hang up at no charge. + """ # noqa: E501 + + reason: Optional[StrictStr] = Field( + default=None, + description="The user defined reason for the hangup. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the Call flows for the given application.", + ) + command: StrictStr = "Hangup" + + __properties: ClassVar[List[str]] = ["command", "reason"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Hangup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Hangup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "reason": obj.get("reason")} + ) + return _obj diff --git a/freeclimb/model/if_machine.py b/freeclimb/models/if_machine.py similarity index 52% rename from freeclimb/model/if_machine.py rename to freeclimb/models/if_machine.py index 8bfaacd..2d48383 100644 --- a/freeclimb/model/if_machine.py +++ b/freeclimb/models/if_machine.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class IfMachine(str, Enum): - REDIRECT= "redirect", - HANGUP= "hangup", +from typing_extensions import Self +class IfMachine(str, Enum): + """ + Specifies how FreeClimb should handle this OutDial if an answering machine answers the Call. Valid values: `redirect` invokes the ifMachineUrl for instructions. `hangup` hangs up the Call. The ifMachineUrl will not be invoked. + """ + + """ + allowed enum values + """ + REDIRECT = "redirect" + HANGUP = "hangup" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of IfMachine from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/inbound_call_webhook.py b/freeclimb/models/inbound_call_webhook.py new file mode 100644 index 0000000..df84858 --- /dev/null +++ b/freeclimb/models/inbound_call_webhook.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class InboundCallWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + An inbound Call to a number registered on FreeClimb will trigger a request to the voiceUrl of the application the number is assigned to. FreeClimb expects to receive PerCL in response to this request in order to process the Call. The following parameters are sent as the POST body. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be inboundCall - An inbound call was received and the voiceUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a Conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + parent_call_id: Optional[StrictStr] = Field(default=None, alias="parentCallId") + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "parentCallId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InboundCallWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if parent_call_id (nullable) is None + # and model_fields_set contains the field + if self.parent_call_id is None and "parent_call_id" in self.model_fields_set: + _dict["parentCallId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InboundCallWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "parentCallId": obj.get("parentCallId"), + } + ) + return _obj diff --git a/freeclimb/models/incoming_number_list.py b/freeclimb/models/incoming_number_list.py new file mode 100644 index 0000000..6ee9e0b --- /dev/null +++ b/freeclimb/models/incoming_number_list.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.incoming_number_result import IncomingNumberResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class IncomingNumberList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + IncomingNumberList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + incoming_phone_numbers: Optional[List[IncomingNumberResult]] = Field( + default=None, alias="incomingPhoneNumbers" + ) + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "incomingPhoneNumbers", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingNumberList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in incoming_phone_numbers (list) + _items = [] + if self.incoming_phone_numbers: + for _item_incoming_phone_numbers in self.incoming_phone_numbers: + if _item_incoming_phone_numbers: + _items.append(_item_incoming_phone_numbers.to_dict()) + _dict["incomingPhoneNumbers"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if incoming_phone_numbers (nullable) is None + # and model_fields_set contains the field + if ( + self.incoming_phone_numbers is None + and "incoming_phone_numbers" in self.model_fields_set + ): + _dict["incomingPhoneNumbers"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingNumberList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "incomingPhoneNumbers": ( + [ + IncomingNumberResult.from_dict(_item) + for _item in obj["incomingPhoneNumbers"] + ] + if obj.get("incomingPhoneNumbers") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/incoming_number_request.py b/freeclimb/models/incoming_number_request.py new file mode 100644 index 0000000..a83e69a --- /dev/null +++ b/freeclimb/models/incoming_number_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class IncomingNumberRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + IncomingNumberRequest + """ # noqa: E501 + + application_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Application that should handle calls to this number.", + alias="applicationId", + ) + alias: Optional[StrictStr] = Field( + default=None, description="Description for this phone number." + ) + campaign_id: Optional[StrictStr] = Field( + default=None, + description="The campaign ID generated by the campaign registry", + alias="campaignId", + ) + + __properties: ClassVar[List[str]] = ["applicationId", "alias", "campaignId"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingNumberRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if campaign_id (nullable) is None + # and model_fields_set contains the field + if self.campaign_id is None and "campaign_id" in self.model_fields_set: + _dict["campaignId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingNumberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "applicationId": obj.get("applicationId"), + "alias": obj.get("alias"), + "campaignId": obj.get("campaignId"), + } + ) + return _obj diff --git a/freeclimb/models/incoming_number_result.py b/freeclimb/models/incoming_number_result.py new file mode 100644 index 0000000..d2cca66 --- /dev/null +++ b/freeclimb/models/incoming_number_result.py @@ -0,0 +1,254 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.capabilities import Capabilities +from freeclimb.models.tfn import TFN +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class IncomingNumberResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + IncomingNumberResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + capabilities: Optional[Capabilities] = None + campaign_id: Optional[StrictStr] = Field( + default=None, + description="The campaign ID generated by the campaign registry", + alias="campaignId", + ) + phone_number_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies this phone number resource.", + alias="phoneNumberId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that owns this phone number.", + alias="accountId", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Application that FreeClimb should contact if a Call or SMS arrives for this phone number or a Call from this number is placed. An incoming phone number is not useful until associated with an applicationId.", + alias="applicationId", + ) + phone_number: Optional[StrictStr] = Field( + default=None, description="Phone number in E.164 format.", alias="phoneNumber" + ) + alias: Optional[StrictStr] = Field( + default=None, + description="Description for this phone number. Typically the conventionally-formatted version of the phone number.", + ) + region: Optional[StrictStr] = Field( + default=None, description="State or province of this phone number." + ) + country: Optional[StrictStr] = Field( + default=None, description="Country of this phone number." + ) + voice_enabled: Optional[StrictBool] = Field( + default=None, + description="Indicates whether the phone number can handle Calls. Typically set to true for all numbers.", + alias="voiceEnabled", + ) + sms_enabled: Optional[StrictBool] = Field( + default=None, + description="Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.", + alias="smsEnabled", + ) + offnet: Optional[StrictBool] = Field( + default=None, + description="The offnet field is a boolean representing whether the number is offnet registered or not. This field will be rendered only for requests to the IncomingPhone number resource.", + ) + tfn: Optional[TFN] = None + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "capabilities", + "campaignId", + "phoneNumberId", + "accountId", + "applicationId", + "phoneNumber", + "alias", + "region", + "country", + "voiceEnabled", + "smsEnabled", + "offnet", + "tfn", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IncomingNumberResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of capabilities + if self.capabilities: + _dict["capabilities"] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of tfn + if self.tfn: + _dict["tfn"] = self.tfn.to_dict() + # set to None if campaign_id (nullable) is None + # and model_fields_set contains the field + if self.campaign_id is None and "campaign_id" in self.model_fields_set: + _dict["campaignId"] = None + + # set to None if phone_number_id (nullable) is None + # and model_fields_set contains the field + if self.phone_number_id is None and "phone_number_id" in self.model_fields_set: + _dict["phoneNumberId"] = None + + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if application_id (nullable) is None + # and model_fields_set contains the field + if self.application_id is None and "application_id" in self.model_fields_set: + _dict["applicationId"] = None + + # set to None if phone_number (nullable) is None + # and model_fields_set contains the field + if self.phone_number is None and "phone_number" in self.model_fields_set: + _dict["phoneNumber"] = None + + # set to None if alias (nullable) is None + # and model_fields_set contains the field + if self.alias is None and "alias" in self.model_fields_set: + _dict["alias"] = None + + # set to None if region (nullable) is None + # and model_fields_set contains the field + if self.region is None and "region" in self.model_fields_set: + _dict["region"] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict["country"] = None + + # set to None if voice_enabled (nullable) is None + # and model_fields_set contains the field + if self.voice_enabled is None and "voice_enabled" in self.model_fields_set: + _dict["voiceEnabled"] = None + + # set to None if sms_enabled (nullable) is None + # and model_fields_set contains the field + if self.sms_enabled is None and "sms_enabled" in self.model_fields_set: + _dict["smsEnabled"] = None + + # set to None if offnet (nullable) is None + # and model_fields_set contains the field + if self.offnet is None and "offnet" in self.model_fields_set: + _dict["offnet"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IncomingNumberResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "capabilities": ( + Capabilities.from_dict(obj["capabilities"]) + if obj.get("capabilities") is not None + else None + ), + "campaignId": obj.get("campaignId"), + "phoneNumberId": obj.get("phoneNumberId"), + "accountId": obj.get("accountId"), + "applicationId": obj.get("applicationId"), + "phoneNumber": obj.get("phoneNumber"), + "alias": obj.get("alias"), + "region": obj.get("region"), + "country": obj.get("country"), + "voiceEnabled": obj.get("voiceEnabled"), + "smsEnabled": obj.get("smsEnabled"), + "offnet": obj.get("offnet"), + "tfn": ( + TFN.from_dict(obj["tfn"]) if obj.get("tfn") is not None else None + ), + } + ) + return _obj diff --git a/freeclimb/models/language.py b/freeclimb/models/language.py new file mode 100644 index 0000000..bbec275 --- /dev/null +++ b/freeclimb/models/language.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Language(str, Enum): + """ + Language + """ + + """ + allowed enum values + """ + CATALAN = "ca-ES" + DANISH = "da-DK" + GERMAN = "de-DE" + ENGLISH_AU = "en-AU" + ENGLISH_CA = "en-CA" + ENGLISH_UK = "en-GB" + ENGLISH_IN = "en-IN" + ENGLISH_US = "en-US" + ENGLISH_ES = "es-ES" + ENGLISH_MX = "es-MX" + FINNISH = "fi-FI" + FRENCH_CA = "fr-CA" + FRENCH_FR = "fr-FR" + ITALIAN = "it-IT" + JAPANESE = "ja-JP" + KOREAN = "ko-KR" + NORWEGIAN = "nb-NO" + DUTCH = "nl-NL" + POLISH = "pl-PL" + PORTUGESE_BR = "pt-BR" + PORTUGESE_PT = "pt-PT" + RUSSIAN = "ru-RU" + SWEDISH = "sv-SE" + CHINESE_CN = "zh-CN" + CHINESE_HK = "zh-HK" + CHINESE_TW = "zh-TW" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Language from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/leave_conference_webhook.py b/freeclimb/models/leave_conference_webhook.py new file mode 100644 index 0000000..c5e9b29 --- /dev/null +++ b/freeclimb/models/leave_conference_webhook.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class LeaveConferenceWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked. A PerCL response is expected — unless the URL is invoked due to the participant hanging up. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be leaveConference - Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a Conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LeaveConferenceWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LeaveConferenceWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + } + ) + return _obj diff --git a/freeclimb/model/log_level.py b/freeclimb/models/log_level.py similarity index 57% rename from freeclimb/model/log_level.py rename to freeclimb/models/log_level.py index 7b547a2..591f265 100644 --- a/freeclimb/model/log_level.py +++ b/freeclimb/models/log_level.py @@ -1,42 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class LogLevel(str, Enum): - INFO= "info", - WARNING= "warning", - ERROR= "error", +from typing_extensions import Self +class LogLevel(str, Enum): + """ + Level of the log. Possible values are info, warning, and error. + """ + + """ + allowed enum values + """ + INFO = "info" + WARNING = "warning" + ERROR = "error" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LogLevel from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/log_list.py b/freeclimb/models/log_list.py new file mode 100644 index 0000000..1de1cd1 --- /dev/null +++ b/freeclimb/models/log_list.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.log_result import LogResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class LogList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + LogList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + logs: Optional[List[LogResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "logs", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LogList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in logs (list) + _items = [] + if self.logs: + for _item_logs in self.logs: + if _item_logs: + _items.append(_item_logs.to_dict()) + _dict["logs"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if logs (nullable) is None + # and model_fields_set contains the field + if self.logs is None and "logs" in self.model_fields_set: + _dict["logs"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LogList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "logs": ( + [LogResult.from_dict(_item) for _item in obj["logs"]] + if obj.get("logs") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/log_result.py b/freeclimb/models/log_result.py new file mode 100644 index 0000000..5a95d36 --- /dev/null +++ b/freeclimb/models/log_result.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.log_level import LogLevel +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class LogResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + LogResult + """ # noqa: E501 + + timestamp: Optional[StrictInt] = Field( + default=None, + description="Time that the log was generated. The time is represented as microseconds since the Unix Epoch.", + ) + level: Optional[LogLevel] = None + request_id: Optional[StrictStr] = Field( + default=None, + description="ID of the request associated with the log. The requestId is propagated across all logs generated by FreeClimb when processing a request.", + alias="requestId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that this log was generated under.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call associated with the log. Can be set to null if the log was generated without regard to a specific Call.", + alias="callId", + ) + message: Optional[StrictStr] = Field( + default=None, description="A simple string describing the event being logged." + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="JSON document containing metadata about the event. Some log messages may include request and response header content in this field.", + ) + + __properties: ClassVar[List[str]] = [ + "timestamp", + "level", + "requestId", + "accountId", + "callId", + "message", + "metadata", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LogResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if timestamp (nullable) is None + # and model_fields_set contains the field + if self.timestamp is None and "timestamp" in self.model_fields_set: + _dict["timestamp"] = None + + # set to None if level (nullable) is None + # and model_fields_set contains the field + if self.level is None and "level" in self.model_fields_set: + _dict["level"] = None + + # set to None if request_id (nullable) is None + # and model_fields_set contains the field + if self.request_id is None and "request_id" in self.model_fields_set: + _dict["requestId"] = None + + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if call_id (nullable) is None + # and model_fields_set contains the field + if self.call_id is None and "call_id" in self.model_fields_set: + _dict["callId"] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict["message"] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict["metadata"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LogResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "timestamp": obj.get("timestamp"), + "level": obj.get("level"), + "requestId": obj.get("requestId"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + } + ) + return _obj diff --git a/freeclimb/models/machine_detected_webhook.py b/freeclimb/models/machine_detected_webhook.py new file mode 100644 index 0000000..b94c2f3 --- /dev/null +++ b/freeclimb/models/machine_detected_webhook.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.machine_type import MachineType +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MachineDetectedWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + An outbound call spawned by OutDial detected an answer by a machine (answering machine or fax/modem machine) and ifMachineUrl is being invoked. A PerCL response is expected. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be machineDetected - An outbound call spawned by OutDial was answered by a machine and the ifMachineUrl is being invoked.", + alias="requestType", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this Call, generated by FreeClimb.", + alias="callId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a Conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + alias="queueId", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="Call ID of the leg which initiated the OutDial.", + alias="parentCallId", + ) + machine_type: Optional[MachineType] = Field(default=None, alias="machineType") + + __properties: ClassVar[List[str]] = [ + "requestType", + "callId", + "accountId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "parentCallId", + "machineType", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MachineDetectedWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MachineDetectedWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "callId": obj.get("callId"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "parentCallId": obj.get("parentCallId"), + "machineType": obj.get("machineType"), + } + ) + return _obj diff --git a/freeclimb/model/machine_type.py b/freeclimb/models/machine_type.py similarity index 57% rename from freeclimb/model/machine_type.py rename to freeclimb/models/machine_type.py index 01b00a3..6704601 100644 --- a/freeclimb/model/machine_type.py +++ b/freeclimb/models/machine_type.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class MachineType(str, Enum): - ANSWERING_MACHINE= "answeringMachine", - FAX_MACHINE= "faxMachine", +from typing_extensions import Self +class MachineType(str, Enum): + """ + MachineType + """ + + """ + allowed enum values + """ + ANSWERING_MACHINE = "answering machine" + FAX_MODEM = "fax modem" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MachineType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/make_call_request.py b/freeclimb/models/make_call_request.py new file mode 100644 index 0000000..4a3a8d5 --- /dev/null +++ b/freeclimb/models/make_call_request.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MakeCallRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + MakeCallRequest + """ # noqa: E501 + + var_from: StrictStr = Field( + description="Phone number to use as the caller ID. This can be: (a) The To or From number provided in FreeClimb's initial request to your app or (b) Any incoming phone number you have purchased from FreeClimb.", + alias="from", + ) + to: StrictStr = Field(description="Phone number to place the Call to.") + application_id: Optional[StrictStr] = Field( + default=None, + description="Required if no `parentCallId` or `callConnectUrl` has been provided. ID of the application FreeClimb should use to handle this phone call. FreeClimb will use the `callConnectUrl` and `statusCallbackUrl` set on the application unless the `callConnectUrl` attribute is also provided with the request. In this case, the URL specified in that `callConnectUrl` attribute will be used as a replacement of the `callConnectUrl` originally assigned in the application. If the `callConnectUrl` is not set as either an attribute of the request or as part of the specified application, an error will be provided. The application’s voiceUrl parameter is not used for outbound calls.", + alias="applicationId", + ) + send_digits: Optional[StrictStr] = Field( + default=None, + description="String of digits to dial after connecting to the number. It can include digits `0-9`, `*`, and `#`, and allows embedding a pause between the output of individual digits. The default pause is 500 milliseconds. So, a string such as *1234#* will be played in 2 seconds because of the 4 standard pauses implied within the string. A custom pause is specified by including a positive integer wrapped in curly braces: {n}. For more information, see **sendDigits examples** below.", + alias="sendDigits", + ) + if_machine: Optional[StrictStr] = Field( + default=None, + description="Specifies how FreeClimb should handle this Call if an answering machine answers it.", + alias="ifMachine", + ) + if_machine_url: Optional[StrictStr] = Field( + default=None, + description="This attribute specifies a URL to which FreeClimb will make a POST request when an answering machine or a fax machine is detected. This URL is required if the ifMachine flag is set to redirect. When ifMachine is set to hangup, ifMachineUrl must not be included in the request. For more information, see **ifMachineUrl example** below.", + alias="ifMachineUrl", + ) + timeout: Optional[StrictInt] = Field( + default=30, + description="Number of seconds that FreeClimb should allow the phone to ring before assuming there is no answer. Default is 30 seconds. Maximum allowed ring-time is determined by the target phone's provider. Note that most providers limit ring-time to 120 seconds.", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="Required if no `applicationId` or `callConnectUrl` has been provided. The ID of the parent Call in the case that this new Call is meant to be treated as a child of an existing Call. This attribute should be included when possible to reduce latency when adding child calls to Conferences containing the parent Call. A call can only be used as a parent once the call is in progress or as an inbound call that is still ringing. An outbound call is considered to be in progress once the `outdialConnect` or `outdialApiConnect` webhook is invoked. An inbound call is ringing when the inbound webhook is invoked. If a `callConnectUrl` attribute is also included with the `parentCallId` in the request, this URL will be used as a replacement of the `callConnectUrl` originally assigned in the parent call.", + alias="parentCallId", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Activate privacy mode in order to obscure log data that can potentially expose private information.", + alias="privacyMode", + ) + call_connect_url: Optional[StrictStr] = Field( + default=None, + description="The URL that FreeClimb should use to handle this phone call. If an applicationId or parentCallId have already been provided, this callConnectUrl attribute will be used as a replacement of the callConnectUrl originally assigned in the application or parent call.", + alias="callConnectUrl", + ) + + __properties: ClassVar[List[str]] = [ + "from", + "to", + "applicationId", + "sendDigits", + "ifMachine", + "ifMachineUrl", + "timeout", + "parentCallId", + "privacyMode", + "callConnectUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MakeCallRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MakeCallRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "from": obj.get("from"), + "to": obj.get("to"), + "applicationId": obj.get("applicationId"), + "sendDigits": obj.get("sendDigits"), + "ifMachine": obj.get("ifMachine"), + "ifMachineUrl": obj.get("ifMachineUrl"), + "timeout": obj.get("timeout") if obj.get("timeout") is not None else 30, + "parentCallId": obj.get("parentCallId"), + "privacyMode": obj.get("privacyMode"), + "callConnectUrl": obj.get("callConnectUrl"), + } + ) + return _obj diff --git a/freeclimb/models/message_delivery_webhook.py b/freeclimb/models/message_delivery_webhook.py new file mode 100644 index 0000000..816e74a --- /dev/null +++ b/freeclimb/models/message_delivery_webhook.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MessageDeliveryWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + An SMS has been received by the platform and is being delivered to the smsUrl of the customer application that is associated with the destination number. A PerCL response will be ignored. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Value will be messageDelivery - An SMS message has been received by the platform and is being delivered to the customer application associated with the destination number.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to you and to which this Call is directed (in E.164 format).", + ) + text: Optional[StrictStr] = Field( + default=None, description="Body of the SMS message." + ) + direction: Optional[StrictStr] = Field( + default=None, + description="Value will be inbound to indicate the receipt of a message into the FreeClimb platform.", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="ID of the application to which the destination number is assigned.", + alias="applicationId", + ) + status: Optional[StrictStr] = Field( + default=None, + description="Value will be received to indicate that the platform has successfully received the incoming message.", + ) + phone_number_id: Optional[StrictStr] = Field( + default=None, + description="ID of the destination phone number.", + alias="phoneNumberId", + ) + uri: Optional[StrictStr] = Field( + default=None, + description="The URI for this resource, relative to the API base URL", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "from", + "to", + "text", + "direction", + "applicationId", + "status", + "phoneNumberId", + "uri", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageDeliveryWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageDeliveryWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "from": obj.get("from"), + "to": obj.get("to"), + "text": obj.get("text"), + "direction": obj.get("direction"), + "applicationId": obj.get("applicationId"), + "status": obj.get("status"), + "phoneNumberId": obj.get("phoneNumberId"), + "uri": obj.get("uri"), + } + ) + return _obj diff --git a/freeclimb/model/message_direction.py b/freeclimb/models/message_direction.py similarity index 59% rename from freeclimb/model/message_direction.py rename to freeclimb/models/message_direction.py index e70a1d5..ebbb41a 100644 --- a/freeclimb/model/message_direction.py +++ b/freeclimb/models/message_direction.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class MessageDirection(str, Enum): - INBOUND= "inbound", - OUTBOUND= "outbound", +from typing_extensions import Self +class MessageDirection(str, Enum): + """ + MessageDirection + """ + + """ + allowed enum values + """ + INBOUND = "inbound" + OUTBOUND = "outbound" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MessageDirection from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/message_request.py b/freeclimb/models/message_request.py new file mode 100644 index 0000000..b0570e4 --- /dev/null +++ b/freeclimb/models/message_request.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MessageRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + MessageRequest + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + var_from: StrictStr = Field( + description="Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb.", + alias="from", + ) + to: StrictStr = Field( + description="Phone number to receive the message. Must be within FreeClimb's service area." + ) + text: StrictStr = Field( + description="Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported." + ) + notification_url: Optional[StrictStr] = Field( + default=None, + description="When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored.", + alias="notificationUrl", + ) + media_urls: Optional[List[StrictStr]] = Field( + default=None, + description="an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile.", + alias="mediaUrls", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "from", + "to", + "text", + "notificationUrl", + "mediaUrls", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if media_urls (nullable) is None + # and model_fields_set contains the field + if self.media_urls is None and "media_urls" in self.model_fields_set: + _dict["mediaUrls"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "from": obj.get("from"), + "to": obj.get("to"), + "text": obj.get("text"), + "notificationUrl": obj.get("notificationUrl"), + "mediaUrls": obj.get("mediaUrls"), + } + ) + return _obj diff --git a/freeclimb/models/message_result.py b/freeclimb/models/message_result.py new file mode 100644 index 0000000..4bdb256 --- /dev/null +++ b/freeclimb/models/message_result.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from freeclimb.models.message_status import MessageStatus +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MessageResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + MessageResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies this account resource.", + alias="accountId", + ) + message_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies this message resource", + alias="messageId", + ) + status: Optional[MessageStatus] = None + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number in E.164 format that sent the message.", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number in E.164 format that received the message.", + ) + text: Optional[StrictStr] = Field(default=None, description="Message contents") + direction: Optional[StrictStr] = Field( + default=None, description="Noting whether the message was inbound or outbound" + ) + notification_url: Optional[StrictStr] = Field( + default=None, + description="URL invoked when message sent", + alias="notificationUrl", + ) + brand_id: Optional[StrictStr] = Field( + default=None, + description="The unique identifier for the brand associated with the message", + alias="brandId", + ) + campaign_id: Optional[StrictStr] = Field( + default=None, + description="The unique identifier for the campaign associated with the message", + alias="campaignId", + ) + segment_count: Optional[Union[StrictFloat, StrictInt]] = Field( + default=None, + description="The number of segments into which the message was split", + alias="segmentCount", + ) + media_urls: Optional[List[StrictStr]] = Field( + default=None, + description="an array of HTTP URLs which were attached this this message", + alias="mediaUrls", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "accountId", + "messageId", + "status", + "from", + "to", + "text", + "direction", + "notificationUrl", + "brandId", + "campaignId", + "segmentCount", + "mediaUrls", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if message_id (nullable) is None + # and model_fields_set contains the field + if self.message_id is None and "message_id" in self.model_fields_set: + _dict["messageId"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict["from"] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict["to"] = None + + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict["text"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if notification_url (nullable) is None + # and model_fields_set contains the field + if ( + self.notification_url is None + and "notification_url" in self.model_fields_set + ): + _dict["notificationUrl"] = None + + # set to None if brand_id (nullable) is None + # and model_fields_set contains the field + if self.brand_id is None and "brand_id" in self.model_fields_set: + _dict["brandId"] = None + + # set to None if campaign_id (nullable) is None + # and model_fields_set contains the field + if self.campaign_id is None and "campaign_id" in self.model_fields_set: + _dict["campaignId"] = None + + # set to None if segment_count (nullable) is None + # and model_fields_set contains the field + if self.segment_count is None and "segment_count" in self.model_fields_set: + _dict["segmentCount"] = None + + # set to None if media_urls (nullable) is None + # and model_fields_set contains the field + if self.media_urls is None and "media_urls" in self.model_fields_set: + _dict["mediaUrls"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "accountId": obj.get("accountId"), + "messageId": obj.get("messageId"), + "status": obj.get("status"), + "from": obj.get("from"), + "to": obj.get("to"), + "text": obj.get("text"), + "direction": obj.get("direction"), + "notificationUrl": obj.get("notificationUrl"), + "brandId": obj.get("brandId"), + "campaignId": obj.get("campaignId"), + "segmentCount": obj.get("segmentCount"), + "mediaUrls": obj.get("mediaUrls"), + } + ) + return _obj diff --git a/freeclimb/models/message_status.py b/freeclimb/models/message_status.py new file mode 100644 index 0000000..38949dc --- /dev/null +++ b/freeclimb/models/message_status.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class MessageStatus(str, Enum): + """ + Indicates the state of the message through the message lifecycle including: new, queued, rejected, sending, sent, failed, received, undelivered, expired, deleted, and unknown + """ + + """ + allowed enum values + """ + NEW = "new" + QUEUED = "queued" + REJECTED = "rejected" + SENDING = "sending" + SENT = "sent" + FAILED = "failed" + RECEIVED = "received" + UNDELIVERED = "undelivered" + EXPIRED = "expired" + DELETED = "deleted" + UNKNOWN = "unknown" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MessageStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/message_status_webhook.py b/freeclimb/models/message_status_webhook.py new file mode 100644 index 0000000..f293972 --- /dev/null +++ b/freeclimb/models/message_status_webhook.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.message_status import MessageStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MessageStatusWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + An outbound SMS has changed status and the notificationUrl from the Sms command or Send an SMS request is being invoked. A PerCL response will be ignored. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Value will be messageStatus - An outbound SMS has changed status and the Sms command's notificationUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + message_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for this message, generated by FreeClimb.", + alias="messageId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique ID for the Call in the context of which the Sms PerCL command was issued.", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="aPhone number used to initiate the SMS message (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Destination number of the SMS message (in E.164 format).", + ) + text: Optional[StrictStr] = Field( + default=None, description="Body of the SMS message." + ) + direction: Optional[StrictStr] = Field( + default=None, + description="Value will be outbound to indicate an outgoing SMS from FreeClimb.", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="ID of the application to which the destination number is assigned. May be null if the originating number is invalid in some way or is not registered to an application.", + alias="applicationId", + ) + status: Optional[MessageStatus] = None + phone_number_id: Optional[StrictStr] = Field( + default=None, + description="ID of the destination phone number.", + alias="phoneNumberId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "messageId", + "callId", + "from", + "to", + "text", + "direction", + "applicationId", + "status", + "phoneNumberId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageStatusWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageStatusWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "messageId": obj.get("messageId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "text": obj.get("text"), + "direction": obj.get("direction"), + "applicationId": obj.get("applicationId"), + "status": obj.get("status"), + "phoneNumberId": obj.get("phoneNumberId"), + } + ) + return _obj diff --git a/freeclimb/models/messages_list.py b/freeclimb/models/messages_list.py new file mode 100644 index 0000000..b42d7e6 --- /dev/null +++ b/freeclimb/models/messages_list.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.message_result import MessageResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MessagesList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + MessagesList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + messages: Optional[List[MessageResult]] = Field( + default=None, description="Array of messages" + ) + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "messages", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessagesList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in messages (list) + _items = [] + if self.messages: + for _item_messages in self.messages: + if _item_messages: + _items.append(_item_messages.to_dict()) + _dict["messages"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if messages (nullable) is None + # and model_fields_set contains the field + if self.messages is None and "messages" in self.model_fields_set: + _dict["messages"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessagesList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "messages": ( + [MessageResult.from_dict(_item) for _item in obj["messages"]] + if obj.get("messages") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/mutable_resource_model.py b/freeclimb/models/mutable_resource_model.py new file mode 100644 index 0000000..bef2093 --- /dev/null +++ b/freeclimb/models/mutable_resource_model.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class MutableResourceModel( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + MutableResourceModel + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MutableResourceModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MutableResourceModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + } + ) + return _obj diff --git a/freeclimb/models/out_dial.py b/freeclimb/models/out_dial.py new file mode 100644 index 0000000..96d7f4d --- /dev/null +++ b/freeclimb/models/out_dial.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.if_machine import IfMachine +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class OutDial( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The OutDial command is used to call a phone number + """ # noqa: E501 + + action_url: StrictStr = Field( + description="URL to which FreeClimb sends an HTTP POST request. ", + alias="actionUrl", + ) + call_connect_url: StrictStr = Field( + description="URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial.", + alias="callConnectUrl", + ) + calling_number: StrictStr = Field( + description="he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb.", + alias="callingNumber", + ) + destination: StrictStr = Field( + description="E.164 representation of the phone number to Call. " + ) + if_machine: Optional[IfMachine] = Field(default=None, alias="ifMachine") + if_machine_url: Optional[StrictStr] = Field( + default=None, + description="When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included.", + alias="ifMachineUrl", + ) + send_digits: Optional[StrictStr] = Field( + default=None, + description="DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension.", + alias="sendDigits", + ) + status_callback_url: Optional[StrictStr] = Field( + default=None, + description="When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored.", + alias="statusCallbackUrl", + ) + timeout: Optional[StrictInt] = Field( + default=None, + description="Maximum time in seconds the `OutDial` command waits for the called party to answer the Call. When a timeout occurs, FreeClimb invokes the `callConnectUrl` Webhook to report that the out-dialed Call has ended with a status of `noAnswer`.", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter `privacyMode` will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "OutDial" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "callConnectUrl", + "callingNumber", + "destination", + "ifMachine", + "ifMachineUrl", + "sendDigits", + "statusCallbackUrl", + "timeout", + "privacyMode", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OutDial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutDial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "callConnectUrl": obj.get("callConnectUrl"), + "callingNumber": obj.get("callingNumber"), + "destination": obj.get("destination"), + "ifMachine": obj.get("ifMachine"), + "ifMachineUrl": obj.get("ifMachineUrl"), + "sendDigits": obj.get("sendDigits"), + "statusCallbackUrl": obj.get("statusCallbackUrl"), + "timeout": obj.get("timeout"), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/models/out_dial_api_connect_webhook.py b/freeclimb/models/out_dial_api_connect_webhook.py new file mode 100644 index 0000000..ddde669 --- /dev/null +++ b/freeclimb/models/out_dial_api_connect_webhook.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class OutDialApiConnectWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + An outbound call initiated by the REST API has connected and the callConnectUrl specified in the API request is being invoked. A PerCL response is expected if the call was successfully connected (with status of inProgress). + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be outDialApiConnect - An outbound call spawned by the REST API has connected and the callConnectUrl specified in the API request is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child call).", + alias="parentCallId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "parentCallId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OutDialApiConnectWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutDialApiConnectWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "parentCallId": obj.get("parentCallId"), + } + ) + return _obj diff --git a/freeclimb/models/out_dial_connect_webhook.py b/freeclimb/models/out_dial_connect_webhook.py new file mode 100644 index 0000000..bd09848 --- /dev/null +++ b/freeclimb/models/out_dial_connect_webhook.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class OutDialConnectWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A Call generated by OutDial has connected and the callConnectUrl is being invoked. This request is made in the context of the Call leg that was generated using OutDial and not the parent (the OutDialStart webhook is invoked on the parent call to continue that call context). A PerCL response is expected if the call was successfully connected (as indicated by status of inProgress) and begins the execution context for this (child) call. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be outDialConnect - A Call generated by OutDial has connected and the callConnectUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child call).", + alias="parentCallId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "parentCallId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OutDialConnectWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutDialConnectWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "parentCallId": obj.get("parentCallId"), + } + ) + return _obj diff --git a/freeclimb/models/out_dial_start_webhook.py b/freeclimb/models/out_dial_start_webhook.py new file mode 100644 index 0000000..eb65491 --- /dev/null +++ b/freeclimb/models/out_dial_start_webhook.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class OutDialStartWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The OutDial command has started and the actionUrl is being invoked. This request is made in the context of the parent call (Call leg that invoked). A PerCL response is expected. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be outDialStart - The OutDial command has started and the actionUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to the customer and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + dial_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the child call that was generated as a result of the Outdial.", + alias="dialCallId", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child call). If this was an inbound call or call created via REST API with no parent, this field will be null.", + alias="parentCallId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "dialCallId", + "parentCallId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OutDialStartWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if parent_call_id (nullable) is None + # and model_fields_set contains the field + if self.parent_call_id is None and "parent_call_id" in self.model_fields_set: + _dict["parentCallId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OutDialStartWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "dialCallId": obj.get("dialCallId"), + "parentCallId": obj.get("parentCallId"), + } + ) + return _obj diff --git a/freeclimb/models/pagination_model.py b/freeclimb/models/pagination_model.py new file mode 100644 index 0000000..7229779 --- /dev/null +++ b/freeclimb/models/pagination_model.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class PaginationModel( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + PaginationModel + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginationModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + } + ) + return _obj diff --git a/freeclimb/models/park.py b/freeclimb/models/park.py new file mode 100644 index 0000000..46e4025 --- /dev/null +++ b/freeclimb/models/park.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Park( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Park` command allows a caller to be put on hold. You can provide hold music,messages,etc until ready to resume the call. Park is a terminal command. Actions performed on the Call while on hold are provided in a PerCL script in response to the waitUrl property. Actions performed on the Call after it has been unparked (resumed) will be provided in a PerCL script in response to the actionUrl provided. A Call can be resumed in two ways -- REST API invocation or the Unpark percl command. No actions can be nested within Park and Park cannot be nested in any other actions. + """ # noqa: E501 + + wait_url: StrictStr = Field( + description="Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely.", + alias="waitUrl", + ) + action_url: StrictStr = Field( + description="A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call.", + alias="actionUrl", + ) + notification_url: Optional[StrictStr] = Field( + default=None, + description="URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.", + alias="notificationUrl", + ) + command: StrictStr = "Park" + + __properties: ClassVar[List[str]] = [ + "command", + "waitUrl", + "actionUrl", + "notificationUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Park from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Park from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "waitUrl": obj.get("waitUrl"), + "actionUrl": obj.get("actionUrl"), + "notificationUrl": obj.get("notificationUrl"), + } + ) + return _obj diff --git a/freeclimb/models/pause.py b/freeclimb/models/pause.py new file mode 100644 index 0000000..f0b1ec9 --- /dev/null +++ b/freeclimb/models/pause.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Pause( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Pause` command halts execution of the current PerCL script for a specified number of milliseconds. If `Pause` is the first command in a PerCL document, FreeClimb will wait for the specified time to elapse before picking up the call. + """ # noqa: E501 + + length: StrictInt = Field( + description="Length in milliseconds. FreeClimb will wait silently before continuing on." + ) + command: StrictStr = "Pause" + + __properties: ClassVar[List[str]] = ["command", "length"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Pause from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Pause from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "length": obj.get("length")} + ) + return _obj diff --git a/freeclimb/models/percl_command.py b/freeclimb/models/percl_command.py new file mode 100644 index 0000000..c9ab788 --- /dev/null +++ b/freeclimb/models/percl_command.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from freeclimb.models.add_to_conference import AddToConference + from freeclimb.models.create_conference import CreateConference + from freeclimb.models.dequeue import Dequeue + from freeclimb.models.enqueue import Enqueue + from freeclimb.models.get_digits import GetDigits + from freeclimb.models.get_speech import GetSpeech + from freeclimb.models.hangup import Hangup + from freeclimb.models.out_dial import OutDial + from freeclimb.models.park import Park + from freeclimb.models.pause import Pause + from freeclimb.models.play import Play + from freeclimb.models.play_early_media import PlayEarlyMedia + from freeclimb.models.record_utterance import RecordUtterance + from freeclimb.models.redirect import Redirect + from freeclimb.models.reject import Reject + from freeclimb.models.remove_from_conference import RemoveFromConference + from freeclimb.models.say import Say + from freeclimb.models.send_digits import SendDigits + from freeclimb.models.set_dtmf_pass_through import SetDTMFPassThrough + from freeclimb.models.set_listen import SetListen + from freeclimb.models.set_talk import SetTalk + from freeclimb.models.sms import Sms + from freeclimb.models.start_record_call import StartRecordCall + from freeclimb.models.terminate_conference import TerminateConference + from freeclimb.models.transcribe_utterance import TranscribeUtterance + from freeclimb.models.unpark import Unpark + + +class PerclCommand( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + An individual command used in a PerCLScript. + """ # noqa: E501 + + command: Optional[StrictStr] = Field( + default=None, + description="Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments)", + ) + + __properties: ClassVar[List[str]] = ["command"] + + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = "command" + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + "AddToConference": "AddToConference", + "CreateConference": "CreateConference", + "Dequeue": "Dequeue", + "Enqueue": "Enqueue", + "GetDigits": "GetDigits", + "GetSpeech": "GetSpeech", + "Hangup": "Hangup", + "OutDial": "OutDial", + "Park": "Park", + "Pause": "Pause", + "Play": "Play", + "PlayEarlyMedia": "PlayEarlyMedia", + "RecordUtterance": "RecordUtterance", + "Redirect": "Redirect", + "Reject": "Reject", + "RemoveFromConference": "RemoveFromConference", + "Say": "Say", + "SendDigits": "SendDigits", + "SetDTMFPassThrough": "SetDTMFPassThrough", + "SetListen": "SetListen", + "SetTalk": "SetTalk", + "Sms": "Sms", + "StartRecordCall": "StartRecordCall", + "TerminateConference": "TerminateConference", + "TranscribeUtterance": "TranscribeUtterance", + "Unpark": "Unpark", + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[ + Union[ + AddToConference, + CreateConference, + Dequeue, + Enqueue, + GetDigits, + GetSpeech, + Hangup, + OutDial, + Park, + Pause, + Play, + PlayEarlyMedia, + RecordUtterance, + Redirect, + Reject, + RemoveFromConference, + Say, + SendDigits, + SetDTMFPassThrough, + SetListen, + SetTalk, + Sms, + StartRecordCall, + TerminateConference, + TranscribeUtterance, + Unpark, + ] + ]: + """Create an instance of PerclCommand from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + AddToConference, + CreateConference, + Dequeue, + Enqueue, + GetDigits, + GetSpeech, + Hangup, + OutDial, + Park, + Pause, + Play, + PlayEarlyMedia, + RecordUtterance, + Redirect, + Reject, + RemoveFromConference, + Say, + SendDigits, + SetDTMFPassThrough, + SetListen, + SetTalk, + Sms, + StartRecordCall, + TerminateConference, + TranscribeUtterance, + Unpark, + ] + ]: + """Create an instance of PerclCommand from a dict""" + # look up the object type based on discriminator mapping + object_type = cls.get_discriminator_value(obj) + if object_type == "AddToConference": + return import_module( + "freeclimb.models.add_to_conference" + ).AddToConference.from_dict(obj) + if object_type == "CreateConference": + return import_module( + "freeclimb.models.create_conference" + ).CreateConference.from_dict(obj) + if object_type == "Dequeue": + return import_module("freeclimb.models.dequeue").Dequeue.from_dict(obj) + if object_type == "Enqueue": + return import_module("freeclimb.models.enqueue").Enqueue.from_dict(obj) + if object_type == "GetDigits": + return import_module("freeclimb.models.get_digits").GetDigits.from_dict(obj) + if object_type == "GetSpeech": + return import_module("freeclimb.models.get_speech").GetSpeech.from_dict(obj) + if object_type == "Hangup": + return import_module("freeclimb.models.hangup").Hangup.from_dict(obj) + if object_type == "OutDial": + return import_module("freeclimb.models.out_dial").OutDial.from_dict(obj) + if object_type == "Park": + return import_module("freeclimb.models.park").Park.from_dict(obj) + if object_type == "Pause": + return import_module("freeclimb.models.pause").Pause.from_dict(obj) + if object_type == "Play": + return import_module("freeclimb.models.play").Play.from_dict(obj) + if object_type == "PlayEarlyMedia": + return import_module( + "freeclimb.models.play_early_media" + ).PlayEarlyMedia.from_dict(obj) + if object_type == "RecordUtterance": + return import_module( + "freeclimb.models.record_utterance" + ).RecordUtterance.from_dict(obj) + if object_type == "Redirect": + return import_module("freeclimb.models.redirect").Redirect.from_dict(obj) + if object_type == "Reject": + return import_module("freeclimb.models.reject").Reject.from_dict(obj) + if object_type == "RemoveFromConference": + return import_module( + "freeclimb.models.remove_from_conference" + ).RemoveFromConference.from_dict(obj) + if object_type == "Say": + return import_module("freeclimb.models.say").Say.from_dict(obj) + if object_type == "SendDigits": + return import_module("freeclimb.models.send_digits").SendDigits.from_dict( + obj + ) + if object_type == "SetDTMFPassThrough": + return import_module( + "freeclimb.models.set_dtmf_pass_through" + ).SetDTMFPassThrough.from_dict(obj) + if object_type == "SetListen": + return import_module("freeclimb.models.set_listen").SetListen.from_dict(obj) + if object_type == "SetTalk": + return import_module("freeclimb.models.set_talk").SetTalk.from_dict(obj) + if object_type == "Sms": + return import_module("freeclimb.models.sms").Sms.from_dict(obj) + if object_type == "StartRecordCall": + return import_module( + "freeclimb.models.start_record_call" + ).StartRecordCall.from_dict(obj) + if object_type == "TerminateConference": + return import_module( + "freeclimb.models.terminate_conference" + ).TerminateConference.from_dict(obj) + if object_type == "TranscribeUtterance": + return import_module( + "freeclimb.models.transcribe_utterance" + ).TranscribeUtterance.from_dict(obj) + if object_type == "Unpark": + return import_module("freeclimb.models.unpark").Unpark.from_dict(obj) + + raise ValueError( + "PerclCommand failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) diff --git a/freeclimb/models/percl_script.py b/freeclimb/models/percl_script.py new file mode 100644 index 0000000..23151f0 --- /dev/null +++ b/freeclimb/models/percl_script.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class PerclScript( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A PerCL script to be returned to the FreeClimb servers in FreeClimb applications + """ # noqa: E501 + + commands: Optional[List[PerclCommand]] = Field( + default=None, description="A JSON array of PerCL commands" + ) + + __properties: ClassVar[List[str]] = ["commands"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_percl_dict(self, instance_dict): + if "command" in instance_dict == False: + raise AttributeError( + "{0} has no attribute '{1}'".format(instance_dict, "command") + ) + command = instance_dict.get("command") + attribute_map = {} + for key, value in instance_dict.items(): + if key == "command": + continue + if value is None: + continue + if isinstance(value, dict) and "command" in value: + attribute_map[key] = self.to_percl_dict(value) + continue + if isinstance(value, list): + attribute_map[key] = [self.to_percl_dict(item) for item in value] + continue + attribute_map[key] = value + percl_dict = {command: attribute_map} + return percl_dict + + def to_json(self): + return json.dumps( + [self.to_percl_dict(command.to_dict()) for command in self.commands] + ) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PerclScript from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in commands (list) + _items = [] + if self.commands: + for _item_commands in self.commands: + if _item_commands: + _items.append(_item_commands.to_dict()) + _dict["commands"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PerclScript from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "commands": ( + [PerclCommand.from_dict(_item) for _item in obj["commands"]] + if obj.get("commands") is not None + else None + ) + } + ) + return _obj diff --git a/freeclimb/models/play.py b/freeclimb/models/play.py new file mode 100644 index 0000000..6714592 --- /dev/null +++ b/freeclimb/models/play.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Play( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Play` command plays an audio file back to the caller. The audio file may be located at any location accessible via a URL. `Play` can exist as a stand-alone command or as a nested command. It does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested. + """ # noqa: E501 + + file: StrictStr = Field( + description="RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands. " + ) + loop: Optional[StrictInt] = Field( + default=None, + description="Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter `privacyMode` will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "Play" + + __properties: ClassVar[List[str]] = ["command", "file", "loop", "privacyMode"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Play from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Play from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "file": obj.get("file"), + "loop": obj.get("loop"), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/model/play_beep.py b/freeclimb/models/play_beep.py similarity index 51% rename from freeclimb/model/play_beep.py rename to freeclimb/models/play_beep.py index c607587..d4237d6 100644 --- a/freeclimb/model/play_beep.py +++ b/freeclimb/models/play_beep.py @@ -1,43 +1,38 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class PlayBeep(str, Enum): - ALWAYS= "always", - NEVER= "never", - ENTRY_ONLY= "entryOnly", - EXIT_ONLY= "exitOnly", +from typing_extensions import Self +class PlayBeep(str, Enum): + """ + Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` + """ + + """ + allowed enum values + """ + ALWAYS = "always" + NEVER = "never" + ENTRY_ONLY = "entryOnly" + EXIT_ONLY = "exitOnly" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PlayBeep from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/play_early_media.py b/freeclimb/models/play_early_media.py new file mode 100644 index 0000000..8c254a2 --- /dev/null +++ b/freeclimb/models/play_early_media.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class PlayEarlyMedia( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + `PlayEarlyMedia` is relevant only when present as the very first command in the PerCL script returned for an incoming Call. In such cases, the command is executed before FreeClimb attempts to connect the call. The audio file it uses can be stored in any location that is accessible via URL. + """ # noqa: E501 + + file: StrictStr = Field( + description="RL of the audio file to be played to the caller. The URL can be the `recordingUrl` generated from the `RecordUtterance` or `StartRecordCall` PerCL commands or any accessible URL. FreeClimb will respect Cache-Control headers for this file. Use these to limit repeated requests for unchanged audio. If no Cache-Control header is provided, the file will be cached for seven days by default." + ) + command: StrictStr = "PlayEarlyMedia" + + __properties: ClassVar[List[str]] = ["command", "file"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PlayEarlyMedia from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PlayEarlyMedia from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "file": obj.get("file")} + ) + return _obj diff --git a/freeclimb/models/queue_list.py b/freeclimb/models/queue_list.py new file mode 100644 index 0000000..1c9f391 --- /dev/null +++ b/freeclimb/models/queue_list.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.queue_result import QueueResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class QueueList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + QueueList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + queues: Optional[List[QueueResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "queues", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueueList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in queues (list) + _items = [] + if self.queues: + for _item_queues in self.queues: + if _item_queues: + _items.append(_item_queues.to_dict()) + _dict["queues"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if queues (nullable) is None + # and model_fields_set contains the field + if self.queues is None and "queues" in self.model_fields_set: + _dict["queues"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueueList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "queues": ( + [QueueResult.from_dict(_item) for _item in obj["queues"]] + if obj.get("queues") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/queue_member.py b/freeclimb/models/queue_member.py new file mode 100644 index 0000000..63b1733 --- /dev/null +++ b/freeclimb/models/queue_member.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class QueueMember( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + QueueMember + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, + description="URI for this Queue Member resource, relative to the API base URL.", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call associated with this Queue Member.", + alias="callId", + ) + wait_time: Optional[StrictInt] = Field( + default=None, + description="Number of seconds the Member has been in the queue.", + alias="waitTime", + ) + position: Optional[StrictInt] = Field( + default=None, description="Member's current position in the Queue, 1 indexed." + ) + date_enqueued: Optional[StrictStr] = Field( + default=None, + description="Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateEnqueued", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "callId", + "waitTime", + "position", + "dateEnqueued", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueueMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if uri (nullable) is None + # and model_fields_set contains the field + if self.uri is None and "uri" in self.model_fields_set: + _dict["uri"] = None + + # set to None if call_id (nullable) is None + # and model_fields_set contains the field + if self.call_id is None and "call_id" in self.model_fields_set: + _dict["callId"] = None + + # set to None if wait_time (nullable) is None + # and model_fields_set contains the field + if self.wait_time is None and "wait_time" in self.model_fields_set: + _dict["waitTime"] = None + + # set to None if position (nullable) is None + # and model_fields_set contains the field + if self.position is None and "position" in self.model_fields_set: + _dict["position"] = None + + # set to None if date_enqueued (nullable) is None + # and model_fields_set contains the field + if self.date_enqueued is None and "date_enqueued" in self.model_fields_set: + _dict["dateEnqueued"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueueMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "callId": obj.get("callId"), + "waitTime": obj.get("waitTime"), + "position": obj.get("position"), + "dateEnqueued": obj.get("dateEnqueued"), + } + ) + return _obj diff --git a/freeclimb/models/queue_member_list.py b/freeclimb/models/queue_member_list.py new file mode 100644 index 0000000..245c9a6 --- /dev/null +++ b/freeclimb/models/queue_member_list.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.queue_member import QueueMember +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class QueueMemberList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + QueueMemberList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + queue_members: Optional[List[QueueMember]] = Field( + default=None, alias="queueMembers" + ) + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "queueMembers", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueueMemberList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in queue_members (list) + _items = [] + if self.queue_members: + for _item_queue_members in self.queue_members: + if _item_queue_members: + _items.append(_item_queue_members.to_dict()) + _dict["queueMembers"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if queue_members (nullable) is None + # and model_fields_set contains the field + if self.queue_members is None and "queue_members" in self.model_fields_set: + _dict["queueMembers"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueueMemberList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "queueMembers": ( + [QueueMember.from_dict(_item) for _item in obj["queueMembers"]] + if obj.get("queueMembers") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/queue_request.py b/freeclimb/models/queue_request.py new file mode 100644 index 0000000..d308a4d --- /dev/null +++ b/freeclimb/models/queue_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class QueueRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + QueueRequest + """ # noqa: E501 + + alias: Optional[StrictStr] = Field( + default=None, + description="Description for this Queue. Max length is 64 characters.", + ) + max_size: Optional[StrictInt] = Field( + default=100, + description="Maximum number of calls this queue can hold. Default is 100. Maximum is 1000. **Note:** Reducing the maxSize of a Queue causes the Queue to reject incoming requests until it shrinks below the new value of maxSize.", + alias="maxSize", + ) + + __properties: ClassVar[List[str]] = ["alias", "maxSize"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueueRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueueRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "alias": obj.get("alias"), + "maxSize": ( + obj.get("maxSize") if obj.get("maxSize") is not None else 100 + ), + } + ) + return _obj diff --git a/freeclimb/models/queue_result.py b/freeclimb/models/queue_result.py new file mode 100644 index 0000000..dfbe367 --- /dev/null +++ b/freeclimb/models/queue_result.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class QueueResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + QueueResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this Queue.", + alias="accountId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="A string that uniquely identifies this Queue resource.", + alias="queueId", + ) + alias: Optional[StrictStr] = Field( + default=None, description="A description for this Queue." + ) + max_size: Optional[StrictInt] = Field( + default=None, + description="The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000.", + alias="maxSize", + ) + current_size: Optional[StrictInt] = Field( + default=None, + description="Count of Calls currently in the Queue.", + alias="currentSize", + ) + average_queue_removal_time: Optional[StrictInt] = Field( + default=None, + description="The average amount of time (in seconds) for a call to be removed from the queue.", + alias="averageQueueRemovalTime", + ) + subresource_uris: Optional[Dict[str, Any]] = Field( + default=None, + description="List of subresources for this Queue (which includes Queue members).", + alias="subresourceUris", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "accountId", + "queueId", + "alias", + "maxSize", + "currentSize", + "averageQueueRemovalTime", + "subresourceUris", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueueResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + # set to None if alias (nullable) is None + # and model_fields_set contains the field + if self.alias is None and "alias" in self.model_fields_set: + _dict["alias"] = None + + # set to None if max_size (nullable) is None + # and model_fields_set contains the field + if self.max_size is None and "max_size" in self.model_fields_set: + _dict["maxSize"] = None + + # set to None if current_size (nullable) is None + # and model_fields_set contains the field + if self.current_size is None and "current_size" in self.model_fields_set: + _dict["currentSize"] = None + + # set to None if average_queue_removal_time (nullable) is None + # and model_fields_set contains the field + if ( + self.average_queue_removal_time is None + and "average_queue_removal_time" in self.model_fields_set + ): + _dict["averageQueueRemovalTime"] = None + + # set to None if subresource_uris (nullable) is None + # and model_fields_set contains the field + if ( + self.subresource_uris is None + and "subresource_uris" in self.model_fields_set + ): + _dict["subresourceUris"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueueResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "accountId": obj.get("accountId"), + "queueId": obj.get("queueId"), + "alias": obj.get("alias"), + "maxSize": obj.get("maxSize"), + "currentSize": obj.get("currentSize"), + "averageQueueRemovalTime": obj.get("averageQueueRemovalTime"), + "subresourceUris": obj.get("subresourceUris"), + } + ) + return _obj diff --git a/freeclimb/model/queue_result_status.py b/freeclimb/models/queue_result_status.py similarity index 56% rename from freeclimb/model/queue_result_status.py rename to freeclimb/models/queue_result_status.py index 18eafa2..e21612c 100644 --- a/freeclimb/model/queue_result_status.py +++ b/freeclimb/models/queue_result_status.py @@ -1,43 +1,38 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class QueueResultStatus(str, Enum): - QUEUE_FULL= "queueFull", - DEQUEUED= "dequeued", - HANGUP= "hangup", - SYSTEM_ERROR= "systemError", +from typing_extensions import Self +class QueueResultStatus(str, Enum): + """ + QueueResultStatus + """ + + """ + allowed enum values + """ + QUEUE_FULL = "queueFull" + DEQUEUED = "dequeued" + HANGUP = "hangup" + SYSTEM_ERROR = "systemError" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of QueueResultStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/queue_wait_webhook.py b/freeclimb/models/queue_wait_webhook.py new file mode 100644 index 0000000..f695812 --- /dev/null +++ b/freeclimb/models/queue_wait_webhook.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class QueueWaitWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A queued Call is requesting instructions to execute during the wait in the Queue and the corresponding waitUrl is being invoked. A PerCL response is expected. The following are the only PerCL commands supported in the PerCL script response to a request to the waitUrl: Play,Say,Pause,GetDigits,Dequeue,Hangup + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be queueWait - A queued call is requesting instructions to execute during the wait in the queue and the corresponding waitUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to the customer and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + queue_position: Optional[StrictStr] = Field( + default=None, + description="Current queue position of the enqueued Call.", + alias="queuePosition", + ) + queue_time: Optional[StrictInt] = Field( + default=None, + description="Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued.", + alias="queueTime", + ) + current_queue_size: Optional[StrictInt] = Field( + default=None, + description="Current number of enqueued Calls in this Queue.", + alias="currentQueueSize", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "queuePosition", + "queueTime", + "currentQueueSize", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueueWaitWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueueWaitWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "queuePosition": obj.get("queuePosition"), + "queueTime": obj.get("queueTime"), + "currentQueueSize": obj.get("currentQueueSize"), + } + ) + return _obj diff --git a/freeclimb/models/record_utterance.py b/freeclimb/models/record_utterance.py new file mode 100644 index 0000000..10dcdb4 --- /dev/null +++ b/freeclimb/models/record_utterance.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RecordUtterance( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `RecordUtterance` command records the caller's voice and returns the URL of a file containing the audio recording. `RecordUtterance` is blocking and is a terminal command. As such, the `actionUrl` property is required, and control of the Call picks up using the PerCL returned in response to the `actionUrl`. Recording information is returned in the `actionUrl` request. + """ # noqa: E501 + + action_url: StrictStr = Field( + description="URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing.", + alias="actionUrl", + ) + silence_timeout_ms: Optional[StrictInt] = Field( + default=None, + description="Interval of silence that should elapse before ending the recording.", + alias="silenceTimeoutMs", + ) + finish_on_key: Optional[StrictStr] = Field( + default=None, + description="Key that triggers the end of the recording. any digit, '#', or '*'", + alias="finishOnKey", + ) + max_length_sec: Optional[StrictInt] = Field( + default=None, + description="Maximum length for the command execution in seconds.", + alias="maxLengthSec", + ) + play_beep: Optional[StrictBool] = Field( + default=None, + description="Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played.", + alias="playBeep", + ) + auto_start: Optional[StrictBool] = Field( + default=None, + description="If `false`, recording begins immediately after the RecordUtterance command is processed. If `true`, recording begins when audio is present and if audio begins before the `maxLengthSec` timeout. If no audio begins before `maxLengthSec`, no recording is generated.", + alias="autoStart", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter `privacyMode` will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "RecordUtterance" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "silenceTimeoutMs", + "finishOnKey", + "maxLengthSec", + "playBeep", + "autoStart", + "privacyMode", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecordUtterance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecordUtterance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "silenceTimeoutMs": obj.get("silenceTimeoutMs"), + "finishOnKey": obj.get("finishOnKey"), + "maxLengthSec": obj.get("maxLengthSec"), + "playBeep": obj.get("playBeep"), + "autoStart": obj.get("autoStart"), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/model/record_utterance_term_reason.py b/freeclimb/models/record_utterance_term_reason.py similarity index 57% rename from freeclimb/model/record_utterance_term_reason.py rename to freeclimb/models/record_utterance_term_reason.py index aaa2c2e..6252caa 100644 --- a/freeclimb/model/record_utterance_term_reason.py +++ b/freeclimb/models/record_utterance_term_reason.py @@ -1,43 +1,38 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class RecordUtteranceTermReason(str, Enum): - FINISH_KEY= "finishKey", - TIMEOUT= "timeout", - HANGUP= "hangup", - MAX_LENGTH= "maxLength", +from typing_extensions import Self +class RecordUtteranceTermReason(str, Enum): + """ + RecordUtteranceTermReason + """ + + """ + allowed enum values + """ + FINISH_KEY = "finishKey" + TIMEOUT = "timeout" + HANGUP = "hangup" + MAX_LENGTH = "maxLength" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RecordUtteranceTermReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/record_webhook.py b/freeclimb/models/record_webhook.py new file mode 100644 index 0000000..22775b4 --- /dev/null +++ b/freeclimb/models/record_webhook.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.record_utterance_term_reason import RecordUtteranceTermReason +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RecordWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The RecordUtterance command has completed and its actionUrl is being invoked. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="The context or reason why this request is being made. Will be record - The RecordUtterance command has completed and its actionUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to the customer and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + recording_id: Optional[StrictStr] = Field( + default=None, description="ID of the recording.", alias="recordingId" + ) + recording_url: Optional[StrictStr] = Field( + default=None, + description="URL of the recorded audio file. This URL can be used as is in a Play command to play the recording (no authentication needed). It can also be used to download a recording file via the REST API.", + alias="recordingUrl", + ) + recording_size: Optional[StrictStr] = Field( + default=None, + description="Size of the recording in bytes", + alias="recordingSize", + ) + recording_format: Optional[StrictStr] = Field( + default=None, + description="File type of the recording (audio/wav)", + alias="recordingFormat", + ) + recording_duration_sec: Optional[StrictInt] = Field( + default=None, + description="Duration of the recorded audio rounded up to the nearest second (in seconds)", + alias="recordingDurationSec", + ) + term_reason: Optional[RecordUtteranceTermReason] = Field( + default=None, alias="termReason" + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of Call that created this leg (child call).", + alias="parentCallId", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="If true then it indicates the recording will only be available for download for two minutes prior to it being deleted. This is to minimize risk of anyone else getting access to the url and attempting to access it.", + alias="privacyMode", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "recordingId", + "recordingUrl", + "recordingSize", + "recordingFormat", + "recordingDurationSec", + "termReason", + "parentCallId", + "privacyMode", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecordWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecordWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "recordingId": obj.get("recordingId"), + "recordingUrl": obj.get("recordingUrl"), + "recordingSize": obj.get("recordingSize"), + "recordingFormat": obj.get("recordingFormat"), + "recordingDurationSec": obj.get("recordingDurationSec"), + "termReason": obj.get("termReason"), + "parentCallId": obj.get("parentCallId"), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/models/recording_list.py b/freeclimb/models/recording_list.py new file mode 100644 index 0000000..b42a540 --- /dev/null +++ b/freeclimb/models/recording_list.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.recording_result import RecordingResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RecordingList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + RecordingList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + recordings: Optional[List[RecordingResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "recordings", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecordingList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in recordings (list) + _items = [] + if self.recordings: + for _item_recordings in self.recordings: + if _item_recordings: + _items.append(_item_recordings.to_dict()) + _dict["recordings"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if recordings (nullable) is None + # and model_fields_set contains the field + if self.recordings is None and "recordings" in self.model_fields_set: + _dict["recordings"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecordingList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "recordings": ( + [RecordingResult.from_dict(_item) for _item in obj["recordings"]] + if obj.get("recordings") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/recording_result.py b/freeclimb/models/recording_result.py new file mode 100644 index 0000000..6c19468 --- /dev/null +++ b/freeclimb/models/recording_result.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RecordingResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + RecordingResult + """ # noqa: E501 + + uri: Optional[StrictStr] = Field( + default=None, description="The URI for this resource, relative to /apiserver." + ) + date_created: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateCreated", + ) + date_updated: Optional[StrictStr] = Field( + default=None, + description="The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).", + alias="dateUpdated", + ) + revision: Optional[StrictInt] = Field( + default=None, + description="Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.", + ) + recording_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies this recording resource.", + alias="recordingId", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this recording.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.", + alias="callId", + ) + duration_sec: Optional[StrictInt] = Field( + default=None, + description="Length of the recording in seconds.", + alias="durationSec", + ) + conference_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.", + alias="conferenceId", + ) + + __properties: ClassVar[List[str]] = [ + "uri", + "dateCreated", + "dateUpdated", + "revision", + "recordingId", + "accountId", + "callId", + "durationSec", + "conferenceId", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RecordingResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if recording_id (nullable) is None + # and model_fields_set contains the field + if self.recording_id is None and "recording_id" in self.model_fields_set: + _dict["recordingId"] = None + + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if call_id (nullable) is None + # and model_fields_set contains the field + if self.call_id is None and "call_id" in self.model_fields_set: + _dict["callId"] = None + + # set to None if duration_sec (nullable) is None + # and model_fields_set contains the field + if self.duration_sec is None and "duration_sec" in self.model_fields_set: + _dict["durationSec"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RecordingResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "recordingId": obj.get("recordingId"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "durationSec": obj.get("durationSec"), + "conferenceId": obj.get("conferenceId"), + } + ) + return _obj diff --git a/freeclimb/models/redirect.py b/freeclimb/models/redirect.py new file mode 100644 index 0000000..404a43d --- /dev/null +++ b/freeclimb/models/redirect.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Redirect( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Redirect` command transfers control of a Call to the PerCL at a different URL. `Redirect` is a terminal command, so any actions following it are never executed. The maximum number of redirections allowed during the life time of a Call is 256. This is intended to prevent a Call from possibly looping infinitely due to errors in PerCL being generated. + """ # noqa: E501 + + action_url: StrictStr = Field( + description="URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call.", + alias="actionUrl", + ) + command: StrictStr = "Redirect" + + __properties: ClassVar[List[str]] = ["command", "actionUrl"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Redirect from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Redirect from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "actionUrl": obj.get("actionUrl")} + ) + return _obj diff --git a/freeclimb/models/redirect_webhook.py b/freeclimb/models/redirect_webhook.py new file mode 100644 index 0000000..c3d3daa --- /dev/null +++ b/freeclimb/models/redirect_webhook.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RedirectWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + The Redirect command is executing and its actionUrl is being invoked. A PerCL response is expected. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be redirect - The Redirect command is executing and its actionUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to the customer and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of Call that created this leg (child call).", + alias="parentCallId", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "parentCallId", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RedirectWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RedirectWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "parentCallId": obj.get("parentCallId"), + } + ) + return _obj diff --git a/freeclimb/models/reject.py b/freeclimb/models/reject.py new file mode 100644 index 0000000..b90bd47 --- /dev/null +++ b/freeclimb/models/reject.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Reject( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Reject` command blocks an incoming Call. Using `Reject` is the only way to prevent FreeClimb from answering a Call. Any other response will result in an answered Call and your account will be billed. + """ # noqa: E501 + + reason: Optional[StrictStr] = Field( + default=None, + description="Reason for the rejection. This can be any string value. In general, applications should use a set of enumerated values that are predefined to cover all exit points of the call flows for the given application.", + ) + command: StrictStr = "Reject" + + __properties: ClassVar[List[str]] = ["command", "reason"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Reject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Reject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "reason": obj.get("reason")} + ) + return _obj diff --git a/freeclimb/models/remove_from_conference.py b/freeclimb/models/remove_from_conference.py new file mode 100644 index 0000000..27297ba --- /dev/null +++ b/freeclimb/models/remove_from_conference.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RemoveFromConference( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `RemoveFromConference` command removes a Participant from a Conference but does not hang up. Instead, the Call is simply unbridged and what happens next with the Call is determined by the PerCL returned in response to the `leaveConferenceUrl` attribute. + """ # noqa: E501 + + command: StrictStr = "RemoveFromConference" + + __properties: ClassVar[List[str]] = ["command"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveFromConference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveFromConference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"command": obj.get("command")}) + return _obj diff --git a/freeclimb/models/remove_from_queue_notification_webhook.py b/freeclimb/models/remove_from_queue_notification_webhook.py new file mode 100644 index 0000000..ea02290 --- /dev/null +++ b/freeclimb/models/remove_from_queue_notification_webhook.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.call_direction import CallDirection +from freeclimb.models.call_status import CallStatus +from freeclimb.models.queue_result_status import QueueResultStatus +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class RemoveFromQueueNotificationWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A call has been removed from a queue and the Enqueue command’s actionUrl is being invoked. A PerCL response is expected except if reason is hangup. + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="Context or reason why this request is being made. Will be removeFromQueueNotification - A Call has been removed from a Queue and the Enqueue command’s actionUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to the customer and to which this Call is directed (in E.164 format).", + ) + call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + direction: Optional[CallDirection] = None + conference_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if request pertains to a conference. Otherwise, it is set to null.", + alias="conferenceId", + ) + queue_id: Optional[StrictStr] = Field( + default=None, + description="This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + alias="queueId", + ) + queue_result: Optional[QueueResultStatus] = Field(default=None, alias="queueResult") + queue_time: Optional[StrictInt] = Field( + default=None, + description="Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued.", + alias="queueTime", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "callStatus", + "direction", + "conferenceId", + "queueId", + "queueResult", + "queueTime", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveFromQueueNotificationWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if call_status (nullable) is None + # and model_fields_set contains the field + if self.call_status is None and "call_status" in self.model_fields_set: + _dict["callStatus"] = None + + # set to None if direction (nullable) is None + # and model_fields_set contains the field + if self.direction is None and "direction" in self.model_fields_set: + _dict["direction"] = None + + # set to None if conference_id (nullable) is None + # and model_fields_set contains the field + if self.conference_id is None and "conference_id" in self.model_fields_set: + _dict["conferenceId"] = None + + # set to None if queue_id (nullable) is None + # and model_fields_set contains the field + if self.queue_id is None and "queue_id" in self.model_fields_set: + _dict["queueId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveFromQueueNotificationWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "callStatus": obj.get("callStatus"), + "direction": obj.get("direction"), + "conferenceId": obj.get("conferenceId"), + "queueId": obj.get("queueId"), + "queueResult": obj.get("queueResult"), + "queueTime": obj.get("queueTime"), + } + ) + return _obj diff --git a/freeclimb/models/request_type.py b/freeclimb/models/request_type.py new file mode 100644 index 0000000..09faf9d --- /dev/null +++ b/freeclimb/models/request_type.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class RequestType(str, Enum): + """ + RequestType + """ + + """ + allowed enum values + """ + INBOUND_CALL = "inboundCall" + RECORD = "record" + GET_DIGITS = "getDigits" + GET_SPEECH = "getSpeech" + REDIRECT = "redirect" + PAUSE = "pause" + OUT_DIAL_START = "outDialStart" + OUT_DIAL_CONNECT = "outDialConnect" + OUT_DIAL_API_CONNECT = "outDialApiConnect" + MACHINE_DETECTED = "machineDetected" + DEQUEUE = "dequeue" + QUEUE_WAIT = "queueWait" + ADD_TO_QUEUE_NOTIFICATION = "addToQueueNotification" + REMOVE_FROM_QUEUE_NOTIFICATION = "removeFromQueueNotification" + CALL_STATUS = "callStatus" + CREATE_CONFERENCE = "createConference" + CONFERENCE_STATUS = "conferenceStatus" + LEAVE_CONFERENCE = "leaveConference" + ADD_TO_CONFERENCE_NOTIFICATION = "addToConferenceNotification" + CONFERENCE_RECORDING_STATUS = "conferenceRecordingStatus" + CONFERENCE_CALL_CONTROL = "conferenceCallControl" + MESSAGE_DELIVERY = "messageDelivery" + MESSAGE_STATUS = "messageStatus" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RequestType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/say.py b/freeclimb/models/say.py new file mode 100644 index 0000000..1297b03 --- /dev/null +++ b/freeclimb/models/say.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Say( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Say` command provides Text-To-Speech (TTS) support. It converts text to speech and then renders it in a female voice back to the caller. `Say` is useful in cases where it's difficult to pre-record a prompt for any reason. `Say` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested. + """ # noqa: E501 + + text: StrictStr = Field( + description="The message to be played to the caller using TTS. The size of the string is limited to 4 KB (or 4,096 bytes). An empty string will cause the command to be skipped." + ) + language: Optional[StrictStr] = Field( + default=None, + description="Language and (by implication) the locale to use. This implies the accent and pronunciations to be usde for the TTS. The complete list of valid values for the language attribute is shown below.", + ) + loop: Optional[StrictInt] = Field( + default=1, + description="Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up.", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter `privacyMode` will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "Say" + + __properties: ClassVar[List[str]] = [ + "command", + "text", + "language", + "loop", + "privacyMode", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Say from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Say from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "text": obj.get("text"), + "language": obj.get("language"), + "loop": obj.get("loop") if obj.get("loop") is not None else 1, + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/models/send_digits.py b/freeclimb/models/send_digits.py new file mode 100644 index 0000000..3caf0f5 --- /dev/null +++ b/freeclimb/models/send_digits.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SendDigits( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `SendDigits` command plays DTMF tones on a live Call. This is useful for navigating through IVR menus or dialing extensions. + """ # noqa: E501 + + digits: StrictStr = Field( + description="String containing the digits to be played. The string cannot be empty and can include any digit, plus `#`, or `*`, and allows embedding specification for delay or pause between the output of individual digits." + ) + pause_ms: Optional[StrictInt] = Field( + default=None, + description="Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.", + alias="pauseMs", + ) + privacy_mode: Optional[StrictBool] = Field( + default=None, + description="Parameter `privacyMode` will not log the `text` as required by PCI compliance.", + alias="privacyMode", + ) + command: StrictStr = "SendDigits" + + __properties: ClassVar[List[str]] = ["command", "digits", "pauseMs", "privacyMode"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendDigits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendDigits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "digits": obj.get("digits"), + "pauseMs": obj.get("pauseMs"), + "privacyMode": obj.get("privacyMode"), + } + ) + return _obj diff --git a/freeclimb/models/set_dtmf_pass_through.py b/freeclimb/models/set_dtmf_pass_through.py new file mode 100644 index 0000000..b8536e8 --- /dev/null +++ b/freeclimb/models/set_dtmf_pass_through.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SetDTMFPassThrough( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `SetDTMFPassThrough` command enables or disables the dtmfPassThrough privilege for this Conference Participant. If 'true', DTMFs will be passed through from this Participant to all other Participants in the Conference + """ # noqa: E501 + + dtmf_pass_through: Optional[StrictBool] = Field( + default=None, + description="Specifying `false` mutes the Participant's dtmf audio.", + alias="dtmfPassThrough", + ) + command: StrictStr = "SetDTMFPassThrough" + + __properties: ClassVar[List[str]] = ["command", "dtmfPassThrough"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetDTMFPassThrough from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetDTMFPassThrough from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "dtmfPassThrough": obj.get("dtmfPassThrough"), + } + ) + return _obj diff --git a/freeclimb/models/set_listen.py b/freeclimb/models/set_listen.py new file mode 100644 index 0000000..39a27cc --- /dev/null +++ b/freeclimb/models/set_listen.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SetListen( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `SetListen` command enables or disables the listen privilege for this Conference Participant. The Participant can hear what the other participants are saying only if this privilege is enabled. + """ # noqa: E501 + + listen: Optional[StrictBool] = Field( + default=None, + description="Specifying `false` will silence the Conference for this Participant.", + ) + command: StrictStr = "SetListen" + + __properties: ClassVar[List[str]] = ["command", "listen"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetListen from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetListen from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "listen": obj.get("listen")} + ) + return _obj diff --git a/freeclimb/models/set_talk.py b/freeclimb/models/set_talk.py new file mode 100644 index 0000000..28ab86e --- /dev/null +++ b/freeclimb/models/set_talk.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SetTalk( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `SetTalk` command enables or disables the talk privilege for this Conference Participant. If 'true', no audio from that Participant is shared with the other Participants of the Conference. + """ # noqa: E501 + + talk: Optional[StrictBool] = Field( + default=None, description="Specifying `false` mutes the Participant." + ) + command: StrictStr = "SetTalk" + + __properties: ClassVar[List[str]] = ["command", "talk"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetTalk from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetTalk from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"command": obj.get("command"), "talk": obj.get("talk")} + ) + return _obj diff --git a/freeclimb/models/sms.py b/freeclimb/models/sms.py new file mode 100644 index 0000000..d60947b --- /dev/null +++ b/freeclimb/models/sms.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Sms( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Sms` command can be used to send an SMS message to a phone number during a phone call. International SMS is disabled by default. + """ # noqa: E501 + + to: StrictStr = Field( + description="E.164 representation of the phone number to which the message will be sent. Must be within FreeClimb's service area and E.164 formatting (e.g., +18003608245)." + ) + var_from: StrictStr = Field( + description="E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb.", + alias="from", + ) + text: StrictStr = Field( + description="Text contained in the message (maximum 160 characters)." + ) + notification_url: Optional[StrictStr] = Field( + default=None, + description="When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored.", + alias="notificationUrl", + ) + command: StrictStr = "Sms" + + __properties: ClassVar[List[str]] = [ + "command", + "to", + "from", + "text", + "notificationUrl", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Sms from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Sms from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "to": obj.get("to"), + "from": obj.get("from"), + "text": obj.get("text"), + "notificationUrl": obj.get("notificationUrl"), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_brand.py b/freeclimb/models/sms_ten_dlc_brand.py new file mode 100644 index 0000000..8f33cba --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brand.py @@ -0,0 +1,290 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from freeclimb.models.sms_ten_dlc_brand_alt_business_id_type import ( + SMSTenDLCBrandAltBusinessIdType, +) +from freeclimb.models.sms_ten_dlc_brand_entity_type import SMSTenDLCBrandEntityType +from freeclimb.models.sms_ten_dlc_brand_identity_status import ( + SMSTenDLCBrandIdentityStatus, +) +from freeclimb.models.sms_ten_dlc_brand_relationship import SMSTenDLCBrandRelationship +from freeclimb.models.sms_ten_dlc_brand_stock_exchange import ( + SMSTenDLCBrandStockExchange, +) +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCBrand( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + A brand is a business identity behind the campaign. + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this Queue.", + alias="accountId", + ) + entity_type: SMSTenDLCBrandEntityType = Field(alias="entityType") + csp_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier assigned to the csp by the registry.", + alias="cspId", + ) + brand_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier assigned to the brand by the registry.", + alias="brandId", + ) + first_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="First or given name. ", alias="firstName" + ) + last_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="Last or Surname.", alias="lastName" + ) + display_name: Annotated[str, Field(strict=True, max_length=255)] = Field( + description="Display or marketing name of the brand.", alias="displayName" + ) + company_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="(Required for Non-profit/private/public) Legal company name.", + alias="companyName", + ) + ein: Optional[Annotated[str, Field(strict=True, max_length=21)]] = Field( + default=None, + description="(Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S.", + ) + ein_issuing_country: Optional[Annotated[str, Field(strict=True, max_length=2)]] = ( + Field( + default=None, + description="ISO2 2 characters country code. Example: US - United States", + alias="einIssuingCountry", + ) + ) + phone: Annotated[str, Field(strict=True, max_length=20)] = Field( + description="Valid phone number in e.164 international format." + ) + street: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="Street number and name." + ) + city: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="City name" + ) + state: Optional[Annotated[str, Field(strict=True, max_length=20)]] = Field( + default=None, description="State. Must be 2 letters code for United States." + ) + postal_code: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field( + default=None, + description="Postal codes. Use 5 digit zipcode for United States", + alias="postalCode", + ) + country: Annotated[str, Field(strict=True, max_length=2)] = Field( + description="ISO2 2 characters country code. Example: US - United States" + ) + email: Annotated[str, Field(strict=True, max_length=100)] = Field( + description="Valid email address of brand support contact." + ) + stock_symbol: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field( + default=None, + description="(Required for public company) stock symbol.", + alias="stockSymbol", + ) + stock_exchange: Optional[SMSTenDLCBrandStockExchange] = Field( + default=None, alias="stockExchange" + ) + ip_address: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field( + default=None, + description="IP address of the browser requesting to create brand identity.", + alias="ipAddress", + ) + website: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="Brand website URL." + ) + brand_relationship: SMSTenDLCBrandRelationship = Field(alias="brandRelationship") + vertical: Annotated[str, Field(strict=True, max_length=50)] = Field( + description="Vertical or industry segment of the brand." + ) + alt_business_id: Optional[Annotated[str, Field(strict=True, max_length=50)]] = ( + Field( + default=None, + description="Alternate business identifier such as DUNS, LEI, or GIIN", + alias="altBusinessId", + ) + ) + alt_business_id_type: Optional[SMSTenDLCBrandAltBusinessIdType] = Field( + default=None, alias="altBusinessIdType" + ) + universal_ein: Optional[StrictStr] = Field( + default=None, + description="Universal EIN of Brand, Read Only.", + alias="universalEin", + ) + reference_id: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field( + default=None, + description="Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations.", + alias="referenceId", + ) + optional_attributes: Optional[Dict[str, Any]] = Field( + default=None, + description="Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.", + alias="optionalAttributes", + ) + mock: StrictBool = Field(description="Test brand.") + identity_status: SMSTenDLCBrandIdentityStatus = Field(alias="identityStatus") + create_date: Optional[datetime] = Field( + default=None, + description="Unix timestamp when brand was created.", + alias="createDate", + ) + + __properties: ClassVar[List[str]] = [ + "accountId", + "entityType", + "cspId", + "brandId", + "firstName", + "lastName", + "displayName", + "companyName", + "ein", + "einIssuingCountry", + "phone", + "street", + "city", + "state", + "postalCode", + "country", + "email", + "stockSymbol", + "stockExchange", + "ipAddress", + "website", + "brandRelationship", + "vertical", + "altBusinessId", + "altBusinessIdType", + "universalEin", + "referenceId", + "optionalAttributes", + "mock", + "identityStatus", + "createDate", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCBrand from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "csp_id", + "brand_id", + "universal_ein", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCBrand from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "entityType": obj.get("entityType"), + "cspId": obj.get("cspId"), + "brandId": obj.get("brandId"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "displayName": obj.get("displayName"), + "companyName": obj.get("companyName"), + "ein": obj.get("ein"), + "einIssuingCountry": obj.get("einIssuingCountry"), + "phone": obj.get("phone"), + "street": obj.get("street"), + "city": obj.get("city"), + "state": obj.get("state"), + "postalCode": obj.get("postalCode"), + "country": obj.get("country"), + "email": obj.get("email"), + "stockSymbol": obj.get("stockSymbol"), + "stockExchange": obj.get("stockExchange"), + "ipAddress": obj.get("ipAddress"), + "website": obj.get("website"), + "brandRelationship": obj.get("brandRelationship"), + "vertical": obj.get("vertical"), + "altBusinessId": obj.get("altBusinessId"), + "altBusinessIdType": obj.get("altBusinessIdType"), + "universalEin": obj.get("universalEin"), + "referenceId": obj.get("referenceId"), + "optionalAttributes": obj.get("optionalAttributes"), + "mock": obj.get("mock"), + "identityStatus": obj.get("identityStatus"), + "createDate": obj.get("createDate"), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.py b/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.py new file mode 100644 index 0000000..f072889 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCBrandAltBusinessIdType(str, Enum): + """ + The type of the Alternative business identifier + """ + + """ + allowed enum values + """ + NONE = "NONE" + DUNS = "DUNS" + GIIN = "GIIN" + LEI = "LEI" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCBrandAltBusinessIdType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_brand_entity_type.py b/freeclimb/models/sms_ten_dlc_brand_entity_type.py new file mode 100644 index 0000000..d63dace --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brand_entity_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCBrandEntityType(str, Enum): + """ + Entity type behind the brand. This is the form of business establishment. + """ + + """ + allowed enum values + """ + PRIVATE_PROFIT = "PRIVATE_PROFIT" + PUBLIC_PROFIT = "PUBLIC_PROFIT" + NON_PROFIT = "NON_PROFIT" + GOVERNMENT = "GOVERNMENT" + SOLE_PROPRIETOR = "SOLE_PROPRIETOR" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCBrandEntityType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_brand_identity_status.py b/freeclimb/models/sms_ten_dlc_brand_identity_status.py new file mode 100644 index 0000000..ee6a061 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brand_identity_status.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCBrandIdentityStatus(str, Enum): + """ + TCR assessment of the brand identification status. + """ + + """ + allowed enum values + """ + SELF_DECLARED = "SELF_DECLARED" + UNVERIFIED = "UNVERIFIED" + VERIFIED = "VERIFIED" + VETTED_VERIFIED = "VETTED_VERIFIED" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCBrandIdentityStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_brand_relationship.py b/freeclimb/models/sms_ten_dlc_brand_relationship.py new file mode 100644 index 0000000..4883980 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brand_relationship.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCBrandRelationship(str, Enum): + """ + Brand relationship to the CSP + """ + + """ + allowed enum values + """ + BASIC_ACCOUNT = "BASIC_ACCOUNT" + SMALL_ACCOUNT = "SMALL_ACCOUNT" + MEDIUM_ACCOUNT = "MEDIUM_ACCOUNT" + LARGE_ACCOUNT = "LARGE_ACCOUNT" + KEY_ACCOUNT = "KEY_ACCOUNT" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCBrandRelationship from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_brand_stock_exchange.py b/freeclimb/models/sms_ten_dlc_brand_stock_exchange.py new file mode 100644 index 0000000..53bd671 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brand_stock_exchange.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCBrandStockExchange(str, Enum): + """ + (Required for public company) stock exchange. + """ + + """ + allowed enum values + """ + NONE = "NONE" + NASDAQ = "NASDAQ" + NYSE = "NYSE" + AMEX = "AMEX" + AMX = "AMX" + ASX = "ASX" + B3 = "B3" + BME = "BME" + BSE = "BSE" + FRA = "FRA" + ICEX = "ICEX" + JPX = "JPX" + JSE = "JSE" + KRX = "KRX" + LON = "LON" + NSE = "NSE" + OMX = "OMX" + SEHK = "SEHK" + SGX = "SGX" + SSE = "SSE" + STO = "STO" + SWX = "SWX" + SZSE = "SZSE" + TSX = "TSX" + TWSE = "TWSE" + VSE = "VSE" + OTHER = "OTHER" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCBrandStockExchange from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_brands_list_result.py b/freeclimb/models/sms_ten_dlc_brands_list_result.py new file mode 100644 index 0000000..2ba3c28 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_brands_list_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCBrandsListResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTenDLCBrandsListResult + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + brands: Optional[List[SMSTenDLCBrand]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "brands", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCBrandsListResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in brands (list) + _items = [] + if self.brands: + for _item_brands in self.brands: + if _item_brands: + _items.append(_item_brands.to_dict()) + _dict["brands"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if brands (nullable) is None + # and model_fields_set contains the field + if self.brands is None and "brands" in self.model_fields_set: + _dict["brands"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCBrandsListResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "brands": ( + [SMSTenDLCBrand.from_dict(_item) for _item in obj["brands"]] + if obj.get("brands") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_campaign.py b/freeclimb/models/sms_ten_dlc_campaign.py new file mode 100644 index 0000000..00905f1 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_campaign.py @@ -0,0 +1,395 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date, datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from freeclimb.models.sms_ten_dlc_campaign_status import SMSTenDLCCampaignStatus +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCCampaign( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTenDLCCampaign + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this Queue.", + alias="accountId", + ) + campaign_id: StrictStr = Field( + description="Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.", + alias="campaignId", + ) + csp_id: StrictStr = Field( + description="Alphanumeric identifier of the CSP associated with this campaign.", + alias="cspId", + ) + reseller_id: Optional[Annotated[str, Field(strict=True, max_length=8)]] = Field( + default=None, + description="Alphanumeric identifier of the reseller that you want to associate with this campaign.", + alias="resellerId", + ) + status: Optional[SMSTenDLCCampaignStatus] = None + create_date: Optional[datetime] = Field( + default=None, + description="Unix timestamp when campaign was created.", + alias="createDate", + ) + auto_renewal: Optional[StrictBool] = Field( + default=None, + description="Campaign subscription auto-renewal status.", + alias="autoRenewal", + ) + billed_date: Optional[datetime] = Field( + default=None, description="Campaign recent billed date.", alias="billedDate" + ) + brand_id: Annotated[str, Field(strict=True, max_length=8)] = Field( + description="Alphanumeric identifier of the brand associated with this campaign.", + alias="brandId", + ) + usecase: Annotated[str, Field(strict=True, max_length=20)] = Field( + description="Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand." + ) + sub_usecases: List[StrictStr] = Field( + description="Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases", + alias="subUsecases", + ) + description: Annotated[str, Field(strict=True, max_length=4096)] = Field( + description="Summary description of this campaign." + ) + embedded_link: Optional[StrictBool] = Field( + default=False, + description="Does message generated by the campaign include URL link in SMS?", + alias="embeddedLink", + ) + embedded_phone: Optional[StrictBool] = Field( + default=False, + description="Does message generated by the campaign include phone number in SMS?", + alias="embeddedPhone", + ) + affiliate_marketing: Optional[StrictBool] = Field( + default=None, + description="Does message content controlled by affiliate marketing other than the brand?", + alias="affiliateMarketing", + ) + number_pool: Optional[StrictBool] = Field( + default=False, + description="Does campaign utilize pool of phone nubers?", + alias="numberPool", + ) + age_gated: Optional[StrictBool] = Field( + default=None, description="Age gated content in campaign.", alias="ageGated" + ) + direct_lending: Optional[StrictBool] = Field(default=None, alias="directLending") + subscriber_optin: Optional[StrictBool] = Field( + default=False, + description="Does campaign require subscriber to opt-in before SMS is sent to subscriber?", + alias="subscriberOptin", + ) + subscriber_optout: Optional[StrictBool] = Field( + default=False, + description="Does campaign support subscriber opt-out keyword(s)?", + alias="subscriberOptout", + ) + subscriber_help: Optional[StrictBool] = Field( + default=False, + description="Does campaign responds to help keyword(s)?", + alias="subscriberHelp", + ) + sample1: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 1 or more message samples.", + ) + sample2: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 2 or more message samples.", + ) + sample3: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 3 or more message samples.", + ) + sample4: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 4 or more message samples.", + ) + sample5: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 5 or more message samples.", + ) + message_flow: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default=None, description="Message flow description.", alias="messageFlow" + ) + help_message: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Help message of the campaign.", alias="helpMessage" + ) + optin_keywords: Optional[Annotated[str, Field(strict=True, max_length=255)]] = ( + Field( + default=None, + description="Subscriber opt-in keywords. Multiple keywords are comma separated without space.", + alias="optinKeywords", + ) + ) + optout_keywords: Optional[Annotated[str, Field(strict=True, max_length=255)]] = ( + Field( + default=None, + description="Subscriber opt-out keywords. Multiple keywords are comma separated without space.", + alias="optoutKeywords", + ) + ) + help_keywords: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="Subscriber help keywords. Multiple keywords are comma separated without space.", + alias="helpKeywords", + ) + optin_message: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Subscriber opt-in message.", alias="optinMessage" + ) + optout_message: Optional[Annotated[str, Field(strict=True, max_length=255)]] = ( + Field( + default=None, + description="Subscriber opt-out message.", + alias="optoutMessage", + ) + ) + reference_id: Optional[Annotated[str, Field(strict=True, max_length=50)]] = Field( + default=None, + description="Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.", + alias="referenceId", + ) + mock: StrictBool = Field( + description="Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP." + ) + next_renewal_or_expiration_date: Optional[date] = Field( + default=None, + description="When the campaign would be due for its next renew/bill date.", + alias="nextRenewalOrExpirationDate", + ) + + __properties: ClassVar[List[str]] = [ + "accountId", + "campaignId", + "cspId", + "resellerId", + "status", + "createDate", + "autoRenewal", + "billedDate", + "brandId", + "usecase", + "subUsecases", + "description", + "embeddedLink", + "embeddedPhone", + "affiliateMarketing", + "numberPool", + "ageGated", + "directLending", + "subscriberOptin", + "subscriberOptout", + "subscriberHelp", + "sample1", + "sample2", + "sample3", + "sample4", + "sample5", + "messageFlow", + "helpMessage", + "optinKeywords", + "optoutKeywords", + "helpKeywords", + "optinMessage", + "optoutMessage", + "referenceId", + "mock", + "nextRenewalOrExpirationDate", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCCampaign from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if reseller_id (nullable) is None + # and model_fields_set contains the field + if self.reseller_id is None and "reseller_id" in self.model_fields_set: + _dict["resellerId"] = None + + # set to None if billed_date (nullable) is None + # and model_fields_set contains the field + if self.billed_date is None and "billed_date" in self.model_fields_set: + _dict["billedDate"] = None + + # set to None if sample2 (nullable) is None + # and model_fields_set contains the field + if self.sample2 is None and "sample2" in self.model_fields_set: + _dict["sample2"] = None + + # set to None if sample3 (nullable) is None + # and model_fields_set contains the field + if self.sample3 is None and "sample3" in self.model_fields_set: + _dict["sample3"] = None + + # set to None if sample4 (nullable) is None + # and model_fields_set contains the field + if self.sample4 is None and "sample4" in self.model_fields_set: + _dict["sample4"] = None + + # set to None if sample5 (nullable) is None + # and model_fields_set contains the field + if self.sample5 is None and "sample5" in self.model_fields_set: + _dict["sample5"] = None + + # set to None if message_flow (nullable) is None + # and model_fields_set contains the field + if self.message_flow is None and "message_flow" in self.model_fields_set: + _dict["messageFlow"] = None + + # set to None if help_message (nullable) is None + # and model_fields_set contains the field + if self.help_message is None and "help_message" in self.model_fields_set: + _dict["helpMessage"] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict["referenceId"] = None + + # set to None if next_renewal_or_expiration_date (nullable) is None + # and model_fields_set contains the field + if ( + self.next_renewal_or_expiration_date is None + and "next_renewal_or_expiration_date" in self.model_fields_set + ): + _dict["nextRenewalOrExpirationDate"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCCampaign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "campaignId": obj.get("campaignId"), + "cspId": obj.get("cspId"), + "resellerId": obj.get("resellerId"), + "status": obj.get("status"), + "createDate": obj.get("createDate"), + "autoRenewal": obj.get("autoRenewal"), + "billedDate": obj.get("billedDate"), + "brandId": obj.get("brandId"), + "usecase": obj.get("usecase"), + "subUsecases": obj.get("subUsecases"), + "description": obj.get("description"), + "embeddedLink": ( + obj.get("embeddedLink") + if obj.get("embeddedLink") is not None + else False + ), + "embeddedPhone": ( + obj.get("embeddedPhone") + if obj.get("embeddedPhone") is not None + else False + ), + "affiliateMarketing": obj.get("affiliateMarketing"), + "numberPool": ( + obj.get("numberPool") + if obj.get("numberPool") is not None + else False + ), + "ageGated": obj.get("ageGated"), + "directLending": obj.get("directLending"), + "subscriberOptin": ( + obj.get("subscriberOptin") + if obj.get("subscriberOptin") is not None + else False + ), + "subscriberOptout": ( + obj.get("subscriberOptout") + if obj.get("subscriberOptout") is not None + else False + ), + "subscriberHelp": ( + obj.get("subscriberHelp") + if obj.get("subscriberHelp") is not None + else False + ), + "sample1": obj.get("sample1"), + "sample2": obj.get("sample2"), + "sample3": obj.get("sample3"), + "sample4": obj.get("sample4"), + "sample5": obj.get("sample5"), + "messageFlow": obj.get("messageFlow"), + "helpMessage": obj.get("helpMessage"), + "optinKeywords": obj.get("optinKeywords"), + "optoutKeywords": obj.get("optoutKeywords"), + "helpKeywords": obj.get("helpKeywords"), + "optinMessage": obj.get("optinMessage"), + "optoutMessage": obj.get("optoutMessage"), + "referenceId": obj.get("referenceId"), + "mock": obj.get("mock"), + "nextRenewalOrExpirationDate": obj.get("nextRenewalOrExpirationDate"), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_campaign_status.py b/freeclimb/models/sms_ten_dlc_campaign_status.py new file mode 100644 index 0000000..604790f --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_campaign_status.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCCampaignStatus(str, Enum): + """ + Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + """ + + """ + allowed enum values + """ + ACTIVE = "ACTIVE" + EXPIRED = "EXPIRED" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCCampaignStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_campaigns_list_result.py b/freeclimb/models/sms_ten_dlc_campaigns_list_result.py new file mode 100644 index 0000000..2eebbab --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_campaigns_list_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCCampaignsListResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTenDLCCampaignsListResult + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + campaigns: Optional[List[SMSTenDLCCampaign]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "campaigns", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCCampaignsListResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in campaigns (list) + _items = [] + if self.campaigns: + for _item_campaigns in self.campaigns: + if _item_campaigns: + _items.append(_item_campaigns.to_dict()) + _dict["campaigns"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if campaigns (nullable) is None + # and model_fields_set contains the field + if self.campaigns is None and "campaigns" in self.model_fields_set: + _dict["campaigns"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCCampaignsListResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "campaigns": ( + [SMSTenDLCCampaign.from_dict(_item) for _item in obj["campaigns"]] + if obj.get("campaigns") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_partner_campaign.py b/freeclimb/models/sms_ten_dlc_partner_campaign.py new file mode 100644 index 0000000..1658b2a --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_partner_campaign.py @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from freeclimb.models.sms_ten_dlc_partner_campaign_brand import ( + SMSTenDLCPartnerCampaignBrand, +) +from freeclimb.models.sms_ten_dlc_partner_campaign_status import ( + SMSTenDLCPartnerCampaignStatus, +) +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCPartnerCampaign( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTenDLCPartnerCampaign + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this Queue.", + alias="accountId", + ) + campaign_id: StrictStr = Field( + description="Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.", + alias="campaignId", + ) + status: Optional[SMSTenDLCPartnerCampaignStatus] = None + create_date: Optional[datetime] = Field( + default=None, + description="Unix timestamp when campaign was created.", + alias="createDate", + ) + brand_id: Annotated[str, Field(strict=True, max_length=8)] = Field( + description="Alphanumeric identifier of the brand associated with this campaign.", + alias="brandId", + ) + usecase: Annotated[str, Field(strict=True, max_length=20)] = Field( + description="Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand." + ) + description: Annotated[str, Field(strict=True, max_length=4096)] = Field( + description="Summary description of this campaign." + ) + embedded_link: Optional[StrictBool] = Field( + default=False, + description="Does message generated by the campaign include URL link in SMS?", + alias="embeddedLink", + ) + embedded_phone: Optional[StrictBool] = Field( + default=False, + description="Does message generated by the campaign include phone number in SMS?", + alias="embeddedPhone", + ) + affiliate_marketing: Optional[StrictBool] = Field( + default=None, + description="Does message content controlled by affiliate marketing other than the brand?", + alias="affiliateMarketing", + ) + number_pool: Optional[StrictBool] = Field( + default=False, + description="Does campaign utilize pool of phone nubers?", + alias="numberPool", + ) + age_gated: Optional[StrictBool] = Field( + default=None, description="Age gated content in campaign.", alias="ageGated" + ) + direct_lending: Optional[StrictBool] = Field(default=None, alias="directLending") + subscriber_optin: Optional[StrictBool] = Field( + default=False, + description="Does campaign require subscriber to opt-in before SMS is sent to subscriber?", + alias="subscriberOptin", + ) + subscriber_optout: Optional[StrictBool] = Field( + default=False, + description="Does campaign support subscriber opt-out keyword(s)?", + alias="subscriberOptout", + ) + subscriber_help: Optional[StrictBool] = Field( + default=False, + description="Does campaign responds to help keyword(s)?", + alias="subscriberHelp", + ) + sample1: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 1 or more message samples.", + ) + sample2: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 2 or more message samples.", + ) + sample3: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 3 or more message samples.", + ) + sample4: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 4 or more message samples.", + ) + sample5: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field( + default=None, + description="Message sample. Some campaign tiers require 5 or more message samples.", + ) + message_flow: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field( + default=None, description="Message flow description.", alias="messageFlow" + ) + help_message: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Help message of the campaign.", alias="helpMessage" + ) + optin_keywords: Optional[Annotated[str, Field(strict=True, max_length=255)]] = ( + Field( + default=None, + description="Subscriber opt-in keywords. Multiple keywords are comma separated without space.", + alias="optinKeywords", + ) + ) + optout_keywords: Optional[Annotated[str, Field(strict=True, max_length=255)]] = ( + Field( + default=None, + description="Subscriber opt-out keywords. Multiple keywords are comma separated without space.", + alias="optoutKeywords", + ) + ) + help_keywords: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="Subscriber help keywords. Multiple keywords are comma separated without space.", + alias="helpKeywords", + ) + optin_message: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Subscriber opt-in message.", alias="optinMessage" + ) + optout_message: Optional[Annotated[str, Field(strict=True, max_length=255)]] = ( + Field( + default=None, + description="Subscriber opt-out message.", + alias="optoutMessage", + ) + ) + brand: Optional[SMSTenDLCPartnerCampaignBrand] = None + + __properties: ClassVar[List[str]] = [ + "accountId", + "campaignId", + "status", + "createDate", + "brandId", + "usecase", + "description", + "embeddedLink", + "embeddedPhone", + "affiliateMarketing", + "numberPool", + "ageGated", + "directLending", + "subscriberOptin", + "subscriberOptout", + "subscriberHelp", + "sample1", + "sample2", + "sample3", + "sample4", + "sample5", + "messageFlow", + "helpMessage", + "optinKeywords", + "optoutKeywords", + "helpKeywords", + "optinMessage", + "optoutMessage", + "brand", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCPartnerCampaign from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of brand + if self.brand: + _dict["brand"] = self.brand.to_dict() + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if sample2 (nullable) is None + # and model_fields_set contains the field + if self.sample2 is None and "sample2" in self.model_fields_set: + _dict["sample2"] = None + + # set to None if sample3 (nullable) is None + # and model_fields_set contains the field + if self.sample3 is None and "sample3" in self.model_fields_set: + _dict["sample3"] = None + + # set to None if sample4 (nullable) is None + # and model_fields_set contains the field + if self.sample4 is None and "sample4" in self.model_fields_set: + _dict["sample4"] = None + + # set to None if sample5 (nullable) is None + # and model_fields_set contains the field + if self.sample5 is None and "sample5" in self.model_fields_set: + _dict["sample5"] = None + + # set to None if message_flow (nullable) is None + # and model_fields_set contains the field + if self.message_flow is None and "message_flow" in self.model_fields_set: + _dict["messageFlow"] = None + + # set to None if help_message (nullable) is None + # and model_fields_set contains the field + if self.help_message is None and "help_message" in self.model_fields_set: + _dict["helpMessage"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCPartnerCampaign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "campaignId": obj.get("campaignId"), + "status": obj.get("status"), + "createDate": obj.get("createDate"), + "brandId": obj.get("brandId"), + "usecase": obj.get("usecase"), + "description": obj.get("description"), + "embeddedLink": ( + obj.get("embeddedLink") + if obj.get("embeddedLink") is not None + else False + ), + "embeddedPhone": ( + obj.get("embeddedPhone") + if obj.get("embeddedPhone") is not None + else False + ), + "affiliateMarketing": obj.get("affiliateMarketing"), + "numberPool": ( + obj.get("numberPool") + if obj.get("numberPool") is not None + else False + ), + "ageGated": obj.get("ageGated"), + "directLending": obj.get("directLending"), + "subscriberOptin": ( + obj.get("subscriberOptin") + if obj.get("subscriberOptin") is not None + else False + ), + "subscriberOptout": ( + obj.get("subscriberOptout") + if obj.get("subscriberOptout") is not None + else False + ), + "subscriberHelp": ( + obj.get("subscriberHelp") + if obj.get("subscriberHelp") is not None + else False + ), + "sample1": obj.get("sample1"), + "sample2": obj.get("sample2"), + "sample3": obj.get("sample3"), + "sample4": obj.get("sample4"), + "sample5": obj.get("sample5"), + "messageFlow": obj.get("messageFlow"), + "helpMessage": obj.get("helpMessage"), + "optinKeywords": obj.get("optinKeywords"), + "optoutKeywords": obj.get("optoutKeywords"), + "helpKeywords": obj.get("helpKeywords"), + "optinMessage": obj.get("optinMessage"), + "optoutMessage": obj.get("optoutMessage"), + "brand": ( + SMSTenDLCPartnerCampaignBrand.from_dict(obj["brand"]) + if obj.get("brand") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_partner_campaign_brand.py b/freeclimb/models/sms_ten_dlc_partner_campaign_brand.py new file mode 100644 index 0000000..db9f3f0 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_partner_campaign_brand.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCPartnerCampaignBrand( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTenDLCPartnerCampaignBrand + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="ID of the account that created this Queue.", + alias="accountId", + ) + brand_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier assigned to the brand by the registry.", + alias="brandId", + ) + first_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="First or given name. ", alias="firstName" + ) + last_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="Last or Surname.", alias="lastName" + ) + display_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="Display or marketing name of the brand.", + alias="displayName", + ) + company_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="(Required for Non-profit/private/public) Legal company name.", + alias="companyName", + ) + phone: Annotated[str, Field(strict=True, max_length=20)] = Field( + description="Valid phone number in e.164 international format." + ) + email: Annotated[str, Field(strict=True, max_length=100)] = Field( + description="Valid email address of brand support contact." + ) + website: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="Brand website URL." + ) + optional_attributes: Optional[Dict[str, Any]] = Field( + default=None, + description="Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.", + alias="optionalAttributes", + ) + evp_vetting_score: Optional[StrictInt] = Field( + default=None, description="External vetting score.", alias="evpVettingScore" + ) + + __properties: ClassVar[List[str]] = [ + "accountId", + "brandId", + "firstName", + "lastName", + "displayName", + "companyName", + "phone", + "email", + "website", + "optionalAttributes", + "evpVettingScore", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCPartnerCampaignBrand from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "brand_id", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCPartnerCampaignBrand from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "brandId": obj.get("brandId"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "displayName": obj.get("displayName"), + "companyName": obj.get("companyName"), + "phone": obj.get("phone"), + "email": obj.get("email"), + "website": obj.get("website"), + "optionalAttributes": obj.get("optionalAttributes"), + "evpVettingScore": obj.get("evpVettingScore"), + } + ) + return _obj diff --git a/freeclimb/models/sms_ten_dlc_partner_campaign_status.py b/freeclimb/models/sms_ten_dlc_partner_campaign_status.py new file mode 100644 index 0000000..9d183d4 --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_partner_campaign_status.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTenDLCPartnerCampaignStatus(str, Enum): + """ + Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + """ + + """ + allowed enum values + """ + ACTIVE = "ACTIVE" + EXPIRED = "EXPIRED" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTenDLCPartnerCampaignStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.py b/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.py new file mode 100644 index 0000000..7ee5bca --- /dev/null +++ b/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTenDLCPartnerCampaignsListResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTenDLCPartnerCampaignsListResult + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + partner_campaigns: Optional[List[SMSTenDLCPartnerCampaign]] = Field( + default=None, alias="partnerCampaigns" + ) + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "partnerCampaigns", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTenDLCPartnerCampaignsListResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in partner_campaigns (list) + _items = [] + if self.partner_campaigns: + for _item_partner_campaigns in self.partner_campaigns: + if _item_partner_campaigns: + _items.append(_item_partner_campaigns.to_dict()) + _dict["partnerCampaigns"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if partner_campaigns (nullable) is None + # and model_fields_set contains the field + if ( + self.partner_campaigns is None + and "partner_campaigns" in self.model_fields_set + ): + _dict["partnerCampaigns"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTenDLCPartnerCampaignsListResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "partnerCampaigns": ( + [ + SMSTenDLCPartnerCampaign.from_dict(_item) + for _item in obj["partnerCampaigns"] + ] + if obj.get("partnerCampaigns") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/sms_toll_free_campaign.py b/freeclimb/models/sms_toll_free_campaign.py new file mode 100644 index 0000000..b06aec2 --- /dev/null +++ b/freeclimb/models/sms_toll_free_campaign.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.sms_toll_free_campaign_registration_status import ( + SMSTollFreeCampaignRegistrationStatus, +) +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTollFreeCampaign( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTollFreeCampaign + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + description="ID of the account that created this toll-free campaign", + alias="accountId", + ) + campaign_id: StrictStr = Field( + description="Alphanumeric identifier used by the platform to identify this toll-free campaign", + alias="campaignId", + ) + use_case: StrictStr = Field(alias="useCase") + registration_status: SMSTollFreeCampaignRegistrationStatus = Field( + alias="registrationStatus" + ) + date_created: StrictStr = Field(alias="dateCreated") + date_updated: StrictStr = Field(alias="dateUpdated") + revision: StrictInt + + __properties: ClassVar[List[str]] = [ + "accountId", + "campaignId", + "useCase", + "registrationStatus", + "dateCreated", + "dateUpdated", + "revision", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTollFreeCampaign from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTollFreeCampaign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "campaignId": obj.get("campaignId"), + "useCase": obj.get("useCase"), + "registrationStatus": obj.get("registrationStatus"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + } + ) + return _obj diff --git a/freeclimb/models/sms_toll_free_campaign_registration_status.py b/freeclimb/models/sms_toll_free_campaign_registration_status.py new file mode 100644 index 0000000..94dc126 --- /dev/null +++ b/freeclimb/models/sms_toll_free_campaign_registration_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SMSTollFreeCampaignRegistrationStatus(str, Enum): + """ + Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. + """ + + """ + allowed enum values + """ + UNREGISTERED = "UNREGISTERED" + INITIATED = "INITIATED" + PENDING = "PENDING" + DECLINED = "DECLINED" + REGISTERED = "REGISTERED" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SMSTollFreeCampaignRegistrationStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/sms_toll_free_campaigns_list_result.py b/freeclimb/models/sms_toll_free_campaigns_list_result.py new file mode 100644 index 0000000..2783129 --- /dev/null +++ b/freeclimb/models/sms_toll_free_campaigns_list_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.sms_toll_free_campaign import SMSTollFreeCampaign +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class SMSTollFreeCampaignsListResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + SMSTollFreeCampaignsListResult + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + brands: Optional[List[SMSTollFreeCampaign]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "brands", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SMSTollFreeCampaignsListResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in brands (list) + _items = [] + if self.brands: + for _item_brands in self.brands: + if _item_brands: + _items.append(_item_brands.to_dict()) + _dict["brands"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if brands (nullable) is None + # and model_fields_set contains the field + if self.brands is None and "brands" in self.model_fields_set: + _dict["brands"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SMSTollFreeCampaignsListResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "brands": ( + [SMSTollFreeCampaign.from_dict(_item) for _item in obj["brands"]] + if obj.get("brands") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/start_record_call.py b/freeclimb/models/start_record_call.py new file mode 100644 index 0000000..6cfd836 --- /dev/null +++ b/freeclimb/models/start_record_call.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class StartRecordCall( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `StartRecordCall` command records the current call and returns the URL of a file containing the audio recording when recording completes. `StartRecordCall` is non-blocking. After recording of the current call begins, control of the call moves to the PerCL command that follows `StartRecordCall` in the current PerCL script. + """ # noqa: E501 + + command: StrictStr = "StartRecordCall" + + __properties: ClassVar[List[str]] = ["command"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StartRecordCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StartRecordCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"command": obj.get("command")}) + return _obj diff --git a/freeclimb/models/terminate_conference.py b/freeclimb/models/terminate_conference.py new file mode 100644 index 0000000..b6e664e --- /dev/null +++ b/freeclimb/models/terminate_conference.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class TerminateConference( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `TerminateConference` command terminates an existing Conference. Any active participants are hung up on by FreeClimb. If this is not the desired behavior, use the `RemoveFromConference` command to unbridge Calls that should not be hung up. Note: The Call requesting TerminateConference must be on the same Conference for this command to execute. + """ # noqa: E501 + + command: StrictStr = "TerminateConference" + + __properties: ClassVar[List[str]] = ["command"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TerminateConference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TerminateConference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"command": obj.get("command")}) + return _obj diff --git a/freeclimb/models/tfn.py b/freeclimb/models/tfn.py new file mode 100644 index 0000000..7a95c52 --- /dev/null +++ b/freeclimb/models/tfn.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class TFN( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + TollFree Campaign details for this number + """ # noqa: E501 + + campaign_id: StrictStr = Field( + description="alphanumeric identifier for the TollFree campaign associated with this number", + alias="campaignId", + ) + + __properties: ClassVar[List[str]] = ["campaignId"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TFN from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TFN from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"campaignId": obj.get("campaignId")}) + return _obj diff --git a/freeclimb/models/transcribe_reason.py b/freeclimb/models/transcribe_reason.py new file mode 100644 index 0000000..f29c3cb --- /dev/null +++ b/freeclimb/models/transcribe_reason.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TranscribeReason(str, Enum): + """ + TranscribeReason + """ + + """ + allowed enum values + """ + INTERNAL_ERROR = "internalError" + HANGUP = "hangup" + MAX_LENGTH = "maxLength" + DIGIT = "digit" + NO_INPUT = "noInput" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TranscribeReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/model/answered_by.py b/freeclimb/models/transcribe_term_reason.py similarity index 57% rename from freeclimb/model/answered_by.py rename to freeclimb/models/transcribe_term_reason.py index 872fea7..c01f9a6 100644 --- a/freeclimb/model/answered_by.py +++ b/freeclimb/models/transcribe_term_reason.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum +from typing_extensions import Self + -# class syntax -class AnsweredBy(str, Enum): - HUMAN= "human", - MACHINE= "machine", +class TranscribeTermReason(str, Enum): + """ + TranscribeTermReason + """ + """ + allowed enum values + """ + ERROR = "error" + COMPLETED = "completed" + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TranscribeTermReason from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/transcribe_utterance.py b/freeclimb/models/transcribe_utterance.py new file mode 100644 index 0000000..77c3b98 --- /dev/null +++ b/freeclimb/models/transcribe_utterance.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.percl_command import PerclCommand +from freeclimb.models.transcribe_utterance_record import TranscribeUtteranceRecord +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class TranscribeUtterance( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed. `TranscribeUtterance` is blocking and is a terminal command. As such, the actionUrl property is required, and control of the Call picks up using the `PerCL` returned in response of the `actionUrl`. Recording and Transcription information is returned in the actionUrl request. If the reason this command ended was due to the call hanging up, any PerCL returned will not execute. + """ # noqa: E501 + + action_url: StrictStr = Field(alias="actionUrl") + play_beep: Optional[StrictBool] = Field(default=False, alias="playBeep") + record: Optional[TranscribeUtteranceRecord] = None + privacy_for_logging: Optional[StrictBool] = Field( + default=False, alias="privacyForLogging" + ) + privacy_for_recording: Optional[StrictBool] = Field( + default=False, alias="privacyForRecording" + ) + prompts: Optional[List[PerclCommand]] = None + command: StrictStr = "TranscribeUtterance" + + __properties: ClassVar[List[str]] = [ + "command", + "actionUrl", + "playBeep", + "record", + "privacyForLogging", + "privacyForRecording", + "prompts", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TranscribeUtterance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of record + if self.record: + _dict["record"] = self.record.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in prompts (list) + _items = [] + if self.prompts: + for _item_prompts in self.prompts: + if _item_prompts: + _items.append(_item_prompts.to_dict()) + _dict["prompts"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TranscribeUtterance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "command": obj.get("command"), + "actionUrl": obj.get("actionUrl"), + "playBeep": ( + obj.get("playBeep") if obj.get("playBeep") is not None else False + ), + "record": ( + TranscribeUtteranceRecord.from_dict(obj["record"]) + if obj.get("record") is not None + else None + ), + "privacyForLogging": ( + obj.get("privacyForLogging") + if obj.get("privacyForLogging") is not None + else False + ), + "privacyForRecording": ( + obj.get("privacyForRecording") + if obj.get("privacyForRecording") is not None + else False + ), + "prompts": ( + [PerclCommand.from_dict(_item) for _item in obj["prompts"]] + if obj.get("prompts") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/transcribe_utterance_record.py b/freeclimb/models/transcribe_utterance_record.py new file mode 100644 index 0000000..b607358 --- /dev/null +++ b/freeclimb/models/transcribe_utterance_record.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class TranscribeUtteranceRecord( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + TranscribeUtteranceRecord + """ # noqa: E501 + + save_recording: Optional[StrictBool] = Field(default=False, alias="saveRecording") + max_length_sec: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field( + default=60, alias="maxLengthSec" + ) + rcrd_termination_silence_time_ms: Optional[ + Annotated[int, Field(le=3000, strict=True, ge=1)] + ] = Field(default=None, alias="rcrdTerminationSilenceTimeMs") + + __properties: ClassVar[List[str]] = [ + "saveRecording", + "maxLengthSec", + "rcrdTerminationSilenceTimeMs", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TranscribeUtteranceRecord from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TranscribeUtteranceRecord from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "saveRecording": ( + obj.get("saveRecording") + if obj.get("saveRecording") is not None + else False + ), + "maxLengthSec": ( + obj.get("maxLengthSec") + if obj.get("maxLengthSec") is not None + else 60 + ), + "rcrdTerminationSilenceTimeMs": obj.get("rcrdTerminationSilenceTimeMs"), + } + ) + return _obj diff --git a/freeclimb/models/transcribe_webhook.py b/freeclimb/models/transcribe_webhook.py new file mode 100644 index 0000000..22d655b --- /dev/null +++ b/freeclimb/models/transcribe_webhook.py @@ -0,0 +1,266 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.barge_in_reason import BargeInReason +from freeclimb.models.record_utterance_term_reason import RecordUtteranceTermReason +from freeclimb.models.transcribe_reason import TranscribeReason +from freeclimb.models.transcribe_term_reason import TranscribeTermReason +from freeclimb.models.webhook import Webhook +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class TranscribeWebhook( + Webhook, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + TranscribeWebhook + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, + description="The context or reason why this request is being made. Will be transcribe - The TranscribeUtterance command has completed and its actionUrl is being invoked.", + alias="requestType", + ) + account_id: Optional[StrictStr] = Field( + default=None, + description="Account ID associated with your account.", + alias="accountId", + ) + call_id: Optional[StrictStr] = Field( + default=None, + description="Unique identifier for this Call, generated by FreeClimb", + alias="callId", + ) + var_from: Optional[StrictStr] = Field( + default=None, + description="Phone number of the party that initiated the Call (in E.164 format).", + alias="from", + ) + to: Optional[StrictStr] = Field( + default=None, + description="Phone number provisioned to the customer and to which this Call is directed (in E.164 format).", + ) + recording_id: Optional[StrictStr] = Field( + default=None, + description="The ID of the recording. If no recording was made due to errors or the 'saveRecording' flag being disabled this field will be set to null.", + alias="recordingId", + ) + recording_url: Optional[StrictStr] = Field( + default=None, + description="The URL of the recorded audio file. This URL can be used as is in a Play command to play the recording (no authentication needed). It can also be used to download the recording file via the REST API.", + alias="recordingUrl", + ) + recording_size: Optional[StrictInt] = Field( + default=None, + description="The size of the recording in bytes.", + alias="recordingSize", + ) + recording_format: Optional[StrictStr] = Field( + default=None, + description="The media type of the recording.", + alias="recordingFormat", + ) + recording_duration_ms: Optional[StrictInt] = Field( + default=None, + description="The duration of the recorded audio in milliseconds.", + alias="recordingDurationMs", + ) + term_reason: Optional[TranscribeTermReason] = Field( + default=None, alias="termReason" + ) + record_term_reason: Optional[RecordUtteranceTermReason] = Field( + default=None, alias="recordTermReason" + ) + digit: Optional[StrictStr] = Field( + default=None, + description="If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null.", + ) + privacy_for_logging: Optional[StrictBool] = Field( + default=None, + description="Echo back of the privacyForLogging flag as specified in the transcribe utterance command – confirmation of logging protection has been applied. Can be used by application to know it should also apply protection when handling this request.", + alias="privacyForLogging", + ) + privacy_for_recording: Optional[StrictBool] = Field( + default=None, + description="Echo back of the privacyForRecording flag as specified in the transcribe utterance command – confirmation of logging protection has been applied. Can be used by application to know it should also apply protection when handling this request.", + alias="privacyForRecording", + ) + barge_in_reason: Optional[BargeInReason] = Field( + default=None, alias="bargeInReason" + ) + barged_in_prompt_no: Optional[StrictInt] = Field( + default=None, alias="bargedInPromptNo" + ) + barged_in_prompt_ms: Optional[StrictInt] = Field( + default=None, + description="duration in ms bargedInPromptNo prompt was executing until barge-in occurred.", + alias="bargedInPromptMs", + ) + barged_in_prompt_loop_no: Optional[StrictInt] = Field( + default=None, alias="bargedInPromptLoopNo" + ) + barge_in_time_ms: Optional[StrictInt] = Field( + default=None, description="epoch time in ms", alias="bargeInTimeMs" + ) + transcript: Optional[StrictStr] = Field( + default=None, + description="Transcribed text of the recording. Can be empty or null. null means there was a failure in transcribing the audio, refer to transcribeReason for detailed failure reason.", + ) + transcribe_reason: Optional[TranscribeReason] = Field( + default=None, alias="transcribeReason" + ) + transcription_duration_ms: Optional[StrictInt] = Field( + default=None, + description="The duration of the audio being transcribed in milliseconds", + alias="transcriptionDurationMs", + ) + + __properties: ClassVar[List[str]] = [ + "requestType", + "accountId", + "callId", + "from", + "to", + "recordingId", + "recordingUrl", + "recordingSize", + "recordingFormat", + "recordingDurationMs", + "termReason", + "recordTermReason", + "digit", + "privacyForLogging", + "privacyForRecording", + "bargeInReason", + "bargedInPromptNo", + "bargedInPromptMs", + "bargedInPromptLoopNo", + "bargeInTimeMs", + "transcript", + "transcribeReason", + "transcriptionDurationMs", + ] + + @classmethod + def deserialize(cls, payload: str) -> Optional[Self]: + return cls.from_json(payload) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TranscribeWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if recording_id (nullable) is None + # and model_fields_set contains the field + if self.recording_id is None and "recording_id" in self.model_fields_set: + _dict["recordingId"] = None + + # set to None if recording_url (nullable) is None + # and model_fields_set contains the field + if self.recording_url is None and "recording_url" in self.model_fields_set: + _dict["recordingUrl"] = None + + # set to None if recording_format (nullable) is None + # and model_fields_set contains the field + if ( + self.recording_format is None + and "recording_format" in self.model_fields_set + ): + _dict["recordingFormat"] = None + + # set to None if digit (nullable) is None + # and model_fields_set contains the field + if self.digit is None and "digit" in self.model_fields_set: + _dict["digit"] = None + + # set to None if transcript (nullable) is None + # and model_fields_set contains the field + if self.transcript is None and "transcript" in self.model_fields_set: + _dict["transcript"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TranscribeWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "requestType": obj.get("requestType"), + "accountId": obj.get("accountId"), + "callId": obj.get("callId"), + "from": obj.get("from"), + "to": obj.get("to"), + "recordingId": obj.get("recordingId"), + "recordingUrl": obj.get("recordingUrl"), + "recordingSize": obj.get("recordingSize"), + "recordingFormat": obj.get("recordingFormat"), + "recordingDurationMs": obj.get("recordingDurationMs"), + "termReason": obj.get("termReason"), + "recordTermReason": obj.get("recordTermReason"), + "digit": obj.get("digit"), + "privacyForLogging": obj.get("privacyForLogging"), + "privacyForRecording": obj.get("privacyForRecording"), + "bargeInReason": obj.get("bargeInReason"), + "bargedInPromptNo": obj.get("bargedInPromptNo"), + "bargedInPromptMs": obj.get("bargedInPromptMs"), + "bargedInPromptLoopNo": obj.get("bargedInPromptLoopNo"), + "bargeInTimeMs": obj.get("bargeInTimeMs"), + "transcript": obj.get("transcript"), + "transcribeReason": obj.get("transcribeReason"), + "transcriptionDurationMs": obj.get("transcriptionDurationMs"), + } + ) + return _obj diff --git a/freeclimb/models/unpark.py b/freeclimb/models/unpark.py new file mode 100644 index 0000000..4fd9dcf --- /dev/null +++ b/freeclimb/models/unpark.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.percl_command import PerclCommand +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class Unpark( + PerclCommand, + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), +): + """ + The `Unpark` command resumes a parked call. Execution continues with the first command in the PerCL scripted returned by the actionUrl specified in the Park command as long as the call is still in progress. If the call is no longer in progress, any returned PerCL will not be executed. Unpark is a terminal command -- any commands following it in the same script are not executed. + """ # noqa: E501 + + command: StrictStr = "Unpark" + + __properties: ClassVar[List[str]] = ["command"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Unpark from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Unpark from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"command": obj.get("command")}) + return _obj diff --git a/freeclimb/models/update_call_request.py b/freeclimb/models/update_call_request.py new file mode 100644 index 0000000..97d5477 --- /dev/null +++ b/freeclimb/models/update_call_request.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.update_call_request_status import UpdateCallRequestStatus +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class UpdateCallRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + UpdateCallRequest + """ # noqa: E501 + + status: UpdateCallRequestStatus + + __properties: ClassVar[List[str]] = ["status"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCallRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCallRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"status": obj.get("status")}) + return _obj diff --git a/freeclimb/model/update_call_request_status.py b/freeclimb/models/update_call_request_status.py similarity index 52% rename from freeclimb/model/update_call_request_status.py rename to freeclimb/models/update_call_request_status.py index 8f0b3b0..b4bb46b 100644 --- a/freeclimb/model/update_call_request_status.py +++ b/freeclimb/models/update_call_request_status.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class UpdateCallRequestStatus(str, Enum): - CANCELED= "canceled", - COMPLETED= "completed", +from typing_extensions import Self +class UpdateCallRequestStatus(str, Enum): + """ + Either `canceled` or `completed`. Specifying `canceled` attempts to hang up calls that are queued without affecting calls already in progress. Specifying `completed` attempts to hang up a call already in progress. + """ + + """ + allowed enum values + """ + CANCELED = "canceled" + COMPLETED = "completed" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UpdateCallRequestStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/update_conference_participant_request.py b/freeclimb/models/update_conference_participant_request.py new file mode 100644 index 0000000..1d6e30f --- /dev/null +++ b/freeclimb/models/update_conference_participant_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class UpdateConferenceParticipantRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + UpdateConferenceParticipantRequest + """ # noqa: E501 + + talk: Optional[StrictBool] = Field( + default=None, + description="(Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value.", + ) + listen: Optional[StrictBool] = Field( + default=None, + description="(Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value.", + ) + dtmf_pass_through: Optional[StrictBool] = Field( + default=None, + description="(Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value.", + alias="dtmfPassThrough", + ) + + __properties: ClassVar[List[str]] = ["talk", "listen", "dtmfPassThrough"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateConferenceParticipantRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateConferenceParticipantRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "talk": obj.get("talk"), + "listen": obj.get("listen"), + "dtmfPassThrough": obj.get("dtmfPassThrough"), + } + ) + return _obj diff --git a/freeclimb/models/update_conference_request.py b/freeclimb/models/update_conference_request.py new file mode 100644 index 0000000..b0874bd --- /dev/null +++ b/freeclimb/models/update_conference_request.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.play_beep import PlayBeep +from freeclimb.models.update_conference_request_status import ( + UpdateConferenceRequestStatus, +) +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class UpdateConferenceRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + UpdateConferenceRequest + """ # noqa: E501 + + alias: Optional[StrictStr] = Field( + default=None, + description="Description for this conference. Maximum 64 characters.", + ) + play_beep: Optional[PlayBeep] = Field(default=None, alias="playBeep") + status: Optional[UpdateConferenceRequestStatus] = None + + __properties: ClassVar[List[str]] = ["alias", "playBeep", "status"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateConferenceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if play_beep (nullable) is None + # and model_fields_set contains the field + if self.play_beep is None and "play_beep" in self.model_fields_set: + _dict["playBeep"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateConferenceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "alias": obj.get("alias"), + "playBeep": obj.get("playBeep"), + "status": obj.get("status"), + } + ) + return _obj diff --git a/freeclimb/model/update_conference_request_status.py b/freeclimb/models/update_conference_request_status.py similarity index 55% rename from freeclimb/model/update_conference_request_status.py rename to freeclimb/models/update_conference_request_status.py index 63e6271..9ca9591 100644 --- a/freeclimb/model/update_conference_request_status.py +++ b/freeclimb/models/update_conference_request_status.py @@ -1,41 +1,36 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from freeclimb.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 freeclimb.exceptions import ApiAttributeError + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 +from __future__ import annotations +import json from enum import Enum - -# class syntax -class UpdateConferenceRequestStatus(str, Enum): - EMPTY= "empty", - TERMINATED= "terminated", +from typing_extensions import Self +class UpdateConferenceRequestStatus(str, Enum): + """ + New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.** + """ + + """ + allowed enum values + """ + EMPTY = "empty" + TERMINATED = "terminated" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UpdateConferenceRequestStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/webhook.py b/freeclimb/models/webhook.py new file mode 100644 index 0000000..6904c5b --- /dev/null +++ b/freeclimb/models/webhook.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from importlib import import_module +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from freeclimb.models.add_to_conference_notification_webhook import ( + AddToConferenceNotificationWebhook, + ) + from freeclimb.models.add_to_queue_notification_webhook import ( + AddToQueueNotificationWebhook, + ) + from freeclimb.models.call_control_webhook import CallControlWebhook + from freeclimb.models.call_status_webhook import CallStatusWebhook + from freeclimb.models.conference_recording_status_webhook import ( + ConferenceRecordingStatusWebhook, + ) + from freeclimb.models.conference_status_webhook import ConferenceStatusWebhook + from freeclimb.models.create_conference_webhook import CreateConferenceWebhook + from freeclimb.models.dequeue_webhook import DequeueWebhook + from freeclimb.models.get_digits_webhook import GetDigitsWebhook + from freeclimb.models.get_speech_webhook import GetSpeechWebhook + from freeclimb.models.inbound_call_webhook import InboundCallWebhook + from freeclimb.models.leave_conference_webhook import LeaveConferenceWebhook + from freeclimb.models.machine_detected_webhook import MachineDetectedWebhook + from freeclimb.models.message_delivery_webhook import MessageDeliveryWebhook + from freeclimb.models.message_status_webhook import MessageStatusWebhook + from freeclimb.models.out_dial_api_connect_webhook import OutDialApiConnectWebhook + from freeclimb.models.out_dial_connect_webhook import OutDialConnectWebhook + from freeclimb.models.out_dial_start_webhook import OutDialStartWebhook + from freeclimb.models.queue_wait_webhook import QueueWaitWebhook + from freeclimb.models.record_webhook import RecordWebhook + from freeclimb.models.redirect_webhook import RedirectWebhook + from freeclimb.models.remove_from_queue_notification_webhook import ( + RemoveFromQueueNotificationWebhook, + ) + from freeclimb.models.transcribe_webhook import TranscribeWebhook + + +class Webhook( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + Webhook + """ # noqa: E501 + + request_type: Optional[StrictStr] = Field( + default=None, description="Type of webhook request", alias="requestType" + ) + + __properties: ClassVar[List[str]] = ["requestType"] + + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = "requestType" + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + "addToConferenceNotification": "AddToConferenceNotificationWebhook", + "addToQueueNotification": "AddToQueueNotificationWebhook", + "callControl": "CallControlWebhook", + "callStatus": "CallStatusWebhook", + "conferenceRecordingStatus": "ConferenceRecordingStatusWebhook", + "conferenceStatus": "ConferenceStatusWebhook", + "createConference": "CreateConferenceWebhook", + "dequeue": "DequeueWebhook", + "getDigits": "GetDigitsWebhook", + "getSpeech": "GetSpeechWebhook", + "inboundCall": "InboundCallWebhook", + "leaveConference": "LeaveConferenceWebhook", + "machineDetected": "MachineDetectedWebhook", + "messageDelivery": "MessageDeliveryWebhook", + "messageStatus": "MessageStatusWebhook", + "outDialApiConnect": "OutDialApiConnectWebhook", + "outDialConnect": "OutDialConnectWebhook", + "outDialStart": "OutDialStartWebhook", + "queueWait": "QueueWaitWebhook", + "record": "RecordWebhook", + "redirect": "RedirectWebhook", + "removeFromQueueNotification": "RemoveFromQueueNotificationWebhook", + "transcribe": "TranscribeWebhook", + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[ + Union[ + AddToConferenceNotificationWebhook, + AddToQueueNotificationWebhook, + CallControlWebhook, + CallStatusWebhook, + ConferenceRecordingStatusWebhook, + ConferenceStatusWebhook, + CreateConferenceWebhook, + DequeueWebhook, + GetDigitsWebhook, + GetSpeechWebhook, + InboundCallWebhook, + LeaveConferenceWebhook, + MachineDetectedWebhook, + MessageDeliveryWebhook, + MessageStatusWebhook, + OutDialApiConnectWebhook, + OutDialConnectWebhook, + OutDialStartWebhook, + QueueWaitWebhook, + RecordWebhook, + RedirectWebhook, + RemoveFromQueueNotificationWebhook, + TranscribeWebhook, + ] + ]: + """Create an instance of Webhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + AddToConferenceNotificationWebhook, + AddToQueueNotificationWebhook, + CallControlWebhook, + CallStatusWebhook, + ConferenceRecordingStatusWebhook, + ConferenceStatusWebhook, + CreateConferenceWebhook, + DequeueWebhook, + GetDigitsWebhook, + GetSpeechWebhook, + InboundCallWebhook, + LeaveConferenceWebhook, + MachineDetectedWebhook, + MessageDeliveryWebhook, + MessageStatusWebhook, + OutDialApiConnectWebhook, + OutDialConnectWebhook, + OutDialStartWebhook, + QueueWaitWebhook, + RecordWebhook, + RedirectWebhook, + RemoveFromQueueNotificationWebhook, + TranscribeWebhook, + ] + ]: + """Create an instance of Webhook from a dict""" + # look up the object type based on discriminator mapping + object_type = cls.get_discriminator_value(obj) + if object_type == "AddToConferenceNotificationWebhook": + return import_module( + "freeclimb.models.add_to_conference_notification_webhook" + ).AddToConferenceNotificationWebhook.from_dict(obj) + if object_type == "AddToQueueNotificationWebhook": + return import_module( + "freeclimb.models.add_to_queue_notification_webhook" + ).AddToQueueNotificationWebhook.from_dict(obj) + if object_type == "CallControlWebhook": + return import_module( + "freeclimb.models.call_control_webhook" + ).CallControlWebhook.from_dict(obj) + if object_type == "CallStatusWebhook": + return import_module( + "freeclimb.models.call_status_webhook" + ).CallStatusWebhook.from_dict(obj) + if object_type == "ConferenceRecordingStatusWebhook": + return import_module( + "freeclimb.models.conference_recording_status_webhook" + ).ConferenceRecordingStatusWebhook.from_dict(obj) + if object_type == "ConferenceStatusWebhook": + return import_module( + "freeclimb.models.conference_status_webhook" + ).ConferenceStatusWebhook.from_dict(obj) + if object_type == "CreateConferenceWebhook": + return import_module( + "freeclimb.models.create_conference_webhook" + ).CreateConferenceWebhook.from_dict(obj) + if object_type == "DequeueWebhook": + return import_module( + "freeclimb.models.dequeue_webhook" + ).DequeueWebhook.from_dict(obj) + if object_type == "GetDigitsWebhook": + return import_module( + "freeclimb.models.get_digits_webhook" + ).GetDigitsWebhook.from_dict(obj) + if object_type == "GetSpeechWebhook": + return import_module( + "freeclimb.models.get_speech_webhook" + ).GetSpeechWebhook.from_dict(obj) + if object_type == "InboundCallWebhook": + return import_module( + "freeclimb.models.inbound_call_webhook" + ).InboundCallWebhook.from_dict(obj) + if object_type == "LeaveConferenceWebhook": + return import_module( + "freeclimb.models.leave_conference_webhook" + ).LeaveConferenceWebhook.from_dict(obj) + if object_type == "MachineDetectedWebhook": + return import_module( + "freeclimb.models.machine_detected_webhook" + ).MachineDetectedWebhook.from_dict(obj) + if object_type == "MessageDeliveryWebhook": + return import_module( + "freeclimb.models.message_delivery_webhook" + ).MessageDeliveryWebhook.from_dict(obj) + if object_type == "MessageStatusWebhook": + return import_module( + "freeclimb.models.message_status_webhook" + ).MessageStatusWebhook.from_dict(obj) + if object_type == "OutDialApiConnectWebhook": + return import_module( + "freeclimb.models.out_dial_api_connect_webhook" + ).OutDialApiConnectWebhook.from_dict(obj) + if object_type == "OutDialConnectWebhook": + return import_module( + "freeclimb.models.out_dial_connect_webhook" + ).OutDialConnectWebhook.from_dict(obj) + if object_type == "OutDialStartWebhook": + return import_module( + "freeclimb.models.out_dial_start_webhook" + ).OutDialStartWebhook.from_dict(obj) + if object_type == "QueueWaitWebhook": + return import_module( + "freeclimb.models.queue_wait_webhook" + ).QueueWaitWebhook.from_dict(obj) + if object_type == "RecordWebhook": + return import_module( + "freeclimb.models.record_webhook" + ).RecordWebhook.from_dict(obj) + if object_type == "RedirectWebhook": + return import_module( + "freeclimb.models.redirect_webhook" + ).RedirectWebhook.from_dict(obj) + if object_type == "RemoveFromQueueNotificationWebhook": + return import_module( + "freeclimb.models.remove_from_queue_notification_webhook" + ).RemoveFromQueueNotificationWebhook.from_dict(obj) + if object_type == "TranscribeWebhook": + return import_module( + "freeclimb.models.transcribe_webhook" + ).TranscribeWebhook.from_dict(obj) + + raise ValueError( + "Webhook failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) diff --git a/freeclimb/py.typed b/freeclimb/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/freeclimb/rest.py b/freeclimb/rest.py index 582710b..c1014e5 100644 --- a/freeclimb/rest.py +++ b/freeclimb/rest.py @@ -1,55 +1,69 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 import io import json -import logging import re import ssl -from urllib.parse import urlencode -from urllib.parse import urlparse -from urllib.request import proxy_bypass_environment + import urllib3 -import ipaddress -from freeclimb.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from freeclimb.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -58,70 +72,69 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args["assert_hostname"] = configuration.assert_hostname if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args["retries"] = configuration.retries + + if configuration.tls_server_name: + pool_args["server_hostname"] = configuration.tls_server_name if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args["socket_options"] = configuration.socket_options - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.connection_pool_maxsize is not None: + pool_args["maxsize"] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None, + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: 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. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] if post_params and body: raise ApiValueError( @@ -133,62 +146,84 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) + connect=_request_timeout[0], read=_request_timeout[1] + ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' - if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: + + # no content type provided or payload is json + content_type = headers.get("Content-Type") + if not content_type or re.search("json", content_type, re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False, + ) + elif content_type == "application/x-www-form-urlencoded": r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False, + ) + elif content_type == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers['Content-Type'] + del headers["Content-Type"] + # Ensures that dict objects are serialized + post_params = [ + (a, json.dumps(b)) if isinstance(b, dict) else (a, b) + for a, b in post_params + ] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False, + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False, + ) + elif headers["Content-Type"].startswith("text/") and isinstance( + body, bool + ): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, - headers=headers) + headers=headers, + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -197,151 +232,16 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False, + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - -# end of class RESTClientObject -def is_ipv4(target): - """ Test if IPv4 address or not - """ - try: - chk = ipaddress.IPv4Address(target) - return True - except ipaddress.AddressValueError: - return False - -def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ - try: - nw = ipaddress.IPv4Network(net) - ip = ipaddress.IPv4Address(target) - if ip in nw: - return True - return False - except ipaddress.AddressValueError: - return False - except ipaddress.NetmaskValueError: - return False - -def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies - Test if proxies should not be used for a particular url. - """ - - parsed = urlparse(url) - - # special cases - if parsed.hostname in [None, '']: - return True - - # special cases - if no_proxy in [None , '']: - return False - if no_proxy == '*': - return True - - no_proxy = no_proxy.lower().replace(' ',''); - entries = ( - host for host in no_proxy.split(',') if host - ) - - if is_ipv4(parsed.hostname): - for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} ) + return RESTResponse(r) diff --git a/freeclimb/utils/request_verifier.py b/freeclimb/utils/request_verifier.py index ae907b3..548182a 100644 --- a/freeclimb/utils/request_verifier.py +++ b/freeclimb/utils/request_verifier.py @@ -2,12 +2,18 @@ from freeclimb.utils.signature_information import SignatureInformation + class RequestVerifier: - - DEFAULT_TOLERANCE = 5*60*1000 + + DEFAULT_TOLERANCE = 5 * 60 * 1000 @staticmethod - def verify_request_signature(request_body:str, request_header:str, signing_secret:str, tolerance:int=DEFAULT_TOLERANCE): + def verify_request_signature( + request_body: str, + request_header: str, + signing_secret: str, + tolerance: int = DEFAULT_TOLERANCE, + ): verifier = RequestVerifier() verifier.__check_request_body(request_body) verifier.__check_request_header(request_header) @@ -16,37 +22,45 @@ def verify_request_signature(request_body:str, request_header:str, signing_secre info = SignatureInformation(request_header) verifier.__verify_tolerance(info, tolerance) verifier.__verify_signature(info, request_body, signing_secret) - - def __check_request_body(self, request_body:str): + + def __check_request_body(self, request_body: str): if request_body == "" or request_body == None: raise Exception("Request Body cannot be empty or null") - def __check_request_header(self, request_header:str): - if request_header == "" or request_header == None: + def __check_request_header(self, request_header: str): + if request_header == "" or request_header == None: raise Exception("Error with request header, Request header is empty") - - elif not("t" in request_header) : + + elif not ("t" in request_header): raise Exception("Error with request header, timestamp is not present") - - elif not("v1" in request_header) : + + elif not ("v1" in request_header): raise Exception("Error with request header, signatures are not present") - - def __check_signing_secret(self, signing_secret:str): + def __check_signing_secret(self, signing_secret: str): if signing_secret == "" or signing_secret == None: raise Exception("Signing secret cannot be empty or null") - - def __check_tolerance(self, tolerance:int): + + def __check_tolerance(self, tolerance: int): if tolerance <= 0 or tolerance >= sys.maxsize: raise Exception("Tolerance value must be a positive integer") - - def __verify_tolerance(self, info:SignatureInformation, tolerance:int): - currentTime = info.get_current_unix_time() - if not(info.is_request_time_valid(tolerance)): - raise Exception("Request time exceeded tolerance threshold. Request: " + str(info.request_timestamp) - + ", CurrentTime: " + str(currentTime) + ", tolerance: " + str(tolerance)) - def __verify_signature(self, info:SignatureInformation, request_body:str, signing_secret:str): - if not(info.is_signature_safe(request_body, signing_secret)): - raise Exception("Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret") + def __verify_tolerance(self, info: SignatureInformation, tolerance: int): + currentTime = info.get_current_unix_time() + if not (info.is_request_time_valid(tolerance)): + raise Exception( + "Request time exceeded tolerance threshold. Request: " + + str(info.request_timestamp) + + ", CurrentTime: " + + str(currentTime) + + ", tolerance: " + + str(tolerance) + ) + def __verify_signature( + self, info: SignatureInformation, request_body: str, signing_secret: str + ): + if not (info.is_signature_safe(request_body, signing_secret)): + raise Exception( + "Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret" + ) diff --git a/freeclimb/utils/signature_information.py b/freeclimb/utils/signature_information.py index b1c7a8d..1f8f312 100644 --- a/freeclimb/utils/signature_information.py +++ b/freeclimb/utils/signature_information.py @@ -1,30 +1,35 @@ import time, hmac, hashlib + class SignatureInformation: - request_timestamp:int = 0 + request_timestamp: int = 0 signatures = [] - def __init__(self, request_header:str): + def __init__(self, request_header: str): signature_headers = request_header.split(",") for signature in signature_headers: header, value = signature.split("=") if header == "t": self.request_timestamp = int(value) elif header == "v1": - self.signatures.append(value) - - def is_request_time_valid(self, tolerance:int) -> bool: + self.signatures.append(value) + + def is_request_time_valid(self, tolerance: int) -> bool: current_time = self.get_current_unix_time() - time_calculation:int = self.request_timestamp + tolerance + time_calculation: int = self.request_timestamp + tolerance return current_time < (time_calculation) - def is_signature_safe(self, requestBody:str, signingSecret:str) -> bool: + def is_signature_safe(self, requestBody: str, signingSecret: str) -> bool: hashValue = self.__compute_hash(requestBody, signingSecret) return hashValue in self.signatures - def __compute_hash(self, requestBody:str, signingSecret:str) -> str: + def __compute_hash(self, requestBody: str, signingSecret: str) -> str: data = str(self.request_timestamp) + "." + requestBody - return hmac.new(bytes(signingSecret, 'utf-8'), data.encode('utf-8'), digestmod=hashlib.sha256).hexdigest() + return hmac.new( + bytes(signingSecret, "utf-8"), + data.encode("utf-8"), + digestmod=hashlib.sha256, + ).hexdigest() def get_current_unix_time(self) -> int: return int(time.time()) diff --git a/openapi.json b/openapi.json index 554dc8c..16e3520 100644 --- a/openapi.json +++ b/openapi.json @@ -22,7 +22,6 @@ "in": "path", "description": "ID of the account", "required": true, - "x-account-id": true, "schema": { "type": "string" } @@ -84,8 +83,6 @@ "AccountStatus": { "type": "string", "enum": ["closed", "suspended", "active"], - "x-enum-varnames": ["CLOSED", "SUSPENDED", "ACTIVE"], - "x-enum": true, "description": "The status of this account. It is one of: active, suspended, or closed.", "nullable": true }, @@ -93,24 +90,18 @@ "type": "string", "description": "The type of this account. It is one of: trial or full.", "enum": ["trial", "full"], - "x-enum": true, - "x-enum-varnames": ["TRIAL", "FULL"], "nullable": true }, "AnsweredBy": { "type": "string", "nullable": true, "enum": ["human", "machine"], - "x-enum-varnames": ["HUMAN", "MACHINE"], - "x-enum": true, "description": "If this Call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise." }, "CallDirection": { "type": "string", "nullable": true, "enum": ["inbound", "outboundAPI", "outboundDial"], - "x-enum-varnames": ["INBOUND", "OUTBOUND_API", "OUTBOUND_DIAL"], - "x-enum": true, "description": "Direction of the Call. `inbound` for Calls into FreeClimb, `outboundAPI` for Calls initiated via the REST API, `outboundDial` for Calls initiated by the `OutDial` PerCL command." }, "CallStatus": { @@ -126,25 +117,52 @@ "busy", "noAnswer" ], - "x-enum-varnames": [ - "QUEUED", - "RINGING", - "IN_PROGRESS", - "CANCELED", - "COMPLETED", - "FAILED", - "BUSY", - "NO_ANSWER" - ], - "x-enum": true, "description": "* `queued` – Call is ready and waiting in line before going out. * `ringing` – Call is currently ringing. * `inProgress` – Call was answered and is currently in progress. * `canceled` – Call was hung up while it was queued or ringing. * `completed` – Call was answered and has ended normally. * `busy` – Caller received a busy signal. * `failed` – Call could not be completed as dialed, most likely because the phone number was non-existent. * `noAnswer` – Call ended without being answered." }, + "CallEndedReason": { + "type": "string", + "nullable": true, + "enum": [ + "busy", + "failed", + "noAnswer", + "callCanceled", + "farEndHangup", + "appHangup", + "appReject", + "appNoPercl", + "appInvalidPercl", + "conferenceTerminated", + "conferenceEmptied", + "removedFromConference", + "machineDetected", + "webhookFailed", + "webhookInvalidResponse", + "voiceDisabled", + "configErrorNoApplication", + "configErrorNoVoiceUrl", + "maxRedirectsError", + "perclProcessingError", + "internalError", + "grpcHangup", + "maxDuration" + ], + "description": "Enhanced status for the Call with additional information where available." + }, + "GetDigitsReason": { + "type": "string", + "enum": [ + "finishKey", + "timeout", + "maxDigits", + "tone" + ], + "description": "This field explains how the GetDigits action ended. The value is one of the below: •finishKey - The finish key as specified had been pressed by the caller. Digit string has all keys up to, but not including, the finish key. •timeout - The timeout limit was reached prior to any other criteria being met. If any digits were collected, they will be included. •maxDigits - The maximum number of digits was reached and digit collection ended. •tone - Answering machine or fax tone detection occurred, interrupting digit collection. Any digits received up to this point are included in this webhook." + }, "ConferenceStatus": { "type": "string", "nullable": true, "enum": ["empty", "populated", "inProgress", "terminated"], - "x-enum-varnames": ["EMPTY", "POPULATED", "IN_PROGRESS", "TERMINATED"], - "x-enum": true, "description": "The status of the Conference. One of: creating, empty, populated, inProgress, or terminated." }, "GetSpeechReason": { @@ -156,16 +174,7 @@ "noInput", "noMatch", "recognition" - ], - "x-enum-varnames": [ - "ERROR", - "HANGUP", - "DIGIT", - "NO_INPUT", - "NO_MATCH", - "RECOGNITION" - ], - "x-enum": true + ] }, "GrammarFileBuiltIn": { "type": "string", @@ -185,39 +194,17 @@ "DIG11", "UP_TO_20_DIGIT_SEQUENCE", "VERSAY_YESNO" - ], - "x-enum-varnames": [ - "ALPHNUM6", - "ANY_DIG", - "DIG1", - "DIG2", - "DIG3", - "DIG4", - "DIG5", - "DIG6", - "DIG7", - "DIG8", - "DIG9", - "DIG10", - "DIG11", - "UP_TO_20_DIGIT_SEQUENCE", - "VERSAY_YESNO" - ], - "x-enum": true + ] }, "GrammarType": { "type": "string", "enum": ["URL", "BUILTIN"], "nullable": true, - "x-enum-varnames": ["URL", "BUILT_IN"], - "x-enum": true, "description": "The grammar file type to use for speech recognition. A value of 'URL' indicates the grammarFile attribute specifies a URL that points to the grammar file. A value of `BUILTIN` indicates the grammarFile attribute specifies the name of one of the platform built-in grammar files." }, "IfMachine": { "type": "string", "enum": ["redirect", "hangup"], - "x-enum-varnames": ["REDIRECT", "HANGUP"], - "x-enum": true, "description": "Specifies how FreeClimb should handle this OutDial if an answering machine answers the Call. Valid values: `redirect` invokes the ifMachineUrl for instructions. `hangup` hangs up the Call. The ifMachineUrl will not be invoked." }, "Language": { @@ -249,56 +236,21 @@ "zh-CN", "zh-HK", "zh-TW" - ], - "x-enum-varnames": [ - "CATALAN", - "DANISH", - "GERMAN", - "ENGLISH_AU", - "ENGLISH_CA", - "ENGLISH_UK", - "ENGLISH_IN", - "ENGLISH_US", - "ENGLISH_ES", - "ENGLISH_MX", - "FINNISH", - "FRENCH_CA", - "FRENCH_FR", - "ITALIAN", - "JAPANESE", - "KOREAN", - "NORWEGIAN", - "DUTCH", - "POLISH", - "PORTUGESE_BR", - "PORTUGESE_PT", - "RUSSIAN", - "SWEDISH", - "CHINESE_CN", - "CHINESE_HK", - "CHINESE_TW" - ], - "x-enum": true + ] }, "LogLevel": { "type": "string", "enum": ["info", "warning", "error"], "nullable": true, - "x-enum-varnames": ["INFO", "WARNING", "ERROR"], - "x-enum": true, "description": "Level of the log. Possible values are info, warning, and error." }, "MachineType": { "type": "string", - "enum": ["answeringMachine", "faxMachine"], - "x-enum-varnames": ["ANSWERING_MACHINE", "FAX_MACHINE"], - "x-enum": true + "enum": ["answering machine", "fax modem"] }, "MessageDirection": { "type": "string", - "enum": ["inbound", "outbound"], - "x-enum-varnames": ["INBOUND", "OUTBOUND"], - "x-enum": true + "enum": ["inbound", "outbound"] }, "MessageStatus": { "type": "string", @@ -316,43 +268,33 @@ "expired", "deleted", "unknown" - ], - "x-enum-varnames": [ - "NEW", - "QUEUED", - "REJECTED", - "SENDING", - "SENT", - "FAILED", - "RECEIVED", - "UNDELIVERED", - "EXPIRED", - "DELETED", - "UNKNOWN" - ], - "x-enum": true + ] }, "PlayBeep": { "type": "string", "nullable": true, "enum": ["always", "never", "entryOnly", "exitOnly"], - "x-enum-varnames": ["ALWAYS", "NEVER", "ENTRY_ONLY", "EXIT_ONLY"], - "x-enum": true, - "description": "Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` ", - "default": "always", - "x-enum-default-attr": "ALWAYS" + "description": "Indicates whether to play a beep when a Participant enters or leaves the Conference. either `always`, `never`, `entryOnly`, or `exitOnly`. Leaving this unset will make conference default to `always` " }, "QueueResultStatus": { "type": "string", - "enum": ["queueFull", "dequeued", "hangup", "systemError"], - "x-enum-varnames": ["QUEUE_FULL", "DEQUEUED", "HANGUP", "SYSTEM_ERROR"], - "x-enum": true + "enum": ["queueFull", "dequeued", "hangup", "systemError"] }, "RecordUtteranceTermReason": { "type": "string", - "enum": ["finishKey", "timeout", "hangup", "maxLength"], - "x-enum-varnames": ["FINISH_KEY", "TIMEOUT", "HANGUP", "MAX_LENGTH"], - "x-enum": true + "enum": ["finishKey", "timeout", "hangup", "maxLength"] + }, + "BargeInReason": { + "type": "string", + "enum": ["noBargeIn", "bargeInByDTMF", "bargeInByEnergy"] + }, + "TranscribeTermReason": { + "type": "string", + "enum": ["error", "completed"] + }, + "TranscribeReason": { + "type": "string", + "enum": ["internalError", "hangup", "maxLength", "digit", "noInput"] }, "RequestType": { "type": "string", @@ -380,120 +322,1590 @@ "conferenceCallControl", "messageDelivery", "messageStatus" - ], - "x-enum-varnames": [ - "INBOUND_CALL", - "RECORD", - "GET_DIGITS", - "GET_SPEECH", - "REDIRECT", - "PAUSE", - "OUT_DIAL_START", - "OUT_DIAL_CONNECT", - "OUT_DIAL_API_CONNECT", - "MACHINE_DETECTED", - "DEQUEUE", - "QUEUE_WAIT", - "ADD_TO_QUEUE_NOTIFICATION", - "REMOVE_FROM_QUEUE_NOTIFICATION", - "CALL_STATUS", - "CREATE_CONFERENCE", - "CONFERENCE_STATUS", - "LEAVE_CONFERENCE", - "ADD_TO_CONFERENCE_NOTIFICATION", - "CONFERENCE_RECORDING_STATUS", - "CONFERENCE_CALL_CONTROL", - "MESSAGE_DELIVERY", - "MESSAGE_STATUS" - ], - "x-enum": true + ] }, "UpdateCallRequestStatus": { "type": "string", "enum": ["canceled", "completed"], - "x-enum-varnames": ["CANCELED", "COMPLETED"], - "x-enum": true, "description": "Either `canceled` or `completed`. Specifying `canceled` attempts to hang up calls that are queued without affecting calls already in progress. Specifying `completed` attempts to hang up a call already in progress." }, "UpdateConferenceRequestStatus": { "type": "string", "enum": ["empty", "terminated"], - "x-enum-varnames": ["EMPTY", "TERMINATED"], - "x-enum": true, "description": "New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.**" }, + "SMSTollFreeCampaignRegistrationStatus": { + "type": "string", + "description": "Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. ", + "enum": [ + "UNREGISTERED", + "INITIATED", + "PENDING", + "DECLINED", + "REGISTERED" + ] + }, + "SMSTenDLCCampaignStatus": { + "type": "string", + "description": "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. ", + "enum": ["ACTIVE", "EXPIRED"] + }, + "SMSTenDLCPartnerCampaignStatus": { + "type": "string", + "description": "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. ", + "enum": ["ACTIVE", "EXPIRED"] + }, + "SMSTenDLCBrandEntityType": { + "maxLength": 20, + "type": "string", + "description": "Entity type behind the brand. This is the form of business establishment.", + "enum": [ + "PRIVATE_PROFIT", + "PUBLIC_PROFIT", + "NON_PROFIT", + "GOVERNMENT", + "SOLE_PROPRIETOR" + ] + }, + "SMSTenDLCBrandRelationship": { + "type": "string", + "description": "Brand relationship to the CSP", + "enum": [ + "BASIC_ACCOUNT", + "SMALL_ACCOUNT", + "MEDIUM_ACCOUNT", + "LARGE_ACCOUNT", + "KEY_ACCOUNT" + ] + }, + "SMSTenDLCBrandStockExchange": { + "type": "string", + "description": "(Required for public company) stock exchange.", + "example": "NASDAQ", + "enum": [ + "NONE", + "NASDAQ", + "NYSE", + "AMEX", + "AMX", + "ASX", + "B3", + "BME", + "BSE", + "FRA", + "ICEX", + "JPX", + "JSE", + "KRX", + "LON", + "NSE", + "OMX", + "SEHK", + "SGX", + "SSE", + "STO", + "SWX", + "SZSE", + "TSX", + "TWSE", + "VSE", + "OTHER" + ] + }, + "SMSTenDLCBrandAltBusinessIdType": { + "type": "string", + "enum": ["NONE", "DUNS", "GIIN", "LEI"], + "description": "The type of the Alternative business identifier" + }, + "SMSTenDLCBrandIdentityStatus": { + "type": "string", + "description": "TCR assessment of the brand identification status.", + "enum": [ + "SELF_DECLARED", + "UNVERIFIED", + "VERIFIED", + "VETTED_VERIFIED" + ] + }, + "CompletionResultStatus": { + "type": "string", + "description": "Completion result status. Possible values: success, no_context", + "enum": ["success", "no_context"] + }, + "SMSTenDLCOptionalAttributes": { + "type": "object", + "description": "Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.", + "additionalProperties": true + }, "PerclScript": { "type": "object", "description": "A PerCL script to be returned to the FreeClimb servers in FreeClimb applications", - "x-percl-script": true, "properties": { "commands": { "type": "array", "description": "A JSON array of PerCL commands", - "x-is-list": true, "items": { "$ref": "#/components/schemas/PerclCommand" } } - } + } + }, + "PerclCommand": { + "type": "object", + "description": "An individual command used in a PerCLScript.", + "discriminator": { + "propertyName": "command", + "mapping": { + "AddToConference": "#/components/schemas/AddToConference", + "CreateConference": "#/components/schemas/CreateConference", + "Dequeue": "#/components/schemas/Dequeue", + "Enqueue": "#/components/schemas/Enqueue", + "GetDigits": "#/components/schemas/GetDigits", + "GetSpeech": "#/components/schemas/GetSpeech", + "Hangup": "#/components/schemas/Hangup", + "OutDial": "#/components/schemas/OutDial", + "Pause": "#/components/schemas/Pause", + "Park": "#/components/schemas/Park", + "Play": "#/components/schemas/Play", + "PlayEarlyMedia": "#/components/schemas/PlayEarlyMedia", + "RecordUtterance": "#/components/schemas/RecordUtterance", + "Redirect": "#/components/schemas/Redirect", + "Reject": "#/components/schemas/Reject", + "RemoveFromConference": "#/components/schemas/RemoveFromConference", + "Say": "#/components/schemas/Say", + "SendDigits": "#/components/schemas/SendDigits", + "SetListen": "#/components/schemas/SetListen", + "SetTalk": "#/components/schemas/SetTalk", + "SetDTMFPassThrough": "#/components/schemas/SetDTMFPassThrough", + "Sms": "#/components/schemas/Sms", + "StartRecordCall": "#/components/schemas/StartRecordCall", + "TerminateConference": "#/components/schemas/TerminateConference", + "TranscribeUtterance": "#/components/schemas/TranscribeUtterance", + "Unpark": "#/components/schemas/Unpark" + } + }, + "properties": { + "command": { + "type": "string", + "description": "Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments)" + } + } + }, + "Webhook": { + "type": "object", + "discriminator": { + "propertyName": "requestType", + "mapping": { + "addToConferenceNotification": "#/components/schemas/AddToConferenceNotificationWebhook", + "addToQueueNotification": "#/components/schemas/AddToQueueNotificationWebhook", + "callControl": "#/components/schemas/CallControlWebhook", + "callStatus": "#/components/schemas/CallStatusWebhook", + "conferenceRecordingStatus": "#/components/schemas/ConferenceRecordingStatusWebhook", + "conferenceStatus": "#/components/schemas/ConferenceStatusWebhook", + "createConference": "#/components/schemas/CreateConferenceWebhook", + "dequeue": "#/components/schemas/DequeueWebhook", + "getDigits": "#/components/schemas/GetDigitsWebhook", + "getSpeech": "#/components/schemas/GetSpeechWebhook", + "inboundCall": "#/components/schemas/InboundCallWebhook", + "leaveConference": "#/components/schemas/LeaveConferenceWebhook", + "machineDetected": "#/components/schemas/MachineDetectedWebhook", + "messageDelivery": "#/components/schemas/MessageDeliveryWebhook", + "messageStatus": "#/components/schemas/MessageStatusWebhook", + "outDialApiConnect": "#/components/schemas/OutDialApiConnectWebhook", + "outDialConnect": "#/components/schemas/OutDialConnectWebhook", + "outDialStart": "#/components/schemas/OutDialStartWebhook", + "queueWait": "#/components/schemas/QueueWaitWebhook", + "record": "#/components/schemas/RecordWebhook", + "redirect": "#/components/schemas/RedirectWebhook", + "removeFromQueueNotification": "#/components/schemas/RemoveFromQueueNotificationWebhook", + "transcribe": "#/components/schemas/TranscribeWebhook" + } + }, + "properties": { + "requestType": { + "type": "string", + "description": "Type of webhook request" + } + } + }, + "AddToConferenceNotificationWebhook": { + "description": "A Call has been bridged to a Conference and the AddToConference command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be addToConferenceNotification - A Call has been bridged to a conference and the addToConference command’s notificationUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/ConferenceStatus" + }, + "recordingUrl": { + "type": "string", + "description": "URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied.", + "format": "uri" + }, + "recordingId": { + "type": "string", + "description": "Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied." + }, + "recordingDurationSec": { + "type": "integer", + "description": "Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied." + } + } + } + ] + }, + "AddToQueueNotificationWebhook": { + "description": "A Call has been added to a Queue and the Enqueue command’s notificationUrl is being invoked. This is a notification only; any PerCL returned will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be addToQueueNotification - A call has been added to a queue and the Enqueue command’s notificationUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + } + } + } + ] + }, + "CallControlWebhook": { + "description": "The digit sequence defined in the callControlSequence attribute of the AddToConference PerCL command has been entered by the Conference participant. A PerCL response is expected. If invalid PerCL is provided, the call leg which triggered this webhook will terminate.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be callControl." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "digits": { + "type": "string", + "description": "String of digits entered by the participant." + } + } + } + ] + }, + "CallStatusWebhook": { + "description": "A Call has ended and the statusCallbackUrl is being invoked. This is a notification only; All PerCL commands will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be callStatus - A Call has ended and the statusCallbackUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "callEndedReason": { + "$ref": "#/components/schemas/CallEndedReason" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + } + } + } + ] + }, + "ConferenceRecordingStatusWebhook": { + "description": "The statusCallbackUrl request includes Recording information for a Conference that ended. This is a notification only; any PerCL returned will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/ConferenceStatus" + }, + "recordingUrl": { + "type": "string", + "description": "URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied.", + "format": "uri" + }, + "recordingId": { + "type": "string", + "description": "Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied." + }, + "recordingDurationSec": { + "type": "integer", + "description": "Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied." + } + } + } + ] + }, + "ConferenceStatusWebhook": { + "description": "The context or reason why this request is being made. Will be conferenceStatus - A Conference's status changed and its statusCallbackUrl is being invoked.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/ConferenceStatus" + }, + "recordingUrl": { + "type": "string", + "description": "The URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + "format": "uri", + "nullable": true + }, + "recordingId": { + "type": "string", + "description": "The unique ID of the Recording from this Conference. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + "nullable": true + }, + "recordingDurationSec": { + "type": "integer", + "description": "The duration of the recorded audio rounded up to the nearest second (in seconds). Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + "nullable": true + } + } + } + ] + }, + "CreateConferenceWebhook": { + "description": "A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. A PerCL response is expected if the actionUrl is being invoked.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be createConference - A Conference has been created and its statusCallbackUrl or actionUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/ConferenceStatus" + }, + "recordingUrl": { + "type": "string", + "description": "The URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + "format": "uri", + "nullable": true + }, + "recordingId": { + "type": "string", + "description": "The unique ID of the Recording from this Conference. Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + "nullable": true + }, + "recordingDurationSec": { + "type": "integer", + "description": "The duration of the recorded audio rounded up to the nearest second (in seconds). Populated only if a Recording exists and the Conference was emptied. Present only if statusCallbackUrl is being invoked.", + "nullable": true + } + } + } + ] + }, + "DequeueWebhook": { + "description": "A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. A PerCL response is expected.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be dequeue - A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "queueResult": { + "type": "string", + "description": "The final result of the enqueued Call. Valid values are: •dequeued - Enqueued caller exited the Queue via a Dequeue action (Dequeue command or Queue Members POST REST API)." + }, + "queueTime": { + "type": "integer", + "description": "Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued.", + "nullable": true + } + } + } + ] + }, + "GetDigitsWebhook": { + "description": "A POST request with the following fields will be sent to the actionUrl provided in your GetDigits command.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be getDigits - The GetDigits command has completed and its actionUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "digits": { + "type": "string", + "description": "tring of digits entered by the Caller, excluding the terminating digit (if used). The string of digits will be replaced by 'xxxxx' when privacyMode is set to true" + }, + "reason": { + "$ref": "#/components/schemas/GetDigitsReason" + }, + "parentCallId": { + "type": "string", + "description": "ID of the Call that created this leg (child call)." + } + } + } + ] + }, + "GetSpeechWebhook": { + "description": "The GetSpeech command has completed and its actionUrl is being invoked. A PerCL response is expected, unless reason is hangup.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be getSpeech - The GetSpeech command has completed and its actionUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "Unique ID of the Conference." + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "reason": { + "$ref": "#/components/schemas/GetSpeechReason" + }, + "recognitionResult": { + "type": "string", + "description": "Semantic content (either a string if speech was recognized or a digit if a digit was input instead of speech) returned from the entry or tag that was recognized within the grammar. The content will be replaced by 'xxxxx' when privacyMode is set to true. This field is populated only if the reason field is set to recognition or digit." + }, + "confidence": { + "type": "integer", + "description": "Level of confidence in the obtained result. This is a value in the range 0 to 100 – with 0 being total lack of confidence and 100 being absolute certainty in the recognition. This field is populated only if the reason field is set to recognition." + }, + "parentCallId": { + "type": "string", + "description": "ID of the Call that created this leg (child call)." + }, + "completionReason": { + "type": "string", + "description": "Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition." + }, + "completionCause": { + "type": "string", + "description": "Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition." + }, + "mrcpCode": { + "type": "integer", + "description": "Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification." + }, + "mrcpDiagnostic": { + "type": "string", + "description": "Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification." + } + } + } + ] + }, + "InboundCallWebhook": { + "description": "An inbound Call to a number registered on FreeClimb will trigger a request to the voiceUrl of the application the number is assigned to. FreeClimb expects to receive PerCL in response to this request in order to process the Call. The following parameters are sent as the POST body.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be inboundCall - An inbound call was received and the voiceUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a Conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "parentCallId": { + "type": "string", + "nullable": true + } + } + } + ] + }, + "LeaveConferenceWebhook": { + "description": "A Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked. A PerCL response is expected — unless the URL is invoked due to the participant hanging up.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be leaveConference - Call has been unbridged from a Conference and its leaveConferenceUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference" + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a Conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + } + } + } + ] + }, + "MachineDetectedWebhook": { + "description": "An outbound call spawned by OutDial detected an answer by a machine (answering machine or fax/modem machine) and ifMachineUrl is being invoked. A PerCL response is expected.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be machineDetected - An outbound call spawned by OutDial was answered by a machine and the ifMachineUrl is being invoked." + }, + "callId": { + "type": "string", + "description": "Unique ID for this Call, generated by FreeClimb." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a Conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a Queue. Otherwise, it is set to null.", + "nullable": true + }, + "parentCallId": { + "type": "string", + "description": "Call ID of the leg which initiated the OutDial." + }, + "machineType": { + "$ref": "#/components/schemas/MachineType" + } + } + } + ] + }, + "MessageDeliveryWebhook": { + "description": "An SMS has been received by the platform and is being delivered to the smsUrl of the customer application that is associated with the destination number. A PerCL response will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Value will be messageDelivery - An SMS message has been received by the platform and is being delivered to the customer application associated with the destination number." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to you and to which this Call is directed (in E.164 format)." + }, + "text": { + "type": "string", + "description": "Body of the SMS message." + }, + "direction": { + "type": "string", + "description": "Value will be inbound to indicate the receipt of a message into the FreeClimb platform." + }, + "applicationId": { + "type": "string", + "description": "ID of the application to which the destination number is assigned." + }, + "status": { + "type": "string", + "description": "Value will be received to indicate that the platform has successfully received the incoming message." + }, + "phoneNumberId": { + "type": "string", + "description": "ID of the destination phone number." + }, + "uri": { + "type": "string", + "description": "The URI for this resource, relative to the API base URL" + } + } + } + ] + }, + "MessageStatusWebhook": { + "description": "An outbound SMS has changed status and the notificationUrl from the Sms command or Send an SMS request is being invoked. A PerCL response will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Value will be messageStatus - An outbound SMS has changed status and the Sms command's notificationUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "messageId": { + "type": "string", + "description": "Unique ID for this message, generated by FreeClimb." + }, + "callId": { + "type": "string", + "description": "Unique ID for the Call in the context of which the Sms PerCL command was issued." + }, + "from": { + "type": "string", + "description": "aPhone number used to initiate the SMS message (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Destination number of the SMS message (in E.164 format)." + }, + "text": { + "type": "string", + "description": "Body of the SMS message." + }, + "direction": { + "type": "string", + "description": "Value will be outbound to indicate an outgoing SMS from FreeClimb." + }, + "applicationId": { + "type": "string", + "description": "ID of the application to which the destination number is assigned. May be null if the originating number is invalid in some way or is not registered to an application." + }, + "status": { + "$ref": "#/components/schemas/MessageStatus" + }, + "phoneNumberId": { + "type": "string", + "description": "ID of the destination phone number." + } + } + } + ] + }, + "OutDialApiConnectWebhook": { + "description": "An outbound call initiated by the REST API has connected and the callConnectUrl specified in the API request is being invoked. A PerCL response is expected if the call was successfully connected (with status of inProgress).", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be outDialApiConnect - An outbound call spawned by the REST API has connected and the callConnectUrl specified in the API request is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "parentCallId": { + "type": "string", + "description": "ID of the Call that created this leg (child call)." + } + } + } + ] + }, + "OutDialConnectWebhook": { + "description": "A Call generated by OutDial has connected and the callConnectUrl is being invoked. This request is made in the context of the Call leg that was generated using OutDial and not the parent (the OutDialStart webhook is invoked on the parent call to continue that call context). A PerCL response is expected if the call was successfully connected (as indicated by status of inProgress) and begins the execution context for this (child) call.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be outDialConnect - A Call generated by OutDial has connected and the callConnectUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "parentCallId": { + "type": "string", + "description": "ID of the Call that created this leg (child call)." + } + } + } + ] + }, + "OutDialStartWebhook": { + "description": "The OutDial command has started and the actionUrl is being invoked. This request is made in the context of the parent call (Call leg that invoked). A PerCL response is expected.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be outDialStart - The OutDial command has started and the actionUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to the customer and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "dialCallId": { + "type": "string", + "description": "ID of the child call that was generated as a result of the Outdial." + }, + "parentCallId": { + "type": "string", + "description": "ID of the Call that created this leg (child call). If this was an inbound call or call created via REST API with no parent, this field will be null.", + "nullable": true + } + } + } + ] + }, + "QueueWaitWebhook": { + "description": "A queued Call is requesting instructions to execute during the wait in the Queue and the corresponding waitUrl is being invoked. A PerCL response is expected. The following are the only PerCL commands supported in the PerCL script response to a request to the waitUrl: Play,Say,Pause,GetDigits,Dequeue,Hangup", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be queueWait - A queued call is requesting instructions to execute during the wait in the queue and the corresponding waitUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to the customer and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "queuePosition": { + "type": "string", + "description": "Current queue position of the enqueued Call." + }, + "queueTime": { + "type": "integer", + "description": "Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued." + }, + "currentQueueSize": { + "type": "integer", + "description": "Current number of enqueued Calls in this Queue." + } + } + } + ] + }, + "RecordWebhook": { + "description": "The RecordUtterance command has completed and its actionUrl is being invoked.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "The context or reason why this request is being made. Will be record - The RecordUtterance command has completed and its actionUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to the customer and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "recordingId": { + "type": "string", + "description": "ID of the recording." + }, + "recordingUrl": { + "type": "string", + "description": "URL of the recorded audio file. This URL can be used as is in a Play command to play the recording (no authentication needed). It can also be used to download a recording file via the REST API.", + "format": "uri" + }, + "recordingSize": { + "type": "string", + "description": "Size of the recording in bytes" + }, + "recordingFormat": { + "type": "string", + "description": "File type of the recording (audio/wav)" + }, + "recordingDurationSec": { + "type": "integer", + "description": "Duration of the recorded audio rounded up to the nearest second (in seconds)" + }, + "termReason": { + "$ref": "#/components/schemas/RecordUtteranceTermReason" + }, + "parentCallId": { + "type": "string", + "description": "ID of Call that created this leg (child call)." + }, + "privacyMode": { + "type": "boolean", + "description": "If true then it indicates the recording will only be available for download for two minutes prior to it being deleted. This is to minimize risk of anyone else getting access to the url and attempting to access it." + } + } + } + ] + }, + "RedirectWebhook": { + "description": "The Redirect command is executing and its actionUrl is being invoked. A PerCL response is expected.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be redirect - The Redirect command is executing and its actionUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to the customer and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "parentCallId": { + "type": "string", + "description": "ID of Call that created this leg (child call)." + } + } + } + ] }, - "PerclCommand": { - "type": "object", - "description": "An individual command used in a PerCLScript.", - "x-percl-command-base": true, - "discriminator": { - "propertyName": "command", - "mapping": { - "AddToConference": "#/components/schemas/AddToConference", - "CreateConference": "#/components/schemas/CreateConference", - "Dequeue": "#/components/schemas/Dequeue", - "Enqueue": "#/components/schemas/Enqueue", - "GetDigits": "#/components/schemas/GetDigits", - "GetSpeech": "#/components/schemas/GetSpeech", - "Hangup": "#/components/schemas/Hangup", - "OutDial": "#/components/schemas/OutDial", - "Pause": "#/components/schemas/Pause", - "Park": "#/components/schemas/Park", - "Play": "#/components/schemas/Play", - "PlayEarlyMedia": "#/components/schemas/PlayEarlyMedia", - "RecordUtterance": "#/components/schemas/RecordUtterance", - "Redirect": "#/components/schemas/Redirect", - "Reject": "#/components/schemas/Reject", - "RemoveFromConference": "#/components/schemas/RemoveFromConference", - "Say": "#/components/schemas/Say", - "SendDigits": "#/components/schemas/SendDigits", - "SetListen": "#/components/schemas/SetListen", - "SetTalk": "#/components/schemas/SetTalk", - "SetDTMFPassThrough": "#/components/schemas/SetDTMFPassThrough", - "Sms": "#/components/schemas/Sms", - "StartRecordCall": "#/components/schemas/StartRecordCall", - "TerminateConference": "#/components/schemas/TerminateConference", - "TranscribeUtterance": "#/components/schemas/TranscribeUtterance", - "Unpark": "#/components/schemas/Unpark" + "RemoveFromQueueNotificationWebhook": { + "description": "A call has been removed from a queue and the Enqueue command’s actionUrl is being invoked. A PerCL response is expected except if reason is hangup.", + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "Context or reason why this request is being made. Will be removeFromQueueNotification - A Call has been removed from a Queue and the Enqueue command’s actionUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to the customer and to which this Call is directed (in E.164 format)." + }, + "callStatus": { + "$ref": "#/components/schemas/CallStatus" + }, + "direction": { + "$ref": "#/components/schemas/CallDirection" + }, + "conferenceId": { + "type": "string", + "description": "This is only populated if request pertains to a conference. Otherwise, it is set to null.", + "nullable": true + }, + "queueId": { + "type": "string", + "description": "This is only populated if the request pertains to a queue. Otherwise, it is set to null.", + "nullable": true + }, + "queueResult": { + "$ref": "#/components/schemas/QueueResultStatus" + }, + "queueTime": { + "type": "integer", + "description": "Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued." + } + } } - }, - "properties": { - "command": { - "x-is-no-property": true, - "type": "string", - "description": "Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments)" + ] + }, + "TranscribeWebhook": { + "allOf": [ + { + "$ref": "#/components/schemas/Webhook" + }, + { + "type": "object", + "properties": { + "requestType": { + "type": "string", + "description": "The context or reason why this request is being made. Will be transcribe - The TranscribeUtterance command has completed and its actionUrl is being invoked." + }, + "accountId": { + "type": "string", + "description": "Account ID associated with your account." + }, + "callId": { + "type": "string", + "description": "Unique identifier for this Call, generated by FreeClimb" + }, + "from": { + "type": "string", + "description": "Phone number of the party that initiated the Call (in E.164 format)." + }, + "to": { + "type": "string", + "description": "Phone number provisioned to the customer and to which this Call is directed (in E.164 format)." + }, + "recordingId": { + "type": "string", + "description": "The ID of the recording. If no recording was made due to errors or the 'saveRecording' flag being disabled this field will be set to null.", + "nullable": true + }, + "recordingUrl": { + "type": "string", + "description": "The URL of the recorded audio file. This URL can be used as is in a Play command to play the recording (no authentication needed). It can also be used to download the recording file via the REST API.", + "format": "uri", + "nullable": true + }, + "recordingSize": { + "type": "integer", + "description": "The size of the recording in bytes." + }, + "recordingFormat": { + "type": "string", + "description": "The media type of the recording.", + "nullable": true + }, + "recordingDurationMs": { + "type": "integer", + "description": "The duration of the recorded audio in milliseconds." + }, + "termReason": { + "$ref": "#/components/schemas/TranscribeTermReason" + }, + "recordTermReason": { + "$ref": "#/components/schemas/RecordUtteranceTermReason" + }, + "digit": { + "type": "string", + "description": "If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null.", + "nullable": true + }, + "privacyForLogging": { + "type": "boolean", + "description": "Echo back of the privacyForLogging flag as specified in the transcribe utterance command – confirmation of logging protection has been applied. Can be used by application to know it should also apply protection when handling this request." + }, + "privacyForRecording": { + "type": "boolean", + "description": "Echo back of the privacyForRecording flag as specified in the transcribe utterance command – confirmation of logging protection has been applied. Can be used by application to know it should also apply protection when handling this request." + }, + "bargeInReason": { + "$ref": "#/components/schemas/BargeInReason" + }, + "bargedInPromptNo": { + "type": "integer" + }, + "bargedInPromptMs": { + "type": "integer", + "description": "duration in ms bargedInPromptNo prompt was executing until barge-in occurred." + }, + "bargedInPromptLoopNo": { + "type": "integer" + }, + "bargeInTimeMs": { + "type": "integer", + "description": "epoch time in ms" + }, + "transcript": { + "type": "string", + "description": "Transcribed text of the recording. Can be empty or null. null means there was a failure in transcribing the audio, refer to transcribeReason for detailed failure reason.", + "nullable": true + }, + "transcribeReason": { + "$ref": "#/components/schemas/TranscribeReason" + }, + "transcriptionDurationMs": { + "type": "integer", + "description": "The duration of the audio being transcribed in milliseconds" + } + } } - } + ] }, "AddToConference": { "description": "The `AddToConference` command adds a Participant to a Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`.", - "x-percl-command": true, - "x-ref-properties": [ - "false", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "false", - "\"TEST_STRING\"", - "false", - "false" - ], + "required": ["conferenceId"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -512,7 +1924,8 @@ }, "callControlUrl": { "description": "URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.", - "type": "string" + "type": "string", + "format": "uri" }, "conferenceId": { "description": "ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result.", @@ -520,6 +1933,7 @@ }, "leaveConferenceUrl": { "description": "URL to be invoked when the Participant leaves the Conference. ", + "format": "uri", "type": "string" }, "listen": { @@ -528,6 +1942,7 @@ }, "notificationUrl": { "description": "When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.", + "format": "uri", "type": "string" }, "startConfOnEnter": { @@ -548,16 +1963,6 @@ }, "CreateConference": { "description": "The `CreateConference` command does exactly what its name implies — it creates an unpopulated Conference (one without any Participants). Once created, a Conference remains in FreeClimb until explicitly terminated by a customer. Once a Conference has been terminated, it can no longer be used.", - "x-percl-command": true, - "x-ref-properties": [ - "\"TEST_STRING\"", - "false", - "PlayBeep.ALWAYS", - "false", - "\"https://a.com\"", - "\"https://a.com\"", - "\"TEST_STRING\"" - ], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -568,8 +1973,8 @@ "properties": { "actionUrl": { "description": " This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. ", - "type": "string", - "x-is-uri": true + "format": "uri", + "type": "string" }, "alias": { "description": "Descriptive name for the Conference. ", @@ -584,10 +1989,12 @@ }, "statusCallbackUrl": { "description": "This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.", + "format": "uri", "type": "string" }, "waitUrl": { "description": "If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.", + "format": "uri", "type": "string" } } @@ -596,8 +2003,6 @@ }, "Dequeue": { "description": "The `Dequeue` command transfers control of a Call that is in a Queue so that the waiting caller exits the Queue. Execution continues with the first command in the PerCL script returned by the `actionUrl` specified in the `Enqueue` command.", - "x-percl-command": true, - "x-no-properties": true, "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -609,18 +2014,10 @@ }, "Enqueue": { "description": "The `Enqueue` command adds the current Call to a call Queue. If the specified Queue does not exist, it is created and then the Call is added to it. The default maximum length of the queue is 100. This can be modified using the REST API.", - "x-percl-command": true, - "x-ref-properties": [ - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"" - ], + "required": ["queueId", "waitUrl", "actionUrl"], "allOf": [ { - "$ref": "#/components/schemas/PerclCommand", - "x-is-uri": true + "$ref": "#/components/schemas/PerclCommand" }, { "type": "object", @@ -629,12 +2026,12 @@ "actionUrl": { "description": "A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up.", "type": "string", - "x-is-uri": true + "format": "uri" }, "notificationUrl": { "description": "URL to be invoked when the call enters the queue. The request to the URL contains the standard request parameters.This is a notification only; any PerCL returned will be ignored.", "type": "string", - "x-is-uri": true + "format": "uri" }, "queueId": { "description": "ID of the Queue to which to add the Call. If the Queue does not exist, it will be created. The ID must start with QU followed by 40 hex characters.", @@ -642,7 +2039,8 @@ }, "waitUrl": { "description": "A request is made to this URL when the Call leaves the Queue, which can occur if enqueue of the Call fails or when the call is dequeued via the `Dequeue` command, the REST API (POST to Queue Member resource), or the caller hangs up.", - "type": "string" + "type": "string", + "format": "uri" } } } @@ -650,23 +2048,9 @@ }, "GetDigits": { "description": "The `GetDigits` command collects DTMF inputs from the caller. It is only supported only when there is a single party on the Call. `GetDigits` is a Terminal Command — any actions following it are never executed. When the Caller is done entering the digits, FreeClimb submits that data to the provided `actionUrl` using an HTTP POST request. Your server will be required to respond to the FreeClimb Webhook with PerCL to continue handling the call.", - "x-percl-command": true, - "x-ref-properties": [ - "\"https://a.com\"", - "1", - "\"TEST_STRING\"", - "false", - "300", - "1", - "1", - "new List()", - "false", - "\"TEST_STRING\"" - ], "allOf": [ { - "$ref": "#/components/schemas/PerclCommand", - "x-is-uri": true + "$ref": "#/components/schemas/PerclCommand" }, { "type": "object", @@ -675,7 +2059,7 @@ "actionUrl": { "description": "When the Caller has finished entering digits, FreeClimb will make an HTTP POST request to this URL. A PerCL response is expected to continue handling the Call. Make sure to keep “http://“ in the URL.", "type": "string", - "x-is-uri": true + "format": "uri" }, "digitTimeoutMs": { "description": " Maximum time in milliseconds that FreeClimb will wait for the Caller to press any digit after the last digit entered, before making a determination that a `timeout` has occurred and moving on to make the request to the actionUrl to submit the results of the `GetDigits` command. This timeout interval begins and resets after each digit entered.", @@ -704,7 +2088,6 @@ "prompts": { "description": "JSON array of PerCL commands to nest within the `GetDigits` command. The `Say`, `Play`, and `Pause` commands can be used. The nested actions are executed while FreeClimb is waiting for input from the Caller.", "type": "array", - "x-is-list": true, "items": { "$ref": "#/components/schemas/PerclCommand" } @@ -719,23 +2102,6 @@ }, "GetSpeech": { "description": "The `GetSpeech` command enables the Caller to respond to the application using a supported language. Unlike DTMF entry, which implicitly restricts the user to using the available buttons on the phone key pad, speech input allows for flexible audio inputs based on grammar. FreeClimb supports grammars written using GRXML compatible with the Microsoft Speech Platform. `GetSpeech` is only supported on a single call leg. It is not supported when there are two or more call legs connected (as in within a Conference).", - "x-percl-command": true, - "x-ref-properties": [ - "\"https://a.com\"", - "GrammarType.URL", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "false", - "new List()", - "1", - "1", - "1", - "1", - "1", - "1", - "false", - "\"TEST_STRING\"" - ], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -747,9 +2113,7 @@ "actionUrl": { "description": "When the caller has finished speaking or the command has timed out, FreeClimb will make a POST request to this URL. A PerCL response is expected to continue handling the call.", "type": "string", - "format": "uri", - "x-is-uri": true, - "x-is-url": true + "format": "uri" }, "grammarType": { "$ref": "#/components/schemas/GrammarType" @@ -771,8 +2135,7 @@ "type": "array", "items": { "$ref": "#/components/schemas/PerclCommand" - }, - "x-is-list": true + } }, "noInputTimeoutMs": { "description": "When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.", @@ -808,7 +2171,6 @@ }, "Hangup": { "description": "The `Hangup` command terminates a Call. If `Hangup` is used as the first action in a PerCL response, it does not prevent FreeClimb from answering the Call and billing your account. See the `Reject` command to hang up at no charge.", - "x-percl-command": true, "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -826,24 +2188,9 @@ }, "OutDial": { "description": "The OutDial command is used to call a phone number", - "x-percl-command": true, - "x-ref-properties": [ - "\"https://a.com\"", - "\"https://a.com\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "IfMachine.REDIRECT", - "\"https://a.com\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "1", - "false", - "\"TEST_STRING\"" - ], "allOf": [ { - "$ref": "#/components/schemas/PerclCommand", - "x-is-uri": true + "$ref": "#/components/schemas/PerclCommand" }, { "required": [ @@ -857,12 +2204,12 @@ "actionUrl": { "description": "URL to which FreeClimb sends an HTTP POST request. ", "type": "string", - "x-is-uri": true + "format": "uri" }, "callConnectUrl": { "description": "URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial.", "type": "string", - "x-is-uri": true + "format": "uri" }, "callingNumber": { "description": "he caller ID to show to the called party when FreeClimb calls. This can be one of the following: The To or From number provided in the first Webhook to your webserver. Any phone number you have purchased from FreeClimb.", @@ -877,6 +2224,7 @@ }, "ifMachineUrl": { "description": "When the `ifMachine` flag is set to `redirect`, this attribute specifies a URL to which FreeClimb makes a POST request when an answering machine or a fax machine is detected. This URL is required if the `ifMachine` flag is set to `redirect`. Otherwise, it should not be included.", + "format": "uri", "type": "string" }, "sendDigits": { @@ -885,6 +2233,7 @@ }, "statusCallbackUrl": { "description": "When the outdialed Call leg terminates, FreeClimb sends a `callStatus` Webhook to the `statusCallbackUrl`. This is a notification only; any PerCL command returned is ignored.", + "format": "uri", "type": "string" }, "timeout": { @@ -901,17 +2250,9 @@ }, "Park": { "description": "The `Park` command allows a caller to be put on hold. You can provide hold music,messages,etc until ready to resume the call. Park is a terminal command. Actions performed on the Call while on hold are provided in a PerCL script in response to the waitUrl property. Actions performed on the Call after it has been unparked (resumed) will be provided in a PerCL script in response to the actionUrl provided. A Call can be resumed in two ways -- REST API invocation or the Unpark percl command. No actions can be nested within Park and Park cannot be nested in any other actions. ", - "x-percl-command": true, - "x-ref-properties": [ - "\"https://a.com\"", - "\"https://a.com\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"" - ], "allOf": [ { - "$ref": "#/components/schemas/PerclCommand", - "x-is-uri": true + "$ref": "#/components/schemas/PerclCommand" }, { "type": "object", @@ -920,16 +2261,17 @@ "waitUrl": { "description": "Specifies a URL pointing to a PerCL script containing actions to be executed while the caller is Parked. Once the script returned by the waitUrl runs out of commands to execute, FreeClimb will re-request the waitUrl and start over, essentially looping the script requests indefinitely.", "type": "string", - "x-is-uri": true + "format": "uri" }, "actionUrl": { "description": "A request is made to this URL when the Call is resumed, which can occur if the Call is resumed via the Unpark command, the REST API (POST to Call resource), or the caller hangs up. The PerCL script returned in response to the actionUrl will be executed on the resumed call.", "type": "string", - "x-is-uri": true + "format": "uri" }, "notificationUrl": { "description": "URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.", - "type": "string" + "type": "string", + "format": "uri" } } } @@ -937,8 +2279,6 @@ }, "Pause": { "description": "The `Pause` command halts execution of the current PerCL script for a specified number of milliseconds. If `Pause` is the first command in a PerCL document, FreeClimb will wait for the specified time to elapse before picking up the call.", - "x-percl-command": true, - "x-ref-properties": ["1"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -957,8 +2297,6 @@ }, "Play": { "description": "The `Play` command plays an audio file back to the caller. The audio file may be located at any location accessible via a URL. `Play` can exist as a stand-alone command or as a nested command. It does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested.", - "x-percl-command": true, - "x-ref-properties": ["\"TEST_STRING\"", "1", "false"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -985,8 +2323,6 @@ }, "PlayEarlyMedia": { "description": "`PlayEarlyMedia` is relevant only when present as the very first command in the PerCL script returned for an incoming Call. In such cases, the command is executed before FreeClimb attempts to connect the call. The audio file it uses can be stored in any location that is accessible via URL.", - "x-percl-command": true, - "x-ref-properties": ["\"TEST_STRING\""], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1005,20 +2341,9 @@ }, "RecordUtterance": { "description": "The `RecordUtterance` command records the caller's voice and returns the URL of a file containing the audio recording. `RecordUtterance` is blocking and is a terminal command. As such, the `actionUrl` property is required, and control of the Call picks up using the PerCL returned in response to the `actionUrl`. Recording information is returned in the `actionUrl` request.", - "x-percl-command": true, - "x-ref-properties": [ - "\"https://a.com\"", - "1", - "\"TEST_STRING\"", - "1", - "false", - "false", - "false" - ], "allOf": [ { - "$ref": "#/components/schemas/PerclCommand", - "x-is-uri": true + "$ref": "#/components/schemas/PerclCommand" }, { "required": ["actionUrl"], @@ -1027,7 +2352,7 @@ "actionUrl": { "description": "URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing.", "type": "string", - "x-is-uri": true + "format": "uri" }, "silenceTimeoutMs": { "description": "Interval of silence that should elapse before ending the recording.", @@ -1059,12 +2384,9 @@ }, "Redirect": { "description": "The `Redirect` command transfers control of a Call to the PerCL at a different URL. `Redirect` is a terminal command, so any actions following it are never executed. The maximum number of redirections allowed during the life time of a Call is 256. This is intended to prevent a Call from possibly looping infinitely due to errors in PerCL being generated.", - "x-percl-command": true, - "x-ref-properties": ["\"https://a.com\""], "allOf": [ { - "$ref": "#/components/schemas/PerclCommand", - "x-is-uri": true + "$ref": "#/components/schemas/PerclCommand" }, { "required": ["actionUrl"], @@ -1073,7 +2395,7 @@ "actionUrl": { "description": "URL to request a new PerCL script to continue with the current Call's processing. When `Redirect` invokes the `actionUrl`, an `inbound` Webhook is sent. This request therefore looks identical to the initial request (made to the `voiceUrl` of the number that was called) for an inbound Call.", "type": "string", - "x-is-uri": true + "format": "uri" } } } @@ -1081,8 +2403,6 @@ }, "Reject": { "description": "The `Reject` command blocks an incoming Call. Using `Reject` is the only way to prevent FreeClimb from answering a Call. Any other response will result in an answered Call and your account will be billed.", - "x-percl-command": true, - "x-ref-properties": ["\"TEST_STRING\""], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1100,8 +2420,6 @@ }, "RemoveFromConference": { "description": "The `RemoveFromConference` command removes a Participant from a Conference but does not hang up. Instead, the Call is simply unbridged and what happens next with the Call is determined by the PerCL returned in response to the `leaveConferenceUrl` attribute.", - "x-percl-command": true, - "x-no-properties": true, "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1115,13 +2433,6 @@ }, "Say": { "description": "The `Say` command provides Text-To-Speech (TTS) support. It converts text to speech and then renders it in a female voice back to the caller. `Say` is useful in cases where it's difficult to pre-record a prompt for any reason. `Say` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested.", - "x-percl-command": true, - "x-ref-properties": [ - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "1", - "false" - ], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1153,8 +2464,6 @@ }, "SendDigits": { "description": "The `SendDigits` command plays DTMF tones on a live Call. This is useful for navigating through IVR menus or dialing extensions.", - "x-percl-command": true, - "x-ref-properties": ["\"TEST_STRING\"", "1", "false"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1181,8 +2490,6 @@ }, "SetListen": { "description": "The `SetListen` command enables or disables the listen privilege for this Conference Participant. The Participant can hear what the other participants are saying only if this privilege is enabled.", - "x-percl-command": true, - "x-ref-properties": ["false"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1201,8 +2508,6 @@ }, "SetTalk": { "description": "The `SetTalk` command enables or disables the talk privilege for this Conference Participant. If 'true', no audio from that Participant is shared with the other Participants of the Conference.", - "x-percl-command": true, - "x-ref-properties": ["false"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1221,8 +2526,6 @@ }, "SetDTMFPassThrough": { "description": "The `SetDTMFPassThrough` command enables or disables the dtmfPassThrough privilege for this Conference Participant. If 'true', DTMFs will be passed through from this Participant to all other Participants in the Conference", - "x-percl-command": true, - "x-ref-properties": ["false"], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1241,12 +2544,6 @@ }, "Sms": { "description": "The `Sms` command can be used to send an SMS message to a phone number during a phone call. International SMS is disabled by default.", - "x-percl-command": true, - "x-ref-properties": [ - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"" - ], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1269,7 +2566,8 @@ }, "notificationUrl": { "description": "When the message changes status, this URL will be invoked using HTTP POST with the messageStatus parameters. This is a notification only; any PerCL returned will be ignored.", - "type": "string" + "type": "string", + "format": "uri" } } } @@ -1277,8 +2575,6 @@ }, "StartRecordCall": { "description": "The `StartRecordCall` command records the current call and returns the URL of a file containing the audio recording when recording completes. `StartRecordCall` is non-blocking. After recording of the current call begins, control of the call moves to the PerCL command that follows `StartRecordCall` in the current PerCL script.", - "x-percl-command": true, - "x-no-properties": true, "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1290,8 +2586,6 @@ }, "TerminateConference": { "description": "The `TerminateConference` command terminates an existing Conference. Any active participants are hung up on by FreeClimb. If this is not the desired behavior, use the `RemoveFromConference` command to unbridge Calls that should not be hung up. Note: The Call requesting TerminateConference must be on the same Conference for this command to execute.", - "x-percl-command": true, - "x-no-properties": true, "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1305,8 +2599,6 @@ }, "Unpark": { "description": "The `Unpark` command resumes a parked call. Execution continues with the first command in the PerCL scripted returned by the actionUrl specified in the Park command as long as the call is still in progress. If the call is no longer in progress, any returned PerCL will not be executed. Unpark is a terminal command -- any commands following it in the same script are not executed.", - "x-percl-command": true, - "x-no-properties": true, "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -1381,8 +2673,6 @@ "description": "Details for which features this number may be used.", "type": "object", "required": ["voice", "sms", "tollFree", "tenDLC", "shortCode"], - "x-is-object": true, - "x-ref-properties": [false, false, false, false, false], "properties": { "voice": { "description": "Indicates whether a number can be used for voice calls. Replaces voiceEnabled.", @@ -1415,8 +2705,6 @@ "description": "TollFree Campaign details for this number", "type": "object", "required": ["campaignId"], - "x-is-object": true, - "x-ref-properties": ["\"TEST_STRING\""], "properties": { "campaignId": { "description": "alphanumeric identifier for the TollFree campaign associated with this number", @@ -1506,31 +2794,37 @@ "voiceUrl": { "type": "string", "description": "The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.", + "format": "uri", "nullable": true }, "voiceFallbackUrl": { "type": "string", "description": "The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.", + "format": "uri", "nullable": true }, "callConnectUrl": { "type": "string", "description": "The URL to which FreeClimb will make a POST request informing the result of the outbound Call request. The status property of the request message specifies if the Call was connected or not.", + "format": "uri", "nullable": true }, "statusCallbackUrl": { "type": "string", "description": "A URL to which FreeClimb will make a POST request when the Call ends to notify this app.", + "format": "uri", "nullable": true }, "smsUrl": { "type": "string", "description": "The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.", + "format": "uri", "nullable": true }, "smsFallbackUrl": { "type": "string", "description": "The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.", + "format": "uri", "nullable": true } } @@ -1547,37 +2841,42 @@ "voiceUrl": { "type": "string", "description": "The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls.", + "format": "uri", "nullable": true }, "voiceFallbackUrl": { "type": "string", "description": "The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. Note: A PerCL response is expected to control the inbound call.", + "format": "uri", "nullable": true }, "callConnectUrl": { "type": "string", "description": "The URL that FreeClimb will request when an outbound call request is complete. Used for outbound calls only. Note: A PerCL response is expected if the outbound call is connected (status=InProgress) to control the call.", + "format": "uri", "nullable": true }, "statusCallbackUrl": { "type": "string", "description": "The URL that FreeClimb will request to pass call status (such as call ended) to the application. Note: This is a notification only; any PerCL returned will be ignored.", + "format": "uri", "nullable": true }, "smsUrl": { "type": "string", "description": "The URL that FreeClimb will request when a phone number assigned to this application receives an incoming SMS message. Used for inbound SMS only. Note: Any PerCL returned will be ignored.", + "format": "uri", "nullable": true }, "smsFallbackUrl": { "type": "string", "description": "The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. Note: Any PerCL returned will be ignored.", + "format": "uri", "nullable": true } } }, "ApplicationList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -1590,8 +2889,7 @@ "items": { "$ref": "#/components/schemas/ApplicationResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -1638,7 +2936,6 @@ } }, "AvailableNumberList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -1651,8 +2948,7 @@ "items": { "$ref": "#/components/schemas/AvailableNumber" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -1753,7 +3049,6 @@ } }, "IncomingNumberList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -1766,8 +3061,7 @@ "items": { "$ref": "#/components/schemas/IncomingNumberResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -1912,7 +3206,8 @@ }, "ifMachineUrl": { "type": "string", - "description": "This attribute specifies a URL to which FreeClimb will make a POST request when an answering machine or a fax machine is detected. This URL is required if the ifMachine flag is set to redirect. When ifMachine is set to hangup, ifMachineUrl must not be included in the request. For more information, see **ifMachineUrl example** below." + "description": "This attribute specifies a URL to which FreeClimb will make a POST request when an answering machine or a fax machine is detected. This URL is required if the ifMachine flag is set to redirect. When ifMachine is set to hangup, ifMachineUrl must not be included in the request. For more information, see **ifMachineUrl example** below.", + "format": "uri" }, "timeout": { "type": "integer", @@ -1930,12 +3225,12 @@ }, "callConnectUrl": { "type": "string", - "description": "The URL that FreeClimb should use to handle this phone call. If an applicationId or parentCallId have already been provided, this callConnectUrl attribute will be used as a replacement of the callConnectUrl originally assigned in the application or parent call." + "description": "The URL that FreeClimb should use to handle this phone call. If an applicationId or parentCallId have already been provided, this callConnectUrl attribute will be used as a replacement of the callConnectUrl originally assigned in the application or parent call.", + "format": "uri" } } }, "CallList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -1948,8 +3243,7 @@ "items": { "$ref": "#/components/schemas/CallResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -1993,7 +3287,6 @@ ] }, "RecordingList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2006,8 +3299,7 @@ "items": { "$ref": "#/components/schemas/RecordingResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2052,7 +3344,6 @@ } }, "LogList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2065,8 +3356,7 @@ "items": { "$ref": "#/components/schemas/LogResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2110,16 +3400,19 @@ "waitUrl": { "type": "string", "description": "URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.", + "format": "uri", "nullable": true }, "actionUrl": { "type": "string", "description": "URL invoked once the Conference is successfully created.", + "format": "uri", "nullable": true }, "statusCallbackUrl": { "type": "string", "description": "URL to inform that the Conference status has changed.", + "format": "uri", "nullable": true }, "subresourceUris": { @@ -2132,7 +3425,6 @@ ] }, "MessagesList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2146,8 +3438,7 @@ "items": { "$ref": "#/components/schemas/MessageResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2176,12 +3467,12 @@ }, "notificationUrl": { "type": "string", - "description": "When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored." + "description": "When the Message changes status, this URL is invoked using HTTP POST with the messageStatus parameters. **Note:** This is a notification only; any PerCL returned is ignored.", + "format": "uri" }, "mediaUrls": { "type": "array", "description": "an array of HTTP URLs which are to be used as attachments to the message. This will force the message into being an MMS message and must be done using a from number which is MMS capabile.", - "x-is-list": true, "items": { "type": "string", "format": "uri" @@ -2206,26 +3497,17 @@ "CompletionResult": { "type": "object", "required": ["response", "status"], - "x-completion-result": true, "properties": { "response": { "type": "string", "description": "The generative response from the KnowledgeBase" }, "status": { - "type": "string", - "x-has-writer": true, - "description": "Completion result status. Possible values: success, no_context", - "x-enum-type": "CompletionResultStatusEnum", - "x-enum-type-c-sharp": "StatusEnum", - "enum": ["success", "no_context"], - "x-enum-varnames": ["SUCCESS", "NO_CONTEXT"], - "x-enum-varnames-values": ["success", "no_context"] + "$ref": "#/components/schemas/CompletionResultStatus" } } }, "ConferenceList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2238,8 +3520,7 @@ "items": { "$ref": "#/components/schemas/ConferenceResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2289,6 +3570,7 @@ "notificationUrl": { "type": "string", "description": "URL invoked when message sent", + "format": "uri", "nullable": true }, "brandId": { @@ -2309,7 +3591,6 @@ "mediaUrls": { "type": "array", "description": "an array of HTTP URLs which were attached this this message", - "x-is-list": true, "items": { "type": "string", "format": "uri" @@ -2336,11 +3617,13 @@ }, "waitUrl": { "type": "string", - "description": "If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once — when the Conference is created." + "description": "If specified, a URL for the audio file that provides custom hold music for the Conference when it is in the populated state. Otherwise, FreeClimb uses a system default audio file. This is always fetched using HTTP GET and is fetched just once — when the Conference is created.", + "format": "uri" }, "statusCallbackUrl": { "type": "string", - "description": "This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below)." + "description": "This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below).", + "format": "uri" } } }, @@ -2424,7 +3707,6 @@ } }, "ConferenceParticipantList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2437,8 +3719,7 @@ "items": { "$ref": "#/components/schemas/ConferenceParticipantResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2507,7 +3788,6 @@ } }, "QueueList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2520,8 +3800,7 @@ "items": { "$ref": "#/components/schemas/QueueResult" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2558,7 +3837,6 @@ } }, "QueueMemberList": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2571,8 +3849,7 @@ "items": { "$ref": "#/components/schemas/QueueMember" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2589,7 +3866,6 @@ } }, "SMSTenDLCCampaignsListResult": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2602,8 +3878,7 @@ "items": { "$ref": "#/components/schemas/SMSTenDLCCampaign" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2641,19 +3916,12 @@ "description": "Alphanumeric identifier of the reseller that you want to associate with this campaign." }, "status": { - "type": "string", - "x-has-writer": true, - "description": "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. ", - "x-enum-type": "SMSTenDLCCampaignStatusEnum", - "x-enum-type-c-sharp": "StatusEnum", - "enum": ["ACTIVE", "EXPIRED"], - "x-enum-varnames": ["ACTIVE", "EXPIRED"] + "$ref": "#/components/schemas/SMSTenDLCCampaignStatus" }, "createDate": { "type": "string", "description": "Unix timestamp when campaign was created.", - "format": "date-time", - "x-is-date-time": true + "format": "date-time" }, "autoRenewal": { "type": "boolean", @@ -2663,7 +3931,6 @@ "type": "string", "description": "Campaign recent billed date.", "format": "date-time", - "x-is-date-time": true, "nullable": true }, "brandId": { @@ -2678,7 +3945,6 @@ }, "subUsecases": { "uniqueItems": true, - "x-is-set": true, "type": "array", "description": "Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases", "items": { @@ -2813,7 +4079,6 @@ "nullable": true, "description": "When the campaign would be due for its next renew/bill date.", "format": "date", - "x-is-date": true, "example": "2000-01-01" } }, @@ -2852,7 +4117,6 @@ } }, "SMSTenDLCPartnerCampaignsListResult": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -2865,8 +4129,7 @@ "items": { "$ref": "#/components/schemas/SMSTenDLCPartnerCampaign" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -2886,19 +4149,12 @@ "description": "Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC." }, "status": { - "type": "string", - "x-has-writer": true, - "description": "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. ", - "x-enum-type": "SMSTenDLCPartnerCampaignStatusEnum", - "x-enum-type-c-sharp": "StatusEnum", - "enum": ["ACTIVE", "EXPIRED"], - "x-enum-varnames": ["ACTIVE", "EXPIRED"] + "$ref": "#/components/schemas/SMSTenDLCPartnerCampaignStatus" }, "createDate": { "type": "string", "description": "Unix timestamp when campaign was created.", - "format": "date-time", - "x-is-date-time": true + "format": "date-time" }, "brandId": { "maxLength": 8, @@ -3023,8 +4279,7 @@ "description": "Subscriber opt-out message." }, "brand": { - "$ref": "#/components/schemas/SMSTenDLCPartnerCampaignBrand", - "x-partner-campaign-brand": true + "$ref": "#/components/schemas/SMSTenDLCPartnerCampaignBrand" } }, "example": { @@ -3073,20 +4328,6 @@ "SMSTenDLCPartnerCampaignBrand": { "required": ["email", "phone"], "type": "object", - "x-is-object": true, - "x-sms-ten-dlc-partner-campaign-brand": true, - "x-ref-properties": [ - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "\"TEST_STRING\"", - "new Dictionary()", - "1" - ], "properties": { "accountId": { "type": "string", @@ -3140,14 +4381,7 @@ "example": "http://www.abcmobile.com" }, "optionalAttributes": { - "x-is-map": true, - "type": "object", - "x-is-hash": true, - "additionalProperties": { - "type": "object", - "description": "Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names." - }, - "description": "Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names." + "$ref": "#/components/schemas/SMSTenDLCOptionalAttributes" }, "evpVettingScore": { "type": "integer", @@ -3156,7 +4390,6 @@ } }, "SMSTenDLCBrandsListResult": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -3169,8 +4402,7 @@ "items": { "$ref": "#/components/schemas/SMSTenDLCBrand" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -3189,7 +4421,6 @@ "vertical" ], "type": "object", - "x-sms-ten-dlc-brand": true, "properties": { "accountId": { "type": "string", @@ -3197,26 +4428,7 @@ "nullable": true }, "entityType": { - "maxLength": 20, - "type": "string", - "x-has-writer": true, - "description": "Entity type behind the brand. This is the form of business establishment.", - "x-enum-type": "SMSTenDLCBrandEntityTypeEnum", - "x-enum-type-c-sharp": "EntityTypeEnum", - "enum": [ - "PRIVATE_PROFIT", - "PUBLIC_PROFIT", - "NON_PROFIT", - "GOVERNMENT", - "SOLE_PROPRIETOR" - ], - "x-enum-varnames": [ - "PRIVATE_PROFIT", - "PUBLIC_PROFIT", - "NON_PROFIT", - "GOVERNMENT", - "SOLE_PROPRIETOR" - ] + "$ref": "#/components/schemas/SMSTenDLCBrandEntityType" }, "cspId": { "type": "string", @@ -3312,70 +4524,7 @@ "example": "ABC" }, "stockExchange": { - "type": "string", - "x-has-writer": true, - "description": "(Required for public company) stock exchange.", - "example": "NASDAQ", - "x-enum-type": "SMSTenDLCBrandStockExchangeEnum", - "x-enum-type-c-sharp": "StockExchangeEnum", - "enum": [ - "NONE", - "NASDAQ", - "NYSE", - "AMEX", - "AMX", - "ASX", - "B3", - "BME", - "BSE", - "FRA", - "ICEX", - "JPX", - "JSE", - "KRX", - "LON", - "NSE", - "OMX", - "SEHK", - "SGX", - "SSE", - "STO", - "SWX", - "SZSE", - "TSX", - "TWSE", - "VSE", - "OTHER" - ], - "x-enum-varnames": [ - "NONE", - "NASDAQ", - "NYSE", - "AMEX", - "AMX", - "ASX", - "B3", - "BME", - "BSE", - "FRA", - "ICEX", - "JPX", - "JSE", - "KRX", - "LON", - "NSE", - "OMX", - "SEHK", - "SGX", - "SSE", - "STO", - "SWX", - "SZSE", - "TSX", - "TWSE", - "VSE", - "OTHER" - ] + "$ref": "#/components/schemas/SMSTenDLCBrandStockExchange" }, "ipAddress": { "maxLength": 50, @@ -3389,25 +4538,7 @@ "example": "http://www.abcmobile.com" }, "brandRelationship": { - "type": "string", - "x-has-writer": true, - "description": "Brand relationship to the CSP", - "x-enum-type": "SMSTenDLCBrandBrandRelationshipEnum", - "x-enum-type-c-sharp": "BrandRelationshipEnum", - "enum": [ - "BASIC_ACCOUNT", - "SMALL_ACCOUNT", - "MEDIUM_ACCOUNT", - "LARGE_ACCOUNT", - "KEY_ACCOUNT" - ], - "x-enum-varnames": [ - "BASIC_ACCOUNT", - "SMALL_ACCOUNT", - "MEDIUM_ACCOUNT", - "LARGE_ACCOUNT", - "KEY_ACCOUNT" - ] + "$ref": "#/components/schemas/SMSTenDLCBrandRelationship" }, "vertical": { "maxLength": 50, @@ -3420,13 +4551,7 @@ "description": "Alternate business identifier such as DUNS, LEI, or GIIN" }, "altBusinessIdType": { - "type": "string", - "x-has-writer": true, - "x-enum-type": "SMSTenDLCBrandAltBusinessIdTypeEnum", - "x-enum-type-c-sharp": "AltBusinessIdTypeEnum", - "enum": ["NONE", "DUNS", "GIIN", "LEI"], - "x-enum-varnames": ["NONE", "DUNS", "GIIN", "LEI"], - "description": "The type of the Alternative business identifier" + "$ref": "#/components/schemas/SMSTenDLCBrandAltBusinessIdType" }, "universalEin": { "type": "string", @@ -3439,43 +4564,19 @@ "description": "Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations." }, "optionalAttributes": { - "x-is-map": true, - "type": "object", - "x-is-hash": true, - "additionalProperties": { - "type": "object", - "description": "Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names." - }, - "description": "Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names." + "$ref": "#/components/schemas/SMSTenDLCOptionalAttributes" }, "mock": { "type": "boolean", "description": "Test brand." }, "identityStatus": { - "type": "string", - "x-has-writer": true, - "description": "TCR assessment of the brand identification status.", - "x-enum-type": "SMSTenDLCBrandIdentityStatusEnum", - "x-enum-type-c-sharp": "IdentityStatusEnum", - "enum": [ - "SELF_DECLARED", - "UNVERIFIED", - "VERIFIED", - "VETTED_VERIFIED" - ], - "x-enum-varnames": [ - "SELF_DECLARED", - "UNVERIFIED", - "VERIFIED", - "VETTED_VERIFIED" - ] + "$ref": "#/components/schemas/SMSTenDLCBrandIdentityStatus" }, "createDate": { "type": "string", "description": "Unix timestamp when brand was created.", - "format": "date-time", - "x-is-date-time": true + "format": "date-time" } }, "description": "A brand is a business identity behind the campaign.", @@ -3512,7 +4613,6 @@ } }, "SMSTollFreeCampaignsListResult": { - "x-implements": "Pagination", "allOf": [ { "$ref": "#/components/schemas/PaginationModel" @@ -3525,8 +4625,7 @@ "items": { "$ref": "#/components/schemas/SMSTollFreeCampaign" }, - "nullable": true, - "x-is-list": true + "nullable": true } } } @@ -3543,7 +4642,6 @@ "dateUpdated", "revision" ], - "x-sms-toll-free-campaign": true, "properties": { "accountId": { "type": "string", @@ -3558,25 +4656,7 @@ "type": "string" }, "registrationStatus": { - "type": "string", - "x-has-writer": true, - "description": "Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. ", - "x-enum-type": "SMSTollFreeCampaignRegistrationStatusEnum", - "x-enum-type-c-sharp": "RegistrationStatusEnum", - "enum": [ - "UNREGISTERED", - "INITIATED", - "PENDING", - "DECLINED", - "REGISTERED" - ], - "x-enum-varnames": [ - "UNREGISTERED", - "INITIATED", - "PENDING", - "DECLINED", - "REGISTERED" - ] + "$ref": "#/components/schemas/SMSTollFreeCampaignRegistrationStatus" }, "dateCreated": { "type": "string" @@ -3589,22 +4669,32 @@ } } }, + "TranscribeUtteranceRecord": { + "type": "object", + "properties": { + "saveRecording": { + "type": "boolean", + "default": false + }, + "maxLengthSec": { + "type": "integer", + "minimum": 1, + "maximum": 60, + "default": 60 + }, + "rcrdTerminationSilenceTimeMs": { + "type": "integer", + "minimum": 1, + "maximum": 3000 + } + } + }, "TranscribeUtterance": { "title": "TranscribeUtterance", "x-stoplight": { "id": "u509r3zqc38ze" }, "description": "The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed.\n\n`TranscribeUtterance` is blocking and is a terminal command. As such, the actionUrl property is required, and control of the Call picks up using the `PerCL` returned in response of the `actionUrl`. Recording and Transcription information is returned in the actionUrl request. If the reason this command ended was due to the call hanging up, any PerCL returned will not execute.", - "x-percl-command": true, - "x-ref-properties": [ - "\"TEST_STRING\"", - "false", - "new TranscribeUtteranceAllOfRecord()", - "false", - "false", - "new List()", - "\"TEST_STRING\"" - ], "allOf": [ { "$ref": "#/components/schemas/PerclCommand" @@ -3615,33 +4705,15 @@ "description": "The `TranscribeUtterance` command transcribes the caller’s voice and returns transcription of the audio and optionally returns the recording of the audio transcribed.\n\n`TranscribeUtterance` is blocking and is a terminal command. As such, the actionUrl property is required, and control of the Call picks up using the `PerCL` returned in response of the `actionUrl`. Recording and Transcription information is returned in the actionUrl request. If the reason this command ended was due to the call hanging up, any PerCL returned will not execute.", "properties": { "actionUrl": { - "type": "string" + "type": "string", + "format": "uri" }, "playBeep": { "type": "boolean", "default": false }, "record": { - "type": "object", - "x-is-object": true, - "properties": { - "saveRecording": { - "type": "boolean", - "default": false - }, - "maxLengthSec": { - "type": "integer", - "minimum": 1, - "maximum": 60, - "default": 60 - }, - "rcrdTerminationSilenceTimeMs": { - "type": "integer", - "exclusiveMinimum": true, - "minimum": 0, - "maximum": 3000 - } - } + "$ref": "#/components/schemas/TranscribeUtteranceRecord" }, "privacyForLogging": { "type": "boolean", @@ -3653,8 +4725,9 @@ }, "prompts": { "type": "array", - "x-is-list": true, - "items": {} + "items": { + "$ref": "#/components/schemas/PerclCommand" + } } } } @@ -3683,7 +4756,6 @@ "CreateWebRTCToken": { "type": "object", "required": ["to", "from", "uses"], - "x-web-rtc": true, "additionalProperties": false, "properties": { "to": { @@ -3865,7 +4937,6 @@ "tags": [], "summary": "List applications", "operationId": "list-applications", - "x-is-paginated": true, "parameters": [ { "name": "alias", @@ -3933,7 +5004,6 @@ "tags": [], "summary": "List available numbers", "operationId": "list-available-numbers", - "x-is-paginated": true, "parameters": [ { "name": "phoneNumber", @@ -4119,7 +5189,6 @@ "tags": [], "summary": "List Incoming Numbers", "operationId": "list-incoming-numbers", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -4445,7 +5514,6 @@ "tags": [], "summary": "List Calls", "operationId": "list-calls", - "x-is-paginated": true, "parameters": [ { "name": "active", @@ -4550,7 +5618,6 @@ "tags": [], "summary": "List Call Recordings", "operationId": "list-call-recordings", - "x-is-paginated": true, "parameters": [ { "name": "dateCreated", @@ -4594,7 +5661,6 @@ "tags": [], "summary": "List Call Logs", "operationId": "list-call-logs", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -4628,7 +5694,6 @@ "post": { "summary": "Make a JWT for WebRTC calling", "operationId": "make-a-webrtc-jwt", - "x-web-rtc": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -4698,7 +5763,6 @@ "tags": [], "summary": "List Conferences", "operationId": "list-conferences", - "x-is-paginated": true, "parameters": [ { "name": "status", @@ -4957,7 +6021,6 @@ "tags": [], "summary": "List Participants", "operationId": "list-participants", - "x-is-paginated": true, "parameters": [ { "name": "talk", @@ -5019,7 +6082,6 @@ "tags": [], "summary": "List Conference Recordings", "operationId": "list-conference-recordings", - "x-is-paginated": true, "parameters": [ { "name": "callId", @@ -5148,7 +6210,6 @@ "tags": [], "summary": "List Active Queues", "operationId": "list-active-queues", - "x-is-paginated": true, "parameters": [ { "name": "alias", @@ -5282,7 +6343,6 @@ "tags": [], "summary": "List Members", "operationId": "list-members", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -5401,7 +6461,6 @@ "tags": [], "summary": "List All Account Logs", "operationId": "list-all-account-logs", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -5461,7 +6520,6 @@ "tags": [], "summary": "List Recordings", "operationId": "list-recordings", - "x-is-paginated": true, "parameters": [ { "name": "callId", @@ -5643,7 +6701,6 @@ "tags": [], "summary": "List SMS Messages", "operationId": "list-sms-messages", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -5808,8 +6865,7 @@ "get": { "tags": [], "summary": "Get list of SMS 10DLC Campaigns", - "operationId": "get-tenDLC-sms-Campaigns", - "x-is-paginated": true, + "operationId": "get-tenDLC-sms-campaigns", "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -5922,7 +6978,6 @@ "tags": [], "summary": "Get list of SMS 10DLC Partner Campaigns", "operationId": "get-tenDLC-sms-partnerCampaigns", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -6044,7 +7099,6 @@ "tags": [], "summary": "Get list of SMS 10DLC Brands", "operationId": "get-tenDLC-sms-brands", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" @@ -6146,7 +7200,6 @@ "tags": [], "summary": "Get list of TollFree Campaigns", "operationId": "get-tollFree-sms-campaigns", - "x-is-paginated": true, "parameters": [ { "$ref": "#/components/parameters/AccountId" diff --git a/package.json b/package.json index c6f6aac..df830c5 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "dependencies": { - "@stoplight/prism-cli": "5.6.0" + "@stoplight/prism-cli": "5.6.0", + "fast-xml-parser": "^4.5.0", + "jsonpath-plus": "^10.0.0" }, "resolutions": { - "@stoplight/json": "3.20.0", - "jsonpath-plus": "^10.0.0", - "fast-xml-parser": "^4.5.0" + "@stoplight/json": "3.20.0" } } diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8bbc602 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,72 @@ +[tool.poetry] +name = "freeclimb" +version = "5.0.0" +description = "FreeClimb API" +authors = ["FreeClimb API Support "] +license = "NoLicense" +readme = "README.md" +repository = "https://https://github.com/freeclimbapi/python-sdk" +keywords = ["OpenAPI", "OpenAPI-Generator", "FreeClimb API"] +include = ["freeclimb/py.typed"] + +[tool.poetry.dependencies] +python = "^3.8" + +urllib3 = ">= 1.25.3 < 3.0.0" +python-dateutil = ">= 2.8.2" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "freeclimb", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/requirements.txt b/requirements.txt index 96947f6..67f7f68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3 +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/setup.py b/setup.py index e6255cd..0ffea03 100644 --- a/setup.py +++ b/setup.py @@ -1,28 +1,34 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 from setuptools import setup, find_packages # noqa: H301 -NAME = "FreeClimb" -VERSION = "4.9.0" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools - +NAME = "FreeClimb" +VERSION = "5.0.0" +PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", ] setup( @@ -33,11 +39,12 @@ author_email="support@freeclimb.com", url="https://freeclimb.com", keywords=["OpenAPI", "OpenAPI-Generator", "FreeClimb API"], - python_requires=">=3.6", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + long_description_content_type="text/markdown", long_description="""\ - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - """ + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + """, # noqa: E501 + package_data={"freeclimb": ["py.typed"]}, ) diff --git a/test/api/__init__.py b/test/api/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/test/api/__init__.py @@ -0,0 +1 @@ + diff --git a/test/test_default_api.py b/test/api/test_default_api.py similarity index 59% rename from test/test_default_api.py rename to test/api/test_default_api.py index 5d37efb..239343d 100644 --- a/test/test_default_api.py +++ b/test/api/test_default_api.py @@ -1,1020 +1,1115 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 + +import freeclimb +from freeclimb.models.play_beep import PlayBeep +from freeclimb.models.call_status import CallStatus +from freeclimb.models.message_direction import MessageDirection +from freeclimb.models.update_call_request_status import UpdateCallRequestStatus +from freeclimb.models.update_conference_request_status import ( + UpdateConferenceRequestStatus, +) + +from freeclimb.models.account_request import AccountRequest +from freeclimb.models.account_result import AccountResult +from freeclimb.models.application_list import ApplicationList +from freeclimb.models.application_request import ApplicationRequest +from freeclimb.models.application_result import ApplicationResult +from freeclimb.models.available_number_list import AvailableNumberList +from freeclimb.models.buy_incoming_number_request import BuyIncomingNumberRequest +from freeclimb.models.call_list import CallList +from freeclimb.models.call_result import CallResult +from freeclimb.models.conference_list import ConferenceList +from freeclimb.models.conference_participant_list import ConferenceParticipantList +from freeclimb.models.conference_participant_result import ConferenceParticipantResult +from freeclimb.models.conference_result import ConferenceResult +from freeclimb.models.completion_result import CompletionResult +from freeclimb.models.completion_request import CompletionRequest +from freeclimb.models.create_conference_request import CreateConferenceRequest +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken +from freeclimb.models.filter_logs_request import FilterLogsRequest +from freeclimb.models.incoming_number_list import IncomingNumberList +from freeclimb.models.incoming_number_request import IncomingNumberRequest +from freeclimb.models.incoming_number_result import IncomingNumberResult +from freeclimb.models.log_list import LogList +from freeclimb.models.make_call_request import MakeCallRequest +from freeclimb.models.message_request import MessageRequest +from freeclimb.models.message_result import MessageResult +from freeclimb.models.messages_list import MessagesList +from freeclimb.models.queue_list import QueueList +from freeclimb.models.queue_member import QueueMember +from freeclimb.models.queue_member_list import QueueMemberList +from freeclimb.models.queue_request import QueueRequest +from freeclimb.models.queue_result import QueueResult +from freeclimb.models.recording_list import RecordingList +from freeclimb.models.recording_result import RecordingResult +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import ( + SMSTenDLCPartnerCampaignsListResult, +) +from freeclimb.models.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult +from freeclimb.models.sms_ten_dlc_campaigns_list_result import ( + SMSTenDLCCampaignsListResult, +) +from freeclimb.models.sms_toll_free_campaigns_list_result import ( + SMSTollFreeCampaignsListResult, +) +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand +from freeclimb.models.sms_toll_free_campaign import SMSTollFreeCampaign +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign +from freeclimb.models.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign +from freeclimb.models.update_call_request import UpdateCallRequest +from freeclimb.models.update_conference_participant_request import ( + UpdateConferenceParticipantRequest, +) +from freeclimb.models.update_conference_request import UpdateConferenceRequest import unittest -from test.helpers import TestHelpers, MockPoolManager -import freeclimb -from freeclimb.api.default_api import DefaultApi # noqa: E501 - -from freeclimb.model.play_beep import PlayBeep -from freeclimb.model.call_status import CallStatus -from freeclimb.model.message_direction import MessageDirection -from freeclimb.model.update_call_request_status import UpdateCallRequestStatus -from freeclimb.model.update_conference_request_status import UpdateConferenceRequestStatus - -from freeclimb.model.account_request import AccountRequest -from freeclimb.model.account_result import AccountResult -from freeclimb.model.application_list import ApplicationList -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult -from freeclimb.model.available_number_list import AvailableNumberList -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.call_list import CallList -from freeclimb.model.call_result import CallResult -from freeclimb.model.conference_list import ConferenceList -from freeclimb.model.conference_participant_list import ConferenceParticipantList -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.conference_result import ConferenceResult -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.filter_logs_request import FilterLogsRequest -from freeclimb.model.incoming_number_list import IncomingNumberList -from freeclimb.model.incoming_number_request import IncomingNumberRequest -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.log_list import LogList -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.message_request import MessageRequest -from freeclimb.model.message_result import MessageResult -from freeclimb.model.messages_list import MessagesList -from freeclimb.model.queue_list import QueueList -from freeclimb.model.queue_member import QueueMember -from freeclimb.model.queue_member_list import QueueMemberList -from freeclimb.model.queue_request import QueueRequest -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.recording_list import RecordingList -from freeclimb.model.recording_result import RecordingResult -from freeclimb.model.update_call_request import UpdateCallRequest -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest - -from io import BufferedReader as file_type - -from freeclimb.model.account_request import AccountRequest -from freeclimb.model.account_result import AccountResult -from freeclimb.model.application_list import ApplicationList -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.application_result import ApplicationResult -from freeclimb.model.available_number_list import AvailableNumberList -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.call_list import CallList -from freeclimb.model.call_result import CallResult -from freeclimb.model.call_status import CallStatus -from freeclimb.model.completion_request import CompletionRequest -from freeclimb.model.completion_result import CompletionResult -from freeclimb.model.conference_list import ConferenceList -from freeclimb.model.conference_participant_list import ConferenceParticipantList -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.conference_result import ConferenceResult -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.create_web_rtc_token import CreateWebRTCToken -from freeclimb.model.filter_logs_request import FilterLogsRequest -from freeclimb.model.incoming_number_list import IncomingNumberList -from freeclimb.model.incoming_number_request import IncomingNumberRequest -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.log_list import LogList -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.message_direction import MessageDirection -from freeclimb.model.message_request import MessageRequest -from freeclimb.model.message_result import MessageResult -from freeclimb.model.messages_list import MessagesList -from freeclimb.model.queue_list import QueueList -from freeclimb.model.queue_member import QueueMember -from freeclimb.model.queue_member_list import QueueMemberList -from freeclimb.model.queue_request import QueueRequest -from freeclimb.model.queue_result import QueueResult -from freeclimb.model.recording_list import RecordingList -from freeclimb.model.recording_result import RecordingResult -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand -from freeclimb.model.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign -from freeclimb.model.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign -from freeclimb.model.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult -from freeclimb.model.update_call_request import UpdateCallRequest -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest - -import json +from freeclimb.api.default_api import DefaultApi + class TestDefaultApi(unittest.TestCase): """DefaultApi unit test stubs""" - def setUp(self): + def setUp(self) -> None: configuration = freeclimb.Configuration( - host = 'http://127.0.0.1:4010', - username = 'TEST_ACCOUNT_ID', - password = 'TEST_API_KEY' + host="http://127.0.0.1:4010", + username="TEST_ACCOUNT_ID", + password="TEST_API_KEY", ) - self.api = DefaultApi(freeclimb.ApiClient(configuration)) # noqa: E501 + api_client = freeclimb.ApiClient(configuration) + self.api = freeclimb.DefaultApi(api_client) - def tearDown(self): + def tearDown(self) -> None: pass - def test_buy_a_phone_number(self): + def test_buy_a_phone_number(self) -> None: """Test case for buy_a_phone_number - Buy a Phone Number # noqa: E501 + Buy a Phone Number """ - buy_incoming_number_request = buy_incoming_number_request_buy_a_phone_number_test_value + buy_incoming_number_request = ( + buy_incoming_number_request_buy_a_phone_number_test_value + ) + api_response = self.api.buy_a_phone_number( + buy_incoming_number_request=buy_incoming_number_request + ) - api_response = self.api.buy_a_phone_number(buy_incoming_number_request=buy_incoming_number_request) - assert isinstance(api_response, IncomingNumberResult) - def test_create_a_conference(self): + def test_create_a_conference(self) -> None: """Test case for create_a_conference - Create a Conference # noqa: E501 + Create a Conference """ - create_conference_request = create_conference_request_create_a_conference_test_value + create_conference_request = ( + create_conference_request_create_a_conference_test_value + ) + api_response = self.api.create_a_conference( + create_conference_request=create_conference_request + ) - api_response = self.api.create_a_conference(create_conference_request=create_conference_request) - assert isinstance(api_response, ConferenceResult) - def test_create_a_queue(self): + def test_create_a_queue(self) -> None: """Test case for create_a_queue - Create a Queue # noqa: E501 + Create a Queue """ queue_request = queue_request_create_a_queue_test_value - api_response = self.api.create_a_queue(queue_request=queue_request) - + assert isinstance(api_response, QueueResult) - def test_create_an_application(self): + def test_create_an_application(self) -> None: """Test case for create_an_application - Create an application # noqa: E501 + Create an application """ application_request = application_request_create_an_application_test_value + api_response = self.api.create_an_application( + application_request=application_request + ) - api_response = self.api.create_an_application(application_request=application_request) - assert isinstance(api_response, ApplicationResult) - def test_create_knowledge_base_completion(self): + def test_create_knowledge_base_completion(self) -> None: """Test case for create_knowledge_base_completion - Query the knowledge base # noqa: E501 + Query the knowledge base """ - knowledge_base_id = knowledge_base_id_create_knowledge_base_completion_test_value - completion_request = completion_request_create_knowledge_base_completion_test_value + knowledge_base_id = ( + knowledge_base_id_create_knowledge_base_completion_test_value + ) + + completion_request = ( + completion_request_create_knowledge_base_completion_test_value + ) + api_response = self.api.create_knowledge_base_completion( + knowledge_base_id=knowledge_base_id, completion_request=completion_request + ) - api_response = self.api.create_knowledge_base_completion(knowledge_base_id=knowledge_base_id,completion_request=completion_request) - assert isinstance(api_response, CompletionResult) - def test_delete_a_recording(self): + def test_delete_a_recording(self) -> None: """Test case for delete_a_recording - Delete a Recording # noqa: E501 + Delete a Recording """ recording_id = recording_id_delete_a_recording_test_value - api_response = self.api.delete_a_recording(recording_id=recording_id) - - - def test_delete_an_application(self): + def test_delete_an_application(self) -> None: """Test case for delete_an_application - Delete an application # noqa: E501 + Delete an application """ application_id = application_id_delete_an_application_test_value - api_response = self.api.delete_an_application(application_id=application_id) - - - def test_delete_an_incoming_number(self): + def test_delete_an_incoming_number(self) -> None: """Test case for delete_an_incoming_number - Delete an Incoming Number # noqa: E501 + Delete an Incoming Number """ phone_number_id = phone_number_id_delete_an_incoming_number_test_value + api_response = self.api.delete_an_incoming_number( + phone_number_id=phone_number_id + ) - api_response = self.api.delete_an_incoming_number(phone_number_id=phone_number_id) - - - - def test_dequeue_a_member(self): + def test_dequeue_a_member(self) -> None: """Test case for dequeue_a_member - Dequeue a Member # noqa: E501 + Dequeue a Member """ queue_id = queue_id_dequeue_a_member_test_value + call_id = call_id_dequeue_a_member_test_value + api_response = self.api.dequeue_a_member(queue_id=queue_id, call_id=call_id) - api_response = self.api.dequeue_a_member(queue_id=queue_id,call_id=call_id) - assert isinstance(api_response, QueueMember) - def test_dequeue_head_member(self): + def test_dequeue_head_member(self) -> None: """Test case for dequeue_head_member - Dequeue Head Member # noqa: E501 + Dequeue Head Member """ queue_id = queue_id_dequeue_head_member_test_value - api_response = self.api.dequeue_head_member(queue_id=queue_id) - + assert isinstance(api_response, QueueMember) - def test_download_a_recording_file(self): + def test_download_a_recording_file(self) -> None: """Test case for download_a_recording_file - Download a Recording File # noqa: E501 + Download a Recording File """ recording_id = recording_id_download_a_recording_file_test_value - api_response = self.api.download_a_recording_file(recording_id=recording_id) - - assert isinstance(api_response, file_type) - def test_filter_logs(self): + assert isinstance(api_response, bytes) + + def test_filter_logs(self) -> None: """Test case for filter_logs - Filter Logs # noqa: E501 + Filter Logs """ filter_logs_request = filter_logs_request_filter_logs_test_value - api_response = self.api.filter_logs(filter_logs_request=filter_logs_request) - + assert isinstance(api_response, LogList) - def test_get_a_call(self): + def test_get_a_call(self) -> None: """Test case for get_a_call - Get a Call # noqa: E501 + Get a Call """ call_id = call_id_get_a_call_test_value - api_response = self.api.get_a_call(call_id=call_id) - + assert isinstance(api_response, CallResult) - def test_get_a_conference(self): + def test_get_a_conference(self) -> None: """Test case for get_a_conference - Get a Conference # noqa: E501 + Get a Conference """ conference_id = conference_id_get_a_conference_test_value - api_response = self.api.get_a_conference(conference_id=conference_id) - + assert isinstance(api_response, ConferenceResult) - def test_get_a_member(self): + def test_get_a_member(self) -> None: """Test case for get_a_member - Get a Member # noqa: E501 + Get a Member """ queue_id = queue_id_get_a_member_test_value + call_id = call_id_get_a_member_test_value + api_response = self.api.get_a_member(queue_id=queue_id, call_id=call_id) - api_response = self.api.get_a_member(queue_id=queue_id,call_id=call_id) - assert isinstance(api_response, QueueMember) - def test_get_a_participant(self): + def test_get_a_participant(self) -> None: """Test case for get_a_participant - Get a Participant # noqa: E501 + Get a Participant """ conference_id = conference_id_get_a_participant_test_value + call_id = call_id_get_a_participant_test_value + api_response = self.api.get_a_participant( + conference_id=conference_id, call_id=call_id + ) - api_response = self.api.get_a_participant(conference_id=conference_id,call_id=call_id) - assert isinstance(api_response, ConferenceParticipantResult) - def test_get_a_queue(self): + def test_get_a_queue(self) -> None: """Test case for get_a_queue - Get a Queue # noqa: E501 + Get a Queue """ queue_id = queue_id_get_a_queue_test_value - api_response = self.api.get_a_queue(queue_id=queue_id) - + assert isinstance(api_response, QueueResult) - def test_get_a_recording(self): + def test_get_a_recording(self) -> None: """Test case for get_a_recording - Get a Recording # noqa: E501 + Get a Recording """ recording_id = recording_id_get_a_recording_test_value - api_response = self.api.get_a_recording(recording_id=recording_id) - + assert isinstance(api_response, RecordingResult) - def test_get_an_account(self): + def test_get_an_account(self) -> None: """Test case for get_an_account - Get an Account # noqa: E501 + Get an Account """ - - api_response = self.api.get_an_account() - + assert isinstance(api_response, AccountResult) - def test_get_an_application(self): + def test_get_an_application(self) -> None: """Test case for get_an_application - Get an Application # noqa: E501 + Get an Application """ application_id = application_id_get_an_application_test_value - api_response = self.api.get_an_application(application_id=application_id) - + assert isinstance(api_response, ApplicationResult) - def test_get_an_incoming_number(self): + def test_get_an_incoming_number(self) -> None: """Test case for get_an_incoming_number - Get an Incoming Number # noqa: E501 + Get an Incoming Number """ phone_number_id = phone_number_id_get_an_incoming_number_test_value - api_response = self.api.get_an_incoming_number(phone_number_id=phone_number_id) - + assert isinstance(api_response, IncomingNumberResult) - def test_get_an_sms_message(self): + def test_get_an_sms_message(self) -> None: """Test case for get_an_sms_message - Get an SMS Message # noqa: E501 + Get an SMS Message """ message_id = message_id_get_an_sms_message_test_value - api_response = self.api.get_an_sms_message(message_id=message_id) - + assert isinstance(api_response, MessageResult) - def test_get_head_member(self): + def test_get_head_member(self) -> None: """Test case for get_head_member - Get Head Member # noqa: E501 + Get Head Member """ queue_id = queue_id_get_head_member_test_value - api_response = self.api.get_head_member(queue_id=queue_id) - + assert isinstance(api_response, QueueMember) - def test_get_ten_dlc_sms_brand(self): + def test_get_ten_dlc_sms_brand(self) -> None: """Test case for get_ten_dlc_sms_brand - Get a 10DLC SMS Brand # noqa: E501 + Get a 10DLC SMS Brand """ brand_id = brand_id_get_ten_dlc_sms_brand_test_value - api_response = self.api.get_ten_dlc_sms_brand(brand_id=brand_id) - + assert isinstance(api_response, SMSTenDLCBrand) - def test_get_ten_dlc_sms_brands(self): + def test_get_ten_dlc_sms_brands(self) -> None: """Test case for get_ten_dlc_sms_brands - Get list of SMS 10DLC Brands # noqa: E501 + Get list of SMS 10DLC Brands """ - - api_response = self.api.get_ten_dlc_sms_brands() - + assert isinstance(api_response, SMSTenDLCBrandsListResult) - def test_get_ten_dlc_sms_campaign(self): + def test_get_ten_dlc_sms_campaign(self) -> None: """Test case for get_ten_dlc_sms_campaign - Get a 10DLC SMS Campaign # noqa: E501 + Get a 10DLC SMS Campaign """ campaign_id = campaign_id_get_ten_dlc_sms_campaign_test_value - api_response = self.api.get_ten_dlc_sms_campaign(campaign_id=campaign_id) - + assert isinstance(api_response, SMSTenDLCCampaign) - def test_get_ten_dlc_sms_campaigns(self): + def test_get_ten_dlc_sms_campaigns(self) -> None: """Test case for get_ten_dlc_sms_campaigns - Get list of SMS 10DLC Campaigns # noqa: E501 + Get list of SMS 10DLC Campaigns """ brand_id = brand_id_get_ten_dlc_sms_campaigns_test_value - api_response = self.api.get_ten_dlc_sms_campaigns(brand_id=brand_id) - + assert isinstance(api_response, SMSTenDLCCampaignsListResult) - def test_get_ten_dlc_sms_partner_campaign(self): + def test_get_ten_dlc_sms_partner_campaign(self) -> None: """Test case for get_ten_dlc_sms_partner_campaign - Get a 10DLC SMS Partner Campaign # noqa: E501 + Get a 10DLC SMS Partner Campaign """ campaign_id = campaign_id_get_ten_dlc_sms_partner_campaign_test_value + api_response = self.api.get_ten_dlc_sms_partner_campaign( + campaign_id=campaign_id + ) - api_response = self.api.get_ten_dlc_sms_partner_campaign(campaign_id=campaign_id) - assert isinstance(api_response, SMSTenDLCPartnerCampaign) - def test_get_ten_dlc_sms_partner_campaigns(self): + def test_get_ten_dlc_sms_partner_campaigns(self) -> None: """Test case for get_ten_dlc_sms_partner_campaigns - Get list of SMS 10DLC Partner Campaigns # noqa: E501 + Get list of SMS 10DLC Partner Campaigns """ brand_id = brand_id_get_ten_dlc_sms_partner_campaigns_test_value - api_response = self.api.get_ten_dlc_sms_partner_campaigns(brand_id=brand_id) - + assert isinstance(api_response, SMSTenDLCPartnerCampaignsListResult) - def test_get_toll_free_sms_campaign(self): + def test_get_toll_free_sms_campaign(self) -> None: """Test case for get_toll_free_sms_campaign - Get a TollFree SMS Campaign # noqa: E501 + Get a TollFree SMS Campaign """ campaign_id = campaign_id_get_toll_free_sms_campaign_test_value - api_response = self.api.get_toll_free_sms_campaign(campaign_id=campaign_id) - + assert isinstance(api_response, SMSTollFreeCampaign) - def test_get_toll_free_sms_campaigns(self): + def test_get_toll_free_sms_campaigns(self) -> None: """Test case for get_toll_free_sms_campaigns - Get list of TollFree Campaigns # noqa: E501 + Get list of TollFree Campaigns """ - - api_response = self.api.get_toll_free_sms_campaigns() - + assert isinstance(api_response, SMSTollFreeCampaignsListResult) - def test_list_active_queues(self): + def test_list_active_queues(self) -> None: """Test case for list_active_queues - List Active Queues # noqa: E501 + List Active Queues """ alias = alias_list_active_queues_test_value - api_response = self.api.list_active_queues(alias=alias) - + assert isinstance(api_response, QueueList) - def test_list_all_account_logs(self): + def test_list_all_account_logs(self) -> None: """Test case for list_all_account_logs - List All Account Logs # noqa: E501 + List All Account Logs """ - - api_response = self.api.list_all_account_logs() - + assert isinstance(api_response, LogList) - def test_list_applications(self): + def test_list_applications(self) -> None: """Test case for list_applications - List applications # noqa: E501 + List applications """ alias = alias_list_applications_test_value - api_response = self.api.list_applications(alias=alias) - + assert isinstance(api_response, ApplicationList) - def test_list_available_numbers(self): + def test_list_available_numbers(self) -> None: """Test case for list_available_numbers - List available numbers # noqa: E501 + List available numbers """ phone_number = phone_number_list_available_numbers_test_value + region = region_list_available_numbers_test_value + country = country_list_available_numbers_test_value + voice_enabled = voice_enabled_list_available_numbers_test_value + sms_enabled = sms_enabled_list_available_numbers_test_value + capabilities_voice = capabilities_voice_list_available_numbers_test_value + capabilities_sms = capabilities_sms_list_available_numbers_test_value - capabilities_toll_free = capabilities_toll_free_list_available_numbers_test_value + + capabilities_toll_free = ( + capabilities_toll_free_list_available_numbers_test_value + ) + capabilities_ten_dlc = capabilities_ten_dlc_list_available_numbers_test_value - capabilities_short_code = capabilities_short_code_list_available_numbers_test_value + capabilities_short_code = ( + capabilities_short_code_list_available_numbers_test_value + ) + + api_response = self.api.list_available_numbers( + phone_number=phone_number, + region=region, + country=country, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + ) - api_response = self.api.list_available_numbers(phone_number=phone_number,region=region,country=country,voice_enabled=voice_enabled,sms_enabled=sms_enabled,capabilities_voice=capabilities_voice,capabilities_sms=capabilities_sms,capabilities_toll_free=capabilities_toll_free,capabilities_ten_dlc=capabilities_ten_dlc,capabilities_short_code=capabilities_short_code) - assert isinstance(api_response, AvailableNumberList) - def test_list_call_logs(self): + def test_list_call_logs(self) -> None: """Test case for list_call_logs - List Call Logs # noqa: E501 + List Call Logs """ call_id = call_id_list_call_logs_test_value - api_response = self.api.list_call_logs(call_id=call_id) - + assert isinstance(api_response, LogList) - def test_list_call_recordings(self): + def test_list_call_recordings(self) -> None: """Test case for list_call_recordings - List Call Recordings # noqa: E501 + List Call Recordings """ call_id = call_id_list_call_recordings_test_value + date_created = date_created_list_call_recordings_test_value + api_response = self.api.list_call_recordings( + call_id=call_id, date_created=date_created + ) - api_response = self.api.list_call_recordings(call_id=call_id,date_created=date_created) - assert isinstance(api_response, RecordingList) - def test_list_calls(self): + def test_list_calls(self) -> None: """Test case for list_calls - List Calls # noqa: E501 + List Calls """ active = active_list_calls_test_value + to = to_list_calls_test_value - _from = _from_list_calls_test_value + + var_from = var_from_list_calls_test_value + status = status_list_calls_test_value + start_time = start_time_list_calls_test_value + end_time = end_time_list_calls_test_value + parent_call_id = parent_call_id_list_calls_test_value + application_id = application_id_list_calls_test_value + api_response = self.api.list_calls( + active=active, + to=to, + var_from=var_from, + status=status, + start_time=start_time, + end_time=end_time, + parent_call_id=parent_call_id, + application_id=application_id, + ) - api_response = self.api.list_calls(active=active,to=to,_from=_from,status=status,start_time=start_time,end_time=end_time,parent_call_id=parent_call_id,application_id=application_id) - assert isinstance(api_response, CallList) - def test_list_conference_recordings(self): + def test_list_conference_recordings(self) -> None: """Test case for list_conference_recordings - List Conference Recordings # noqa: E501 + List Conference Recordings """ conference_id = conference_id_list_conference_recordings_test_value + call_id = call_id_list_conference_recordings_test_value + date_created = date_created_list_conference_recordings_test_value + api_response = self.api.list_conference_recordings( + conference_id=conference_id, call_id=call_id, date_created=date_created + ) - api_response = self.api.list_conference_recordings(conference_id=conference_id,call_id=call_id,date_created=date_created) - assert isinstance(api_response, RecordingList) - def test_list_conferences(self): + def test_list_conferences(self) -> None: """Test case for list_conferences - List Conferences # noqa: E501 + List Conferences """ status = status_list_conferences_test_value + alias = alias_list_conferences_test_value + date_created = date_created_list_conferences_test_value + date_updated = date_updated_list_conferences_test_value + api_response = self.api.list_conferences( + status=status, + alias=alias, + date_created=date_created, + date_updated=date_updated, + ) - api_response = self.api.list_conferences(status=status,alias=alias,date_created=date_created,date_updated=date_updated) - assert isinstance(api_response, ConferenceList) - def test_list_incoming_numbers(self): + def test_list_incoming_numbers(self) -> None: """Test case for list_incoming_numbers - List Incoming Numbers # noqa: E501 + List Incoming Numbers """ phone_number = phone_number_list_incoming_numbers_test_value + alias = alias_list_incoming_numbers_test_value + region = region_list_incoming_numbers_test_value + country = country_list_incoming_numbers_test_value + application_id = application_id_list_incoming_numbers_test_value + has_application = has_application_list_incoming_numbers_test_value + voice_enabled = voice_enabled_list_incoming_numbers_test_value + sms_enabled = sms_enabled_list_incoming_numbers_test_value + has_campaign = has_campaign_list_incoming_numbers_test_value + capabilities_voice = capabilities_voice_list_incoming_numbers_test_value + capabilities_sms = capabilities_sms_list_incoming_numbers_test_value + capabilities_toll_free = capabilities_toll_free_list_incoming_numbers_test_value + capabilities_ten_dlc = capabilities_ten_dlc_list_incoming_numbers_test_value - capabilities_short_code = capabilities_short_code_list_incoming_numbers_test_value + + capabilities_short_code = ( + capabilities_short_code_list_incoming_numbers_test_value + ) + tfn_campaign_id = tfn_campaign_id_list_incoming_numbers_test_value + offnet = offnet_list_incoming_numbers_test_value + api_response = self.api.list_incoming_numbers( + phone_number=phone_number, + alias=alias, + region=region, + country=country, + application_id=application_id, + has_application=has_application, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + has_campaign=has_campaign, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + tfn_campaign_id=tfn_campaign_id, + offnet=offnet, + ) - api_response = self.api.list_incoming_numbers(phone_number=phone_number,alias=alias,region=region,country=country,application_id=application_id,has_application=has_application,voice_enabled=voice_enabled,sms_enabled=sms_enabled,has_campaign=has_campaign,capabilities_voice=capabilities_voice,capabilities_sms=capabilities_sms,capabilities_toll_free=capabilities_toll_free,capabilities_ten_dlc=capabilities_ten_dlc,capabilities_short_code=capabilities_short_code,tfn_campaign_id=tfn_campaign_id,offnet=offnet) - assert isinstance(api_response, IncomingNumberList) - def test_list_members(self): + def test_list_members(self) -> None: """Test case for list_members - List Members # noqa: E501 + List Members """ queue_id = queue_id_list_members_test_value - api_response = self.api.list_members(queue_id=queue_id) - + assert isinstance(api_response, QueueMemberList) - def test_list_participants(self): + def test_list_participants(self) -> None: """Test case for list_participants - List Participants # noqa: E501 + List Participants """ conference_id = conference_id_list_participants_test_value + talk = talk_list_participants_test_value + listen = listen_list_participants_test_value + dtmf_pass_through = dtmf_pass_through_list_participants_test_value + + api_response = self.api.list_participants( + conference_id=conference_id, + talk=talk, + listen=listen, + dtmf_pass_through=dtmf_pass_through, + ) - api_response = self.api.list_participants(conference_id=conference_id,talk=talk,listen=listen) - assert isinstance(api_response, ConferenceParticipantList) - def test_list_recordings(self): + def test_list_recordings(self) -> None: """Test case for list_recordings - List Recordings # noqa: E501 + List Recordings """ call_id = call_id_list_recordings_test_value + conference_id = conference_id_list_recordings_test_value + date_created = date_created_list_recordings_test_value + api_response = self.api.list_recordings( + call_id=call_id, conference_id=conference_id, date_created=date_created + ) - api_response = self.api.list_recordings(call_id=call_id,conference_id=conference_id,date_created=date_created) - assert isinstance(api_response, RecordingList) - def test_list_sms_messages(self): + def test_list_sms_messages(self) -> None: """Test case for list_sms_messages - List SMS Messages # noqa: E501 + List SMS Messages """ to = to_list_sms_messages_test_value - _from = _from_list_sms_messages_test_value + + var_from = var_from_list_sms_messages_test_value + begin_time = begin_time_list_sms_messages_test_value + end_time = end_time_list_sms_messages_test_value + direction = direction_list_sms_messages_test_value + campaign_id = campaign_id_list_sms_messages_test_value + brand_id = brand_id_list_sms_messages_test_value + is10_dlc = is10_dlc_list_sms_messages_test_value + api_response = self.api.list_sms_messages( + to=to, + var_from=var_from, + begin_time=begin_time, + end_time=end_time, + direction=direction, + campaign_id=campaign_id, + brand_id=brand_id, + is10_dlc=is10_dlc, + ) - api_response = self.api.list_sms_messages(to=to,_from=_from,begin_time=begin_time,end_time=end_time,direction=direction,campaign_id=campaign_id,brand_id=brand_id,is10_dlc=is10_dlc) - assert isinstance(api_response, MessagesList) - def test_make_a_call(self): + def test_make_a_call(self) -> None: """Test case for make_a_call - Make a Call # noqa: E501 + Make a Call """ make_call_request = make_call_request_make_a_call_test_value - api_response = self.api.make_a_call(make_call_request=make_call_request) - + assert isinstance(api_response, CallResult) - def test_make_a_webrtc_jwt(self): + def test_make_a_webrtc_jwt(self) -> None: """Test case for make_a_webrtc_jwt - Make a JWT for WebRTC calling # noqa: E501 + Make a JWT for WebRTC calling """ create_web_rtc_token = create_web_rtc_token_make_a_webrtc_jwt_test_value + api_response = self.api.make_a_webrtc_jwt( + create_web_rtc_token=create_web_rtc_token + ) - api_response = self.api.make_a_webrtc_jwt(create_web_rtc_token=create_web_rtc_token) - assert isinstance(api_response, str) - def test_remove_a_participant(self): + def test_remove_a_participant(self) -> None: """Test case for remove_a_participant - Remove a Participant # noqa: E501 + Remove a Participant """ conference_id = conference_id_remove_a_participant_test_value - call_id = call_id_remove_a_participant_test_value + call_id = call_id_remove_a_participant_test_value - api_response = self.api.remove_a_participant(conference_id=conference_id,call_id=call_id) - - + api_response = self.api.remove_a_participant( + conference_id=conference_id, call_id=call_id + ) - def test_send_an_sms_message(self): + def test_send_an_sms_message(self) -> None: """Test case for send_an_sms_message - Send an SMS Message # noqa: E501 + Send an SMS Message """ message_request = message_request_send_an_sms_message_test_value - api_response = self.api.send_an_sms_message(message_request=message_request) - + assert isinstance(api_response, MessageResult) - def test_stream_a_recording_file(self): + def test_stream_a_recording_file(self) -> None: """Test case for stream_a_recording_file - Stream a Recording File # noqa: E501 + Stream a Recording File """ recording_id = recording_id_stream_a_recording_file_test_value - api_response = self.api.stream_a_recording_file(recording_id=recording_id) - - assert isinstance(api_response, file_type) - def test_update_a_conference(self): + assert isinstance(api_response, bytes) + + def test_update_a_conference(self) -> None: """Test case for update_a_conference - Update a Conference # noqa: E501 + Update a Conference """ conference_id = conference_id_update_a_conference_test_value - update_conference_request = update_conference_request_update_a_conference_test_value + update_conference_request = ( + update_conference_request_update_a_conference_test_value + ) - api_response = self.api.update_a_conference(conference_id=conference_id,update_conference_request=update_conference_request) - - + api_response = self.api.update_a_conference( + conference_id=conference_id, + update_conference_request=update_conference_request, + ) - def test_update_a_live_call(self): + def test_update_a_live_call(self) -> None: """Test case for update_a_live_call - Update a Live Call # noqa: E501 + Update a Live Call """ call_id = call_id_update_a_live_call_test_value - update_call_request = update_call_request_update_a_live_call_test_value + update_call_request = update_call_request_update_a_live_call_test_value - api_response = self.api.update_a_live_call(call_id=call_id,update_call_request=update_call_request) - - + api_response = self.api.update_a_live_call( + call_id=call_id, update_call_request=update_call_request + ) - def test_update_a_participant(self): + def test_update_a_participant(self) -> None: """Test case for update_a_participant - Update a Participant # noqa: E501 + Update a Participant """ conference_id = conference_id_update_a_participant_test_value + call_id = call_id_update_a_participant_test_value - update_conference_participant_request = update_conference_participant_request_update_a_participant_test_value + update_conference_participant_request = ( + update_conference_participant_request_update_a_participant_test_value + ) + + api_response = self.api.update_a_participant( + conference_id=conference_id, + call_id=call_id, + update_conference_participant_request=update_conference_participant_request, + ) - api_response = self.api.update_a_participant(conference_id=conference_id,call_id=call_id,update_conference_participant_request=update_conference_participant_request) - assert isinstance(api_response, ConferenceParticipantResult) - def test_update_a_queue(self): + def test_update_a_queue(self) -> None: """Test case for update_a_queue - Update a Queue # noqa: E501 + Update a Queue """ queue_id = queue_id_update_a_queue_test_value + queue_request = queue_request_update_a_queue_test_value + api_response = self.api.update_a_queue( + queue_id=queue_id, queue_request=queue_request + ) - api_response = self.api.update_a_queue(queue_id=queue_id,queue_request=queue_request) - assert isinstance(api_response, QueueResult) - def test_update_an_account(self): + def test_update_an_account(self) -> None: """Test case for update_an_account - Manage an account # noqa: E501 + Manage an account """ account_request = account_request_update_an_account_test_value - api_response = self.api.update_an_account(account_request=account_request) - - - def test_update_an_application(self): + def test_update_an_application(self) -> None: """Test case for update_an_application - Update an application # noqa: E501 + Update an application """ application_id = application_id_update_an_application_test_value + application_request = application_request_update_an_application_test_value + api_response = self.api.update_an_application( + application_id=application_id, application_request=application_request + ) - api_response = self.api.update_an_application(application_id=application_id,application_request=application_request) - assert isinstance(api_response, ApplicationResult) - def test_update_an_incoming_number(self): + def test_update_an_incoming_number(self) -> None: """Test case for update_an_incoming_number - Update an Incoming Number # noqa: E501 + Update an Incoming Number """ phone_number_id = phone_number_id_update_an_incoming_number_test_value - incoming_number_request = incoming_number_request_update_an_incoming_number_test_value + incoming_number_request = ( + incoming_number_request_update_an_incoming_number_test_value + ) + + api_response = self.api.update_an_incoming_number( + phone_number_id=phone_number_id, + incoming_number_request=incoming_number_request, + ) - api_response = self.api.update_an_incoming_number(phone_number_id=phone_number_id,incoming_number_request=incoming_number_request) - assert isinstance(api_response, IncomingNumberResult) + def test_filter_logs_get_next_page(self): + """Test case for get_next_page using filter_logs response + + Get Next Page for Filter Logs # noqa: E501 + """ + + filter_logs_request = filter_logs_request_filter_logs_test_value + + api_response = self.api.filter_logs(filter_logs_request=filter_logs_request) + api_response.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1" + next_page_api_response = self.api.get_next_page(api_response) + + assert isinstance(next_page_api_response, LogList) - def test_get_ten_dlc_sms_brands_get_next_page(self): + def test_get_ten_dlc_sms_brands_get_next_page(self): """Test case for get_next_page using get_ten_dlc_sms_brands response Get Next Page for Get list of SMS 10DLC Brands # noqa: E501 """ - api_response = self.api.get_ten_dlc_sms_brands() - api_response.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Brands?cursor=1" + api_response.next_page_uri = ( + "/Accounts/{accountId}/Messages/10DLC/Brands?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, SMSTenDLCBrandsListResult) - def test_get_ten_dlc_sms_campaigns_get_next_page(self): + def test_get_ten_dlc_sms_campaigns_get_next_page(self): """Test case for get_next_page using get_ten_dlc_sms_campaigns response Get Next Page for Get list of SMS 10DLC Campaigns # noqa: E501 """ brand_id = brand_id_get_ten_dlc_sms_campaigns_test_value - + api_response = self.api.get_ten_dlc_sms_campaigns(brand_id=brand_id) - api_response.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/Campaigns?cursor=1" + api_response.next_page_uri = ( + "/Accounts/{accountId}/Messages/10DLC/Campaigns?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, SMSTenDLCCampaignsListResult) - def test_get_ten_dlc_sms_partner_campaigns_get_next_page(self): + def test_get_ten_dlc_sms_partner_campaigns_get_next_page(self): """Test case for get_next_page using get_ten_dlc_sms_partner_campaigns response Get Next Page for Get list of SMS 10DLC Partner Campaigns # noqa: E501 """ brand_id = brand_id_get_ten_dlc_sms_partner_campaigns_test_value - + api_response = self.api.get_ten_dlc_sms_partner_campaigns(brand_id=brand_id) - api_response.next_page_uri = "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns?cursor=1" + api_response.next_page_uri = ( + "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, SMSTenDLCPartnerCampaignsListResult) - def test_get_toll_free_sms_campaigns_get_next_page(self): + def test_get_toll_free_sms_campaigns_get_next_page(self): """Test case for get_next_page using get_toll_free_sms_campaigns response Get Next Page for Get list of TollFree Campaigns # noqa: E501 """ - api_response = self.api.get_toll_free_sms_campaigns() - api_response.next_page_uri = "/Accounts/{accountId}/Messages/TollFree/Campaigns?cursor=1" + api_response.next_page_uri = ( + "/Accounts/{accountId}/Messages/TollFree/Campaigns?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, SMSTollFreeCampaignsListResult) - def test_list_active_queues_get_next_page(self): + def test_list_active_queues_get_next_page(self): """Test case for get_next_page using list_active_queues response Get Next Page for List Active Queues # noqa: E501 """ alias = alias_list_active_queues_test_value - + api_response = self.api.list_active_queues(alias=alias) api_response.next_page_uri = "/Accounts/{accountId}/Queues?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, QueueList) - def test_list_all_account_logs_get_next_page(self): + def test_list_all_account_logs_get_next_page(self): """Test case for get_next_page using list_all_account_logs response Get Next Page for List All Account Logs # noqa: E501 """ - api_response = self.api.list_all_account_logs() api_response.next_page_uri = "/Accounts/{accountId}/Logs?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, LogList) - def test_list_applications_get_next_page(self): + def test_list_applications_get_next_page(self): """Test case for get_next_page using list_applications response Get Next Page for List applications # noqa: E501 """ alias = alias_list_applications_test_value - + api_response = self.api.list_applications(alias=alias) api_response.next_page_uri = "/Accounts/{accountId}/Applications?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, ApplicationList) - def test_list_available_numbers_get_next_page(self): + def test_list_available_numbers_get_next_page(self): """Test case for get_next_page using list_available_numbers response Get Next Page for List available numbers # noqa: E501 @@ -1027,31 +1122,48 @@ def test_list_available_numbers_get_next_page(self): sms_enabled = sms_enabled_list_available_numbers_test_value capabilities_voice = capabilities_voice_list_available_numbers_test_value capabilities_sms = capabilities_sms_list_available_numbers_test_value - capabilities_toll_free = capabilities_toll_free_list_available_numbers_test_value + capabilities_toll_free = ( + capabilities_toll_free_list_available_numbers_test_value + ) capabilities_ten_dlc = capabilities_ten_dlc_list_available_numbers_test_value - capabilities_short_code = capabilities_short_code_list_available_numbers_test_value - - api_response = self.api.list_available_numbers(phone_number=phone_number,region=region,country=country,voice_enabled=voice_enabled,sms_enabled=sms_enabled,capabilities_voice=capabilities_voice,capabilities_sms=capabilities_sms,capabilities_toll_free=capabilities_toll_free,capabilities_ten_dlc=capabilities_ten_dlc,capabilities_short_code=capabilities_short_code) + capabilities_short_code = ( + capabilities_short_code_list_available_numbers_test_value + ) + + api_response = self.api.list_available_numbers( + phone_number=phone_number, + region=region, + country=country, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + ) api_response.next_page_uri = "/AvailablePhoneNumbers?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, AvailableNumberList) - def test_list_call_logs_get_next_page(self): + def test_list_call_logs_get_next_page(self): """Test case for get_next_page using list_call_logs response Get Next Page for List Call Logs # noqa: E501 """ call_id = call_id_list_call_logs_test_value - + api_response = self.api.list_call_logs(call_id=call_id) - api_response.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Logs?cursor=1" + api_response.next_page_uri = ( + "/Accounts/{accountId}/Calls/{callId}/Logs?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, LogList) - def test_list_call_recordings_get_next_page(self): + def test_list_call_recordings_get_next_page(self): """Test case for get_next_page using list_call_recordings response Get Next Page for List Call Recordings # noqa: E501 @@ -1059,14 +1171,18 @@ def test_list_call_recordings_get_next_page(self): call_id = call_id_list_call_recordings_test_value date_created = date_created_list_call_recordings_test_value - - api_response = self.api.list_call_recordings(call_id=call_id,date_created=date_created) - api_response.next_page_uri = "/Accounts/{accountId}/Calls/{callId}/Recordings?cursor=1" + + api_response = self.api.list_call_recordings( + call_id=call_id, date_created=date_created + ) + api_response.next_page_uri = ( + "/Accounts/{accountId}/Calls/{callId}/Recordings?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, RecordingList) - def test_list_calls_get_next_page(self): + def test_list_calls_get_next_page(self): """Test case for get_next_page using list_calls response Get Next Page for List Calls # noqa: E501 @@ -1074,20 +1190,29 @@ def test_list_calls_get_next_page(self): active = active_list_calls_test_value to = to_list_calls_test_value - _from = _from_list_calls_test_value + var_from = var_from_list_calls_test_value status = status_list_calls_test_value start_time = start_time_list_calls_test_value end_time = end_time_list_calls_test_value parent_call_id = parent_call_id_list_calls_test_value application_id = application_id_list_calls_test_value - - api_response = self.api.list_calls(active=active,to=to,_from=_from,status=status,start_time=start_time,end_time=end_time,parent_call_id=parent_call_id,application_id=application_id) + + api_response = self.api.list_calls( + active=active, + to=to, + var_from=var_from, + status=status, + start_time=start_time, + end_time=end_time, + parent_call_id=parent_call_id, + application_id=application_id, + ) api_response.next_page_uri = "/Accounts/{accountId}/Calls?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, CallList) - def test_list_conference_recordings_get_next_page(self): + def test_list_conference_recordings_get_next_page(self): """Test case for get_next_page using list_conference_recordings response Get Next Page for List Conference Recordings # noqa: E501 @@ -1096,14 +1221,18 @@ def test_list_conference_recordings_get_next_page(self): conference_id = conference_id_list_conference_recordings_test_value call_id = call_id_list_conference_recordings_test_value date_created = date_created_list_conference_recordings_test_value - - api_response = self.api.list_conference_recordings(conference_id=conference_id,call_id=call_id,date_created=date_created) - api_response.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1" + + api_response = self.api.list_conference_recordings( + conference_id=conference_id, call_id=call_id, date_created=date_created + ) + api_response.next_page_uri = ( + "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, RecordingList) - def test_list_conferences_get_next_page(self): + def test_list_conferences_get_next_page(self): """Test case for get_next_page using list_conferences response Get Next Page for List Conferences # noqa: E501 @@ -1113,14 +1242,19 @@ def test_list_conferences_get_next_page(self): alias = alias_list_conferences_test_value date_created = date_created_list_conferences_test_value date_updated = date_updated_list_conferences_test_value - - api_response = self.api.list_conferences(status=status,alias=alias,date_created=date_created,date_updated=date_updated) + + api_response = self.api.list_conferences( + status=status, + alias=alias, + date_created=date_created, + date_updated=date_updated, + ) api_response.next_page_uri = "/Accounts/{accountId}/Conferences?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, ConferenceList) - def test_list_incoming_numbers_get_next_page(self): + def test_list_incoming_numbers_get_next_page(self): """Test case for get_next_page using list_incoming_numbers response Get Next Page for List Incoming Numbers # noqa: E501 @@ -1139,31 +1273,54 @@ def test_list_incoming_numbers_get_next_page(self): capabilities_sms = capabilities_sms_list_incoming_numbers_test_value capabilities_toll_free = capabilities_toll_free_list_incoming_numbers_test_value capabilities_ten_dlc = capabilities_ten_dlc_list_incoming_numbers_test_value - capabilities_short_code = capabilities_short_code_list_incoming_numbers_test_value + capabilities_short_code = ( + capabilities_short_code_list_incoming_numbers_test_value + ) tfn_campaign_id = tfn_campaign_id_list_incoming_numbers_test_value offnet = offnet_list_incoming_numbers_test_value - - api_response = self.api.list_incoming_numbers(phone_number=phone_number,alias=alias,region=region,country=country,application_id=application_id,has_application=has_application,voice_enabled=voice_enabled,sms_enabled=sms_enabled,has_campaign=has_campaign,capabilities_voice=capabilities_voice,capabilities_sms=capabilities_sms,capabilities_toll_free=capabilities_toll_free,capabilities_ten_dlc=capabilities_ten_dlc,capabilities_short_code=capabilities_short_code,tfn_campaign_id=tfn_campaign_id,offnet=offnet) - api_response.next_page_uri = "/Accounts/{accountId}/IncomingPhoneNumbers?cursor=1" + + api_response = self.api.list_incoming_numbers( + phone_number=phone_number, + alias=alias, + region=region, + country=country, + application_id=application_id, + has_application=has_application, + voice_enabled=voice_enabled, + sms_enabled=sms_enabled, + has_campaign=has_campaign, + capabilities_voice=capabilities_voice, + capabilities_sms=capabilities_sms, + capabilities_toll_free=capabilities_toll_free, + capabilities_ten_dlc=capabilities_ten_dlc, + capabilities_short_code=capabilities_short_code, + tfn_campaign_id=tfn_campaign_id, + offnet=offnet, + ) + api_response.next_page_uri = ( + "/Accounts/{accountId}/IncomingPhoneNumbers?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, IncomingNumberList) - def test_list_members_get_next_page(self): + def test_list_members_get_next_page(self): """Test case for get_next_page using list_members response Get Next Page for List Members # noqa: E501 """ queue_id = queue_id_list_members_test_value - + api_response = self.api.list_members(queue_id=queue_id) - api_response.next_page_uri = "/Accounts/{accountId}/Queues/{queueId}/Members?cursor=1" + api_response.next_page_uri = ( + "/Accounts/{accountId}/Queues/{queueId}/Members?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, QueueMemberList) - def test_list_participants_get_next_page(self): + def test_list_participants_get_next_page(self): """Test case for get_next_page using list_participants response Get Next Page for List Participants # noqa: E501 @@ -1172,14 +1329,22 @@ def test_list_participants_get_next_page(self): conference_id = conference_id_list_participants_test_value talk = talk_list_participants_test_value listen = listen_list_participants_test_value - - api_response = self.api.list_participants(conference_id=conference_id,talk=talk,listen=listen) - api_response.next_page_uri = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1" + dtmf_pass_through = dtmf_pass_through_list_participants_test_value + + api_response = self.api.list_participants( + conference_id=conference_id, + talk=talk, + listen=listen, + dtmf_pass_through=dtmf_pass_through, + ) + api_response.next_page_uri = ( + "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1" + ) next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, ConferenceParticipantList) - def test_list_recordings_get_next_page(self): + def test_list_recordings_get_next_page(self): """Test case for get_next_page using list_recordings response Get Next Page for List Recordings # noqa: E501 @@ -1188,29 +1353,40 @@ def test_list_recordings_get_next_page(self): call_id = call_id_list_recordings_test_value conference_id = conference_id_list_recordings_test_value date_created = date_created_list_recordings_test_value - - api_response = self.api.list_recordings(call_id=call_id,conference_id=conference_id,date_created=date_created) + + api_response = self.api.list_recordings( + call_id=call_id, conference_id=conference_id, date_created=date_created + ) api_response.next_page_uri = "/Accounts/{accountId}/Recordings?cursor=1" next_page_api_response = self.api.get_next_page(api_response) assert isinstance(next_page_api_response, RecordingList) - def test_list_sms_messages_get_next_page(self): + def test_list_sms_messages_get_next_page(self): """Test case for get_next_page using list_sms_messages response Get Next Page for List SMS Messages # noqa: E501 """ to = to_list_sms_messages_test_value - _from = _from_list_sms_messages_test_value + var_from = var_from_list_sms_messages_test_value begin_time = begin_time_list_sms_messages_test_value end_time = end_time_list_sms_messages_test_value direction = direction_list_sms_messages_test_value campaign_id = campaign_id_list_sms_messages_test_value brand_id = brand_id_list_sms_messages_test_value is10_dlc = is10_dlc_list_sms_messages_test_value - - api_response = self.api.list_sms_messages(to=to,_from=_from,begin_time=begin_time,end_time=end_time,direction=direction,campaign_id=campaign_id,brand_id=brand_id,is10_dlc=is10_dlc) + + api_response = self.api.list_sms_messages( + to=to, + var_from=var_from, + begin_time=begin_time, + end_time=end_time, + direction=direction, + campaign_id=campaign_id, + brand_id=brand_id, + is10_dlc=is10_dlc, + ) api_response.next_page_uri = "/Accounts/{accountId}/Messages?cursor=1" next_page_api_response = self.api.get_next_page(api_response) @@ -1218,35 +1394,35 @@ def test_list_sms_messages_get_next_page(self): buy_incoming_number_request_buy_a_phone_number_test_value = BuyIncomingNumberRequest( - phone_number="phone_number_example", - alias="alias_example", - application_id="application_id_example", + phone_number="phone_number_example", + alias="alias_example", + application_id="application_id_example", ) create_conference_request_create_a_conference_test_value = CreateConferenceRequest( - alias="alias_example", - play_beep=PlayBeep.ALWAYS, - record=True, - wait_url="wait_url_example", - status_callback_url="status_callback_url_example", + alias="alias_example", + play_beep=PlayBeep.ALWAYS, + record=True, + wait_url="https://wait_url_example.com", + status_callback_url="https://status_callback_url_example.com", ) queue_request_create_a_queue_test_value = QueueRequest( - alias="alias_example", - max_size=100, + alias="alias_example", + max_size=100, ) application_request_create_an_application_test_value = ApplicationRequest( - alias="alias_example", - voice_url="voice_url_example", - voice_fallback_url="voice_fallback_url_example", - call_connect_url="call_connect_url_example", - status_callback_url="status_callback_url_example", - sms_url="sms_url_example", - sms_fallback_url="sms_fallback_url_example", + alias="alias_example", + voice_url="https://voice_url_example.com", + voice_fallback_url="https://voice_fallback_url_example.com", + call_connect_url="https://call_connect_url_example.com", + status_callback_url="https://status_callback_url_example.com", + sms_url="https://sms_url_example.com", + sms_fallback_url="https://sms_fallback_url_example.com", ) - + recording_id_delete_a_recording_test_value = "recordingId_example" application_id_delete_an_application_test_value = "applicationId_example" @@ -1262,7 +1438,7 @@ def test_list_sms_messages_get_next_page(self): recording_id_download_a_recording_file_test_value = "recordingId_example" filter_logs_request_filter_logs_test_value = FilterLogsRequest( - pql="pql_example", + pql="pql_example", ) call_id_get_a_call_test_value = "callId_example" @@ -1318,11 +1494,11 @@ def test_list_sms_messages_get_next_page(self): date_created_list_call_recordings_test_value = "dateCreated_example" -active_list_calls_test_value = False +active_list_calls_test_value = False to_list_calls_test_value = "to_example" -_from_list_calls_test_value = "from_example" +var_from_list_calls_test_value = "from_example" status_list_calls_test_value = CallStatus.QUEUED @@ -1332,7 +1508,11 @@ def test_list_sms_messages_get_next_page(self): parent_call_id_list_calls_test_value = "parentCallId_example" -application_id_list_calls_test_value = ['AP0123456789ABCDEFabcedf000000000000000001','AP0123456789ABCDEFabcedf000000000000000002', 'AP0123456789ABCDEFabcedf000000000000000003'] +application_id_list_calls_test_value = [ + "AP0123456789ABCDEFabcedf000000000000000001", + "AP0123456789ABCDEFabcedf000000000000000002", + "AP0123456789ABCDEFabcedf000000000000000003", +] status_list_conferences_test_value = "status_example" @@ -1341,7 +1521,7 @@ def test_list_sms_messages_get_next_page(self): date_created_list_conferences_test_value = "dateCreated_example" date_updated_list_conferences_test_value = "dateUpdated_example" - + phone_number_list_incoming_numbers_test_value = "phoneNumberId_example" alias_list_incoming_numbers_test_value = "alias_example" @@ -1376,9 +1556,9 @@ def test_list_sms_messages_get_next_page(self): listen_list_participants_test_value = True -to_list_sms_messages_test_value="to_example" +to_list_sms_messages_test_value = "to_example" -_from_list_sms_messages_test_value = "from_example" +var_from_list_sms_messages_test_value = "from_example" begin_time_list_sms_messages_test_value = "beginTime_example" @@ -1433,61 +1613,63 @@ def test_list_sms_messages_get_next_page(self): is10_dlc_list_sms_messages_test_value = True queue_request_update_a_queue_test_value = QueueRequest( - alias="alias_example", - max_size=100, + alias="alias_example", + max_size=100, ) application_request_update_an_application_test_value = ApplicationRequest( - alias="alias_example", - voice_url="voice_url_example", - voice_fallback_url="voice_fallback_url_example", - call_connect_url="call_connect_url_example", - status_callback_url="status_callback_url_example", - sms_url="sms_url_example", - sms_fallback_url="sms_fallback_url_example", + alias="alias_example", + voice_url="https://voice_url_example.com", + voice_fallback_url="https://voice_fallback_url_example.com", + call_connect_url="https://call_connect_url_example.com", + status_callback_url="https://status_callback_url_example.com", + sms_url="https://sms_url_example.com", + sms_fallback_url="https://sms_fallback_url_example.com", ) make_call_request_make_a_call_test_value = MakeCallRequest( - _from="_from_example", + var_from="_from_example", to="to_example", application_id="application_id_example", send_digits="send_digits_example", if_machine="if_machine_example", - if_machine_url="if_machine_url_example", + if_machine_url="https://if_machine_url_example.com", timeout=30, parent_call_id="parent_call_id_example", privacy_mode=True, - call_connect_url="call_connect_url_example", + call_connect_url="https://call_connect_url_example.com", ) message_request_send_an_sms_message_test_value = MessageRequest( - _from="_from_example", - to="to_example", - text="Example Text", + var_from="_from_example", + to="to_example", + text="Example Text", ) update_conference_request_update_a_conference_test_value = UpdateConferenceRequest( - alias="alias_example", - play_beep=PlayBeep.ALWAYS, - status=UpdateConferenceRequestStatus.EMPTY, + alias="alias_example", + play_beep=PlayBeep.ALWAYS, + status=UpdateConferenceRequestStatus.EMPTY, ) update_call_request_update_a_live_call_test_value = UpdateCallRequest( - status=UpdateCallRequestStatus.CANCELED, + status=UpdateCallRequestStatus.CANCELED, ) -update_conference_participant_request_update_a_participant_test_value = UpdateConferenceParticipantRequest( +update_conference_participant_request_update_a_participant_test_value = ( + UpdateConferenceParticipantRequest( talk=True, listen=True, + ) ) account_request_update_an_account_test_value = AccountRequest( - alias="alias_example", - label="label_example", + alias="alias_example", + label="label_example", ) incoming_number_request_update_an_incoming_number_test_value = IncomingNumberRequest( - application_id="application_id_example", - alias="alias_example", + application_id="application_id_example", + alias="alias_example", ) tfn_campaign_id_list_incoming_numbers_test_value = "tfn_campaign_id_example" @@ -1500,12 +1682,19 @@ def test_list_sms_messages_get_next_page(self): date_created_list_conference_recordings_test_value = "date_created_example" -create_web_rtc_token_make_a_webrtc_jwt_test_value = CreateWebRTCToken(to="to_example", _from="from_example", uses=1) +create_web_rtc_token_make_a_webrtc_jwt_test_value = CreateWebRTCToken( + to="to_example", var_from="from_example", uses=1 +) -knowledge_base_id_create_knowledge_base_completion_test_value = "knowledge_base_id_example" +knowledge_base_id_create_knowledge_base_completion_test_value = ( + "knowledge_base_id_example" +) -completion_request_create_knowledge_base_completion_test_value = CompletionRequest(query="query_example") +completion_request_create_knowledge_base_completion_test_value = CompletionRequest( + query="query_example" +) +dtmf_pass_through_list_participants_test_value = True -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/test/helpers.py b/test/helpers.py index 65bca24..e02d00d 100644 --- a/test/helpers.py +++ b/test/helpers.py @@ -1,154 +1,146 @@ import urllib3 import json -from freeclimb.model.account_request import AccountRequest -from freeclimb.model.application_request import ApplicationRequest -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.create_conference_request import CreateConferenceRequest -from freeclimb.model.incoming_number_request import IncomingNumberRequest -from freeclimb.model.make_call_request import MakeCallRequest -from freeclimb.model.message_request import MessageRequest -from freeclimb.model.queue_request import QueueRequest -from freeclimb.model.update_call_request import UpdateCallRequest -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest -from freeclimb.model.filter_logs_request import FilterLogsRequest +from freeclimb.models.account_request import AccountRequest +from freeclimb.models.application_request import ApplicationRequest +from freeclimb.models.buy_incoming_number_request import BuyIncomingNumberRequest +from freeclimb.models.create_conference_request import CreateConferenceRequest +from freeclimb.models.incoming_number_request import IncomingNumberRequest +from freeclimb.models.make_call_request import MakeCallRequest +from freeclimb.models.message_request import MessageRequest +from freeclimb.models.queue_request import QueueRequest +from freeclimb.models.update_call_request import UpdateCallRequest +from freeclimb.models.update_conference_participant_request import ( + UpdateConferenceParticipantRequest, +) +from freeclimb.models.update_conference_request import UpdateConferenceRequest +from freeclimb.models.filter_logs_request import FilterLogsRequest from freeclimb.model_utils import model_to_dict, ModelComposed, ModelNormal, ModelSimple -from freeclimb.model.play_beep import PlayBeep -from freeclimb.model.update_call_request_status import UpdateCallRequestStatus -from freeclimb.model.call_status import CallStatus +from freeclimb.models.play_beep import PlayBeep +from freeclimb.models.update_call_request_status import UpdateCallRequestStatus +from freeclimb.models.call_status import CallStatus class TestHelpers(object): @staticmethod def build_url(url, path_params): for key, value in path_params.items(): - url = url.replace('{' + key + '}', value) + url = url.replace("{" + key + "}", value) return url @staticmethod def build_path_param(param): - return 'TEST_' + param.upper() - + return "TEST_" + param.upper() + @staticmethod def build_query_param(param): - if param == 'voice_enabled': + if param == "voice_enabled": return True - if param == 'sms_enabled': + if param == "sms_enabled": return True - if param == 'capabilities_voice': + if param == "capabilities_voice": return True - if param == 'capabilities_sms': + if param == "capabilities_sms": return True - if param == 'capabilities_toll_free': + if param == "capabilities_toll_free": return True - if param == 'capabilities_ten_dlc': + if param == "capabilities_ten_dlc": return True - if param == 'capabilities_short_code': + if param == "capabilities_short_code": return True - if param == 'active': + if param == "active": return False - if param == 'has_application': + if param == "has_application": return False - if param == 'talk': + if param == "talk": return True - if param == 'listen': + if param == "listen": return True - if param == 'status': - return 'empty' - if param == 'statusEnum': + if param == "status": + return "empty" + if param == "statusEnum": return json.dumps(CallStatus.COMPLETED) - if param == 'direction': - return 'inbound' - if param == 'offnet': + if param == "direction": + return "inbound" + if param == "offnet": return True - return 'TEST_' + param.upper() + return "TEST_" + param.upper() @staticmethod def build_body_param(param, klassName): if klassName == BuyIncomingNumberRequest: return BuyIncomingNumberRequest( phone_number="TEST_PHONE_NUMBER", - application_id='TEST_APPLICATION_ID', - alias='TEST_ALIAS' + application_id="TEST_APPLICATION_ID", + alias="TEST_ALIAS", ) if klassName == IncomingNumberRequest: return IncomingNumberRequest( - application_id='TEST_APPLICATION_ID', - alias='TEST_ALIAS' + application_id="TEST_APPLICATION_ID", alias="TEST_ALIAS" ) if klassName == ApplicationRequest: return ApplicationRequest( - alias = 'TEST_ALIAS', - voice_url = 'TEST_VOICE_URL', - voice_fallback_url = 'TEST_VOICE_FALLBACK_URL', - call_connect_url = 'TEST_CALL_CONNECT_URL', - status_callback_url = 'TEST_STATUS_CALLBACK_URL', - sms_url = 'TEST_SMS_URL', - sms_fallback_url = 'TEST_SMS_FALLBACK_URL' + alias="TEST_ALIAS", + voice_url="TEST_VOICE_URL", + voice_fallback_url="TEST_VOICE_FALLBACK_URL", + call_connect_url="TEST_CALL_CONNECT_URL", + status_callback_url="TEST_STATUS_CALLBACK_URL", + sms_url="TEST_SMS_URL", + sms_fallback_url="TEST_SMS_FALLBACK_URL", ) if klassName == AccountRequest: - return AccountRequest( - alias = 'TEST_ALIAS', - label = 'TEST_LABEL' - ) + return AccountRequest(alias="TEST_ALIAS", label="TEST_LABEL") if klassName == QueueRequest: - return QueueRequest( - alias = 'TEST_ALIAS', - max_size = 10 - ) + return QueueRequest(alias="TEST_ALIAS", max_size=10) if klassName == UpdateConferenceParticipantRequest: - return UpdateConferenceParticipantRequest( - talk = True, - listen = True - ) + return UpdateConferenceParticipantRequest(talk=True, listen=True) if klassName == UpdateConferenceRequest: return UpdateConferenceRequest( - alias = 'TEST_ALIAS', - play_beep = json.dumps(PlayBeep.ALWAYS), - status = 'empty' + alias="TEST_ALIAS", + play_beep=json.dumps(PlayBeep.ALWAYS), + status="empty", ) if klassName == MakeCallRequest: return MakeCallRequest( - _from = 'TEST_FROM', - to = 'TEST_TO', - application_id = 'TEST_APPLICATION_ID', - send_digits = 'TEST_SEND_DIGITS', - if_machine = 'TEST_IF_MACHINE', - if_machine_url = 'TEST_IF_MACHINE_URL', - timeout = 10, - parent_call_id = 'TEST_PARENT_CALL_ID', - privacy_mode = False, - call_connect_url = 'TEST_CALL_CONNECT_URL', + "TEST_FROM", + "TEST_TO", + application_id="TEST_APPLICATION_ID", + send_digits="TEST_SEND_DIGITS", + if_machine="TEST_IF_MACHINE", + if_machine_url="TEST_IF_MACHINE_URL", + timeout=10, + parent_call_id="TEST_PARENT_CALL_ID", + privacy_mode=False, + call_connect_url="TEST_CALL_CONNECT_URL", ) if klassName == CreateConferenceRequest: return CreateConferenceRequest( - alias = 'TEST_ALIAS', - play_beep = json.dumps(PlayBeep.ALWAYS), - record = False, - wait_url = 'TEST_WAIT_URL', - status_callback_url = 'TEST_STATUS_CALLBACK_URL' + alias="TEST_ALIAS", + play_beep=json.dumps(PlayBeep.ALWAYS), + record=False, + wait_url="TEST_WAIT_URL", + status_callback_url="TEST_STATUS_CALLBACK_URL", ) if klassName == FilterLogsRequest: - return FilterLogsRequest( - pql="TEST_PQL" - ) + return FilterLogsRequest(pql="TEST_PQL") if klassName == UpdateCallRequest: return UpdateCallRequest( status=json.dumps(UpdateCallRequestStatus.COMPLETED) ) if klassName == MessageRequest: return MessageRequest( - _from="TEST_FROM_NUMBER", - to="TEST_TO_NUMBER", - text="TEST_TEXT" + _from="TEST_FROM_NUMBER", to="TEST_TO_NUMBER", text="TEST_TEXT" ) - return 'TEST_' + param.upper() - + return "TEST_" + param.upper() + @staticmethod def serialize_body_param(param): - if isinstance(param, ModelSimple) or isinstance(param, ModelNormal) or isinstance(param, ModelComposed): - print ("Parameters:", param) + if ( + isinstance(param, ModelSimple) + or isinstance(param, ModelNormal) + or isinstance(param, ModelComposed) + ): + print("Parameters:", param) data = model_to_dict(param) if len(data) == 0: return None @@ -159,22 +151,20 @@ def serialize_body_param(param): def serialize_query_params(query_params): next_params = {} for key, value in query_params.items(): - if key == '_from': - key = 'from' - if key == 'capabilitiesVoice': - key = 'capabilities.voice' - if key == 'capabilitiesSms': - key = 'capabilities.sms' - if key == 'capabilitiesTollFree': - key = 'capabilities.tollFree' - if key == 'capabilitiesTenDlc': - key = 'capabilities.tenDLC' - if key == 'capabilitiesShortCode': - key = 'capabilities.shortCode' + if key == "_from": + key = "from" + if key == "capabilitiesVoice": + key = "capabilities.voice" + if key == "capabilitiesSms": + key = "capabilities.sms" + if key == "capabilitiesTollFree": + key = "capabilities.tollFree" + if key == "capabilitiesTenDlc": + key = "capabilities.tenDLC" + if key == "capabilitiesShortCode": + key = "capabilities.shortCode" next_params[key] = value - return [(key, value) for key,value in next_params.items()] - - + return [(key, value) for key, value in next_params.items()] class MockPoolManager(object): @@ -184,12 +174,15 @@ def __init__(self, tc): def expect_request(self, *args, **kwargs): method = args[0] - if method == 'GET': - kwargs.pop('body') - if method != 'GET': - kwargs.pop('fields') - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS'] and 'Content-Type' not in kwargs['headers'].keys(): - kwargs['headers']['Content-Type'] = 'application/json' + if method == "GET": + kwargs.pop("body") + if method != "GET": + kwargs.pop("fields") + if ( + method in ["POST", "PUT", "PATCH", "OPTIONS"] + and "Content-Type" not in kwargs["headers"].keys() + ): + kwargs["headers"]["Content-Type"] = "application/json" self._reqs.append((args, kwargs)) @@ -199,4 +192,4 @@ def request(self, *args, **kwargs): self._tc.maxDiff = None self._tc.assertEqual(r[0], args) self._tc.assertEqual(r[1], kwargs) - return urllib3.HTTPResponse(status=200, body=b'{}') \ No newline at end of file + return urllib3.HTTPResponse(status=200, body=b"{}") diff --git a/test/manual/test_percl_generation.py b/test/manual/test_percl_generation.py index 55632bf..5eeeae7 100644 --- a/test/manual/test_percl_generation.py +++ b/test/manual/test_percl_generation.py @@ -1,4 +1,3 @@ - """ FreeClimb API @@ -22,18 +21,27 @@ def tearDown(self): def testPerclGeneration(self): message = "Hello, FreeClimb!" - say = freeclimb.Say(text=message) + say = freeclimb.Say(text=message, privacy_mode=True) get_speech = freeclimb.GetSpeech( - action_url="http://example.com/actionurl/getspeech", prompts=[say], grammar_file="grammar.xml") + action_url="http://example.com/actionurl/getspeech", + prompts=[say], + grammar_file="grammar.xml" + ) record_utterance = freeclimb.RecordUtterance( - action_url="http://example.actionurl/recordutterance", silence_timeout_ms=1000) + action_url="http://example.actionurl/recordutterance", + silence_timeout_ms=1000 + ) script = freeclimb.PerclScript(commands=[say, get_speech, record_utterance]) data = script.to_json() + print("GOT DATA") + print(data) expected_json = json.dumps( [ { "Say": { - "text": "Hello, FreeClimb!" + "text": "Hello, FreeClimb!", + "loop": 1, + "privacyMode": True } }, { @@ -43,7 +51,9 @@ def testPerclGeneration(self): "prompts": [ { "Say": { - "text": "Hello, FreeClimb!" + "text": "Hello, FreeClimb!", + "loop": 1, + "privacyMode": True } } ] @@ -56,8 +66,9 @@ def testPerclGeneration(self): } } ]) + self.maxDiff = None self.assertEqual(data, expected_json) if __name__ == '__main__': - unittest.main() + unittest.main() \ No newline at end of file diff --git a/test/manual/test_request_verifier.py b/test/manual/test_request_verifier.py index 74a9ba3..ba63c54 100644 --- a/test/manual/test_request_verifier.py +++ b/test/manual/test_request_verifier.py @@ -4,12 +4,13 @@ from freeclimb.utils.request_verifier import RequestVerifier + class TestRequestVerifier(unittest.TestCase): """RequestVerifier unit test stubs""" def setUp(self): self.request_verifier = RequestVerifier() - + def tearDown(self): pass @@ -19,108 +20,158 @@ def test_check_request_body(self): tolerance = 5 * 60 * 1000 request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) self.assertEqual(str(exc.exception), "Request Body cannot be empty or null") - + def test_check_request_header_no_signatures(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = 5 * 60 * 1000 request_header = "t=1679944186," with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Error with request header, signatures are not present") - + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), "Error with request header, signatures are not present" + ) + def test_check_request_header_no_timestamp(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = 5 * 60 * 1000 request_header = "v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Error with request header, timestamp is not present") - + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), "Error with request header, timestamp is not present" + ) + def test_check_request_header_empty_request_header(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = 5 * 60 * 1000 - request_header = "" + request_header = "" with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Error with request header, Request header is empty") + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), "Error with request header, Request header is empty" + ) def test_check_signing_secret(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "" tolerance = 5 * 60 * 1000 - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) self.assertEqual(str(exc.exception), "Signing secret cannot be empty or null") - + def test_check_tolerance_max_int(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = sys.maxsize - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Tolerance value must be a positive integer") - + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), "Tolerance value must be a positive integer" + ) + def test_check_tolerance_zero_value(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = 0 - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" with self.assertRaises(Exception) as exc: - self.request_verifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Tolerance value must be a positive integer") - + self.request_verifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), "Tolerance value must be a positive integer" + ) + def test_check_tolerance_negative_value(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = -5 - request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Tolerance value must be a positive integer") - + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), "Tolerance value must be a positive integer" + ) + def test_verify_tolerance(self): current_time = int(time.time()) - request_header_time = current_time - (6*60*1000) - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_header_time = current_time - (6 * 60 * 1000) + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = 5 * 60 * 1000 - request_header = "t=" + str(request_header_time) + ",v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=78e363373f8a9f6fddc2e3ca3a1ed9dc94efa44d378363adf52434e78f32d8fb" + request_header = ( + "t=" + + str(request_header_time) + + ",v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=78e363373f8a9f6fddc2e3ca3a1ed9dc94efa44d378363adf52434e78f32d8fb" + ) with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Request time exceeded tolerance threshold. Request: " + str(request_header_time) - + ", CurrentTime: " + str(current_time) + ", tolerance: " + str(tolerance)) - + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), + "Request time exceeded tolerance threshold. Request: " + + str(request_header_time) + + ", CurrentTime: " + + str(current_time) + + ", tolerance: " + + str(tolerance), + ) + def test_verify_signature(self): current_time = int(time.time()) - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7794" tolerance = 5 * 60 * 1000 - request_header = "t=" + str(current_time) + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = ( + "t=" + + str(current_time) + + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + ) with self.assertRaises(Exception) as exc: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) - self.assertEqual(str(exc.exception), "Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret") - + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) + self.assertEqual( + str(exc.exception), + "Unverified signature request, If this request was unexpected, it may be from a bad actor. Please proceed with caution. If the request was exepected, please check any typos or issues with the signingSecret", + ) + def test_verify_request_signature(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" tolerance = 5 * 60 * 1000 - request_header = "t=3795106129,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=96b769b34426fa69117dd6d1bda2c432beb2cf4c63dd2de495fca0c37dde82b2" + request_header = "t=3795106129,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=96b769b34426fa69117dd6d1bda2c432beb2cf4c63dd2de495fca0c37dde82b2" raised = False try: - RequestVerifier.verify_request_signature(request_body, request_header, signing_secret, tolerance) + RequestVerifier.verify_request_signature( + request_body, request_header, signing_secret, tolerance + ) except: raised = True - self.assertFalse(raised, 'Exception has been raised') - - - + self.assertFalse(raised, "Exception has been raised") + -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/manual/test_signature_verification.py b/test/manual/test_signature_verification.py index bb74a4d..cc30e79 100644 --- a/test/manual/test_signature_verification.py +++ b/test/manual/test_signature_verification.py @@ -2,39 +2,59 @@ from freeclimb.utils.signature_information import SignatureInformation + class TestSignatureInformation(unittest.TestCase): """SignatureInformation unit test stubs""" def setUp(self): request_header = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" self.signature_information = SignatureInformation(request_header) - + def tearDown(self): pass def test_is_request_time_valid_true(self): - request_header = "t=" + str(self.signature_information.get_current_unix_time()) + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = ( + "t=" + + str(self.signature_information.get_current_unix_time()) + + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + ) self.signature_information = SignatureInformation(request_header) tolerance = 5 * 60 * 1000 - self.assertEqual(self.signature_information.is_request_time_valid(tolerance), True) - + self.assertEqual( + self.signature_information.is_request_time_valid(tolerance), True + ) + def test_is_request_time_valid_false(self): - request_header = "t=" + str(self.signature_information.get_current_unix_time() - (600 * 60 * 1000)) + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + request_header = ( + "t=" + + str( + self.signature_information.get_current_unix_time() - (600 * 60 * 1000) + ) + + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8" + ) self.signature_information = SignatureInformation(request_header) tolerance = 500 * 60 * 1000 - self.assertEqual(self.signature_information.is_request_time_valid(tolerance), False) - + self.assertEqual( + self.signature_information.is_request_time_valid(tolerance), False + ) + def test_is_signature_safe_true(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793" - self.assertEqual(self.signature_information.is_signature_safe(request_body, signing_secret), True) + self.assertEqual( + self.signature_information.is_signature_safe(request_body, signing_secret), + True, + ) def test_is_signature_safe_false(self): - request_body = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}" + request_body = '{"accountId":"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c","callId":"CAccb0b00506553cda09b51c5477f672a49e0b2213","callStatus":"ringing","conferenceId":null,"direction":"inbound","from":"+13121000109","parentCallId":null,"queueId":null,"requestType":"inboundCall","to":"+13121000096"}' signing_secret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7794" - self.assertEqual(self.signature_information.is_signature_safe(request_body, signing_secret), False) - - + self.assertEqual( + self.signature_information.is_signature_safe(request_body, signing_secret), + False, + ) + -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/__init__.py b/test/models/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/test/models/__init__.py @@ -0,0 +1 @@ + diff --git a/test/test_account_request.py b/test/models/test_account_request.py similarity index 70% rename from test/test_account_request.py rename to test/models/test_account_request.py index f72118c..b4ead6c 100644 --- a/test/test_account_request.py +++ b/test/models/test_account_request.py @@ -1,40 +1,42 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.account_request import AccountRequest -from freeclimb.model.account_request import AccountRequest # noqa: E501 class TestAccountRequest(unittest.TestCase): """AccountRequest unit test stubs""" def setUp(self): - self.model = AccountRequest( - ) - + self.model = AccountRequest() + def test_alias(self): """Test AccountRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_label(self): """Test AccountRequest.label""" self.model.label = "TEST_STRING" - assert self.model.get("label") == "TEST_STRING" + assert self.model.label == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_account_result.py b/test/models/test_account_result.py similarity index 59% rename from test/test_account_result.py rename to test/models/test_account_result.py index 770c63a..06e371b 100644 --- a/test/test_account_result.py +++ b/test/models/test_account_result.py @@ -1,100 +1,94 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.account_result_all_of import AccountResultAllOf -from freeclimb.model.account_status import AccountStatus -from freeclimb.model.account_type import AccountType -from freeclimb.model.mutable_resource_model import MutableResourceModel -globals()['AccountResultAllOf'] = AccountResultAllOf -globals()['AccountStatus'] = AccountStatus -globals()['AccountType'] = AccountType -globals()['MutableResourceModel'] = MutableResourceModel +from freeclimb import * +from freeclimb.models.account_result import AccountResult -from freeclimb.model.account_result import AccountResult # noqa: E501 class TestAccountResult(unittest.TestCase): """AccountResult unit test stubs""" def setUp(self): - self.model = AccountResult( - ) - + self.model = AccountResult() + def test_uri(self): """Test AccountResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test AccountResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test AccountResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test AccountResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_account_id(self): """Test AccountResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_api_key(self): """Test AccountResult.api_key""" self.model.api_key = "TEST_STRING" - assert self.model.get("api_key") == "TEST_STRING" + assert self.model.api_key == "TEST_STRING" def test_alias(self): """Test AccountResult.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_label(self): """Test AccountResult.label""" self.model.label = "TEST_STRING" - assert self.model.get("label") == "TEST_STRING" + assert self.model.label == "TEST_STRING" def test_type(self): """Test AccountResult.type""" self.model.type = AccountType.TRIAL - assert self.model.get("type") == AccountType.TRIAL + assert self.model.type == AccountType.TRIAL self.model.type = AccountType.FULL - assert self.model.get("type") == AccountType.FULL + assert self.model.type == AccountType.FULL def test_status(self): """Test AccountResult.status""" self.model.status = AccountStatus.CLOSED - assert self.model.get("status") == AccountStatus.CLOSED + assert self.model.status == AccountStatus.CLOSED self.model.status = AccountStatus.SUSPENDED - assert self.model.get("status") == AccountStatus.SUSPENDED + assert self.model.status == AccountStatus.SUSPENDED self.model.status = AccountStatus.ACTIVE - assert self.model.get("status") == AccountStatus.ACTIVE + assert self.model.status == AccountStatus.ACTIVE def test_subresource_uris(self): """Test AccountResult.subresource_uris""" testObject = {} self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject + assert self.model.subresource_uris == testObject -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_account_status.py b/test/models/test_account_status.py new file mode 100644 index 0000000..2f8233c --- /dev/null +++ b/test/models/test_account_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.account_status import AccountStatus + + +class TestAccountStatus(unittest.TestCase): + """AccountStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_account_type.py b/test/models/test_account_type.py new file mode 100644 index 0000000..aa66746 --- /dev/null +++ b/test/models/test_account_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.account_type import AccountType + + +class TestAccountType(unittest.TestCase): + """AccountType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_add_to_conference.py b/test/models/test_add_to_conference.py new file mode 100644 index 0000000..7a1e4d0 --- /dev/null +++ b/test/models/test_add_to_conference.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.add_to_conference import AddToConference + + +class TestAddToConference(unittest.TestCase): + """AddToConference unit test stubs""" + + def setUp(self): + self.model = AddToConference( + conference_id="", + ) + + def test_allow_call_control(self): + """Test AddToConference.allow_call_control""" + self.model.allow_call_control = False + assert self.model.allow_call_control == False + + def test_call_control_sequence(self): + """Test AddToConference.call_control_sequence""" + self.model.call_control_sequence = "TEST_STRING" + assert self.model.call_control_sequence == "TEST_STRING" + + def test_call_control_url(self): + """Test AddToConference.call_control_url""" + self.model.call_control_url = "TEST_STRING" + assert self.model.call_control_url == "TEST_STRING" + + def test_conference_id(self): + """Test AddToConference.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_leave_conference_url(self): + """Test AddToConference.leave_conference_url""" + self.model.leave_conference_url = "TEST_STRING" + assert self.model.leave_conference_url == "TEST_STRING" + + def test_listen(self): + """Test AddToConference.listen""" + self.model.listen = False + assert self.model.listen == False + + def test_notification_url(self): + """Test AddToConference.notification_url""" + self.model.notification_url = "TEST_STRING" + assert self.model.notification_url == "TEST_STRING" + + def test_start_conf_on_enter(self): + """Test AddToConference.start_conf_on_enter""" + self.model.start_conf_on_enter = False + assert self.model.start_conf_on_enter == False + + def test_talk(self): + """Test AddToConference.talk""" + self.model.talk = False + assert self.model.talk == False + + def test_dtmf_pass_through(self): + """Test AddToConference.dtmf_pass_through""" + self.model.dtmf_pass_through = False + assert self.model.dtmf_pass_through == False + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_add_to_conference_notification_webhook.py b/test/models/test_add_to_conference_notification_webhook.py new file mode 100644 index 0000000..a3eb7dc --- /dev/null +++ b/test/models/test_add_to_conference_notification_webhook.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.add_to_conference_notification_webhook import ( + AddToConferenceNotificationWebhook, +) + + +class TestAddToConferenceNotificationWebhook(unittest.TestCase): + """AddToConferenceNotificationWebhook unit test stubs""" + + def setUp(self): + self.model = AddToConferenceNotificationWebhook() + + def test_request_type(self): + """Test AddToConferenceNotificationWebhook.request_type""" + + def test_call_id(self): + """Test AddToConferenceNotificationWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test AddToConferenceNotificationWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test AddToConferenceNotificationWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test AddToConferenceNotificationWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test AddToConferenceNotificationWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test AddToConferenceNotificationWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test AddToConferenceNotificationWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test AddToConferenceNotificationWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_status(self): + """Test AddToConferenceNotificationWebhook.status""" + self.model.status = ConferenceStatus.EMPTY + assert self.model.status == ConferenceStatus.EMPTY + self.model.status = ConferenceStatus.POPULATED + assert self.model.status == ConferenceStatus.POPULATED + self.model.status = ConferenceStatus.IN_PROGRESS + assert self.model.status == ConferenceStatus.IN_PROGRESS + self.model.status = ConferenceStatus.TERMINATED + assert self.model.status == ConferenceStatus.TERMINATED + + def test_recording_url(self): + """Test AddToConferenceNotificationWebhook.recording_url""" + self.model.recording_url = "TEST_STRING" + assert self.model.recording_url == "TEST_STRING" + + def test_recording_id(self): + """Test AddToConferenceNotificationWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" + + def test_recording_duration_sec(self): + """Test AddToConferenceNotificationWebhook.recording_duration_sec""" + self.model.recording_duration_sec = 1 + assert self.model.recording_duration_sec == 1 + + def test_deserialize(self): + payload = '{ "requestType": "addToConferenceNotification" }' + assert isinstance( + AddToConferenceNotificationWebhook.deserialize(payload), + AddToConferenceNotificationWebhook, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_add_to_queue_notification_webhook.py b/test/models/test_add_to_queue_notification_webhook.py new file mode 100644 index 0000000..a9c6987 --- /dev/null +++ b/test/models/test_add_to_queue_notification_webhook.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.add_to_queue_notification_webhook import ( + AddToQueueNotificationWebhook, +) + + +class TestAddToQueueNotificationWebhook(unittest.TestCase): + """AddToQueueNotificationWebhook unit test stubs""" + + def setUp(self): + self.model = AddToQueueNotificationWebhook() + + def test_request_type(self): + """Test AddToQueueNotificationWebhook.request_type""" + + def test_call_id(self): + """Test AddToQueueNotificationWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test AddToQueueNotificationWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test AddToQueueNotificationWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test AddToQueueNotificationWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test AddToQueueNotificationWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test AddToQueueNotificationWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test AddToQueueNotificationWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test AddToQueueNotificationWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "addToQueueNotification" }' + assert isinstance( + AddToQueueNotificationWebhook.deserialize(payload), + AddToQueueNotificationWebhook, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_answered_by.py b/test/models/test_answered_by.py new file mode 100644 index 0000000..70c74e8 --- /dev/null +++ b/test/models/test_answered_by.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.answered_by import AnsweredBy + + +class TestAnsweredBy(unittest.TestCase): + """AnsweredBy unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_application_list.py b/test/models/test_application_list.py similarity index 62% rename from test/test_application_list.py rename to test/models/test_application_list.py index 67857fc..287da12 100644 --- a/test/test_application_list.py +++ b/test/models/test_application_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.application_list_all_of import ApplicationListAllOf -from freeclimb.model.application_result import ApplicationResult -from freeclimb.model.pagination_model import PaginationModel -globals()['ApplicationListAllOf'] = ApplicationListAllOf -globals()['ApplicationResult'] = ApplicationResult -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.application_list import ApplicationList -from freeclimb.model.application_list import ApplicationList # noqa: E501 class TestApplicationList(unittest.TestCase): """ApplicationList unit test stubs""" def setUp(self): - self.model = ApplicationList( - ) - + self.model = ApplicationList() + def test_total(self): """Test ApplicationList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test ApplicationList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test ApplicationList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test ApplicationList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test ApplicationList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test ApplicationList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test ApplicationList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_applications(self): """Test ApplicationList.applications""" testList = [] self.model.applications = testList - assert self.model.get("applications") == testList + assert self.model.applications == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_application_request.py b/test/models/test_application_request.py similarity index 70% rename from test/test_application_request.py rename to test/models/test_application_request.py index 22b6035..dff999e 100644 --- a/test/test_application_request.py +++ b/test/models/test_application_request.py @@ -1,65 +1,67 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.application_request import ApplicationRequest -from freeclimb.model.application_request import ApplicationRequest # noqa: E501 class TestApplicationRequest(unittest.TestCase): """ApplicationRequest unit test stubs""" def setUp(self): - self.model = ApplicationRequest( - ) - + self.model = ApplicationRequest() + def test_alias(self): """Test ApplicationRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_voice_url(self): """Test ApplicationRequest.voice_url""" self.model.voice_url = "TEST_STRING" - assert self.model.get("voice_url") == "TEST_STRING" + assert self.model.voice_url == "TEST_STRING" def test_voice_fallback_url(self): """Test ApplicationRequest.voice_fallback_url""" self.model.voice_fallback_url = "TEST_STRING" - assert self.model.get("voice_fallback_url") == "TEST_STRING" + assert self.model.voice_fallback_url == "TEST_STRING" def test_call_connect_url(self): """Test ApplicationRequest.call_connect_url""" self.model.call_connect_url = "TEST_STRING" - assert self.model.get("call_connect_url") == "TEST_STRING" + assert self.model.call_connect_url == "TEST_STRING" def test_status_callback_url(self): """Test ApplicationRequest.status_callback_url""" self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" + assert self.model.status_callback_url == "TEST_STRING" def test_sms_url(self): """Test ApplicationRequest.sms_url""" self.model.sms_url = "TEST_STRING" - assert self.model.get("sms_url") == "TEST_STRING" + assert self.model.sms_url == "TEST_STRING" def test_sms_fallback_url(self): """Test ApplicationRequest.sms_fallback_url""" self.model.sms_fallback_url = "TEST_STRING" - assert self.model.get("sms_fallback_url") == "TEST_STRING" + assert self.model.sms_fallback_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_application_result.py b/test/models/test_application_result.py similarity index 65% rename from test/test_application_result.py rename to test/models/test_application_result.py index 5ef415a..2fa560d 100644 --- a/test/test_application_result.py +++ b/test/models/test_application_result.py @@ -1,99 +1,97 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.application_result_all_of import ApplicationResultAllOf -from freeclimb.model.mutable_resource_model import MutableResourceModel -globals()['ApplicationResultAllOf'] = ApplicationResultAllOf -globals()['MutableResourceModel'] = MutableResourceModel +from freeclimb import * +from freeclimb.models.application_result import ApplicationResult -from freeclimb.model.application_result import ApplicationResult # noqa: E501 class TestApplicationResult(unittest.TestCase): """ApplicationResult unit test stubs""" def setUp(self): - self.model = ApplicationResult( - ) - + self.model = ApplicationResult() + def test_uri(self): """Test ApplicationResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test ApplicationResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test ApplicationResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test ApplicationResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_account_id(self): """Test ApplicationResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_application_id(self): """Test ApplicationResult.application_id""" self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" + assert self.model.application_id == "TEST_STRING" def test_alias(self): """Test ApplicationResult.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_voice_url(self): """Test ApplicationResult.voice_url""" self.model.voice_url = "TEST_STRING" - assert self.model.get("voice_url") == "TEST_STRING" + assert self.model.voice_url == "TEST_STRING" def test_voice_fallback_url(self): """Test ApplicationResult.voice_fallback_url""" self.model.voice_fallback_url = "TEST_STRING" - assert self.model.get("voice_fallback_url") == "TEST_STRING" + assert self.model.voice_fallback_url == "TEST_STRING" def test_call_connect_url(self): """Test ApplicationResult.call_connect_url""" self.model.call_connect_url = "TEST_STRING" - assert self.model.get("call_connect_url") == "TEST_STRING" + assert self.model.call_connect_url == "TEST_STRING" def test_status_callback_url(self): """Test ApplicationResult.status_callback_url""" self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" + assert self.model.status_callback_url == "TEST_STRING" def test_sms_url(self): """Test ApplicationResult.sms_url""" self.model.sms_url = "TEST_STRING" - assert self.model.get("sms_url") == "TEST_STRING" + assert self.model.sms_url == "TEST_STRING" def test_sms_fallback_url(self): """Test ApplicationResult.sms_fallback_url""" self.model.sms_fallback_url = "TEST_STRING" - assert self.model.get("sms_fallback_url") == "TEST_STRING" + assert self.model.sms_fallback_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_available_number.py b/test/models/test_available_number.py similarity index 64% rename from test/test_available_number.py rename to test/models/test_available_number.py index a6a1f95..be39a3c 100644 --- a/test/test_available_number.py +++ b/test/models/test_available_number.py @@ -1,74 +1,74 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.capabilities import Capabilities -globals()['Capabilities'] = Capabilities +from freeclimb import * +from freeclimb.models.available_number import AvailableNumber -from freeclimb.model.available_number import AvailableNumber # noqa: E501 class TestAvailableNumber(unittest.TestCase): """AvailableNumber unit test stubs""" def setUp(self): - self.model = AvailableNumber( - ) - + self.model = AvailableNumber() + def test_capabilities(self): """Test AvailableNumber.capabilities""" - object = Capabilities( - voice=True, - sms=True, - toll_free=True, - ten_dlc=True, - short_code=True, - ) + object = freeclimb.models.capabilities.Capabilities( + voice=True, + sms=True, + toll_free=True, + ten_dlc=True, + short_code=True, + ) self.model.capabilities = object - assert self.model.get("capabilities", object) + assert self.model.capabilities == object def test_campaign_id(self): """Test AvailableNumber.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" def test_phone_number(self): """Test AvailableNumber.phone_number""" self.model.phone_number = "TEST_STRING" - assert self.model.get("phone_number") == "TEST_STRING" + assert self.model.phone_number == "TEST_STRING" def test_voice_enabled(self): """Test AvailableNumber.voice_enabled""" self.model.voice_enabled = False - assert self.model.get("voice_enabled") == False + assert self.model.voice_enabled == False def test_sms_enabled(self): """Test AvailableNumber.sms_enabled""" self.model.sms_enabled = False - assert self.model.get("sms_enabled") == False + assert self.model.sms_enabled == False def test_region(self): """Test AvailableNumber.region""" self.model.region = "TEST_STRING" - assert self.model.get("region") == "TEST_STRING" + assert self.model.region == "TEST_STRING" def test_country(self): """Test AvailableNumber.country""" self.model.country = "TEST_STRING" - assert self.model.get("country") == "TEST_STRING" + assert self.model.country == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_available_number_list.py b/test/models/test_available_number_list.py similarity index 62% rename from test/test_available_number_list.py rename to test/models/test_available_number_list.py index 7864f0d..fb2c3e1 100644 --- a/test/test_available_number_list.py +++ b/test/models/test_available_number_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.available_number import AvailableNumber -from freeclimb.model.available_number_list_all_of import AvailableNumberListAllOf -from freeclimb.model.pagination_model import PaginationModel -globals()['AvailableNumber'] = AvailableNumber -globals()['AvailableNumberListAllOf'] = AvailableNumberListAllOf -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.available_number_list import AvailableNumberList -from freeclimb.model.available_number_list import AvailableNumberList # noqa: E501 class TestAvailableNumberList(unittest.TestCase): """AvailableNumberList unit test stubs""" def setUp(self): - self.model = AvailableNumberList( - ) - + self.model = AvailableNumberList() + def test_total(self): """Test AvailableNumberList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test AvailableNumberList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test AvailableNumberList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test AvailableNumberList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test AvailableNumberList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test AvailableNumberList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test AvailableNumberList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_available_phone_numbers(self): """Test AvailableNumberList.available_phone_numbers""" testList = [] self.model.available_phone_numbers = testList - assert self.model.get("available_phone_numbers") == testList + assert self.model.available_phone_numbers == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_barge_in_reason.py b/test/models/test_barge_in_reason.py new file mode 100644 index 0000000..27f6d7b --- /dev/null +++ b/test/models/test_barge_in_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.barge_in_reason import BargeInReason + + +class TestBargeInReason(unittest.TestCase): + """BargeInReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_buy_incoming_number_request.py b/test/models/test_buy_incoming_number_request.py similarity index 72% rename from test/test_buy_incoming_number_request.py rename to test/models/test_buy_incoming_number_request.py index eee47cb..d4c8aac 100644 --- a/test/test_buy_incoming_number_request.py +++ b/test/models/test_buy_incoming_number_request.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.buy_incoming_number_request import BuyIncomingNumberRequest -from freeclimb.model.buy_incoming_number_request import BuyIncomingNumberRequest # noqa: E501 class TestBuyIncomingNumberRequest(unittest.TestCase): """BuyIncomingNumberRequest unit test stubs""" @@ -25,22 +28,22 @@ def setUp(self): self.model = BuyIncomingNumberRequest( phone_number="", ) - + def test_phone_number(self): """Test BuyIncomingNumberRequest.phone_number""" self.model.phone_number = "TEST_STRING" - assert self.model.get("phone_number") == "TEST_STRING" + assert self.model.phone_number == "TEST_STRING" def test_alias(self): """Test BuyIncomingNumberRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_application_id(self): """Test BuyIncomingNumberRequest.application_id""" self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" + assert self.model.application_id == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_call_control_webhook.py b/test/models/test_call_control_webhook.py new file mode 100644 index 0000000..5a8995b --- /dev/null +++ b/test/models/test_call_control_webhook.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.call_control_webhook import CallControlWebhook + + +class TestCallControlWebhook(unittest.TestCase): + """CallControlWebhook unit test stubs""" + + def setUp(self): + self.model = CallControlWebhook() + + def test_request_type(self): + """Test CallControlWebhook.request_type""" + + def test_call_id(self): + """Test CallControlWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test CallControlWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_conference_id(self): + """Test CallControlWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_digits(self): + """Test CallControlWebhook.digits""" + self.model.digits = "TEST_STRING" + assert self.model.digits == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "callControl" }' + assert isinstance(CallControlWebhook.deserialize(payload), CallControlWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_call_direction.py b/test/models/test_call_direction.py new file mode 100644 index 0000000..e0f6b4d --- /dev/null +++ b/test/models/test_call_direction.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.call_direction import CallDirection + + +class TestCallDirection(unittest.TestCase): + """CallDirection unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_call_ended_reason.py b/test/models/test_call_ended_reason.py new file mode 100644 index 0000000..8ceabac --- /dev/null +++ b/test/models/test_call_ended_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.call_ended_reason import CallEndedReason + + +class TestCallEndedReason(unittest.TestCase): + """CallEndedReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_call_list.py b/test/models/test_call_list.py similarity index 63% rename from test/test_call_list.py rename to test/models/test_call_list.py index 42dc82c..e4a152b 100644 --- a/test/test_call_list.py +++ b/test/models/test_call_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.call_list_all_of import CallListAllOf -from freeclimb.model.call_result import CallResult -from freeclimb.model.pagination_model import PaginationModel -globals()['CallListAllOf'] = CallListAllOf -globals()['CallResult'] = CallResult -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.call_list import CallList -from freeclimb.model.call_list import CallList # noqa: E501 class TestCallList(unittest.TestCase): """CallList unit test stubs""" def setUp(self): - self.model = CallList( - ) - + self.model = CallList() + def test_total(self): """Test CallList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test CallList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test CallList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test CallList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test CallList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test CallList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test CallList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_calls(self): """Test CallList.calls""" testList = [] self.model.calls = testList - assert self.model.get("calls") == testList + assert self.model.calls == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_call_result.py b/test/models/test_call_result.py similarity index 56% rename from test/test_call_result.py rename to test/models/test_call_result.py index 14b88b3..ccae59f 100644 --- a/test/test_call_result.py +++ b/test/models/test_call_result.py @@ -1,156 +1,153 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.answered_by import AnsweredBy -from freeclimb.model.call_direction import CallDirection -from freeclimb.model.call_result_all_of import CallResultAllOf -from freeclimb.model.call_status import CallStatus -from freeclimb.model.mutable_resource_model import MutableResourceModel -globals()['AnsweredBy'] = AnsweredBy -globals()['CallDirection'] = CallDirection -globals()['CallResultAllOf'] = CallResultAllOf -globals()['CallStatus'] = CallStatus -globals()['MutableResourceModel'] = MutableResourceModel - -from freeclimb.model.call_result import CallResult # noqa: E501 +from freeclimb import * +from freeclimb.models.call_result import CallResult + class TestCallResult(unittest.TestCase): """CallResult unit test stubs""" def setUp(self): - self.model = CallResult( - ) - + self.model = CallResult() + def test_uri(self): """Test CallResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test CallResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test CallResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test CallResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_call_id(self): """Test CallResult.call_id""" self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" + assert self.model.call_id == "TEST_STRING" def test_parent_call_id(self): """Test CallResult.parent_call_id""" self.model.parent_call_id = "TEST_STRING" - assert self.model.get("parent_call_id") == "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" def test_account_id(self): """Test CallResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" - def test__from(self): - """Test CallResult._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" + def test_var_from(self): + """Test CallResult.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" def test_to(self): """Test CallResult.to""" self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" + assert self.model.to == "TEST_STRING" def test_phone_number_id(self): """Test CallResult.phone_number_id""" self.model.phone_number_id = "TEST_STRING" - assert self.model.get("phone_number_id") == "TEST_STRING" + assert self.model.phone_number_id == "TEST_STRING" def test_call_status(self): """Test CallResult.call_status""" self.model.call_status = CallStatus.QUEUED - assert self.model.get("call_status") == CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED self.model.call_status = CallStatus.RINGING - assert self.model.get("call_status") == CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING self.model.call_status = CallStatus.IN_PROGRESS - assert self.model.get("call_status") == CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS self.model.call_status = CallStatus.CANCELED - assert self.model.get("call_status") == CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED self.model.call_status = CallStatus.COMPLETED - assert self.model.get("call_status") == CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED self.model.call_status = CallStatus.FAILED - assert self.model.get("call_status") == CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED self.model.call_status = CallStatus.BUSY - assert self.model.get("call_status") == CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY self.model.call_status = CallStatus.NO_ANSWER - assert self.model.get("call_status") == CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER def test_start_time(self): """Test CallResult.start_time""" self.model.start_time = "TEST_STRING" - assert self.model.get("start_time") == "TEST_STRING" + assert self.model.start_time == "TEST_STRING" def test_connect_time(self): """Test CallResult.connect_time""" self.model.connect_time = "TEST_STRING" - assert self.model.get("connect_time") == "TEST_STRING" + assert self.model.connect_time == "TEST_STRING" def test_end_time(self): """Test CallResult.end_time""" self.model.end_time = "TEST_STRING" - assert self.model.get("end_time") == "TEST_STRING" + assert self.model.end_time == "TEST_STRING" def test_duration(self): """Test CallResult.duration""" self.model.duration = 1 - assert self.model.get("duration") == 1 + assert self.model.duration == 1 def test_connect_duration(self): """Test CallResult.connect_duration""" self.model.connect_duration = 1 - assert self.model.get("connect_duration") == 1 + assert self.model.connect_duration == 1 def test_direction(self): """Test CallResult.direction""" self.model.direction = CallDirection.INBOUND - assert self.model.get("direction") == CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND self.model.direction = CallDirection.OUTBOUND_API - assert self.model.get("direction") == CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API self.model.direction = CallDirection.OUTBOUND_DIAL - assert self.model.get("direction") == CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL def test_answered_by(self): """Test CallResult.answered_by""" self.model.answered_by = AnsweredBy.HUMAN - assert self.model.get("answered_by") == AnsweredBy.HUMAN + assert self.model.answered_by == AnsweredBy.HUMAN self.model.answered_by = AnsweredBy.MACHINE - assert self.model.get("answered_by") == AnsweredBy.MACHINE + assert self.model.answered_by == AnsweredBy.MACHINE def test_subresource_uris(self): """Test CallResult.subresource_uris""" testObject = {} self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject + assert self.model.subresource_uris == testObject + + def test_application_id(self): + """Test CallResult.application_id""" + self.model.application_id = "TEST_STRING" + assert self.model.application_id == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_call_status.py b/test/models/test_call_status.py new file mode 100644 index 0000000..b65bdf3 --- /dev/null +++ b/test/models/test_call_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.call_status import CallStatus + + +class TestCallStatus(unittest.TestCase): + """CallStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_call_status_webhook.py b/test/models/test_call_status_webhook.py new file mode 100644 index 0000000..2ca247d --- /dev/null +++ b/test/models/test_call_status_webhook.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.call_status_webhook import CallStatusWebhook + + +class TestCallStatusWebhook(unittest.TestCase): + """CallStatusWebhook unit test stubs""" + + def setUp(self): + self.model = CallStatusWebhook() + + def test_request_type(self): + """Test CallStatusWebhook.request_type""" + + def test_call_id(self): + """Test CallStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test CallStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test CallStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test CallStatusWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test CallStatusWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_call_ended_reason(self): + """Test CallStatusWebhook.call_ended_reason""" + self.model.call_ended_reason = CallEndedReason.BUSY + assert self.model.call_ended_reason == CallEndedReason.BUSY + self.model.call_ended_reason = CallEndedReason.FAILED + assert self.model.call_ended_reason == CallEndedReason.FAILED + self.model.call_ended_reason = CallEndedReason.NO_ANSWER + assert self.model.call_ended_reason == CallEndedReason.NO_ANSWER + self.model.call_ended_reason = CallEndedReason.CALL_CANCELED + assert self.model.call_ended_reason == CallEndedReason.CALL_CANCELED + self.model.call_ended_reason = CallEndedReason.FAR_END_HANGUP + assert self.model.call_ended_reason == CallEndedReason.FAR_END_HANGUP + self.model.call_ended_reason = CallEndedReason.APP_HANGUP + assert self.model.call_ended_reason == CallEndedReason.APP_HANGUP + self.model.call_ended_reason = CallEndedReason.APP_REJECT + assert self.model.call_ended_reason == CallEndedReason.APP_REJECT + self.model.call_ended_reason = CallEndedReason.APP_NO_PERCL + assert self.model.call_ended_reason == CallEndedReason.APP_NO_PERCL + self.model.call_ended_reason = CallEndedReason.APP_INVALID_PERCL + assert self.model.call_ended_reason == CallEndedReason.APP_INVALID_PERCL + self.model.call_ended_reason = CallEndedReason.CONFERENCE_TERMINATED + assert self.model.call_ended_reason == CallEndedReason.CONFERENCE_TERMINATED + self.model.call_ended_reason = CallEndedReason.CONFERENCE_EMPTIED + assert self.model.call_ended_reason == CallEndedReason.CONFERENCE_EMPTIED + self.model.call_ended_reason = CallEndedReason.REMOVED_FROM_CONFERENCE + assert self.model.call_ended_reason == CallEndedReason.REMOVED_FROM_CONFERENCE + self.model.call_ended_reason = CallEndedReason.MACHINE_DETECTED + assert self.model.call_ended_reason == CallEndedReason.MACHINE_DETECTED + self.model.call_ended_reason = CallEndedReason.WEBHOOK_FAILED + assert self.model.call_ended_reason == CallEndedReason.WEBHOOK_FAILED + self.model.call_ended_reason = CallEndedReason.WEBHOOK_INVALID_RESPONSE + assert self.model.call_ended_reason == CallEndedReason.WEBHOOK_INVALID_RESPONSE + self.model.call_ended_reason = CallEndedReason.VOICE_DISABLED + assert self.model.call_ended_reason == CallEndedReason.VOICE_DISABLED + self.model.call_ended_reason = CallEndedReason.CONFIG_ERROR_NO_APPLICATION + assert ( + self.model.call_ended_reason == CallEndedReason.CONFIG_ERROR_NO_APPLICATION + ) + self.model.call_ended_reason = CallEndedReason.CONFIG_ERROR_NO_VOICE_URL + assert self.model.call_ended_reason == CallEndedReason.CONFIG_ERROR_NO_VOICE_URL + self.model.call_ended_reason = CallEndedReason.MAX_REDIRECTS_ERROR + assert self.model.call_ended_reason == CallEndedReason.MAX_REDIRECTS_ERROR + self.model.call_ended_reason = CallEndedReason.PERCL_PROCESSING_ERROR + assert self.model.call_ended_reason == CallEndedReason.PERCL_PROCESSING_ERROR + self.model.call_ended_reason = CallEndedReason.INTERNAL_ERROR + assert self.model.call_ended_reason == CallEndedReason.INTERNAL_ERROR + self.model.call_ended_reason = CallEndedReason.GRPC_HANGUP + assert self.model.call_ended_reason == CallEndedReason.GRPC_HANGUP + self.model.call_ended_reason = CallEndedReason.MAX_DURATION + assert self.model.call_ended_reason == CallEndedReason.MAX_DURATION + + def test_direction(self): + """Test CallStatusWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test CallStatusWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test CallStatusWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "callStatus" }' + assert isinstance(CallStatusWebhook.deserialize(payload), CallStatusWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_capabilities.py b/test/models/test_capabilities.py similarity index 74% rename from test/test_capabilities.py rename to test/models/test_capabilities.py index b2d6bb3..99f09ea 100644 --- a/test/test_capabilities.py +++ b/test/models/test_capabilities.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.capabilities import Capabilities -from freeclimb.model.capabilities import Capabilities # noqa: E501 class TestCapabilities(unittest.TestCase): """Capabilities unit test stubs""" @@ -29,32 +32,32 @@ def setUp(self): ten_dlc=True, short_code=True, ) - + def test_voice(self): """Test Capabilities.voice""" self.model.voice = False - assert self.model.get("voice") == False + assert self.model.voice == False def test_sms(self): """Test Capabilities.sms""" self.model.sms = False - assert self.model.get("sms") == False + assert self.model.sms == False def test_toll_free(self): """Test Capabilities.toll_free""" self.model.toll_free = False - assert self.model.get("toll_free") == False + assert self.model.toll_free == False def test_ten_dlc(self): """Test Capabilities.ten_dlc""" self.model.ten_dlc = False - assert self.model.get("ten_dlc") == False + assert self.model.ten_dlc == False def test_short_code(self): """Test Capabilities.short_code""" self.model.short_code = False - assert self.model.get("short_code") == False + assert self.model.short_code == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_completion_request.py b/test/models/test_completion_request.py similarity index 69% rename from test/test_completion_request.py rename to test/models/test_completion_request.py index 04b2b47..9668737 100644 --- a/test/test_completion_request.py +++ b/test/models/test_completion_request.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.completion_request import CompletionRequest -from freeclimb.model.completion_request import CompletionRequest # noqa: E501 class TestCompletionRequest(unittest.TestCase): """CompletionRequest unit test stubs""" @@ -25,17 +28,15 @@ def setUp(self): self.model = CompletionRequest( query="", ) - + def test_query(self): """Test CompletionRequest.query""" self.model.query = "T" * 2000 - assert self.model.get("query") == "T" * 2000 - - with pytest.raises(Exception) as info: + assert self.model.query == "T" * 2000 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.query = "T" * (2000 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_completion_result.py b/test/models/test_completion_result.py similarity index 58% rename from test/test_completion_result.py rename to test/models/test_completion_result.py index a72edd6..b7f463c 100644 --- a/test/test_completion_result.py +++ b/test/models/test_completion_result.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.completion_result import CompletionResult -from freeclimb.model.completion_result import CompletionResult # noqa: E501 class TestCompletionResult(unittest.TestCase): """CompletionResult unit test stubs""" @@ -24,28 +27,21 @@ class TestCompletionResult(unittest.TestCase): def setUp(self): self.model = CompletionResult( response="", - status="success", + status=CompletionResultStatus.SUCCESS, ) - + def test_response(self): """Test CompletionResult.response""" self.model.response = "TEST_STRING" - assert self.model.get("response") == "TEST_STRING" + assert self.model.response == "TEST_STRING" def test_status(self): """Test CompletionResult.status""" - self.model.status = "success" - assert self.model.get("status") == "success" - self.model.status = "no_context" - assert self.model.get("status") == "no_context" - - - def test_status_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.status = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file + self.model.status = CompletionResultStatus.SUCCESS + assert self.model.status == CompletionResultStatus.SUCCESS + self.model.status = CompletionResultStatus.NO_CONTEXT + assert self.model.status == CompletionResultStatus.NO_CONTEXT + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_completion_result_status.py b/test/models/test_completion_result_status.py new file mode 100644 index 0000000..e2ec1af --- /dev/null +++ b/test/models/test_completion_result_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.completion_result_status import CompletionResultStatus + + +class TestCompletionResultStatus(unittest.TestCase): + """CompletionResultStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_conference_list.py b/test/models/test_conference_list.py similarity index 62% rename from test/test_conference_list.py rename to test/models/test_conference_list.py index 28697ff..68e3d8c 100644 --- a/test/test_conference_list.py +++ b/test/models/test_conference_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.conference_list_all_of import ConferenceListAllOf -from freeclimb.model.conference_result import ConferenceResult -from freeclimb.model.pagination_model import PaginationModel -globals()['ConferenceListAllOf'] = ConferenceListAllOf -globals()['ConferenceResult'] = ConferenceResult -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.conference_list import ConferenceList -from freeclimb.model.conference_list import ConferenceList # noqa: E501 class TestConferenceList(unittest.TestCase): """ConferenceList unit test stubs""" def setUp(self): - self.model = ConferenceList( - ) - + self.model = ConferenceList() + def test_total(self): """Test ConferenceList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test ConferenceList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test ConferenceList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test ConferenceList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test ConferenceList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test ConferenceList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test ConferenceList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_conferences(self): """Test ConferenceList.conferences""" testList = [] self.model.conferences = testList - assert self.model.get("conferences") == testList + assert self.model.conferences == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_conference_participant_list.py b/test/models/test_conference_participant_list.py similarity index 61% rename from test/test_conference_participant_list.py rename to test/models/test_conference_participant_list.py index 446b28e..49324fd 100644 --- a/test/test_conference_participant_list.py +++ b/test/models/test_conference_participant_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.conference_participant_list_all_of import ConferenceParticipantListAllOf -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.pagination_model import PaginationModel -globals()['ConferenceParticipantListAllOf'] = ConferenceParticipantListAllOf -globals()['ConferenceParticipantResult'] = ConferenceParticipantResult -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.conference_participant_list import ConferenceParticipantList -from freeclimb.model.conference_participant_list import ConferenceParticipantList # noqa: E501 class TestConferenceParticipantList(unittest.TestCase): """ConferenceParticipantList unit test stubs""" def setUp(self): - self.model = ConferenceParticipantList( - ) - + self.model = ConferenceParticipantList() + def test_total(self): """Test ConferenceParticipantList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test ConferenceParticipantList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test ConferenceParticipantList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test ConferenceParticipantList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test ConferenceParticipantList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test ConferenceParticipantList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test ConferenceParticipantList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_participants(self): """Test ConferenceParticipantList.participants""" testList = [] self.model.participants = testList - assert self.model.get("participants") == testList + assert self.model.participants == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_conference_participant_result.py b/test/models/test_conference_participant_result.py similarity index 64% rename from test/test_conference_participant_result.py rename to test/models/test_conference_participant_result.py index 1e86862..ed2dee5 100644 --- a/test/test_conference_participant_result.py +++ b/test/models/test_conference_participant_result.py @@ -1,84 +1,87 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.conference_participant_result_all_of import ConferenceParticipantResultAllOf -from freeclimb.model.mutable_resource_model import MutableResourceModel -globals()['ConferenceParticipantResultAllOf'] = ConferenceParticipantResultAllOf -globals()['MutableResourceModel'] = MutableResourceModel +from freeclimb import * +from freeclimb.models.conference_participant_result import ConferenceParticipantResult -from freeclimb.model.conference_participant_result import ConferenceParticipantResult # noqa: E501 class TestConferenceParticipantResult(unittest.TestCase): """ConferenceParticipantResult unit test stubs""" def setUp(self): - self.model = ConferenceParticipantResult( - ) - + self.model = ConferenceParticipantResult() + def test_uri(self): """Test ConferenceParticipantResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test ConferenceParticipantResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test ConferenceParticipantResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test ConferenceParticipantResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_account_id(self): """Test ConferenceParticipantResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_conference_id(self): """Test ConferenceParticipantResult.conference_id""" self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" def test_call_id(self): """Test ConferenceParticipantResult.call_id""" self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" + assert self.model.call_id == "TEST_STRING" def test_talk(self): """Test ConferenceParticipantResult.talk""" self.model.talk = False - assert self.model.get("talk") == False + assert self.model.talk == False def test_listen(self): """Test ConferenceParticipantResult.listen""" self.model.listen = False - assert self.model.get("listen") == False + assert self.model.listen == False + + def test_dtmf_pass_through(self): + """Test ConferenceParticipantResult.dtmf_pass_through""" + self.model.dtmf_pass_through = False + assert self.model.dtmf_pass_through == False def test_start_conf_on_enter(self): """Test ConferenceParticipantResult.start_conf_on_enter""" self.model.start_conf_on_enter = False - assert self.model.get("start_conf_on_enter") == False + assert self.model.start_conf_on_enter == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_conference_recording_status_webhook.py b/test/models/test_conference_recording_status_webhook.py new file mode 100644 index 0000000..892d1be --- /dev/null +++ b/test/models/test_conference_recording_status_webhook.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.conference_recording_status_webhook import ( + ConferenceRecordingStatusWebhook, +) + + +class TestConferenceRecordingStatusWebhook(unittest.TestCase): + """ConferenceRecordingStatusWebhook unit test stubs""" + + def setUp(self): + self.model = ConferenceRecordingStatusWebhook() + + def test_request_type(self): + """Test ConferenceRecordingStatusWebhook.request_type""" + + def test_call_id(self): + """Test ConferenceRecordingStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test ConferenceRecordingStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test ConferenceRecordingStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test ConferenceRecordingStatusWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test ConferenceRecordingStatusWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test ConferenceRecordingStatusWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test ConferenceRecordingStatusWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test ConferenceRecordingStatusWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_status(self): + """Test ConferenceRecordingStatusWebhook.status""" + self.model.status = ConferenceStatus.EMPTY + assert self.model.status == ConferenceStatus.EMPTY + self.model.status = ConferenceStatus.POPULATED + assert self.model.status == ConferenceStatus.POPULATED + self.model.status = ConferenceStatus.IN_PROGRESS + assert self.model.status == ConferenceStatus.IN_PROGRESS + self.model.status = ConferenceStatus.TERMINATED + assert self.model.status == ConferenceStatus.TERMINATED + + def test_recording_url(self): + """Test ConferenceRecordingStatusWebhook.recording_url""" + self.model.recording_url = "TEST_STRING" + assert self.model.recording_url == "TEST_STRING" + + def test_recording_id(self): + """Test ConferenceRecordingStatusWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" + + def test_recording_duration_sec(self): + """Test ConferenceRecordingStatusWebhook.recording_duration_sec""" + self.model.recording_duration_sec = 1 + assert self.model.recording_duration_sec == 1 + + def test_deserialize(self): + payload = '{ "requestType": "conferenceRecordingStatus" }' + assert isinstance( + ConferenceRecordingStatusWebhook.deserialize(payload), + ConferenceRecordingStatusWebhook, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_conference_result.py b/test/models/test_conference_result.py similarity index 59% rename from test/test_conference_result.py rename to test/models/test_conference_result.py index a7ebfd4..41df7de 100644 --- a/test/test_conference_result.py +++ b/test/models/test_conference_result.py @@ -1,121 +1,115 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.conference_result_all_of import ConferenceResultAllOf -from freeclimb.model.conference_status import ConferenceStatus -from freeclimb.model.mutable_resource_model import MutableResourceModel -from freeclimb.model.play_beep import PlayBeep -globals()['ConferenceResultAllOf'] = ConferenceResultAllOf -globals()['ConferenceStatus'] = ConferenceStatus -globals()['MutableResourceModel'] = MutableResourceModel -globals()['PlayBeep'] = PlayBeep +from freeclimb import * +from freeclimb.models.conference_result import ConferenceResult -from freeclimb.model.conference_result import ConferenceResult # noqa: E501 class TestConferenceResult(unittest.TestCase): """ConferenceResult unit test stubs""" def setUp(self): - self.model = ConferenceResult( - ) - + self.model = ConferenceResult() + def test_uri(self): """Test ConferenceResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test ConferenceResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test ConferenceResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test ConferenceResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_conference_id(self): """Test ConferenceResult.conference_id""" self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" def test_account_id(self): """Test ConferenceResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_alias(self): """Test ConferenceResult.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_play_beep(self): """Test ConferenceResult.play_beep""" self.model.play_beep = PlayBeep.ALWAYS - assert self.model.get("play_beep") == PlayBeep.ALWAYS + assert self.model.play_beep == PlayBeep.ALWAYS self.model.play_beep = PlayBeep.NEVER - assert self.model.get("play_beep") == PlayBeep.NEVER + assert self.model.play_beep == PlayBeep.NEVER self.model.play_beep = PlayBeep.ENTRY_ONLY - assert self.model.get("play_beep") == PlayBeep.ENTRY_ONLY + assert self.model.play_beep == PlayBeep.ENTRY_ONLY self.model.play_beep = PlayBeep.EXIT_ONLY - assert self.model.get("play_beep") == PlayBeep.EXIT_ONLY + assert self.model.play_beep == PlayBeep.EXIT_ONLY def test_record(self): """Test ConferenceResult.record""" self.model.record = False - assert self.model.get("record") == False + assert self.model.record == False def test_status(self): """Test ConferenceResult.status""" self.model.status = ConferenceStatus.EMPTY - assert self.model.get("status") == ConferenceStatus.EMPTY + assert self.model.status == ConferenceStatus.EMPTY self.model.status = ConferenceStatus.POPULATED - assert self.model.get("status") == ConferenceStatus.POPULATED + assert self.model.status == ConferenceStatus.POPULATED self.model.status = ConferenceStatus.IN_PROGRESS - assert self.model.get("status") == ConferenceStatus.IN_PROGRESS + assert self.model.status == ConferenceStatus.IN_PROGRESS self.model.status = ConferenceStatus.TERMINATED - assert self.model.get("status") == ConferenceStatus.TERMINATED + assert self.model.status == ConferenceStatus.TERMINATED def test_wait_url(self): """Test ConferenceResult.wait_url""" self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" + assert self.model.wait_url == "TEST_STRING" def test_action_url(self): """Test ConferenceResult.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_status_callback_url(self): """Test ConferenceResult.status_callback_url""" self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" + assert self.model.status_callback_url == "TEST_STRING" def test_subresource_uris(self): """Test ConferenceResult.subresource_uris""" testObject = {} self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject + assert self.model.subresource_uris == testObject -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_conference_status.py b/test/models/test_conference_status.py new file mode 100644 index 0000000..e254833 --- /dev/null +++ b/test/models/test_conference_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.conference_status import ConferenceStatus + + +class TestConferenceStatus(unittest.TestCase): + """ConferenceStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_conference_status_webhook.py b/test/models/test_conference_status_webhook.py new file mode 100644 index 0000000..c1d316b --- /dev/null +++ b/test/models/test_conference_status_webhook.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.conference_status_webhook import ConferenceStatusWebhook + + +class TestConferenceStatusWebhook(unittest.TestCase): + """ConferenceStatusWebhook unit test stubs""" + + def setUp(self): + self.model = ConferenceStatusWebhook() + + def test_request_type(self): + """Test ConferenceStatusWebhook.request_type""" + + def test_call_id(self): + """Test ConferenceStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test ConferenceStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test ConferenceStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test ConferenceStatusWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test ConferenceStatusWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test ConferenceStatusWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test ConferenceStatusWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test ConferenceStatusWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_status(self): + """Test ConferenceStatusWebhook.status""" + self.model.status = ConferenceStatus.EMPTY + assert self.model.status == ConferenceStatus.EMPTY + self.model.status = ConferenceStatus.POPULATED + assert self.model.status == ConferenceStatus.POPULATED + self.model.status = ConferenceStatus.IN_PROGRESS + assert self.model.status == ConferenceStatus.IN_PROGRESS + self.model.status = ConferenceStatus.TERMINATED + assert self.model.status == ConferenceStatus.TERMINATED + + def test_recording_url(self): + """Test ConferenceStatusWebhook.recording_url""" + self.model.recording_url = "TEST_STRING" + assert self.model.recording_url == "TEST_STRING" + + def test_recording_id(self): + """Test ConferenceStatusWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" + + def test_recording_duration_sec(self): + """Test ConferenceStatusWebhook.recording_duration_sec""" + self.model.recording_duration_sec = 1 + assert self.model.recording_duration_sec == 1 + + def test_deserialize(self): + payload = '{ "requestType": "conferenceStatus" }' + assert isinstance( + ConferenceStatusWebhook.deserialize(payload), ConferenceStatusWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_conference_all_of.py b/test/models/test_create_conference.py similarity index 51% rename from test/test_create_conference_all_of.py rename to test/models/test_create_conference.py index d3be35b..2d2d585 100644 --- a/test/test_create_conference_all_of.py +++ b/test/models/test_create_conference.py @@ -1,69 +1,70 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.play_beep import PlayBeep -globals()['PlayBeep'] = PlayBeep +from freeclimb import * +from freeclimb.models.create_conference import CreateConference -from freeclimb.model.create_conference_all_of import CreateConferenceAllOf # noqa: E501 -class TestCreateConferenceAllOf(unittest.TestCase): - """CreateConferenceAllOf unit test stubs""" +class TestCreateConference(unittest.TestCase): + """CreateConference unit test stubs""" def setUp(self): - self.model = CreateConferenceAllOf( + self.model = CreateConference( action_url="", ) - + def test_action_url(self): - """Test CreateConferenceAllOf.action_url""" + """Test CreateConference.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_alias(self): - """Test CreateConferenceAllOf.alias""" + """Test CreateConference.alias""" self.model.alias = False - assert self.model.get("alias") == False + assert self.model.alias == False def test_play_beep(self): - """Test CreateConferenceAllOf.play_beep""" + """Test CreateConference.play_beep""" self.model.play_beep = PlayBeep.ALWAYS - assert self.model.get("play_beep") == PlayBeep.ALWAYS + assert self.model.play_beep == PlayBeep.ALWAYS self.model.play_beep = PlayBeep.NEVER - assert self.model.get("play_beep") == PlayBeep.NEVER + assert self.model.play_beep == PlayBeep.NEVER self.model.play_beep = PlayBeep.ENTRY_ONLY - assert self.model.get("play_beep") == PlayBeep.ENTRY_ONLY + assert self.model.play_beep == PlayBeep.ENTRY_ONLY self.model.play_beep = PlayBeep.EXIT_ONLY - assert self.model.get("play_beep") == PlayBeep.EXIT_ONLY + assert self.model.play_beep == PlayBeep.EXIT_ONLY def test_record(self): - """Test CreateConferenceAllOf.record""" + """Test CreateConference.record""" self.model.record = False - assert self.model.get("record") == False + assert self.model.record == False def test_status_callback_url(self): - """Test CreateConferenceAllOf.status_callback_url""" + """Test CreateConference.status_callback_url""" self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" + assert self.model.status_callback_url == "TEST_STRING" def test_wait_url(self): - """Test CreateConferenceAllOf.wait_url""" + """Test CreateConference.wait_url""" self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" + assert self.model.wait_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_conference_request.py b/test/models/test_create_conference_request.py similarity index 65% rename from test/test_create_conference_request.py rename to test/models/test_create_conference_request.py index a8ca92f..0eac36a 100644 --- a/test/test_create_conference_request.py +++ b/test/models/test_create_conference_request.py @@ -1,63 +1,63 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.play_beep import PlayBeep -globals()['PlayBeep'] = PlayBeep +from freeclimb import * +from freeclimb.models.create_conference_request import CreateConferenceRequest -from freeclimb.model.create_conference_request import CreateConferenceRequest # noqa: E501 class TestCreateConferenceRequest(unittest.TestCase): """CreateConferenceRequest unit test stubs""" def setUp(self): - self.model = CreateConferenceRequest( - ) - + self.model = CreateConferenceRequest() + def test_alias(self): """Test CreateConferenceRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_play_beep(self): """Test CreateConferenceRequest.play_beep""" self.model.play_beep = PlayBeep.ALWAYS - assert self.model.get("play_beep") == PlayBeep.ALWAYS + assert self.model.play_beep == PlayBeep.ALWAYS self.model.play_beep = PlayBeep.NEVER - assert self.model.get("play_beep") == PlayBeep.NEVER + assert self.model.play_beep == PlayBeep.NEVER self.model.play_beep = PlayBeep.ENTRY_ONLY - assert self.model.get("play_beep") == PlayBeep.ENTRY_ONLY + assert self.model.play_beep == PlayBeep.ENTRY_ONLY self.model.play_beep = PlayBeep.EXIT_ONLY - assert self.model.get("play_beep") == PlayBeep.EXIT_ONLY + assert self.model.play_beep == PlayBeep.EXIT_ONLY def test_record(self): """Test CreateConferenceRequest.record""" self.model.record = False - assert self.model.get("record") == False + assert self.model.record == False def test_wait_url(self): """Test CreateConferenceRequest.wait_url""" self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" + assert self.model.wait_url == "TEST_STRING" def test_status_callback_url(self): """Test CreateConferenceRequest.status_callback_url""" self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" + assert self.model.status_callback_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_create_conference_webhook.py b/test/models/test_create_conference_webhook.py new file mode 100644 index 0000000..020cf13 --- /dev/null +++ b/test/models/test_create_conference_webhook.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.create_conference_webhook import CreateConferenceWebhook + + +class TestCreateConferenceWebhook(unittest.TestCase): + """CreateConferenceWebhook unit test stubs""" + + def setUp(self): + self.model = CreateConferenceWebhook() + + def test_request_type(self): + """Test CreateConferenceWebhook.request_type""" + + def test_call_id(self): + """Test CreateConferenceWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test CreateConferenceWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test CreateConferenceWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test CreateConferenceWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test CreateConferenceWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test CreateConferenceWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test CreateConferenceWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test CreateConferenceWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_status(self): + """Test CreateConferenceWebhook.status""" + self.model.status = ConferenceStatus.EMPTY + assert self.model.status == ConferenceStatus.EMPTY + self.model.status = ConferenceStatus.POPULATED + assert self.model.status == ConferenceStatus.POPULATED + self.model.status = ConferenceStatus.IN_PROGRESS + assert self.model.status == ConferenceStatus.IN_PROGRESS + self.model.status = ConferenceStatus.TERMINATED + assert self.model.status == ConferenceStatus.TERMINATED + + def test_recording_url(self): + """Test CreateConferenceWebhook.recording_url""" + self.model.recording_url = "TEST_STRING" + assert self.model.recording_url == "TEST_STRING" + + def test_recording_id(self): + """Test CreateConferenceWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" + + def test_recording_duration_sec(self): + """Test CreateConferenceWebhook.recording_duration_sec""" + self.model.recording_duration_sec = 1 + assert self.model.recording_duration_sec == 1 + + def test_deserialize(self): + payload = '{ "requestType": "createConference" }' + assert isinstance( + CreateConferenceWebhook.deserialize(payload), CreateConferenceWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_create_web_rtc_token.py b/test/models/test_create_web_rtc_token.py similarity index 64% rename from test/test_create_web_rtc_token.py rename to test/models/test_create_web_rtc_token.py index 346a364..98229f1 100644 --- a/test/test_create_web_rtc_token.py +++ b/test/models/test_create_web_rtc_token.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.create_web_rtc_token import CreateWebRTCToken -from freeclimb.model.create_web_rtc_token import CreateWebRTCToken # noqa: E501 class TestCreateWebRTCToken(unittest.TestCase): """CreateWebRTCToken unit test stubs""" @@ -24,25 +27,25 @@ class TestCreateWebRTCToken(unittest.TestCase): def setUp(self): self.model = CreateWebRTCToken( to="", - _from="", - uses = 1, + var_from="", + uses=1, ) - + def test_to(self): """Test CreateWebRTCToken.to""" self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" + assert self.model.to == "TEST_STRING" - def test__from(self): - """Test CreateWebRTCToken._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" + def test_var_from(self): + """Test CreateWebRTCToken.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" def test_uses(self): """Test CreateWebRTCToken.uses""" self.model.uses = 1 - assert self.model.get("uses") == 1 + assert self.model.uses == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_dequeue.py b/test/models/test_dequeue.py new file mode 100644 index 0000000..955382f --- /dev/null +++ b/test/models/test_dequeue.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.dequeue import Dequeue + + +class TestDequeue(unittest.TestCase): + """Dequeue unit test stubs""" + + def setUp(self): + self.model = Dequeue() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_dequeue_webhook.py b/test/models/test_dequeue_webhook.py new file mode 100644 index 0000000..62c1e56 --- /dev/null +++ b/test/models/test_dequeue_webhook.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.dequeue_webhook import DequeueWebhook + + +class TestDequeueWebhook(unittest.TestCase): + """DequeueWebhook unit test stubs""" + + def setUp(self): + self.model = DequeueWebhook() + + def test_request_type(self): + """Test DequeueWebhook.request_type""" + + def test_call_id(self): + """Test DequeueWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test DequeueWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test DequeueWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test DequeueWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test DequeueWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test DequeueWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test DequeueWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test DequeueWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_queue_result(self): + """Test DequeueWebhook.queue_result""" + self.model.queue_result = "TEST_STRING" + assert self.model.queue_result == "TEST_STRING" + + def test_queue_time(self): + """Test DequeueWebhook.queue_time""" + self.model.queue_time = 1 + assert self.model.queue_time == 1 + + def test_deserialize(self): + payload = '{ "requestType": "dequeue" }' + assert isinstance(DequeueWebhook.deserialize(payload), DequeueWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_enqueue_all_of.py b/test/models/test_enqueue.py similarity index 60% rename from test/test_enqueue_all_of.py rename to test/models/test_enqueue.py index ac7f895..6a9bef7 100644 --- a/test/test_enqueue_all_of.py +++ b/test/models/test_enqueue.py @@ -1,53 +1,56 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.enqueue import Enqueue -from freeclimb.model.enqueue_all_of import EnqueueAllOf # noqa: E501 -class TestEnqueueAllOf(unittest.TestCase): - """EnqueueAllOf unit test stubs""" +class TestEnqueue(unittest.TestCase): + """Enqueue unit test stubs""" def setUp(self): - self.model = EnqueueAllOf( + self.model = Enqueue( action_url="", queue_id="", wait_url="", ) - + def test_action_url(self): - """Test EnqueueAllOf.action_url""" + """Test Enqueue.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_notification_url(self): - """Test EnqueueAllOf.notification_url""" + """Test Enqueue.notification_url""" self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" + assert self.model.notification_url == "TEST_STRING" def test_queue_id(self): - """Test EnqueueAllOf.queue_id""" + """Test Enqueue.queue_id""" self.model.queue_id = "TEST_STRING" - assert self.model.get("queue_id") == "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" def test_wait_url(self): - """Test EnqueueAllOf.wait_url""" + """Test Enqueue.wait_url""" self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" + assert self.model.wait_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_filter_logs_request.py b/test/models/test_filter_logs_request.py similarity index 73% rename from test/test_filter_logs_request.py rename to test/models/test_filter_logs_request.py index 65ac409..1a4b028 100644 --- a/test/test_filter_logs_request.py +++ b/test/models/test_filter_logs_request.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.filter_logs_request import FilterLogsRequest -from freeclimb.model.filter_logs_request import FilterLogsRequest # noqa: E501 class TestFilterLogsRequest(unittest.TestCase): """FilterLogsRequest unit test stubs""" @@ -25,12 +28,12 @@ def setUp(self): self.model = FilterLogsRequest( pql="", ) - + def test_pql(self): """Test FilterLogsRequest.pql""" self.model.pql = "TEST_STRING" - assert self.model.get("pql") == "TEST_STRING" + assert self.model.pql == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_get_digits_all_of.py b/test/models/test_get_digits.py similarity index 52% rename from test/test_get_digits_all_of.py rename to test/models/test_get_digits.py index de627b2..0fc3410 100644 --- a/test/test_get_digits_all_of.py +++ b/test/models/test_get_digits.py @@ -1,79 +1,80 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.percl_command import PerclCommand -globals()['PerclCommand'] = PerclCommand +from freeclimb import * +from freeclimb.models.get_digits import GetDigits -from freeclimb.model.get_digits_all_of import GetDigitsAllOf # noqa: E501 -class TestGetDigitsAllOf(unittest.TestCase): - """GetDigitsAllOf unit test stubs""" +class TestGetDigits(unittest.TestCase): + """GetDigits unit test stubs""" def setUp(self): - self.model = GetDigitsAllOf( + self.model = GetDigits( action_url="", ) - + def test_action_url(self): - """Test GetDigitsAllOf.action_url""" + """Test GetDigits.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_digit_timeout_ms(self): - """Test GetDigitsAllOf.digit_timeout_ms""" + """Test GetDigits.digit_timeout_ms""" self.model.digit_timeout_ms = 1 - assert self.model.get("digit_timeout_ms") == 1 + assert self.model.digit_timeout_ms == 1 def test_finish_on_key(self): - """Test GetDigitsAllOf.finish_on_key""" + """Test GetDigits.finish_on_key""" self.model.finish_on_key = "TEST_STRING" - assert self.model.get("finish_on_key") == "TEST_STRING" + assert self.model.finish_on_key == "TEST_STRING" def test_flush_buffer(self): - """Test GetDigitsAllOf.flush_buffer""" + """Test GetDigits.flush_buffer""" self.model.flush_buffer = False - assert self.model.get("flush_buffer") == False + assert self.model.flush_buffer == False def test_initial_timeout_ms(self): - """Test GetDigitsAllOf.initial_timeout_ms""" + """Test GetDigits.initial_timeout_ms""" self.model.initial_timeout_ms = 1 - assert self.model.get("initial_timeout_ms") == 1 + assert self.model.initial_timeout_ms == 1 def test_max_digits(self): - """Test GetDigitsAllOf.max_digits""" + """Test GetDigits.max_digits""" self.model.max_digits = 1 - assert self.model.get("max_digits") == 1 + assert self.model.max_digits == 1 def test_min_digits(self): - """Test GetDigitsAllOf.min_digits""" + """Test GetDigits.min_digits""" self.model.min_digits = 1 - assert self.model.get("min_digits") == 1 + assert self.model.min_digits == 1 def test_prompts(self): - """Test GetDigitsAllOf.prompts""" + """Test GetDigits.prompts""" testList = [] self.model.prompts = testList - assert self.model.get("prompts") == testList + assert self.model.prompts == testList def test_privacy_mode(self): - """Test GetDigitsAllOf.privacy_mode""" + """Test GetDigits.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_get_digits_reason.py b/test/models/test_get_digits_reason.py new file mode 100644 index 0000000..9a103d0 --- /dev/null +++ b/test/models/test_get_digits_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.get_digits_reason import GetDigitsReason + + +class TestGetDigitsReason(unittest.TestCase): + """GetDigitsReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_get_digits_webhook.py b/test/models/test_get_digits_webhook.py new file mode 100644 index 0000000..dd964b7 --- /dev/null +++ b/test/models/test_get_digits_webhook.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.get_digits_webhook import GetDigitsWebhook + + +class TestGetDigitsWebhook(unittest.TestCase): + """GetDigitsWebhook unit test stubs""" + + def setUp(self): + self.model = GetDigitsWebhook() + + def test_request_type(self): + """Test GetDigitsWebhook.request_type""" + + def test_call_id(self): + """Test GetDigitsWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test GetDigitsWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test GetDigitsWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test GetDigitsWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test GetDigitsWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test GetDigitsWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test GetDigitsWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test GetDigitsWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_digits(self): + """Test GetDigitsWebhook.digits""" + self.model.digits = "TEST_STRING" + assert self.model.digits == "TEST_STRING" + + def test_reason(self): + """Test GetDigitsWebhook.reason""" + self.model.reason = GetDigitsReason.FINISH_KEY + assert self.model.reason == GetDigitsReason.FINISH_KEY + self.model.reason = GetDigitsReason.TIMEOUT + assert self.model.reason == GetDigitsReason.TIMEOUT + self.model.reason = GetDigitsReason.MAX_DIGITS + assert self.model.reason == GetDigitsReason.MAX_DIGITS + self.model.reason = GetDigitsReason.TONE + assert self.model.reason == GetDigitsReason.TONE + + def test_parent_call_id(self): + """Test GetDigitsWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "getDigits" }' + assert isinstance(GetDigitsWebhook.deserialize(payload), GetDigitsWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_get_speech.py b/test/models/test_get_speech.py new file mode 100644 index 0000000..7f063eb --- /dev/null +++ b/test/models/test_get_speech.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.get_speech import GetSpeech + + +class TestGetSpeech(unittest.TestCase): + """GetSpeech unit test stubs""" + + def setUp(self): + self.model = GetSpeech( + action_url="", + grammar_file="", + ) + + def test_action_url(self): + """Test GetSpeech.action_url""" + self.model.action_url = "TEST_STRING" + assert self.model.action_url == "TEST_STRING" + + def test_grammar_type(self): + """Test GetSpeech.grammar_type""" + self.model.grammar_type = GrammarType.URL + assert self.model.grammar_type == GrammarType.URL + self.model.grammar_type = GrammarType.BUILT_IN + assert self.model.grammar_type == GrammarType.BUILT_IN + + def test_grammar_file(self): + """Test GetSpeech.grammar_file""" + self.model.grammar_file = "TEST_STRING" + assert self.model.grammar_file == "TEST_STRING" + + def test_grammar_rule(self): + """Test GetSpeech.grammar_rule""" + self.model.grammar_rule = "TEST_STRING" + assert self.model.grammar_rule == "TEST_STRING" + + def test_play_beep(self): + """Test GetSpeech.play_beep""" + self.model.play_beep = False + assert self.model.play_beep == False + + def test_prompts(self): + """Test GetSpeech.prompts""" + testList = [] + self.model.prompts = testList + assert self.model.prompts == testList + + def test_no_input_timeout_ms(self): + """Test GetSpeech.no_input_timeout_ms""" + self.model.no_input_timeout_ms = 1 + assert self.model.no_input_timeout_ms == 1 + + def test_recognition_timeout_ms(self): + """Test GetSpeech.recognition_timeout_ms""" + self.model.recognition_timeout_ms = 1 + assert self.model.recognition_timeout_ms == 1 + + def test_confidence_threshold(self): + """Test GetSpeech.confidence_threshold""" + + self.model.confidence_threshold = float(1) + assert self.model.confidence_threshold == float(1) + + def test_sensitivity_level(self): + """Test GetSpeech.sensitivity_level""" + + self.model.sensitivity_level = float(1) + assert self.model.sensitivity_level == float(1) + + def test_speech_complete_timeout_ms(self): + """Test GetSpeech.speech_complete_timeout_ms""" + self.model.speech_complete_timeout_ms = 1 + assert self.model.speech_complete_timeout_ms == 1 + + def test_speech_incomplete_timeout_ms(self): + """Test GetSpeech.speech_incomplete_timeout_ms""" + self.model.speech_incomplete_timeout_ms = 1 + assert self.model.speech_incomplete_timeout_ms == 1 + + def test_privacy_mode(self): + """Test GetSpeech.privacy_mode""" + self.model.privacy_mode = False + assert self.model.privacy_mode == False + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_get_speech_reason.py b/test/models/test_get_speech_reason.py new file mode 100644 index 0000000..97d51cd --- /dev/null +++ b/test/models/test_get_speech_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.get_speech_reason import GetSpeechReason + + +class TestGetSpeechReason(unittest.TestCase): + """GetSpeechReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_get_speech_webhook.py b/test/models/test_get_speech_webhook.py new file mode 100644 index 0000000..6e3ddde --- /dev/null +++ b/test/models/test_get_speech_webhook.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.get_speech_webhook import GetSpeechWebhook + + +class TestGetSpeechWebhook(unittest.TestCase): + """GetSpeechWebhook unit test stubs""" + + def setUp(self): + self.model = GetSpeechWebhook() + + def test_request_type(self): + """Test GetSpeechWebhook.request_type""" + + def test_call_id(self): + """Test GetSpeechWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test GetSpeechWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test GetSpeechWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test GetSpeechWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test GetSpeechWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test GetSpeechWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test GetSpeechWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test GetSpeechWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_reason(self): + """Test GetSpeechWebhook.reason""" + self.model.reason = GetSpeechReason.ERROR + assert self.model.reason == GetSpeechReason.ERROR + self.model.reason = GetSpeechReason.HANGUP + assert self.model.reason == GetSpeechReason.HANGUP + self.model.reason = GetSpeechReason.DIGIT + assert self.model.reason == GetSpeechReason.DIGIT + self.model.reason = GetSpeechReason.NO_INPUT + assert self.model.reason == GetSpeechReason.NO_INPUT + self.model.reason = GetSpeechReason.NO_MATCH + assert self.model.reason == GetSpeechReason.NO_MATCH + self.model.reason = GetSpeechReason.RECOGNITION + assert self.model.reason == GetSpeechReason.RECOGNITION + + def test_recognition_result(self): + """Test GetSpeechWebhook.recognition_result""" + self.model.recognition_result = "TEST_STRING" + assert self.model.recognition_result == "TEST_STRING" + + def test_confidence(self): + """Test GetSpeechWebhook.confidence""" + self.model.confidence = 1 + assert self.model.confidence == 1 + + def test_parent_call_id(self): + """Test GetSpeechWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_completion_reason(self): + """Test GetSpeechWebhook.completion_reason""" + self.model.completion_reason = "TEST_STRING" + assert self.model.completion_reason == "TEST_STRING" + + def test_completion_cause(self): + """Test GetSpeechWebhook.completion_cause""" + self.model.completion_cause = "TEST_STRING" + assert self.model.completion_cause == "TEST_STRING" + + def test_mrcp_code(self): + """Test GetSpeechWebhook.mrcp_code""" + self.model.mrcp_code = 1 + assert self.model.mrcp_code == 1 + + def test_mrcp_diagnostic(self): + """Test GetSpeechWebhook.mrcp_diagnostic""" + self.model.mrcp_diagnostic = "TEST_STRING" + assert self.model.mrcp_diagnostic == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "getSpeech" }' + assert isinstance(GetSpeechWebhook.deserialize(payload), GetSpeechWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_grammar_file_built_in.py b/test/models/test_grammar_file_built_in.py new file mode 100644 index 0000000..94bd8bd --- /dev/null +++ b/test/models/test_grammar_file_built_in.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.grammar_file_built_in import GrammarFileBuiltIn + + +class TestGrammarFileBuiltIn(unittest.TestCase): + """GrammarFileBuiltIn unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_grammar_type.py b/test/models/test_grammar_type.py new file mode 100644 index 0000000..39683dd --- /dev/null +++ b/test/models/test_grammar_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.grammar_type import GrammarType + + +class TestGrammarType(unittest.TestCase): + """GrammarType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_hangup_all_of.py b/test/models/test_hangup.py similarity index 63% rename from test/test_hangup_all_of.py rename to test/models/test_hangup.py index 30b8d84..626e410 100644 --- a/test/test_hangup_all_of.py +++ b/test/models/test_hangup.py @@ -1,35 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.hangup import Hangup -from freeclimb.model.hangup_all_of import HangupAllOf # noqa: E501 -class TestHangupAllOf(unittest.TestCase): - """HangupAllOf unit test stubs""" +class TestHangup(unittest.TestCase): + """Hangup unit test stubs""" def setUp(self): - self.model = HangupAllOf( - ) - + self.model = Hangup() + def test_reason(self): - """Test HangupAllOf.reason""" + """Test Hangup.reason""" self.model.reason = "TEST_STRING" - assert self.model.get("reason") == "TEST_STRING" + assert self.model.reason == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_if_machine.py b/test/models/test_if_machine.py new file mode 100644 index 0000000..97bb6da --- /dev/null +++ b/test/models/test_if_machine.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.if_machine import IfMachine + + +class TestIfMachine(unittest.TestCase): + """IfMachine unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_inbound_call_webhook.py b/test/models/test_inbound_call_webhook.py new file mode 100644 index 0000000..fecc207 --- /dev/null +++ b/test/models/test_inbound_call_webhook.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.inbound_call_webhook import InboundCallWebhook + + +class TestInboundCallWebhook(unittest.TestCase): + """InboundCallWebhook unit test stubs""" + + def setUp(self): + self.model = InboundCallWebhook() + + def test_request_type(self): + """Test InboundCallWebhook.request_type""" + + def test_call_id(self): + """Test InboundCallWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test InboundCallWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test InboundCallWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test InboundCallWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test InboundCallWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test InboundCallWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test InboundCallWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test InboundCallWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_parent_call_id(self): + """Test InboundCallWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "inboundCall" }' + assert isinstance(InboundCallWebhook.deserialize(payload), InboundCallWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_incoming_number_list.py b/test/models/test_incoming_number_list.py similarity index 62% rename from test/test_incoming_number_list.py rename to test/models/test_incoming_number_list.py index 5712301..800efe2 100644 --- a/test/test_incoming_number_list.py +++ b/test/models/test_incoming_number_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.incoming_number_list_all_of import IncomingNumberListAllOf -from freeclimb.model.incoming_number_result import IncomingNumberResult -from freeclimb.model.pagination_model import PaginationModel -globals()['IncomingNumberListAllOf'] = IncomingNumberListAllOf -globals()['IncomingNumberResult'] = IncomingNumberResult -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.incoming_number_list import IncomingNumberList -from freeclimb.model.incoming_number_list import IncomingNumberList # noqa: E501 class TestIncomingNumberList(unittest.TestCase): """IncomingNumberList unit test stubs""" def setUp(self): - self.model = IncomingNumberList( - ) - + self.model = IncomingNumberList() + def test_total(self): """Test IncomingNumberList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test IncomingNumberList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test IncomingNumberList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test IncomingNumberList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test IncomingNumberList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test IncomingNumberList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test IncomingNumberList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_incoming_phone_numbers(self): """Test IncomingNumberList.incoming_phone_numbers""" testList = [] self.model.incoming_phone_numbers = testList - assert self.model.get("incoming_phone_numbers") == testList + assert self.model.incoming_phone_numbers == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_incoming_number_request.py b/test/models/test_incoming_number_request.py similarity index 69% rename from test/test_incoming_number_request.py rename to test/models/test_incoming_number_request.py index 2ae3006..20c7ee6 100644 --- a/test/test_incoming_number_request.py +++ b/test/models/test_incoming_number_request.py @@ -1,45 +1,47 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.incoming_number_request import IncomingNumberRequest -from freeclimb.model.incoming_number_request import IncomingNumberRequest # noqa: E501 class TestIncomingNumberRequest(unittest.TestCase): """IncomingNumberRequest unit test stubs""" def setUp(self): - self.model = IncomingNumberRequest( - ) - + self.model = IncomingNumberRequest() + def test_application_id(self): """Test IncomingNumberRequest.application_id""" self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" + assert self.model.application_id == "TEST_STRING" def test_alias(self): """Test IncomingNumberRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_campaign_id(self): """Test IncomingNumberRequest.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_incoming_number_result.py b/test/models/test_incoming_number_result.py similarity index 60% rename from test/test_incoming_number_result.py rename to test/models/test_incoming_number_result.py index 5de4e78..d9bac49 100644 --- a/test/test_incoming_number_result.py +++ b/test/models/test_incoming_number_result.py @@ -1,133 +1,127 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.capabilities import Capabilities -from freeclimb.model.incoming_number_result_all_of import IncomingNumberResultAllOf -from freeclimb.model.mutable_resource_model import MutableResourceModel -from freeclimb.model.tfn import TFN -globals()['Capabilities'] = Capabilities -globals()['IncomingNumberResultAllOf'] = IncomingNumberResultAllOf -globals()['MutableResourceModel'] = MutableResourceModel -globals()['TFN'] = TFN +from freeclimb import * +from freeclimb.models.incoming_number_result import IncomingNumberResult -from freeclimb.model.incoming_number_result import IncomingNumberResult # noqa: E501 class TestIncomingNumberResult(unittest.TestCase): """IncomingNumberResult unit test stubs""" def setUp(self): - self.model = IncomingNumberResult( - ) - + self.model = IncomingNumberResult() + def test_uri(self): """Test IncomingNumberResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test IncomingNumberResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test IncomingNumberResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test IncomingNumberResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_capabilities(self): """Test IncomingNumberResult.capabilities""" - object = Capabilities( - voice=True, - sms=True, - toll_free=True, - ten_dlc=True, - short_code=True, - ) + object = freeclimb.models.capabilities.Capabilities( + voice=True, + sms=True, + toll_free=True, + ten_dlc=True, + short_code=True, + ) self.model.capabilities = object - assert self.model.get("capabilities", object) + assert self.model.capabilities == object def test_campaign_id(self): """Test IncomingNumberResult.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" def test_phone_number_id(self): """Test IncomingNumberResult.phone_number_id""" self.model.phone_number_id = "TEST_STRING" - assert self.model.get("phone_number_id") == "TEST_STRING" + assert self.model.phone_number_id == "TEST_STRING" def test_account_id(self): """Test IncomingNumberResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_application_id(self): """Test IncomingNumberResult.application_id""" self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" + assert self.model.application_id == "TEST_STRING" def test_phone_number(self): """Test IncomingNumberResult.phone_number""" self.model.phone_number = "TEST_STRING" - assert self.model.get("phone_number") == "TEST_STRING" + assert self.model.phone_number == "TEST_STRING" def test_alias(self): """Test IncomingNumberResult.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_region(self): """Test IncomingNumberResult.region""" self.model.region = "TEST_STRING" - assert self.model.get("region") == "TEST_STRING" + assert self.model.region == "TEST_STRING" def test_country(self): """Test IncomingNumberResult.country""" self.model.country = "TEST_STRING" - assert self.model.get("country") == "TEST_STRING" + assert self.model.country == "TEST_STRING" def test_voice_enabled(self): """Test IncomingNumberResult.voice_enabled""" self.model.voice_enabled = False - assert self.model.get("voice_enabled") == False + assert self.model.voice_enabled == False def test_sms_enabled(self): """Test IncomingNumberResult.sms_enabled""" self.model.sms_enabled = False - assert self.model.get("sms_enabled") == False + assert self.model.sms_enabled == False def test_offnet(self): """Test IncomingNumberResult.offnet""" self.model.offnet = False - assert self.model.get("offnet") == False + assert self.model.offnet == False def test_tfn(self): """Test IncomingNumberResult.tfn""" - object = TFN( - campaign_id="campaign_id_example", - ) + object = freeclimb.models.tfn.TFN( + campaign_id="", + ) self.model.tfn = object - assert self.model.get("tfn", object) + assert self.model.tfn == object -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_language.py b/test/models/test_language.py new file mode 100644 index 0000000..b7a2377 --- /dev/null +++ b/test/models/test_language.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.language import Language + + +class TestLanguage(unittest.TestCase): + """Language unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_leave_conference_webhook.py b/test/models/test_leave_conference_webhook.py new file mode 100644 index 0000000..0c5039f --- /dev/null +++ b/test/models/test_leave_conference_webhook.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.leave_conference_webhook import LeaveConferenceWebhook + + +class TestLeaveConferenceWebhook(unittest.TestCase): + """LeaveConferenceWebhook unit test stubs""" + + def setUp(self): + self.model = LeaveConferenceWebhook() + + def test_request_type(self): + """Test LeaveConferenceWebhook.request_type""" + + def test_call_id(self): + """Test LeaveConferenceWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test LeaveConferenceWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test LeaveConferenceWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test LeaveConferenceWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test LeaveConferenceWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test LeaveConferenceWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test LeaveConferenceWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test LeaveConferenceWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "leaveConference" }' + assert isinstance( + LeaveConferenceWebhook.deserialize(payload), LeaveConferenceWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_log_level.py b/test/models/test_log_level.py new file mode 100644 index 0000000..86eb79b --- /dev/null +++ b/test/models/test_log_level.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.log_level import LogLevel + + +class TestLogLevel(unittest.TestCase): + """LogLevel unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_log_list.py b/test/models/test_log_list.py similarity index 63% rename from test/test_log_list.py rename to test/models/test_log_list.py index ece8160..1f01de0 100644 --- a/test/test_log_list.py +++ b/test/models/test_log_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.log_list_all_of import LogListAllOf -from freeclimb.model.log_result import LogResult -from freeclimb.model.pagination_model import PaginationModel -globals()['LogListAllOf'] = LogListAllOf -globals()['LogResult'] = LogResult -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.log_list import LogList -from freeclimb.model.log_list import LogList # noqa: E501 class TestLogList(unittest.TestCase): """LogList unit test stubs""" def setUp(self): - self.model = LogList( - ) - + self.model = LogList() + def test_total(self): """Test LogList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test LogList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test LogList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test LogList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test LogList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test LogList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test LogList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_logs(self): """Test LogList.logs""" testList = [] self.model.logs = testList - assert self.model.get("logs") == testList + assert self.model.logs == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_log_result.py b/test/models/test_log_result.py similarity index 66% rename from test/test_log_result.py rename to test/models/test_log_result.py index 6f10fb3..3e609e4 100644 --- a/test/test_log_result.py +++ b/test/models/test_log_result.py @@ -1,72 +1,72 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.log_level import LogLevel -globals()['LogLevel'] = LogLevel +from freeclimb import * +from freeclimb.models.log_result import LogResult -from freeclimb.model.log_result import LogResult # noqa: E501 class TestLogResult(unittest.TestCase): """LogResult unit test stubs""" def setUp(self): - self.model = LogResult( - ) - + self.model = LogResult() + def test_timestamp(self): """Test LogResult.timestamp""" self.model.timestamp = 1 - assert self.model.get("timestamp") == 1 + assert self.model.timestamp == 1 def test_level(self): """Test LogResult.level""" self.model.level = LogLevel.INFO - assert self.model.get("level") == LogLevel.INFO + assert self.model.level == LogLevel.INFO self.model.level = LogLevel.WARNING - assert self.model.get("level") == LogLevel.WARNING + assert self.model.level == LogLevel.WARNING self.model.level = LogLevel.ERROR - assert self.model.get("level") == LogLevel.ERROR + assert self.model.level == LogLevel.ERROR def test_request_id(self): """Test LogResult.request_id""" self.model.request_id = "TEST_STRING" - assert self.model.get("request_id") == "TEST_STRING" + assert self.model.request_id == "TEST_STRING" def test_account_id(self): """Test LogResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test LogResult.call_id""" self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" + assert self.model.call_id == "TEST_STRING" def test_message(self): """Test LogResult.message""" self.model.message = "TEST_STRING" - assert self.model.get("message") == "TEST_STRING" + assert self.model.message == "TEST_STRING" def test_metadata(self): """Test LogResult.metadata""" testObject = {} self.model.metadata = testObject - assert self.model.get("metadata") == testObject + assert self.model.metadata == testObject -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_machine_detected_webhook.py b/test/models/test_machine_detected_webhook.py new file mode 100644 index 0000000..ced684e --- /dev/null +++ b/test/models/test_machine_detected_webhook.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.machine_detected_webhook import MachineDetectedWebhook + + +class TestMachineDetectedWebhook(unittest.TestCase): + """MachineDetectedWebhook unit test stubs""" + + def setUp(self): + self.model = MachineDetectedWebhook() + + def test_request_type(self): + """Test MachineDetectedWebhook.request_type""" + + def test_call_id(self): + """Test MachineDetectedWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_account_id(self): + """Test MachineDetectedWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test MachineDetectedWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test MachineDetectedWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test MachineDetectedWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test MachineDetectedWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test MachineDetectedWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test MachineDetectedWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_parent_call_id(self): + """Test MachineDetectedWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_machine_type(self): + """Test MachineDetectedWebhook.machine_type""" + self.model.machine_type = MachineType.ANSWERING_MACHINE + assert self.model.machine_type == MachineType.ANSWERING_MACHINE + self.model.machine_type = MachineType.FAX_MODEM + assert self.model.machine_type == MachineType.FAX_MODEM + + def test_deserialize(self): + payload = '{ "requestType": "machineDetected" }' + assert isinstance( + MachineDetectedWebhook.deserialize(payload), MachineDetectedWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_machine_type.py b/test/models/test_machine_type.py new file mode 100644 index 0000000..0294f5f --- /dev/null +++ b/test/models/test_machine_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.machine_type import MachineType + + +class TestMachineType(unittest.TestCase): + """MachineType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_make_call_request.py b/test/models/test_make_call_request.py similarity index 67% rename from test/test_make_call_request.py rename to test/models/test_make_call_request.py index 7230421..1d79327 100644 --- a/test/test_make_call_request.py +++ b/test/models/test_make_call_request.py @@ -1,82 +1,85 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.make_call_request import MakeCallRequest -from freeclimb.model.make_call_request import MakeCallRequest # noqa: E501 class TestMakeCallRequest(unittest.TestCase): """MakeCallRequest unit test stubs""" def setUp(self): self.model = MakeCallRequest( - _from="", + var_from="", to="", ) - - def test__from(self): - """Test MakeCallRequest._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" + + def test_var_from(self): + """Test MakeCallRequest.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MakeCallRequest.to""" self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" + assert self.model.to == "TEST_STRING" def test_application_id(self): """Test MakeCallRequest.application_id""" self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" + assert self.model.application_id == "TEST_STRING" def test_send_digits(self): """Test MakeCallRequest.send_digits""" self.model.send_digits = "TEST_STRING" - assert self.model.get("send_digits") == "TEST_STRING" + assert self.model.send_digits == "TEST_STRING" def test_if_machine(self): """Test MakeCallRequest.if_machine""" self.model.if_machine = "TEST_STRING" - assert self.model.get("if_machine") == "TEST_STRING" + assert self.model.if_machine == "TEST_STRING" def test_if_machine_url(self): """Test MakeCallRequest.if_machine_url""" self.model.if_machine_url = "TEST_STRING" - assert self.model.get("if_machine_url") == "TEST_STRING" + assert self.model.if_machine_url == "TEST_STRING" def test_timeout(self): """Test MakeCallRequest.timeout""" self.model.timeout = 1 - assert self.model.get("timeout") == 1 + assert self.model.timeout == 1 def test_parent_call_id(self): """Test MakeCallRequest.parent_call_id""" self.model.parent_call_id = "TEST_STRING" - assert self.model.get("parent_call_id") == "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" def test_privacy_mode(self): """Test MakeCallRequest.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False def test_call_connect_url(self): """Test MakeCallRequest.call_connect_url""" self.model.call_connect_url = "TEST_STRING" - assert self.model.get("call_connect_url") == "TEST_STRING" + assert self.model.call_connect_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_message_delivery_webhook.py b/test/models/test_message_delivery_webhook.py new file mode 100644 index 0000000..9e3dec1 --- /dev/null +++ b/test/models/test_message_delivery_webhook.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.message_delivery_webhook import MessageDeliveryWebhook + + +class TestMessageDeliveryWebhook(unittest.TestCase): + """MessageDeliveryWebhook unit test stubs""" + + def setUp(self): + self.model = MessageDeliveryWebhook() + + def test_request_type(self): + """Test MessageDeliveryWebhook.request_type""" + + def test_account_id(self): + """Test MessageDeliveryWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_var_from(self): + """Test MessageDeliveryWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test MessageDeliveryWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_text(self): + """Test MessageDeliveryWebhook.text""" + self.model.text = "TEST_STRING" + assert self.model.text == "TEST_STRING" + + def test_direction(self): + """Test MessageDeliveryWebhook.direction""" + self.model.direction = "TEST_STRING" + assert self.model.direction == "TEST_STRING" + + def test_application_id(self): + """Test MessageDeliveryWebhook.application_id""" + self.model.application_id = "TEST_STRING" + assert self.model.application_id == "TEST_STRING" + + def test_status(self): + """Test MessageDeliveryWebhook.status""" + self.model.status = "TEST_STRING" + assert self.model.status == "TEST_STRING" + + def test_phone_number_id(self): + """Test MessageDeliveryWebhook.phone_number_id""" + self.model.phone_number_id = "TEST_STRING" + assert self.model.phone_number_id == "TEST_STRING" + + def test_uri(self): + """Test MessageDeliveryWebhook.uri""" + self.model.uri = "TEST_STRING" + assert self.model.uri == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "messageDelivery" }' + assert isinstance( + MessageDeliveryWebhook.deserialize(payload), MessageDeliveryWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_message_direction.py b/test/models/test_message_direction.py new file mode 100644 index 0000000..0366f98 --- /dev/null +++ b/test/models/test_message_direction.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.message_direction import MessageDirection + + +class TestMessageDirection(unittest.TestCase): + """MessageDirection unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_message_request.py b/test/models/test_message_request.py similarity index 62% rename from test/test_message_request.py rename to test/models/test_message_request.py index 06bce15..f1f21fa 100644 --- a/test/test_message_request.py +++ b/test/models/test_message_request.py @@ -1,83 +1,82 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.message_request_all_of import MessageRequestAllOf -from freeclimb.model.mutable_resource_model import MutableResourceModel -globals()['MessageRequestAllOf'] = MessageRequestAllOf -globals()['MutableResourceModel'] = MutableResourceModel +from freeclimb import * +from freeclimb.models.message_request import MessageRequest -from freeclimb.model.message_request import MessageRequest # noqa: E501 class TestMessageRequest(unittest.TestCase): """MessageRequest unit test stubs""" def setUp(self): self.model = MessageRequest( - _from="", + var_from="", to="", text="", ) - + def test_uri(self): """Test MessageRequest.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test MessageRequest.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test MessageRequest.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test MessageRequest.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 - def test__from(self): - """Test MessageRequest._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" + def test_var_from(self): + """Test MessageRequest.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MessageRequest.to""" self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" + assert self.model.to == "TEST_STRING" def test_text(self): """Test MessageRequest.text""" self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" + assert self.model.text == "TEST_STRING" def test_notification_url(self): """Test MessageRequest.notification_url""" self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" + assert self.model.notification_url == "TEST_STRING" def test_media_urls(self): """Test MessageRequest.media_urls""" testList = [] self.model.media_urls = testList - assert self.model.get("media_urls") == testList + assert self.model.media_urls == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_message_result.py b/test/models/test_message_result.py similarity index 56% rename from test/test_message_result.py rename to test/models/test_message_result.py index 0e9f04e..84690bd 100644 --- a/test/test_message_result.py +++ b/test/models/test_message_result.py @@ -1,140 +1,134 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.message_result_all_of import MessageResultAllOf -from freeclimb.model.message_status import MessageStatus -from freeclimb.model.mutable_resource_model import MutableResourceModel -globals()['MessageResultAllOf'] = MessageResultAllOf -globals()['MessageStatus'] = MessageStatus -globals()['MutableResourceModel'] = MutableResourceModel +from freeclimb import * +from freeclimb.models.message_result import MessageResult -from freeclimb.model.message_result import MessageResult # noqa: E501 class TestMessageResult(unittest.TestCase): """MessageResult unit test stubs""" def setUp(self): - self.model = MessageResult( - ) - + self.model = MessageResult() + def test_uri(self): """Test MessageResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test MessageResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test MessageResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test MessageResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_account_id(self): """Test MessageResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_message_id(self): """Test MessageResult.message_id""" self.model.message_id = "TEST_STRING" - assert self.model.get("message_id") == "TEST_STRING" + assert self.model.message_id == "TEST_STRING" def test_status(self): """Test MessageResult.status""" self.model.status = MessageStatus.NEW - assert self.model.get("status") == MessageStatus.NEW + assert self.model.status == MessageStatus.NEW self.model.status = MessageStatus.QUEUED - assert self.model.get("status") == MessageStatus.QUEUED + assert self.model.status == MessageStatus.QUEUED self.model.status = MessageStatus.REJECTED - assert self.model.get("status") == MessageStatus.REJECTED + assert self.model.status == MessageStatus.REJECTED self.model.status = MessageStatus.SENDING - assert self.model.get("status") == MessageStatus.SENDING + assert self.model.status == MessageStatus.SENDING self.model.status = MessageStatus.SENT - assert self.model.get("status") == MessageStatus.SENT + assert self.model.status == MessageStatus.SENT self.model.status = MessageStatus.FAILED - assert self.model.get("status") == MessageStatus.FAILED + assert self.model.status == MessageStatus.FAILED self.model.status = MessageStatus.RECEIVED - assert self.model.get("status") == MessageStatus.RECEIVED + assert self.model.status == MessageStatus.RECEIVED self.model.status = MessageStatus.UNDELIVERED - assert self.model.get("status") == MessageStatus.UNDELIVERED + assert self.model.status == MessageStatus.UNDELIVERED self.model.status = MessageStatus.EXPIRED - assert self.model.get("status") == MessageStatus.EXPIRED + assert self.model.status == MessageStatus.EXPIRED self.model.status = MessageStatus.DELETED - assert self.model.get("status") == MessageStatus.DELETED + assert self.model.status == MessageStatus.DELETED self.model.status = MessageStatus.UNKNOWN - assert self.model.get("status") == MessageStatus.UNKNOWN + assert self.model.status == MessageStatus.UNKNOWN - def test__from(self): - """Test MessageResult._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" + def test_var_from(self): + """Test MessageResult.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MessageResult.to""" self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" + assert self.model.to == "TEST_STRING" def test_text(self): """Test MessageResult.text""" self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" + assert self.model.text == "TEST_STRING" def test_direction(self): """Test MessageResult.direction""" self.model.direction = "TEST_STRING" - assert self.model.get("direction") == "TEST_STRING" + assert self.model.direction == "TEST_STRING" def test_notification_url(self): """Test MessageResult.notification_url""" self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" + assert self.model.notification_url == "TEST_STRING" def test_brand_id(self): """Test MessageResult.brand_id""" self.model.brand_id = "TEST_STRING" - assert self.model.get("brand_id") == "TEST_STRING" + assert self.model.brand_id == "TEST_STRING" def test_campaign_id(self): """Test MessageResult.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" def test_segment_count(self): """Test MessageResult.segment_count""" - - - self.model.segment_count = float(1) - assert self.model.get("segment_count") == float(1) - + + self.model.segment_count = float(1) + assert self.model.segment_count == float(1) def test_media_urls(self): """Test MessageResult.media_urls""" testList = [] self.model.media_urls = testList - assert self.model.get("media_urls") == testList + assert self.model.media_urls == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_message_status.py b/test/models/test_message_status.py new file mode 100644 index 0000000..831476b --- /dev/null +++ b/test/models/test_message_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.message_status import MessageStatus + + +class TestMessageStatus(unittest.TestCase): + """MessageStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_message_status_webhook.py b/test/models/test_message_status_webhook.py new file mode 100644 index 0000000..645106e --- /dev/null +++ b/test/models/test_message_status_webhook.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.message_status_webhook import MessageStatusWebhook + + +class TestMessageStatusWebhook(unittest.TestCase): + """MessageStatusWebhook unit test stubs""" + + def setUp(self): + self.model = MessageStatusWebhook() + + def test_request_type(self): + """Test MessageStatusWebhook.request_type""" + + def test_account_id(self): + """Test MessageStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_message_id(self): + """Test MessageStatusWebhook.message_id""" + self.model.message_id = "TEST_STRING" + assert self.model.message_id == "TEST_STRING" + + def test_call_id(self): + """Test MessageStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test MessageStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test MessageStatusWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_text(self): + """Test MessageStatusWebhook.text""" + self.model.text = "TEST_STRING" + assert self.model.text == "TEST_STRING" + + def test_direction(self): + """Test MessageStatusWebhook.direction""" + self.model.direction = "TEST_STRING" + assert self.model.direction == "TEST_STRING" + + def test_application_id(self): + """Test MessageStatusWebhook.application_id""" + self.model.application_id = "TEST_STRING" + assert self.model.application_id == "TEST_STRING" + + def test_status(self): + """Test MessageStatusWebhook.status""" + self.model.status = MessageStatus.NEW + assert self.model.status == MessageStatus.NEW + self.model.status = MessageStatus.QUEUED + assert self.model.status == MessageStatus.QUEUED + self.model.status = MessageStatus.REJECTED + assert self.model.status == MessageStatus.REJECTED + self.model.status = MessageStatus.SENDING + assert self.model.status == MessageStatus.SENDING + self.model.status = MessageStatus.SENT + assert self.model.status == MessageStatus.SENT + self.model.status = MessageStatus.FAILED + assert self.model.status == MessageStatus.FAILED + self.model.status = MessageStatus.RECEIVED + assert self.model.status == MessageStatus.RECEIVED + self.model.status = MessageStatus.UNDELIVERED + assert self.model.status == MessageStatus.UNDELIVERED + self.model.status = MessageStatus.EXPIRED + assert self.model.status == MessageStatus.EXPIRED + self.model.status = MessageStatus.DELETED + assert self.model.status == MessageStatus.DELETED + self.model.status = MessageStatus.UNKNOWN + assert self.model.status == MessageStatus.UNKNOWN + + def test_phone_number_id(self): + """Test MessageStatusWebhook.phone_number_id""" + self.model.phone_number_id = "TEST_STRING" + assert self.model.phone_number_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "messageStatus" }' + assert isinstance( + MessageStatusWebhook.deserialize(payload), MessageStatusWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_messages_list.py b/test/models/test_messages_list.py similarity index 62% rename from test/test_messages_list.py rename to test/models/test_messages_list.py index fcdf520..5bde13b 100644 --- a/test/test_messages_list.py +++ b/test/models/test_messages_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.message_result import MessageResult -from freeclimb.model.messages_list_all_of import MessagesListAllOf -from freeclimb.model.pagination_model import PaginationModel -globals()['MessageResult'] = MessageResult -globals()['MessagesListAllOf'] = MessagesListAllOf -globals()['PaginationModel'] = PaginationModel +from freeclimb import * +from freeclimb.models.messages_list import MessagesList -from freeclimb.model.messages_list import MessagesList # noqa: E501 class TestMessagesList(unittest.TestCase): """MessagesList unit test stubs""" def setUp(self): - self.model = MessagesList( - ) - + self.model = MessagesList() + def test_total(self): """Test MessagesList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test MessagesList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test MessagesList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test MessagesList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test MessagesList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test MessagesList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test MessagesList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_messages(self): """Test MessagesList.messages""" testList = [] self.model.messages = testList - assert self.model.get("messages") == testList + assert self.model.messages == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_mutable_resource_model.py b/test/models/test_mutable_resource_model.py similarity index 70% rename from test/test_mutable_resource_model.py rename to test/models/test_mutable_resource_model.py index b7c40e0..90081c2 100644 --- a/test/test_mutable_resource_model.py +++ b/test/models/test_mutable_resource_model.py @@ -1,50 +1,52 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.mutable_resource_model import MutableResourceModel -from freeclimb.model.mutable_resource_model import MutableResourceModel # noqa: E501 class TestMutableResourceModel(unittest.TestCase): """MutableResourceModel unit test stubs""" def setUp(self): - self.model = MutableResourceModel( - ) - + self.model = MutableResourceModel() + def test_uri(self): """Test MutableResourceModel.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test MutableResourceModel.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test MutableResourceModel.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test MutableResourceModel.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_out_dial_all_of.py b/test/models/test_out_dial.py similarity index 52% rename from test/test_out_dial_all_of.py rename to test/models/test_out_dial.py index 1bf60b9..42a7dd7 100644 --- a/test/test_out_dial_all_of.py +++ b/test/models/test_out_dial.py @@ -1,88 +1,89 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.if_machine import IfMachine -globals()['IfMachine'] = IfMachine +from freeclimb import * +from freeclimb.models.out_dial import OutDial -from freeclimb.model.out_dial_all_of import OutDialAllOf # noqa: E501 -class TestOutDialAllOf(unittest.TestCase): - """OutDialAllOf unit test stubs""" +class TestOutDial(unittest.TestCase): + """OutDial unit test stubs""" def setUp(self): - self.model = OutDialAllOf( + self.model = OutDial( action_url="", call_connect_url="", calling_number="", destination="", ) - + def test_action_url(self): - """Test OutDialAllOf.action_url""" + """Test OutDial.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_call_connect_url(self): - """Test OutDialAllOf.call_connect_url""" + """Test OutDial.call_connect_url""" self.model.call_connect_url = "TEST_STRING" - assert self.model.get("call_connect_url") == "TEST_STRING" + assert self.model.call_connect_url == "TEST_STRING" def test_calling_number(self): - """Test OutDialAllOf.calling_number""" + """Test OutDial.calling_number""" self.model.calling_number = "TEST_STRING" - assert self.model.get("calling_number") == "TEST_STRING" + assert self.model.calling_number == "TEST_STRING" def test_destination(self): - """Test OutDialAllOf.destination""" + """Test OutDial.destination""" self.model.destination = "TEST_STRING" - assert self.model.get("destination") == "TEST_STRING" + assert self.model.destination == "TEST_STRING" def test_if_machine(self): - """Test OutDialAllOf.if_machine""" + """Test OutDial.if_machine""" self.model.if_machine = IfMachine.REDIRECT - assert self.model.get("if_machine") == IfMachine.REDIRECT + assert self.model.if_machine == IfMachine.REDIRECT self.model.if_machine = IfMachine.HANGUP - assert self.model.get("if_machine") == IfMachine.HANGUP + assert self.model.if_machine == IfMachine.HANGUP def test_if_machine_url(self): - """Test OutDialAllOf.if_machine_url""" + """Test OutDial.if_machine_url""" self.model.if_machine_url = "TEST_STRING" - assert self.model.get("if_machine_url") == "TEST_STRING" + assert self.model.if_machine_url == "TEST_STRING" def test_send_digits(self): - """Test OutDialAllOf.send_digits""" + """Test OutDial.send_digits""" self.model.send_digits = "TEST_STRING" - assert self.model.get("send_digits") == "TEST_STRING" + assert self.model.send_digits == "TEST_STRING" def test_status_callback_url(self): - """Test OutDialAllOf.status_callback_url""" + """Test OutDial.status_callback_url""" self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" + assert self.model.status_callback_url == "TEST_STRING" def test_timeout(self): - """Test OutDialAllOf.timeout""" + """Test OutDial.timeout""" self.model.timeout = 1 - assert self.model.get("timeout") == 1 + assert self.model.timeout == 1 def test_privacy_mode(self): - """Test OutDialAllOf.privacy_mode""" + """Test OutDial.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_out_dial_api_connect_webhook.py b/test/models/test_out_dial_api_connect_webhook.py new file mode 100644 index 0000000..88eae8b --- /dev/null +++ b/test/models/test_out_dial_api_connect_webhook.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.out_dial_api_connect_webhook import OutDialApiConnectWebhook + + +class TestOutDialApiConnectWebhook(unittest.TestCase): + """OutDialApiConnectWebhook unit test stubs""" + + def setUp(self): + self.model = OutDialApiConnectWebhook() + + def test_request_type(self): + """Test OutDialApiConnectWebhook.request_type""" + + def test_account_id(self): + """Test OutDialApiConnectWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test OutDialApiConnectWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test OutDialApiConnectWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test OutDialApiConnectWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test OutDialApiConnectWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test OutDialApiConnectWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test OutDialApiConnectWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test OutDialApiConnectWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_parent_call_id(self): + """Test OutDialApiConnectWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "outDialApiConnect" }' + assert isinstance( + OutDialApiConnectWebhook.deserialize(payload), OutDialApiConnectWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_out_dial_connect_webhook.py b/test/models/test_out_dial_connect_webhook.py new file mode 100644 index 0000000..95db5b1 --- /dev/null +++ b/test/models/test_out_dial_connect_webhook.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.out_dial_connect_webhook import OutDialConnectWebhook + + +class TestOutDialConnectWebhook(unittest.TestCase): + """OutDialConnectWebhook unit test stubs""" + + def setUp(self): + self.model = OutDialConnectWebhook() + + def test_request_type(self): + """Test OutDialConnectWebhook.request_type""" + + def test_account_id(self): + """Test OutDialConnectWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test OutDialConnectWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test OutDialConnectWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test OutDialConnectWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test OutDialConnectWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test OutDialConnectWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test OutDialConnectWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test OutDialConnectWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_parent_call_id(self): + """Test OutDialConnectWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "outDialConnect" }' + assert isinstance( + OutDialConnectWebhook.deserialize(payload), OutDialConnectWebhook + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_out_dial_start_webhook.py b/test/models/test_out_dial_start_webhook.py new file mode 100644 index 0000000..3e392a1 --- /dev/null +++ b/test/models/test_out_dial_start_webhook.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.out_dial_start_webhook import OutDialStartWebhook + + +class TestOutDialStartWebhook(unittest.TestCase): + """OutDialStartWebhook unit test stubs""" + + def setUp(self): + self.model = OutDialStartWebhook() + + def test_request_type(self): + """Test OutDialStartWebhook.request_type""" + + def test_account_id(self): + """Test OutDialStartWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test OutDialStartWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test OutDialStartWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test OutDialStartWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test OutDialStartWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test OutDialStartWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test OutDialStartWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test OutDialStartWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_dial_call_id(self): + """Test OutDialStartWebhook.dial_call_id""" + self.model.dial_call_id = "TEST_STRING" + assert self.model.dial_call_id == "TEST_STRING" + + def test_parent_call_id(self): + """Test OutDialStartWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "outDialStart" }' + assert isinstance(OutDialStartWebhook.deserialize(payload), OutDialStartWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_pagination_model.py b/test/models/test_pagination_model.py similarity index 71% rename from test/test_pagination_model.py rename to test/models/test_pagination_model.py index feec813..a805b69 100644 --- a/test/test_pagination_model.py +++ b/test/models/test_pagination_model.py @@ -1,65 +1,67 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.pagination_model import PaginationModel -from freeclimb.model.pagination_model import PaginationModel # noqa: E501 class TestPaginationModel(unittest.TestCase): """PaginationModel unit test stubs""" def setUp(self): - self.model = PaginationModel( - ) - + self.model = PaginationModel() + def test_total(self): """Test PaginationModel.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test PaginationModel.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test PaginationModel.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test PaginationModel.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test PaginationModel.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test PaginationModel.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test PaginationModel.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_park_all_of.py b/test/models/test_park.py similarity index 61% rename from test/test_park_all_of.py rename to test/models/test_park.py index 9bd34a2..22844cd 100644 --- a/test/test_park_all_of.py +++ b/test/models/test_park.py @@ -1,47 +1,50 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.park import Park -from freeclimb.model.park_all_of import ParkAllOf # noqa: E501 -class TestParkAllOf(unittest.TestCase): - """ParkAllOf unit test stubs""" +class TestPark(unittest.TestCase): + """Park unit test stubs""" def setUp(self): - self.model = ParkAllOf( + self.model = Park( wait_url="", action_url="", ) - + def test_wait_url(self): - """Test ParkAllOf.wait_url""" + """Test Park.wait_url""" self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" + assert self.model.wait_url == "TEST_STRING" def test_action_url(self): - """Test ParkAllOf.action_url""" + """Test Park.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_notification_url(self): - """Test ParkAllOf.notification_url""" + """Test Park.notification_url""" self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" + assert self.model.notification_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_pause_all_of.py b/test/models/test_pause.py similarity index 65% rename from test/test_pause_all_of.py rename to test/models/test_pause.py index d81bac4..eab50f6 100644 --- a/test/test_pause_all_of.py +++ b/test/models/test_pause.py @@ -1,36 +1,39 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.pause import Pause -from freeclimb.model.pause_all_of import PauseAllOf # noqa: E501 -class TestPauseAllOf(unittest.TestCase): - """PauseAllOf unit test stubs""" +class TestPause(unittest.TestCase): + """Pause unit test stubs""" def setUp(self): - self.model = PauseAllOf( + self.model = Pause( length=1, ) - + def test_length(self): - """Test PauseAllOf.length""" + """Test Pause.length""" self.model.length = 1 - assert self.model.get("length") == 1 + assert self.model.length == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_percl_command.py b/test/models/test_percl_command.py new file mode 100644 index 0000000..bbe6af7 --- /dev/null +++ b/test/models/test_percl_command.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.percl_command import PerclCommand + + +class TestPerclCommand(unittest.TestCase): + """PerclCommand unit test stubs""" + + def test_command(self): + """Test PerclCommand.command""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_percl_script.py b/test/models/test_percl_script.py similarity index 64% rename from test/test_percl_script.py rename to test/models/test_percl_script.py index b87c16d..04fabe4 100644 --- a/test/test_percl_script.py +++ b/test/models/test_percl_script.py @@ -1,42 +1,38 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.percl_command import PerclCommand -globals()['PerclCommand'] = PerclCommand +from freeclimb import * +from freeclimb.models.percl_script import PerclScript -from freeclimb.model.percl_script import PerclScript # noqa: E501 class TestPerclScript(unittest.TestCase): """PerclScript unit test stubs""" def setUp(self): - self.model = PerclScript( - ) - + self.model = PerclScript() + def test_commands(self): """Test PerclScript.commands""" testList = [] self.model.commands = testList - assert self.model.get("commands") == testList - + assert self.model.commands == testList - def test_to_json(self): - self.model.commands = [] - assert self.model.to_json() == "[]" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_play_all_of.py b/test/models/test_play.py similarity index 61% rename from test/test_play_all_of.py rename to test/models/test_play.py index ff5de3c..e06825c 100644 --- a/test/test_play_all_of.py +++ b/test/models/test_play.py @@ -1,46 +1,49 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.play import Play -from freeclimb.model.play_all_of import PlayAllOf # noqa: E501 -class TestPlayAllOf(unittest.TestCase): - """PlayAllOf unit test stubs""" +class TestPlay(unittest.TestCase): + """Play unit test stubs""" def setUp(self): - self.model = PlayAllOf( + self.model = Play( file="", ) - + def test_file(self): - """Test PlayAllOf.file""" + """Test Play.file""" self.model.file = "TEST_STRING" - assert self.model.get("file") == "TEST_STRING" + assert self.model.file == "TEST_STRING" def test_loop(self): - """Test PlayAllOf.loop""" + """Test Play.loop""" self.model.loop = 1 - assert self.model.get("loop") == 1 + assert self.model.loop == 1 def test_privacy_mode(self): - """Test PlayAllOf.privacy_mode""" + """Test Play.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_play_beep.py b/test/models/test_play_beep.py new file mode 100644 index 0000000..844de28 --- /dev/null +++ b/test/models/test_play_beep.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.play_beep import PlayBeep + + +class TestPlayBeep(unittest.TestCase): + """PlayBeep unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_play_early_media_all_of.py b/test/models/test_play_early_media.py similarity index 62% rename from test/test_play_early_media_all_of.py rename to test/models/test_play_early_media.py index 067c3eb..b45f817 100644 --- a/test/test_play_early_media_all_of.py +++ b/test/models/test_play_early_media.py @@ -1,36 +1,39 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.play_early_media import PlayEarlyMedia -from freeclimb.model.play_early_media_all_of import PlayEarlyMediaAllOf # noqa: E501 -class TestPlayEarlyMediaAllOf(unittest.TestCase): - """PlayEarlyMediaAllOf unit test stubs""" +class TestPlayEarlyMedia(unittest.TestCase): + """PlayEarlyMedia unit test stubs""" def setUp(self): - self.model = PlayEarlyMediaAllOf( + self.model = PlayEarlyMedia( file="", ) - + def test_file(self): - """Test PlayEarlyMediaAllOf.file""" + """Test PlayEarlyMedia.file""" self.model.file = "TEST_STRING" - assert self.model.get("file") == "TEST_STRING" + assert self.model.file == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_queue_list.py b/test/models/test_queue_list.py similarity index 63% rename from test/test_queue_list.py rename to test/models/test_queue_list.py index 40298ec..1fb3121 100644 --- a/test/test_queue_list.py +++ b/test/models/test_queue_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.queue_list_all_of import QueueListAllOf -from freeclimb.model.queue_result import QueueResult -globals()['PaginationModel'] = PaginationModel -globals()['QueueListAllOf'] = QueueListAllOf -globals()['QueueResult'] = QueueResult +from freeclimb import * +from freeclimb.models.queue_list import QueueList -from freeclimb.model.queue_list import QueueList # noqa: E501 class TestQueueList(unittest.TestCase): """QueueList unit test stubs""" def setUp(self): - self.model = QueueList( - ) - + self.model = QueueList() + def test_total(self): """Test QueueList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test QueueList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test QueueList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test QueueList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test QueueList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test QueueList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test QueueList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_queues(self): """Test QueueList.queues""" testList = [] self.model.queues = testList - assert self.model.get("queues") == testList + assert self.model.queues == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_queue_member.py b/test/models/test_queue_member.py similarity index 70% rename from test/test_queue_member.py rename to test/models/test_queue_member.py index 339210d..967b2ef 100644 --- a/test/test_queue_member.py +++ b/test/models/test_queue_member.py @@ -1,55 +1,57 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.queue_member import QueueMember -from freeclimb.model.queue_member import QueueMember # noqa: E501 class TestQueueMember(unittest.TestCase): """QueueMember unit test stubs""" def setUp(self): - self.model = QueueMember( - ) - + self.model = QueueMember() + def test_uri(self): """Test QueueMember.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_call_id(self): """Test QueueMember.call_id""" self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" + assert self.model.call_id == "TEST_STRING" def test_wait_time(self): """Test QueueMember.wait_time""" self.model.wait_time = 1 - assert self.model.get("wait_time") == 1 + assert self.model.wait_time == 1 def test_position(self): """Test QueueMember.position""" self.model.position = 1 - assert self.model.get("position") == 1 + assert self.model.position == 1 def test_date_enqueued(self): """Test QueueMember.date_enqueued""" self.model.date_enqueued = "TEST_STRING" - assert self.model.get("date_enqueued") == "TEST_STRING" + assert self.model.date_enqueued == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_queue_member_list.py b/test/models/test_queue_member_list.py similarity index 63% rename from test/test_queue_member_list.py rename to test/models/test_queue_member_list.py index b41136c..c930efb 100644 --- a/test/test_queue_member_list.py +++ b/test/models/test_queue_member_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.queue_member import QueueMember -from freeclimb.model.queue_member_list_all_of import QueueMemberListAllOf -globals()['PaginationModel'] = PaginationModel -globals()['QueueMember'] = QueueMember -globals()['QueueMemberListAllOf'] = QueueMemberListAllOf +from freeclimb import * +from freeclimb.models.queue_member_list import QueueMemberList -from freeclimb.model.queue_member_list import QueueMemberList # noqa: E501 class TestQueueMemberList(unittest.TestCase): """QueueMemberList unit test stubs""" def setUp(self): - self.model = QueueMemberList( - ) - + self.model = QueueMemberList() + def test_total(self): """Test QueueMemberList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test QueueMemberList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test QueueMemberList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test QueueMemberList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test QueueMemberList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test QueueMemberList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test QueueMemberList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_queue_members(self): """Test QueueMemberList.queue_members""" testList = [] self.model.queue_members = testList - assert self.model.get("queue_members") == testList + assert self.model.queue_members == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_queue_request.py b/test/models/test_queue_request.py similarity index 70% rename from test/test_queue_request.py rename to test/models/test_queue_request.py index 1cf3946..c19a5b9 100644 --- a/test/test_queue_request.py +++ b/test/models/test_queue_request.py @@ -1,40 +1,42 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.queue_request import QueueRequest -from freeclimb.model.queue_request import QueueRequest # noqa: E501 class TestQueueRequest(unittest.TestCase): """QueueRequest unit test stubs""" def setUp(self): - self.model = QueueRequest( - ) - + self.model = QueueRequest() + def test_alias(self): """Test QueueRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_max_size(self): """Test QueueRequest.max_size""" self.model.max_size = 1 - assert self.model.get("max_size") == 1 + assert self.model.max_size == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_queue_result.py b/test/models/test_queue_result.py similarity index 65% rename from test/test_queue_result.py rename to test/models/test_queue_result.py index 5034df0..99748db 100644 --- a/test/test_queue_result.py +++ b/test/models/test_queue_result.py @@ -1,90 +1,88 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.mutable_resource_model import MutableResourceModel -from freeclimb.model.queue_result_all_of import QueueResultAllOf -globals()['MutableResourceModel'] = MutableResourceModel -globals()['QueueResultAllOf'] = QueueResultAllOf +from freeclimb import * +from freeclimb.models.queue_result import QueueResult -from freeclimb.model.queue_result import QueueResult # noqa: E501 class TestQueueResult(unittest.TestCase): """QueueResult unit test stubs""" def setUp(self): - self.model = QueueResult( - ) - + self.model = QueueResult() + def test_uri(self): """Test QueueResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test QueueResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test QueueResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test QueueResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_account_id(self): """Test QueueResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_queue_id(self): """Test QueueResult.queue_id""" self.model.queue_id = "TEST_STRING" - assert self.model.get("queue_id") == "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" def test_alias(self): """Test QueueResult.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_max_size(self): """Test QueueResult.max_size""" self.model.max_size = 1 - assert self.model.get("max_size") == 1 + assert self.model.max_size == 1 def test_current_size(self): """Test QueueResult.current_size""" self.model.current_size = 1 - assert self.model.get("current_size") == 1 + assert self.model.current_size == 1 def test_average_queue_removal_time(self): """Test QueueResult.average_queue_removal_time""" self.model.average_queue_removal_time = 1 - assert self.model.get("average_queue_removal_time") == 1 + assert self.model.average_queue_removal_time == 1 def test_subresource_uris(self): """Test QueueResult.subresource_uris""" testObject = {} self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject + assert self.model.subresource_uris == testObject -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_queue_result_status.py b/test/models/test_queue_result_status.py new file mode 100644 index 0000000..1ffcaab --- /dev/null +++ b/test/models/test_queue_result_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.queue_result_status import QueueResultStatus + + +class TestQueueResultStatus(unittest.TestCase): + """QueueResultStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_queue_wait_webhook.py b/test/models/test_queue_wait_webhook.py new file mode 100644 index 0000000..d0cd35e --- /dev/null +++ b/test/models/test_queue_wait_webhook.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.queue_wait_webhook import QueueWaitWebhook + + +class TestQueueWaitWebhook(unittest.TestCase): + """QueueWaitWebhook unit test stubs""" + + def setUp(self): + self.model = QueueWaitWebhook() + + def test_request_type(self): + """Test QueueWaitWebhook.request_type""" + + def test_account_id(self): + """Test QueueWaitWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test QueueWaitWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test QueueWaitWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test QueueWaitWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test QueueWaitWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test QueueWaitWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test QueueWaitWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test QueueWaitWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_queue_position(self): + """Test QueueWaitWebhook.queue_position""" + self.model.queue_position = "TEST_STRING" + assert self.model.queue_position == "TEST_STRING" + + def test_queue_time(self): + """Test QueueWaitWebhook.queue_time""" + self.model.queue_time = 1 + assert self.model.queue_time == 1 + + def test_current_queue_size(self): + """Test QueueWaitWebhook.current_queue_size""" + self.model.current_queue_size = 1 + assert self.model.current_queue_size == 1 + + def test_deserialize(self): + payload = '{ "requestType": "queueWait" }' + assert isinstance(QueueWaitWebhook.deserialize(payload), QueueWaitWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_record_utterance_all_of.py b/test/models/test_record_utterance.py similarity index 53% rename from test/test_record_utterance_all_of.py rename to test/models/test_record_utterance.py index a06aa47..31d2d9d 100644 --- a/test/test_record_utterance_all_of.py +++ b/test/models/test_record_utterance.py @@ -1,66 +1,69 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.record_utterance import RecordUtterance -from freeclimb.model.record_utterance_all_of import RecordUtteranceAllOf # noqa: E501 -class TestRecordUtteranceAllOf(unittest.TestCase): - """RecordUtteranceAllOf unit test stubs""" +class TestRecordUtterance(unittest.TestCase): + """RecordUtterance unit test stubs""" def setUp(self): - self.model = RecordUtteranceAllOf( + self.model = RecordUtterance( action_url="", ) - + def test_action_url(self): - """Test RecordUtteranceAllOf.action_url""" + """Test RecordUtterance.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" def test_silence_timeout_ms(self): - """Test RecordUtteranceAllOf.silence_timeout_ms""" + """Test RecordUtterance.silence_timeout_ms""" self.model.silence_timeout_ms = 1 - assert self.model.get("silence_timeout_ms") == 1 + assert self.model.silence_timeout_ms == 1 def test_finish_on_key(self): - """Test RecordUtteranceAllOf.finish_on_key""" + """Test RecordUtterance.finish_on_key""" self.model.finish_on_key = "TEST_STRING" - assert self.model.get("finish_on_key") == "TEST_STRING" + assert self.model.finish_on_key == "TEST_STRING" def test_max_length_sec(self): - """Test RecordUtteranceAllOf.max_length_sec""" + """Test RecordUtterance.max_length_sec""" self.model.max_length_sec = 1 - assert self.model.get("max_length_sec") == 1 + assert self.model.max_length_sec == 1 def test_play_beep(self): - """Test RecordUtteranceAllOf.play_beep""" + """Test RecordUtterance.play_beep""" self.model.play_beep = False - assert self.model.get("play_beep") == False + assert self.model.play_beep == False def test_auto_start(self): - """Test RecordUtteranceAllOf.auto_start""" + """Test RecordUtterance.auto_start""" self.model.auto_start = False - assert self.model.get("auto_start") == False + assert self.model.auto_start == False def test_privacy_mode(self): - """Test RecordUtteranceAllOf.privacy_mode""" + """Test RecordUtterance.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_record_utterance_term_reason.py b/test/models/test_record_utterance_term_reason.py new file mode 100644 index 0000000..9100ffa --- /dev/null +++ b/test/models/test_record_utterance_term_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.record_utterance_term_reason import RecordUtteranceTermReason + + +class TestRecordUtteranceTermReason(unittest.TestCase): + """RecordUtteranceTermReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_record_webhook.py b/test/models/test_record_webhook.py new file mode 100644 index 0000000..ba7fa2e --- /dev/null +++ b/test/models/test_record_webhook.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.record_webhook import RecordWebhook + + +class TestRecordWebhook(unittest.TestCase): + """RecordWebhook unit test stubs""" + + def setUp(self): + self.model = RecordWebhook() + + def test_request_type(self): + """Test RecordWebhook.request_type""" + + def test_account_id(self): + """Test RecordWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test RecordWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test RecordWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test RecordWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test RecordWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test RecordWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test RecordWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test RecordWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_recording_id(self): + """Test RecordWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" + + def test_recording_url(self): + """Test RecordWebhook.recording_url""" + self.model.recording_url = "TEST_STRING" + assert self.model.recording_url == "TEST_STRING" + + def test_recording_size(self): + """Test RecordWebhook.recording_size""" + self.model.recording_size = "TEST_STRING" + assert self.model.recording_size == "TEST_STRING" + + def test_recording_format(self): + """Test RecordWebhook.recording_format""" + self.model.recording_format = "TEST_STRING" + assert self.model.recording_format == "TEST_STRING" + + def test_recording_duration_sec(self): + """Test RecordWebhook.recording_duration_sec""" + self.model.recording_duration_sec = 1 + assert self.model.recording_duration_sec == 1 + + def test_term_reason(self): + """Test RecordWebhook.term_reason""" + self.model.term_reason = RecordUtteranceTermReason.FINISH_KEY + assert self.model.term_reason == RecordUtteranceTermReason.FINISH_KEY + self.model.term_reason = RecordUtteranceTermReason.TIMEOUT + assert self.model.term_reason == RecordUtteranceTermReason.TIMEOUT + self.model.term_reason = RecordUtteranceTermReason.HANGUP + assert self.model.term_reason == RecordUtteranceTermReason.HANGUP + self.model.term_reason = RecordUtteranceTermReason.MAX_LENGTH + assert self.model.term_reason == RecordUtteranceTermReason.MAX_LENGTH + + def test_parent_call_id(self): + """Test RecordWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_privacy_mode(self): + """Test RecordWebhook.privacy_mode""" + self.model.privacy_mode = False + assert self.model.privacy_mode == False + + def test_deserialize(self): + payload = '{ "requestType": "record" }' + assert isinstance(RecordWebhook.deserialize(payload), RecordWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_recording_list.py b/test/models/test_recording_list.py similarity index 62% rename from test/test_recording_list.py rename to test/models/test_recording_list.py index ec44192..8eb053f 100644 --- a/test/test_recording_list.py +++ b/test/models/test_recording_list.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.recording_list_all_of import RecordingListAllOf -from freeclimb.model.recording_result import RecordingResult -globals()['PaginationModel'] = PaginationModel -globals()['RecordingListAllOf'] = RecordingListAllOf -globals()['RecordingResult'] = RecordingResult +from freeclimb import * +from freeclimb.models.recording_list import RecordingList -from freeclimb.model.recording_list import RecordingList # noqa: E501 class TestRecordingList(unittest.TestCase): """RecordingList unit test stubs""" def setUp(self): - self.model = RecordingList( - ) - + self.model = RecordingList() + def test_total(self): """Test RecordingList.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test RecordingList.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test RecordingList.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test RecordingList.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test RecordingList.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test RecordingList.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test RecordingList.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_recordings(self): """Test RecordingList.recordings""" testList = [] self.model.recordings = testList - assert self.model.get("recordings") == testList + assert self.model.recordings == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_recording_result.py b/test/models/test_recording_result.py similarity index 64% rename from test/test_recording_result.py rename to test/models/test_recording_result.py index 85effa6..e1ec95a 100644 --- a/test/test_recording_result.py +++ b/test/models/test_recording_result.py @@ -1,79 +1,77 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.mutable_resource_model import MutableResourceModel -from freeclimb.model.recording_result_all_of import RecordingResultAllOf -globals()['MutableResourceModel'] = MutableResourceModel -globals()['RecordingResultAllOf'] = RecordingResultAllOf +from freeclimb import * +from freeclimb.models.recording_result import RecordingResult -from freeclimb.model.recording_result import RecordingResult # noqa: E501 class TestRecordingResult(unittest.TestCase): """RecordingResult unit test stubs""" def setUp(self): - self.model = RecordingResult( - ) - + self.model = RecordingResult() + def test_uri(self): """Test RecordingResult.uri""" self.model.uri = "TEST_STRING" - assert self.model.get("uri") == "TEST_STRING" + assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test RecordingResult.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test RecordingResult.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test RecordingResult.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 def test_recording_id(self): """Test RecordingResult.recording_id""" self.model.recording_id = "TEST_STRING" - assert self.model.get("recording_id") == "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" def test_account_id(self): """Test RecordingResult.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test RecordingResult.call_id""" self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" + assert self.model.call_id == "TEST_STRING" def test_duration_sec(self): """Test RecordingResult.duration_sec""" self.model.duration_sec = 1 - assert self.model.get("duration_sec") == 1 + assert self.model.duration_sec == 1 def test_conference_id(self): """Test RecordingResult.conference_id""" self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_redirect_all_of.py b/test/models/test_redirect.py similarity index 63% rename from test/test_redirect_all_of.py rename to test/models/test_redirect.py index 35fd6e4..f4b0a11 100644 --- a/test/test_redirect_all_of.py +++ b/test/models/test_redirect.py @@ -1,36 +1,39 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.redirect import Redirect -from freeclimb.model.redirect_all_of import RedirectAllOf # noqa: E501 -class TestRedirectAllOf(unittest.TestCase): - """RedirectAllOf unit test stubs""" +class TestRedirect(unittest.TestCase): + """Redirect unit test stubs""" def setUp(self): - self.model = RedirectAllOf( + self.model = Redirect( action_url="", ) - + def test_action_url(self): - """Test RedirectAllOf.action_url""" + """Test Redirect.action_url""" self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" + assert self.model.action_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_redirect_webhook.py b/test/models/test_redirect_webhook.py new file mode 100644 index 0000000..05e99dc --- /dev/null +++ b/test/models/test_redirect_webhook.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.redirect_webhook import RedirectWebhook + + +class TestRedirectWebhook(unittest.TestCase): + """RedirectWebhook unit test stubs""" + + def setUp(self): + self.model = RedirectWebhook() + + def test_request_type(self): + """Test RedirectWebhook.request_type""" + + def test_account_id(self): + """Test RedirectWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test RedirectWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test RedirectWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test RedirectWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test RedirectWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test RedirectWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test RedirectWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test RedirectWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_parent_call_id(self): + """Test RedirectWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + + def test_deserialize(self): + payload = '{ "requestType": "redirect" }' + assert isinstance(RedirectWebhook.deserialize(payload), RedirectWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_reject_all_of.py b/test/models/test_reject.py similarity index 63% rename from test/test_reject_all_of.py rename to test/models/test_reject.py index 333dcbc..91ee899 100644 --- a/test/test_reject_all_of.py +++ b/test/models/test_reject.py @@ -1,35 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.reject import Reject -from freeclimb.model.reject_all_of import RejectAllOf # noqa: E501 -class TestRejectAllOf(unittest.TestCase): - """RejectAllOf unit test stubs""" +class TestReject(unittest.TestCase): + """Reject unit test stubs""" def setUp(self): - self.model = RejectAllOf( - ) - + self.model = Reject() + def test_reason(self): - """Test RejectAllOf.reason""" + """Test Reject.reason""" self.model.reason = "TEST_STRING" - assert self.model.get("reason") == "TEST_STRING" + assert self.model.reason == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_remove_from_conference.py b/test/models/test_remove_from_conference.py new file mode 100644 index 0000000..27d275f --- /dev/null +++ b/test/models/test_remove_from_conference.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.remove_from_conference import RemoveFromConference + + +class TestRemoveFromConference(unittest.TestCase): + """RemoveFromConference unit test stubs""" + + def setUp(self): + self.model = RemoveFromConference() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_remove_from_queue_notification_webhook.py b/test/models/test_remove_from_queue_notification_webhook.py new file mode 100644 index 0000000..d7027ec --- /dev/null +++ b/test/models/test_remove_from_queue_notification_webhook.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.remove_from_queue_notification_webhook import ( + RemoveFromQueueNotificationWebhook, +) + + +class TestRemoveFromQueueNotificationWebhook(unittest.TestCase): + """RemoveFromQueueNotificationWebhook unit test stubs""" + + def setUp(self): + self.model = RemoveFromQueueNotificationWebhook() + + def test_request_type(self): + """Test RemoveFromQueueNotificationWebhook.request_type""" + + def test_account_id(self): + """Test RemoveFromQueueNotificationWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test RemoveFromQueueNotificationWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test RemoveFromQueueNotificationWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test RemoveFromQueueNotificationWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_call_status(self): + """Test RemoveFromQueueNotificationWebhook.call_status""" + self.model.call_status = CallStatus.QUEUED + assert self.model.call_status == CallStatus.QUEUED + self.model.call_status = CallStatus.RINGING + assert self.model.call_status == CallStatus.RINGING + self.model.call_status = CallStatus.IN_PROGRESS + assert self.model.call_status == CallStatus.IN_PROGRESS + self.model.call_status = CallStatus.CANCELED + assert self.model.call_status == CallStatus.CANCELED + self.model.call_status = CallStatus.COMPLETED + assert self.model.call_status == CallStatus.COMPLETED + self.model.call_status = CallStatus.FAILED + assert self.model.call_status == CallStatus.FAILED + self.model.call_status = CallStatus.BUSY + assert self.model.call_status == CallStatus.BUSY + self.model.call_status = CallStatus.NO_ANSWER + assert self.model.call_status == CallStatus.NO_ANSWER + + def test_direction(self): + """Test RemoveFromQueueNotificationWebhook.direction""" + self.model.direction = CallDirection.INBOUND + assert self.model.direction == CallDirection.INBOUND + self.model.direction = CallDirection.OUTBOUND_API + assert self.model.direction == CallDirection.OUTBOUND_API + self.model.direction = CallDirection.OUTBOUND_DIAL + assert self.model.direction == CallDirection.OUTBOUND_DIAL + + def test_conference_id(self): + """Test RemoveFromQueueNotificationWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" + assert self.model.conference_id == "TEST_STRING" + + def test_queue_id(self): + """Test RemoveFromQueueNotificationWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" + assert self.model.queue_id == "TEST_STRING" + + def test_queue_result(self): + """Test RemoveFromQueueNotificationWebhook.queue_result""" + self.model.queue_result = QueueResultStatus.QUEUE_FULL + assert self.model.queue_result == QueueResultStatus.QUEUE_FULL + self.model.queue_result = QueueResultStatus.DEQUEUED + assert self.model.queue_result == QueueResultStatus.DEQUEUED + self.model.queue_result = QueueResultStatus.HANGUP + assert self.model.queue_result == QueueResultStatus.HANGUP + self.model.queue_result = QueueResultStatus.SYSTEM_ERROR + assert self.model.queue_result == QueueResultStatus.SYSTEM_ERROR + + def test_queue_time(self): + """Test RemoveFromQueueNotificationWebhook.queue_time""" + self.model.queue_time = 1 + assert self.model.queue_time == 1 + + def test_deserialize(self): + payload = '{ "requestType": "removeFromQueueNotification" }' + assert isinstance( + RemoveFromQueueNotificationWebhook.deserialize(payload), + RemoveFromQueueNotificationWebhook, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_request_type.py b/test/models/test_request_type.py new file mode 100644 index 0000000..b33a4a9 --- /dev/null +++ b/test/models/test_request_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.request_type import RequestType + + +class TestRequestType(unittest.TestCase): + """RequestType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_say_all_of.py b/test/models/test_say.py similarity index 60% rename from test/test_say_all_of.py rename to test/models/test_say.py index 2a111aa..715539c 100644 --- a/test/test_say_all_of.py +++ b/test/models/test_say.py @@ -1,51 +1,54 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.say import Say -from freeclimb.model.say_all_of import SayAllOf # noqa: E501 -class TestSayAllOf(unittest.TestCase): - """SayAllOf unit test stubs""" +class TestSay(unittest.TestCase): + """Say unit test stubs""" def setUp(self): - self.model = SayAllOf( + self.model = Say( text="", ) - + def test_text(self): - """Test SayAllOf.text""" + """Test Say.text""" self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" + assert self.model.text == "TEST_STRING" def test_language(self): - """Test SayAllOf.language""" + """Test Say.language""" self.model.language = "TEST_STRING" - assert self.model.get("language") == "TEST_STRING" + assert self.model.language == "TEST_STRING" def test_loop(self): - """Test SayAllOf.loop""" + """Test Say.loop""" self.model.loop = 1 - assert self.model.get("loop") == 1 + assert self.model.loop == 1 def test_privacy_mode(self): - """Test SayAllOf.privacy_mode""" + """Test Say.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_send_digits_all_of.py b/test/models/test_send_digits.py similarity index 60% rename from test/test_send_digits_all_of.py rename to test/models/test_send_digits.py index 50e1166..15c398c 100644 --- a/test/test_send_digits_all_of.py +++ b/test/models/test_send_digits.py @@ -1,46 +1,49 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.send_digits import SendDigits -from freeclimb.model.send_digits_all_of import SendDigitsAllOf # noqa: E501 -class TestSendDigitsAllOf(unittest.TestCase): - """SendDigitsAllOf unit test stubs""" +class TestSendDigits(unittest.TestCase): + """SendDigits unit test stubs""" def setUp(self): - self.model = SendDigitsAllOf( + self.model = SendDigits( digits="", ) - + def test_digits(self): - """Test SendDigitsAllOf.digits""" + """Test SendDigits.digits""" self.model.digits = "TEST_STRING" - assert self.model.get("digits") == "TEST_STRING" + assert self.model.digits == "TEST_STRING" def test_pause_ms(self): - """Test SendDigitsAllOf.pause_ms""" + """Test SendDigits.pause_ms""" self.model.pause_ms = 1 - assert self.model.get("pause_ms") == 1 + assert self.model.pause_ms == 1 def test_privacy_mode(self): - """Test SendDigitsAllOf.privacy_mode""" + """Test SendDigits.privacy_mode""" self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False + assert self.model.privacy_mode == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_set_dtmf_pass_through_all_of.py b/test/models/test_set_dtmf_pass_through.py similarity index 60% rename from test/test_set_dtmf_pass_through_all_of.py rename to test/models/test_set_dtmf_pass_through.py index 1266788..c8a1e53 100644 --- a/test/test_set_dtmf_pass_through_all_of.py +++ b/test/models/test_set_dtmf_pass_through.py @@ -1,35 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.set_dtmf_pass_through import SetDTMFPassThrough -from freeclimb.model.set_dtmf_pass_through_all_of import SetDTMFPassThroughAllOf # noqa: E501 -class TestSetDTMFPassThroughAllOf(unittest.TestCase): - """SetDTMFPassThroughAllOf unit test stubs""" +class TestSetDTMFPassThrough(unittest.TestCase): + """SetDTMFPassThrough unit test stubs""" def setUp(self): - self.model = SetDTMFPassThroughAllOf( - ) - + self.model = SetDTMFPassThrough() + def test_dtmf_pass_through(self): - """Test SetDTMFPassThroughAllOf.dtmf_pass_through""" + """Test SetDTMFPassThrough.dtmf_pass_through""" self.model.dtmf_pass_through = False - assert self.model.get("dtmf_pass_through") == False + assert self.model.dtmf_pass_through == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_set_listen_all_of.py b/test/models/test_set_listen.py similarity index 62% rename from test/test_set_listen_all_of.py rename to test/models/test_set_listen.py index 9e73311..1b80c00 100644 --- a/test/test_set_listen_all_of.py +++ b/test/models/test_set_listen.py @@ -1,35 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.set_listen import SetListen -from freeclimb.model.set_listen_all_of import SetListenAllOf # noqa: E501 -class TestSetListenAllOf(unittest.TestCase): - """SetListenAllOf unit test stubs""" +class TestSetListen(unittest.TestCase): + """SetListen unit test stubs""" def setUp(self): - self.model = SetListenAllOf( - ) - + self.model = SetListen() + def test_listen(self): - """Test SetListenAllOf.listen""" + """Test SetListen.listen""" self.model.listen = False - assert self.model.get("listen") == False + assert self.model.listen == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_set_talk_all_of.py b/test/models/test_set_talk.py similarity index 63% rename from test/test_set_talk_all_of.py rename to test/models/test_set_talk.py index 693c455..794c228 100644 --- a/test/test_set_talk_all_of.py +++ b/test/models/test_set_talk.py @@ -1,35 +1,37 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.set_talk import SetTalk -from freeclimb.model.set_talk_all_of import SetTalkAllOf # noqa: E501 -class TestSetTalkAllOf(unittest.TestCase): - """SetTalkAllOf unit test stubs""" +class TestSetTalk(unittest.TestCase): + """SetTalk unit test stubs""" def setUp(self): - self.model = SetTalkAllOf( - ) - + self.model = SetTalk() + def test_talk(self): - """Test SetTalkAllOf.talk""" + """Test SetTalk.talk""" self.model.talk = False - assert self.model.get("talk") == False + assert self.model.talk == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_all_of.py b/test/models/test_sms.py similarity index 56% rename from test/test_sms_all_of.py rename to test/models/test_sms.py index a7ef58d..cdb830d 100644 --- a/test/test_sms_all_of.py +++ b/test/models/test_sms.py @@ -1,53 +1,56 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.sms import Sms -from freeclimb.model.sms_all_of import SmsAllOf # noqa: E501 -class TestSmsAllOf(unittest.TestCase): - """SmsAllOf unit test stubs""" +class TestSms(unittest.TestCase): + """Sms unit test stubs""" def setUp(self): - self.model = SmsAllOf( + self.model = Sms( to="", - _from="", + var_from="", text="", ) - + def test_to(self): - """Test SmsAllOf.to""" + """Test Sms.to""" self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" + assert self.model.to == "TEST_STRING" - def test__from(self): - """Test SmsAllOf._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" + def test_var_from(self): + """Test Sms.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" def test_text(self): - """Test SmsAllOf.text""" + """Test Sms.text""" self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" + assert self.model.text == "TEST_STRING" def test_notification_url(self): - """Test SmsAllOf.notification_url""" + """Test Sms.notification_url""" self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" + assert self.model.notification_url == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_brand.py b/test/models/test_sms_ten_dlc_brand.py new file mode 100644 index 0000000..360036c --- /dev/null +++ b/test/models/test_sms_ten_dlc_brand.py @@ -0,0 +1,338 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brand import SMSTenDLCBrand + + +class TestSMSTenDLCBrand(unittest.TestCase): + """SMSTenDLCBrand unit test stubs""" + + def setUp(self): + self.model = SMSTenDLCBrand( + entity_type=SMSTenDLCBrandEntityType.PRIVATE_PROFIT, + display_name="", + phone="", + country="", + email="", + brand_relationship=SMSTenDLCBrandRelationship.BASIC_ACCOUNT, + vertical="", + mock=True, + identity_status=SMSTenDLCBrandIdentityStatus.SELF_DECLARED, + ) + + def test_account_id(self): + """Test SMSTenDLCBrand.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_entity_type(self): + """Test SMSTenDLCBrand.entity_type""" + self.model.entity_type = SMSTenDLCBrandEntityType.PRIVATE_PROFIT + assert self.model.entity_type == SMSTenDLCBrandEntityType.PRIVATE_PROFIT + self.model.entity_type = SMSTenDLCBrandEntityType.PUBLIC_PROFIT + assert self.model.entity_type == SMSTenDLCBrandEntityType.PUBLIC_PROFIT + self.model.entity_type = SMSTenDLCBrandEntityType.NON_PROFIT + assert self.model.entity_type == SMSTenDLCBrandEntityType.NON_PROFIT + self.model.entity_type = SMSTenDLCBrandEntityType.GOVERNMENT + assert self.model.entity_type == SMSTenDLCBrandEntityType.GOVERNMENT + self.model.entity_type = SMSTenDLCBrandEntityType.SOLE_PROPRIETOR + assert self.model.entity_type == SMSTenDLCBrandEntityType.SOLE_PROPRIETOR + + def test_csp_id(self): + """Test SMSTenDLCBrand.csp_id""" + self.model.csp_id = "TEST_STRING" + assert self.model.csp_id == "TEST_STRING" + + def test_brand_id(self): + """Test SMSTenDLCBrand.brand_id""" + self.model.brand_id = "TEST_STRING" + assert self.model.brand_id == "TEST_STRING" + + def test_first_name(self): + """Test SMSTenDLCBrand.first_name""" + self.model.first_name = "T" * 100 + assert self.model.first_name == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.first_name = "T" * (100 + 1) + + def test_last_name(self): + """Test SMSTenDLCBrand.last_name""" + self.model.last_name = "T" * 100 + assert self.model.last_name == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.last_name = "T" * (100 + 1) + + def test_display_name(self): + """Test SMSTenDLCBrand.display_name""" + self.model.display_name = "T" * 255 + assert self.model.display_name == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.display_name = "T" * (255 + 1) + + def test_company_name(self): + """Test SMSTenDLCBrand.company_name""" + self.model.company_name = "T" * 255 + assert self.model.company_name == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.company_name = "T" * (255 + 1) + + def test_ein(self): + """Test SMSTenDLCBrand.ein""" + self.model.ein = "T" * 21 + assert self.model.ein == "T" * 21 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.ein = "T" * (21 + 1) + + def test_ein_issuing_country(self): + """Test SMSTenDLCBrand.ein_issuing_country""" + self.model.ein_issuing_country = "T" * 2 + assert self.model.ein_issuing_country == "T" * 2 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.ein_issuing_country = "T" * (2 + 1) + + def test_phone(self): + """Test SMSTenDLCBrand.phone""" + self.model.phone = "T" * 20 + assert self.model.phone == "T" * 20 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.phone = "T" * (20 + 1) + + def test_street(self): + """Test SMSTenDLCBrand.street""" + self.model.street = "T" * 100 + assert self.model.street == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.street = "T" * (100 + 1) + + def test_city(self): + """Test SMSTenDLCBrand.city""" + self.model.city = "T" * 100 + assert self.model.city == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.city = "T" * (100 + 1) + + def test_state(self): + """Test SMSTenDLCBrand.state""" + self.model.state = "T" * 20 + assert self.model.state == "T" * 20 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.state = "T" * (20 + 1) + + def test_postal_code(self): + """Test SMSTenDLCBrand.postal_code""" + self.model.postal_code = "T" * 10 + assert self.model.postal_code == "T" * 10 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.postal_code = "T" * (10 + 1) + + def test_country(self): + """Test SMSTenDLCBrand.country""" + self.model.country = "T" * 2 + assert self.model.country == "T" * 2 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.country = "T" * (2 + 1) + + def test_email(self): + """Test SMSTenDLCBrand.email""" + self.model.email = "T" * 100 + assert self.model.email == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.email = "T" * (100 + 1) + + def test_stock_symbol(self): + """Test SMSTenDLCBrand.stock_symbol""" + self.model.stock_symbol = "T" * 10 + assert self.model.stock_symbol == "T" * 10 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.stock_symbol = "T" * (10 + 1) + + def test_stock_exchange(self): + """Test SMSTenDLCBrand.stock_exchange""" + self.model.stock_exchange = SMSTenDLCBrandStockExchange.NONE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.NONE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.NASDAQ + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.NASDAQ + self.model.stock_exchange = SMSTenDLCBrandStockExchange.NYSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.NYSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.AMEX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.AMEX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.AMX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.AMX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.ASX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.ASX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.B3 + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.B3 + self.model.stock_exchange = SMSTenDLCBrandStockExchange.BME + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.BME + self.model.stock_exchange = SMSTenDLCBrandStockExchange.BSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.BSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.FRA + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.FRA + self.model.stock_exchange = SMSTenDLCBrandStockExchange.ICEX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.ICEX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.JPX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.JPX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.JSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.JSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.KRX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.KRX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.LON + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.LON + self.model.stock_exchange = SMSTenDLCBrandStockExchange.NSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.NSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.OMX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.OMX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.SEHK + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.SEHK + self.model.stock_exchange = SMSTenDLCBrandStockExchange.SGX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.SGX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.SSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.SSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.STO + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.STO + self.model.stock_exchange = SMSTenDLCBrandStockExchange.SWX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.SWX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.SZSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.SZSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.TSX + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.TSX + self.model.stock_exchange = SMSTenDLCBrandStockExchange.TWSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.TWSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.VSE + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.VSE + self.model.stock_exchange = SMSTenDLCBrandStockExchange.OTHER + assert self.model.stock_exchange == SMSTenDLCBrandStockExchange.OTHER + + def test_ip_address(self): + """Test SMSTenDLCBrand.ip_address""" + self.model.ip_address = "T" * 50 + assert self.model.ip_address == "T" * 50 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.ip_address = "T" * (50 + 1) + + def test_website(self): + """Test SMSTenDLCBrand.website""" + self.model.website = "T" * 100 + assert self.model.website == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.website = "T" * (100 + 1) + + def test_brand_relationship(self): + """Test SMSTenDLCBrand.brand_relationship""" + self.model.brand_relationship = SMSTenDLCBrandRelationship.BASIC_ACCOUNT + assert self.model.brand_relationship == SMSTenDLCBrandRelationship.BASIC_ACCOUNT + self.model.brand_relationship = SMSTenDLCBrandRelationship.SMALL_ACCOUNT + assert self.model.brand_relationship == SMSTenDLCBrandRelationship.SMALL_ACCOUNT + self.model.brand_relationship = SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT + assert ( + self.model.brand_relationship == SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT + ) + self.model.brand_relationship = SMSTenDLCBrandRelationship.LARGE_ACCOUNT + assert self.model.brand_relationship == SMSTenDLCBrandRelationship.LARGE_ACCOUNT + self.model.brand_relationship = SMSTenDLCBrandRelationship.KEY_ACCOUNT + assert self.model.brand_relationship == SMSTenDLCBrandRelationship.KEY_ACCOUNT + + def test_vertical(self): + """Test SMSTenDLCBrand.vertical""" + self.model.vertical = "T" * 50 + assert self.model.vertical == "T" * 50 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.vertical = "T" * (50 + 1) + + def test_alt_business_id(self): + """Test SMSTenDLCBrand.alt_business_id""" + self.model.alt_business_id = "T" * 50 + assert self.model.alt_business_id == "T" * 50 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.alt_business_id = "T" * (50 + 1) + + def test_alt_business_id_type(self): + """Test SMSTenDLCBrand.alt_business_id_type""" + self.model.alt_business_id_type = SMSTenDLCBrandAltBusinessIdType.NONE + assert self.model.alt_business_id_type == SMSTenDLCBrandAltBusinessIdType.NONE + self.model.alt_business_id_type = SMSTenDLCBrandAltBusinessIdType.DUNS + assert self.model.alt_business_id_type == SMSTenDLCBrandAltBusinessIdType.DUNS + self.model.alt_business_id_type = SMSTenDLCBrandAltBusinessIdType.GIIN + assert self.model.alt_business_id_type == SMSTenDLCBrandAltBusinessIdType.GIIN + self.model.alt_business_id_type = SMSTenDLCBrandAltBusinessIdType.LEI + assert self.model.alt_business_id_type == SMSTenDLCBrandAltBusinessIdType.LEI + + def test_universal_ein(self): + """Test SMSTenDLCBrand.universal_ein""" + self.model.universal_ein = "TEST_STRING" + assert self.model.universal_ein == "TEST_STRING" + + def test_reference_id(self): + """Test SMSTenDLCBrand.reference_id""" + self.model.reference_id = "T" * 50 + assert self.model.reference_id == "T" * 50 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.reference_id = "T" * (50 + 1) + + def test_optional_attributes(self): + """Test SMSTenDLCBrand.optional_attributes""" + self.model.optional_attributes = {} + assert self.model.optional_attributes == {} + + def test_mock(self): + """Test SMSTenDLCBrand.mock""" + self.model.mock = False + assert self.model.mock == False + + def test_identity_status(self): + """Test SMSTenDLCBrand.identity_status""" + self.model.identity_status = SMSTenDLCBrandIdentityStatus.SELF_DECLARED + assert self.model.identity_status == SMSTenDLCBrandIdentityStatus.SELF_DECLARED + self.model.identity_status = SMSTenDLCBrandIdentityStatus.UNVERIFIED + assert self.model.identity_status == SMSTenDLCBrandIdentityStatus.UNVERIFIED + self.model.identity_status = SMSTenDLCBrandIdentityStatus.VERIFIED + assert self.model.identity_status == SMSTenDLCBrandIdentityStatus.VERIFIED + self.model.identity_status = SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED + assert ( + self.model.identity_status == SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED + ) + + def test_create_date(self): + """Test SMSTenDLCBrand.create_date""" + self.model.create_date = datetime.fromtimestamp(1691592436) + assert self.model.create_date == datetime.fromtimestamp(1691592436) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_brand_alt_business_id_type.py b/test/models/test_sms_ten_dlc_brand_alt_business_id_type.py new file mode 100644 index 0000000..2c24ff2 --- /dev/null +++ b/test/models/test_sms_ten_dlc_brand_alt_business_id_type.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brand_alt_business_id_type import ( + SMSTenDLCBrandAltBusinessIdType, +) + + +class TestSMSTenDLCBrandAltBusinessIdType(unittest.TestCase): + """SMSTenDLCBrandAltBusinessIdType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_brand_entity_type.py b/test/models/test_sms_ten_dlc_brand_entity_type.py new file mode 100644 index 0000000..a30ce75 --- /dev/null +++ b/test/models/test_sms_ten_dlc_brand_entity_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brand_entity_type import SMSTenDLCBrandEntityType + + +class TestSMSTenDLCBrandEntityType(unittest.TestCase): + """SMSTenDLCBrandEntityType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_brand_identity_status.py b/test/models/test_sms_ten_dlc_brand_identity_status.py new file mode 100644 index 0000000..e40e8d2 --- /dev/null +++ b/test/models/test_sms_ten_dlc_brand_identity_status.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brand_identity_status import ( + SMSTenDLCBrandIdentityStatus, +) + + +class TestSMSTenDLCBrandIdentityStatus(unittest.TestCase): + """SMSTenDLCBrandIdentityStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_brand_relationship.py b/test/models/test_sms_ten_dlc_brand_relationship.py new file mode 100644 index 0000000..bfa4eb7 --- /dev/null +++ b/test/models/test_sms_ten_dlc_brand_relationship.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brand_relationship import SMSTenDLCBrandRelationship + + +class TestSMSTenDLCBrandRelationship(unittest.TestCase): + """SMSTenDLCBrandRelationship unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_brand_stock_exchange.py b/test/models/test_sms_ten_dlc_brand_stock_exchange.py new file mode 100644 index 0000000..d3426ee --- /dev/null +++ b/test/models/test_sms_ten_dlc_brand_stock_exchange.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brand_stock_exchange import ( + SMSTenDLCBrandStockExchange, +) + + +class TestSMSTenDLCBrandStockExchange(unittest.TestCase): + """SMSTenDLCBrandStockExchange unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_ten_dlc_brands_list_result.py b/test/models/test_sms_ten_dlc_brands_list_result.py similarity index 62% rename from test/test_sms_ten_dlc_brands_list_result.py rename to test/models/test_sms_ten_dlc_brands_list_result.py index 5b1e241..955c1e1 100644 --- a/test/test_sms_ten_dlc_brands_list_result.py +++ b/test/models/test_sms_ten_dlc_brands_list_result.py @@ -1,77 +1,73 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand -from freeclimb.model.sms_ten_dlc_brands_list_result_all_of import SMSTenDLCBrandsListResultAllOf -globals()['PaginationModel'] = PaginationModel -globals()['SMSTenDLCBrand'] = SMSTenDLCBrand -globals()['SMSTenDLCBrandsListResultAllOf'] = SMSTenDLCBrandsListResultAllOf +from freeclimb import * +from freeclimb.models.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult -from freeclimb.model.sms_ten_dlc_brands_list_result import SMSTenDLCBrandsListResult # noqa: E501 class TestSMSTenDLCBrandsListResult(unittest.TestCase): """SMSTenDLCBrandsListResult unit test stubs""" def setUp(self): - self.model = SMSTenDLCBrandsListResult( - ) - + self.model = SMSTenDLCBrandsListResult() + def test_total(self): """Test SMSTenDLCBrandsListResult.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test SMSTenDLCBrandsListResult.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test SMSTenDLCBrandsListResult.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test SMSTenDLCBrandsListResult.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test SMSTenDLCBrandsListResult.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test SMSTenDLCBrandsListResult.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test SMSTenDLCBrandsListResult.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_brands(self): """Test SMSTenDLCBrandsListResult.brands""" testList = [] self.model.brands = testList - assert self.model.get("brands") == testList + assert self.model.brands == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_ten_dlc_campaign.py b/test/models/test_sms_ten_dlc_campaign.py similarity index 51% rename from test/test_sms_ten_dlc_campaign.py rename to test/models/test_sms_ten_dlc_campaign.py index 7fc18d8..ee4bfd5 100644 --- a/test/test_sms_ten_dlc_campaign.py +++ b/test/models/test_sms_ten_dlc_campaign.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_campaign import SMSTenDLCCampaign -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign # noqa: E501 class TestSMSTenDLCCampaign(unittest.TestCase): """SMSTenDLCCampaign unit test stubs""" @@ -31,284 +34,246 @@ def setUp(self): description="", mock=True, ) - + def test_account_id(self): """Test SMSTenDLCCampaign.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_campaign_id(self): """Test SMSTenDLCCampaign.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" def test_csp_id(self): """Test SMSTenDLCCampaign.csp_id""" self.model.csp_id = "TEST_STRING" - assert self.model.get("csp_id") == "TEST_STRING" + assert self.model.csp_id == "TEST_STRING" def test_reseller_id(self): """Test SMSTenDLCCampaign.reseller_id""" self.model.reseller_id = "T" * 8 - assert self.model.get("reseller_id") == "T" * 8 - - with pytest.raises(Exception) as info: + assert self.model.reseller_id == "T" * 8 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.reseller_id = "T" * (8 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_status(self): """Test SMSTenDLCCampaign.status""" - - self.model.status = "ACTIVE" - assert self.model.get("status") == "ACTIVE" - - self.model.status = "EXPIRED" - assert self.model.get("status") == "EXPIRED" - - - def test_status_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.status = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - + self.model.status = SMSTenDLCCampaignStatus.ACTIVE + assert self.model.status == SMSTenDLCCampaignStatus.ACTIVE + self.model.status = SMSTenDLCCampaignStatus.EXPIRED + assert self.model.status == SMSTenDLCCampaignStatus.EXPIRED + def test_create_date(self): """Test SMSTenDLCCampaign.create_date""" self.model.create_date = datetime.fromtimestamp(1691592436) - assert self.model.get("create_date") == datetime.fromtimestamp(1691592436) + assert self.model.create_date == datetime.fromtimestamp(1691592436) def test_auto_renewal(self): """Test SMSTenDLCCampaign.auto_renewal""" self.model.auto_renewal = False - assert self.model.get("auto_renewal") == False + assert self.model.auto_renewal == False def test_billed_date(self): """Test SMSTenDLCCampaign.billed_date""" self.model.billed_date = datetime.fromtimestamp(1691592436) - assert self.model.get("billed_date") == datetime.fromtimestamp(1691592436) + assert self.model.billed_date == datetime.fromtimestamp(1691592436) def test_brand_id(self): """Test SMSTenDLCCampaign.brand_id""" self.model.brand_id = "T" * 8 - assert self.model.get("brand_id") == "T" * 8 - - with pytest.raises(Exception) as info: + assert self.model.brand_id == "T" * 8 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.brand_id = "T" * (8 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_usecase(self): """Test SMSTenDLCCampaign.usecase""" self.model.usecase = "T" * 20 - assert self.model.get("usecase") == "T" * 20 - - with pytest.raises(Exception) as info: + assert self.model.usecase == "T" * 20 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.usecase = "T" * (20 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_sub_usecases(self): """Test SMSTenDLCCampaign.sub_usecases""" - testSet = [] + testSet = [] self.model.sub_usecases = testSet - assert self.model.get("sub_usecases") == testSet + assert self.model.sub_usecases == testSet def test_description(self): """Test SMSTenDLCCampaign.description""" self.model.description = "T" * 4096 - assert self.model.get("description") == "T" * 4096 - - with pytest.raises(Exception) as info: + assert self.model.description == "T" * 4096 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.description = "T" * (4096 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_embedded_link(self): """Test SMSTenDLCCampaign.embedded_link""" self.model.embedded_link = False - assert self.model.get("embedded_link") == False + assert self.model.embedded_link == False def test_embedded_phone(self): """Test SMSTenDLCCampaign.embedded_phone""" self.model.embedded_phone = False - assert self.model.get("embedded_phone") == False + assert self.model.embedded_phone == False def test_affiliate_marketing(self): """Test SMSTenDLCCampaign.affiliate_marketing""" self.model.affiliate_marketing = False - assert self.model.get("affiliate_marketing") == False + assert self.model.affiliate_marketing == False def test_number_pool(self): """Test SMSTenDLCCampaign.number_pool""" self.model.number_pool = False - assert self.model.get("number_pool") == False + assert self.model.number_pool == False def test_age_gated(self): """Test SMSTenDLCCampaign.age_gated""" self.model.age_gated = False - assert self.model.get("age_gated") == False + assert self.model.age_gated == False def test_direct_lending(self): """Test SMSTenDLCCampaign.direct_lending""" self.model.direct_lending = False - assert self.model.get("direct_lending") == False + assert self.model.direct_lending == False def test_subscriber_optin(self): """Test SMSTenDLCCampaign.subscriber_optin""" self.model.subscriber_optin = False - assert self.model.get("subscriber_optin") == False + assert self.model.subscriber_optin == False def test_subscriber_optout(self): """Test SMSTenDLCCampaign.subscriber_optout""" self.model.subscriber_optout = False - assert self.model.get("subscriber_optout") == False + assert self.model.subscriber_optout == False def test_subscriber_help(self): """Test SMSTenDLCCampaign.subscriber_help""" self.model.subscriber_help = False - assert self.model.get("subscriber_help") == False + assert self.model.subscriber_help == False def test_sample1(self): """Test SMSTenDLCCampaign.sample1""" self.model.sample1 = "T" * 1024 - assert self.model.get("sample1") == "T" * 1024 - - with pytest.raises(Exception) as info: + assert self.model.sample1 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.sample1 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_sample2(self): """Test SMSTenDLCCampaign.sample2""" self.model.sample2 = "T" * 1024 - assert self.model.get("sample2") == "T" * 1024 - - with pytest.raises(Exception) as info: + assert self.model.sample2 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.sample2 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_sample3(self): """Test SMSTenDLCCampaign.sample3""" self.model.sample3 = "T" * 1024 - assert self.model.get("sample3") == "T" * 1024 - - with pytest.raises(Exception) as info: + assert self.model.sample3 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.sample3 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_sample4(self): """Test SMSTenDLCCampaign.sample4""" self.model.sample4 = "T" * 1024 - assert self.model.get("sample4") == "T" * 1024 - - with pytest.raises(Exception) as info: + assert self.model.sample4 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.sample4 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_sample5(self): """Test SMSTenDLCCampaign.sample5""" self.model.sample5 = "T" * 1024 - assert self.model.get("sample5") == "T" * 1024 - - with pytest.raises(Exception) as info: + assert self.model.sample5 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.sample5 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_message_flow(self): """Test SMSTenDLCCampaign.message_flow""" self.model.message_flow = "T" * 2048 - assert self.model.get("message_flow") == "T" * 2048 - - with pytest.raises(Exception) as info: + assert self.model.message_flow == "T" * 2048 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.message_flow = "T" * (2048 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_help_message(self): """Test SMSTenDLCCampaign.help_message""" self.model.help_message = "T" * 255 - assert self.model.get("help_message") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.help_message == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.help_message = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_optin_keywords(self): """Test SMSTenDLCCampaign.optin_keywords""" self.model.optin_keywords = "T" * 255 - assert self.model.get("optin_keywords") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.optin_keywords == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.optin_keywords = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_optout_keywords(self): """Test SMSTenDLCCampaign.optout_keywords""" self.model.optout_keywords = "T" * 255 - assert self.model.get("optout_keywords") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.optout_keywords == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.optout_keywords = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_help_keywords(self): """Test SMSTenDLCCampaign.help_keywords""" self.model.help_keywords = "T" * 255 - assert self.model.get("help_keywords") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.help_keywords == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.help_keywords = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_optin_message(self): """Test SMSTenDLCCampaign.optin_message""" self.model.optin_message = "T" * 255 - assert self.model.get("optin_message") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.optin_message == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.optin_message = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_optout_message(self): """Test SMSTenDLCCampaign.optout_message""" self.model.optout_message = "T" * 255 - assert self.model.get("optout_message") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.optout_message == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.optout_message = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_reference_id(self): """Test SMSTenDLCCampaign.reference_id""" self.model.reference_id = "T" * 50 - assert self.model.get("reference_id") == "T" * 50 - - with pytest.raises(Exception) as info: + assert self.model.reference_id == "T" * 50 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.reference_id = "T" * (50 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_mock(self): """Test SMSTenDLCCampaign.mock""" self.model.mock = False - assert self.model.get("mock") == False + assert self.model.mock == False def test_next_renewal_or_expiration_date(self): """Test SMSTenDLCCampaign.next_renewal_or_expiration_date""" - self.model.next_renewal_or_expiration_date = date.fromtimestamp(1691592436) - assert self.model.get("next_renewal_or_expiration_date") == date.fromtimestamp(1691592436) + self.model.next_renewal_or_expiration_date = datetime.fromtimestamp( + 1691592436 + ).date() + assert ( + self.model.next_renewal_or_expiration_date + == datetime.fromtimestamp(1691592436).date() + ) -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_campaign_status.py b/test/models/test_sms_ten_dlc_campaign_status.py new file mode 100644 index 0000000..f49f6b4 --- /dev/null +++ b/test/models/test_sms_ten_dlc_campaign_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_campaign_status import SMSTenDLCCampaignStatus + + +class TestSMSTenDLCCampaignStatus(unittest.TestCase): + """SMSTenDLCCampaignStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_ten_dlc_campaigns_list_result.py b/test/models/test_sms_ten_dlc_campaigns_list_result.py similarity index 62% rename from test/test_sms_ten_dlc_campaigns_list_result.py rename to test/models/test_sms_ten_dlc_campaigns_list_result.py index 86dc24e..f007903 100644 --- a/test/test_sms_ten_dlc_campaigns_list_result.py +++ b/test/models/test_sms_ten_dlc_campaigns_list_result.py @@ -1,77 +1,75 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign -from freeclimb.model.sms_ten_dlc_campaigns_list_result_all_of import SMSTenDLCCampaignsListResultAllOf -globals()['PaginationModel'] = PaginationModel -globals()['SMSTenDLCCampaign'] = SMSTenDLCCampaign -globals()['SMSTenDLCCampaignsListResultAllOf'] = SMSTenDLCCampaignsListResultAllOf +from freeclimb import * +from freeclimb.models.sms_ten_dlc_campaigns_list_result import ( + SMSTenDLCCampaignsListResult, +) -from freeclimb.model.sms_ten_dlc_campaigns_list_result import SMSTenDLCCampaignsListResult # noqa: E501 class TestSMSTenDLCCampaignsListResult(unittest.TestCase): """SMSTenDLCCampaignsListResult unit test stubs""" def setUp(self): - self.model = SMSTenDLCCampaignsListResult( - ) - + self.model = SMSTenDLCCampaignsListResult() + def test_total(self): """Test SMSTenDLCCampaignsListResult.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test SMSTenDLCCampaignsListResult.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test SMSTenDLCCampaignsListResult.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test SMSTenDLCCampaignsListResult.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test SMSTenDLCCampaignsListResult.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test SMSTenDLCCampaignsListResult.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test SMSTenDLCCampaignsListResult.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_campaigns(self): """Test SMSTenDLCCampaignsListResult.campaigns""" testList = [] self.model.campaigns = testList - assert self.model.get("campaigns") == testList + assert self.model.campaigns == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_partner_campaign.py b/test/models/test_sms_ten_dlc_partner_campaign.py new file mode 100644 index 0000000..bb3e5aa --- /dev/null +++ b/test/models/test_sms_ten_dlc_partner_campaign.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign + + +class TestSMSTenDLCPartnerCampaign(unittest.TestCase): + """SMSTenDLCPartnerCampaign unit test stubs""" + + def setUp(self): + self.model = SMSTenDLCPartnerCampaign( + campaign_id="", + brand_id="", + usecase="", + description="", + ) + + def test_account_id(self): + """Test SMSTenDLCPartnerCampaign.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_campaign_id(self): + """Test SMSTenDLCPartnerCampaign.campaign_id""" + self.model.campaign_id = "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" + + def test_status(self): + """Test SMSTenDLCPartnerCampaign.status""" + self.model.status = SMSTenDLCPartnerCampaignStatus.ACTIVE + assert self.model.status == SMSTenDLCPartnerCampaignStatus.ACTIVE + self.model.status = SMSTenDLCPartnerCampaignStatus.EXPIRED + assert self.model.status == SMSTenDLCPartnerCampaignStatus.EXPIRED + + def test_create_date(self): + """Test SMSTenDLCPartnerCampaign.create_date""" + self.model.create_date = datetime.fromtimestamp(1691592436) + assert self.model.create_date == datetime.fromtimestamp(1691592436) + + def test_brand_id(self): + """Test SMSTenDLCPartnerCampaign.brand_id""" + self.model.brand_id = "T" * 8 + assert self.model.brand_id == "T" * 8 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.brand_id = "T" * (8 + 1) + + def test_usecase(self): + """Test SMSTenDLCPartnerCampaign.usecase""" + self.model.usecase = "T" * 20 + assert self.model.usecase == "T" * 20 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.usecase = "T" * (20 + 1) + + def test_description(self): + """Test SMSTenDLCPartnerCampaign.description""" + self.model.description = "T" * 4096 + assert self.model.description == "T" * 4096 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.description = "T" * (4096 + 1) + + def test_embedded_link(self): + """Test SMSTenDLCPartnerCampaign.embedded_link""" + self.model.embedded_link = False + assert self.model.embedded_link == False + + def test_embedded_phone(self): + """Test SMSTenDLCPartnerCampaign.embedded_phone""" + self.model.embedded_phone = False + assert self.model.embedded_phone == False + + def test_affiliate_marketing(self): + """Test SMSTenDLCPartnerCampaign.affiliate_marketing""" + self.model.affiliate_marketing = False + assert self.model.affiliate_marketing == False + + def test_number_pool(self): + """Test SMSTenDLCPartnerCampaign.number_pool""" + self.model.number_pool = False + assert self.model.number_pool == False + + def test_age_gated(self): + """Test SMSTenDLCPartnerCampaign.age_gated""" + self.model.age_gated = False + assert self.model.age_gated == False + + def test_direct_lending(self): + """Test SMSTenDLCPartnerCampaign.direct_lending""" + self.model.direct_lending = False + assert self.model.direct_lending == False + + def test_subscriber_optin(self): + """Test SMSTenDLCPartnerCampaign.subscriber_optin""" + self.model.subscriber_optin = False + assert self.model.subscriber_optin == False + + def test_subscriber_optout(self): + """Test SMSTenDLCPartnerCampaign.subscriber_optout""" + self.model.subscriber_optout = False + assert self.model.subscriber_optout == False + + def test_subscriber_help(self): + """Test SMSTenDLCPartnerCampaign.subscriber_help""" + self.model.subscriber_help = False + assert self.model.subscriber_help == False + + def test_sample1(self): + """Test SMSTenDLCPartnerCampaign.sample1""" + self.model.sample1 = "T" * 1024 + assert self.model.sample1 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.sample1 = "T" * (1024 + 1) + + def test_sample2(self): + """Test SMSTenDLCPartnerCampaign.sample2""" + self.model.sample2 = "T" * 1024 + assert self.model.sample2 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.sample2 = "T" * (1024 + 1) + + def test_sample3(self): + """Test SMSTenDLCPartnerCampaign.sample3""" + self.model.sample3 = "T" * 1024 + assert self.model.sample3 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.sample3 = "T" * (1024 + 1) + + def test_sample4(self): + """Test SMSTenDLCPartnerCampaign.sample4""" + self.model.sample4 = "T" * 1024 + assert self.model.sample4 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.sample4 = "T" * (1024 + 1) + + def test_sample5(self): + """Test SMSTenDLCPartnerCampaign.sample5""" + self.model.sample5 = "T" * 1024 + assert self.model.sample5 == "T" * 1024 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.sample5 = "T" * (1024 + 1) + + def test_message_flow(self): + """Test SMSTenDLCPartnerCampaign.message_flow""" + self.model.message_flow = "T" * 2048 + assert self.model.message_flow == "T" * 2048 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.message_flow = "T" * (2048 + 1) + + def test_help_message(self): + """Test SMSTenDLCPartnerCampaign.help_message""" + self.model.help_message = "T" * 255 + assert self.model.help_message == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.help_message = "T" * (255 + 1) + + def test_optin_keywords(self): + """Test SMSTenDLCPartnerCampaign.optin_keywords""" + self.model.optin_keywords = "T" * 255 + assert self.model.optin_keywords == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.optin_keywords = "T" * (255 + 1) + + def test_optout_keywords(self): + """Test SMSTenDLCPartnerCampaign.optout_keywords""" + self.model.optout_keywords = "T" * 255 + assert self.model.optout_keywords == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.optout_keywords = "T" * (255 + 1) + + def test_help_keywords(self): + """Test SMSTenDLCPartnerCampaign.help_keywords""" + self.model.help_keywords = "T" * 255 + assert self.model.help_keywords == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.help_keywords = "T" * (255 + 1) + + def test_optin_message(self): + """Test SMSTenDLCPartnerCampaign.optin_message""" + self.model.optin_message = "T" * 255 + assert self.model.optin_message == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.optin_message = "T" * (255 + 1) + + def test_optout_message(self): + """Test SMSTenDLCPartnerCampaign.optout_message""" + self.model.optout_message = "T" * 255 + assert self.model.optout_message == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: + self.model.optout_message = "T" * (255 + 1) + + def test_brand(self): + """Test SMSTenDLCPartnerCampaign.brand""" + object = freeclimb.models.sms_ten_dlc_partner_campaign_brand.SMSTenDLCPartnerCampaignBrand( + account_id="", + brand_id="", + first_name="John", + last_name="Doe", + display_name="ABC Mobile", + company_name="ABC Inc.", + phone="+12024567890", + email="", + website="http://www.abcmobile.com", + optional_attributes={}, + evp_vetting_score=56, + ) + self.model.brand = object + assert self.model.brand == object + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_ten_dlc_partner_campaign_brand.py b/test/models/test_sms_ten_dlc_partner_campaign_brand.py similarity index 56% rename from test/test_sms_ten_dlc_partner_campaign_brand.py rename to test/models/test_sms_ten_dlc_partner_campaign_brand.py index ff90016..ff02165 100644 --- a/test/test_sms_ten_dlc_partner_campaign_brand.py +++ b/test/models/test_sms_ten_dlc_partner_campaign_brand.py @@ -1,22 +1,27 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_partner_campaign_brand import ( + SMSTenDLCPartnerCampaignBrand, +) -from freeclimb.model.sms_ten_dlc_partner_campaign_brand import SMSTenDLCPartnerCampaignBrand # noqa: E501 class TestSMSTenDLCPartnerCampaignBrand(unittest.TestCase): """SMSTenDLCPartnerCampaignBrand unit test stubs""" @@ -26,97 +31,83 @@ def setUp(self): phone="", email="", ) - + def test_account_id(self): """Test SMSTenDLCPartnerCampaignBrand.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_brand_id(self): """Test SMSTenDLCPartnerCampaignBrand.brand_id""" self.model.brand_id = "TEST_STRING" - assert self.model.get("brand_id") == "TEST_STRING" + assert self.model.brand_id == "TEST_STRING" def test_first_name(self): """Test SMSTenDLCPartnerCampaignBrand.first_name""" self.model.first_name = "T" * 100 - assert self.model.get("first_name") == "T" * 100 - - with pytest.raises(Exception) as info: + assert self.model.first_name == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.first_name = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_last_name(self): """Test SMSTenDLCPartnerCampaignBrand.last_name""" self.model.last_name = "T" * 100 - assert self.model.get("last_name") == "T" * 100 - - with pytest.raises(Exception) as info: + assert self.model.last_name == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.last_name = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_display_name(self): """Test SMSTenDLCPartnerCampaignBrand.display_name""" self.model.display_name = "T" * 255 - assert self.model.get("display_name") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.display_name == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.display_name = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_company_name(self): """Test SMSTenDLCPartnerCampaignBrand.company_name""" self.model.company_name = "T" * 255 - assert self.model.get("company_name") == "T" * 255 - - with pytest.raises(Exception) as info: + assert self.model.company_name == "T" * 255 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.company_name = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_phone(self): """Test SMSTenDLCPartnerCampaignBrand.phone""" self.model.phone = "T" * 20 - assert self.model.get("phone") == "T" * 20 - - with pytest.raises(Exception) as info: + assert self.model.phone == "T" * 20 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.phone = "T" * (20 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_email(self): """Test SMSTenDLCPartnerCampaignBrand.email""" self.model.email = "T" * 100 - assert self.model.get("email") == "T" * 100 - - with pytest.raises(Exception) as info: + assert self.model.email == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.email = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_website(self): """Test SMSTenDLCPartnerCampaignBrand.website""" self.model.website = "T" * 100 - assert self.model.get("website") == "T" * 100 - - with pytest.raises(Exception) as info: + assert self.model.website == "T" * 100 + + with self.assertRaises(pydantic_core._pydantic_core.ValidationError) as info: self.model.website = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ def test_optional_attributes(self): """Test SMSTenDLCPartnerCampaignBrand.optional_attributes""" self.model.optional_attributes = {} - assert self.model.get("optional_attributes") == {} + assert self.model.optional_attributes == {} def test_evp_vetting_score(self): """Test SMSTenDLCPartnerCampaignBrand.evp_vetting_score""" self.model.evp_vetting_score = 1 - assert self.model.get("evp_vetting_score") == 1 + assert self.model.evp_vetting_score == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_ten_dlc_partner_campaign_status.py b/test/models/test_sms_ten_dlc_partner_campaign_status.py new file mode 100644 index 0000000..5eb4f1d --- /dev/null +++ b/test/models/test_sms_ten_dlc_partner_campaign_status.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_ten_dlc_partner_campaign_status import ( + SMSTenDLCPartnerCampaignStatus, +) + + +class TestSMSTenDLCPartnerCampaignStatus(unittest.TestCase): + """SMSTenDLCPartnerCampaignStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_ten_dlc_partner_campaigns_list_result.py b/test/models/test_sms_ten_dlc_partner_campaigns_list_result.py similarity index 61% rename from test/test_sms_ten_dlc_partner_campaigns_list_result.py rename to test/models/test_sms_ten_dlc_partner_campaigns_list_result.py index 9112219..669a6f5 100644 --- a/test/test_sms_ten_dlc_partner_campaigns_list_result.py +++ b/test/models/test_sms_ten_dlc_partner_campaigns_list_result.py @@ -1,77 +1,75 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result_all_of import SMSTenDLCPartnerCampaignsListResultAllOf -globals()['PaginationModel'] = PaginationModel -globals()['SMSTenDLCPartnerCampaign'] = SMSTenDLCPartnerCampaign -globals()['SMSTenDLCPartnerCampaignsListResultAllOf'] = SMSTenDLCPartnerCampaignsListResultAllOf +from freeclimb import * +from freeclimb.models.sms_ten_dlc_partner_campaigns_list_result import ( + SMSTenDLCPartnerCampaignsListResult, +) -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result import SMSTenDLCPartnerCampaignsListResult # noqa: E501 class TestSMSTenDLCPartnerCampaignsListResult(unittest.TestCase): """SMSTenDLCPartnerCampaignsListResult unit test stubs""" def setUp(self): - self.model = SMSTenDLCPartnerCampaignsListResult( - ) - + self.model = SMSTenDLCPartnerCampaignsListResult() + def test_total(self): """Test SMSTenDLCPartnerCampaignsListResult.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test SMSTenDLCPartnerCampaignsListResult.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test SMSTenDLCPartnerCampaignsListResult.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test SMSTenDLCPartnerCampaignsListResult.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test SMSTenDLCPartnerCampaignsListResult.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test SMSTenDLCPartnerCampaignsListResult.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test SMSTenDLCPartnerCampaignsListResult.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_partner_campaigns(self): """Test SMSTenDLCPartnerCampaignsListResult.partner_campaigns""" testList = [] self.model.partner_campaigns = testList - assert self.model.get("partner_campaigns") == testList + assert self.model.partner_campaigns == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_toll_free_campaign.py b/test/models/test_sms_toll_free_campaign.py similarity index 50% rename from test/test_sms_toll_free_campaign.py rename to test/models/test_sms_toll_free_campaign.py index 886ed59..dbc50e9 100644 --- a/test/test_sms_toll_free_campaign.py +++ b/test/models/test_sms_toll_free_campaign.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.sms_toll_free_campaign import SMSTollFreeCampaign -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign # noqa: E501 class TestSMSTollFreeCampaign(unittest.TestCase): """SMSTollFreeCampaign unit test stubs""" @@ -26,67 +29,74 @@ def setUp(self): account_id="", campaign_id="", use_case="", - registration_status="UNREGISTERED", + registration_status=SMSTollFreeCampaignRegistrationStatus.UNREGISTERED, date_created="", date_updated="", revision=1, ) - + def test_account_id(self): """Test SMSTollFreeCampaign.account_id""" self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" + assert self.model.account_id == "TEST_STRING" def test_campaign_id(self): """Test SMSTollFreeCampaign.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" def test_use_case(self): """Test SMSTollFreeCampaign.use_case""" self.model.use_case = "TEST_STRING" - assert self.model.get("use_case") == "TEST_STRING" + assert self.model.use_case == "TEST_STRING" def test_registration_status(self): """Test SMSTollFreeCampaign.registration_status""" - - self.model.registration_status = "UNREGISTERED" - assert self.model.get("registration_status") == "UNREGISTERED" - - self.model.registration_status = "INITIATED" - assert self.model.get("registration_status") == "INITIATED" - - self.model.registration_status = "PENDING" - assert self.model.get("registration_status") == "PENDING" - - self.model.registration_status = "DECLINED" - assert self.model.get("registration_status") == "DECLINED" - - self.model.registration_status = "REGISTERED" - assert self.model.get("registration_status") == "REGISTERED" - - - def test_registration_status_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.registration_status = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - + self.model.registration_status = ( + SMSTollFreeCampaignRegistrationStatus.UNREGISTERED + ) + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.UNREGISTERED + ) + self.model.registration_status = SMSTollFreeCampaignRegistrationStatus.INITIATED + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.INITIATED + ) + self.model.registration_status = SMSTollFreeCampaignRegistrationStatus.PENDING + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.PENDING + ) + self.model.registration_status = SMSTollFreeCampaignRegistrationStatus.DECLINED + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.DECLINED + ) + self.model.registration_status = ( + SMSTollFreeCampaignRegistrationStatus.REGISTERED + ) + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.REGISTERED + ) + def test_date_created(self): """Test SMSTollFreeCampaign.date_created""" self.model.date_created = "TEST_STRING" - assert self.model.get("date_created") == "TEST_STRING" + assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test SMSTollFreeCampaign.date_updated""" self.model.date_updated = "TEST_STRING" - assert self.model.get("date_updated") == "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" def test_revision(self): """Test SMSTollFreeCampaign.revision""" self.model.revision = 1 - assert self.model.get("revision") == 1 + assert self.model.revision == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_sms_toll_free_campaign_registration_status.py b/test/models/test_sms_toll_free_campaign_registration_status.py new file mode 100644 index 0000000..90990c1 --- /dev/null +++ b/test/models/test_sms_toll_free_campaign_registration_status.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.sms_toll_free_campaign_registration_status import ( + SMSTollFreeCampaignRegistrationStatus, +) + + +class TestSMSTollFreeCampaignRegistrationStatus(unittest.TestCase): + """SMSTollFreeCampaignRegistrationStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_sms_toll_free_campaigns_list_result.py b/test/models/test_sms_toll_free_campaigns_list_result.py similarity index 61% rename from test/test_sms_toll_free_campaigns_list_result.py rename to test/models/test_sms_toll_free_campaigns_list_result.py index 30a9aab..ee6dc69 100644 --- a/test/test_sms_toll_free_campaigns_list_result.py +++ b/test/models/test_sms_toll_free_campaigns_list_result.py @@ -1,77 +1,75 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.pagination_model import PaginationModel -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign -from freeclimb.model.sms_toll_free_campaigns_list_result_all_of import SMSTollFreeCampaignsListResultAllOf -globals()['PaginationModel'] = PaginationModel -globals()['SMSTollFreeCampaign'] = SMSTollFreeCampaign -globals()['SMSTollFreeCampaignsListResultAllOf'] = SMSTollFreeCampaignsListResultAllOf +from freeclimb import * +from freeclimb.models.sms_toll_free_campaigns_list_result import ( + SMSTollFreeCampaignsListResult, +) -from freeclimb.model.sms_toll_free_campaigns_list_result import SMSTollFreeCampaignsListResult # noqa: E501 class TestSMSTollFreeCampaignsListResult(unittest.TestCase): """SMSTollFreeCampaignsListResult unit test stubs""" def setUp(self): - self.model = SMSTollFreeCampaignsListResult( - ) - + self.model = SMSTollFreeCampaignsListResult() + def test_total(self): """Test SMSTollFreeCampaignsListResult.total""" self.model.total = 1 - assert self.model.get("total") == 1 + assert self.model.total == 1 def test_start(self): """Test SMSTollFreeCampaignsListResult.start""" self.model.start = 1 - assert self.model.get("start") == 1 + assert self.model.start == 1 def test_end(self): """Test SMSTollFreeCampaignsListResult.end""" self.model.end = 1 - assert self.model.get("end") == 1 + assert self.model.end == 1 def test_page(self): """Test SMSTollFreeCampaignsListResult.page""" self.model.page = 1 - assert self.model.get("page") == 1 + assert self.model.page == 1 def test_num_pages(self): """Test SMSTollFreeCampaignsListResult.num_pages""" self.model.num_pages = 1 - assert self.model.get("num_pages") == 1 + assert self.model.num_pages == 1 def test_page_size(self): """Test SMSTollFreeCampaignsListResult.page_size""" self.model.page_size = 1 - assert self.model.get("page_size") == 1 + assert self.model.page_size == 1 def test_next_page_uri(self): """Test SMSTollFreeCampaignsListResult.next_page_uri""" self.model.next_page_uri = "TEST_STRING" - assert self.model.get("next_page_uri") == "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" def test_brands(self): """Test SMSTollFreeCampaignsListResult.brands""" testList = [] self.model.brands = testList - assert self.model.get("brands") == testList + assert self.model.brands == testList -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_start_record_call.py b/test/models/test_start_record_call.py new file mode 100644 index 0000000..9e72b76 --- /dev/null +++ b/test/models/test_start_record_call.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.start_record_call import StartRecordCall + + +class TestStartRecordCall(unittest.TestCase): + """StartRecordCall unit test stubs""" + + def setUp(self): + self.model = StartRecordCall() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_terminate_conference.py b/test/models/test_terminate_conference.py new file mode 100644 index 0000000..ec8d401 --- /dev/null +++ b/test/models/test_terminate_conference.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.terminate_conference import TerminateConference + + +class TestTerminateConference(unittest.TestCase): + """TerminateConference unit test stubs""" + + def setUp(self): + self.model = TerminateConference() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_tfn.py b/test/models/test_tfn.py similarity index 74% rename from test/test_tfn.py rename to test/models/test_tfn.py index 192b26c..ae324ae 100644 --- a/test/test_tfn.py +++ b/test/models/test_tfn.py @@ -1,22 +1,25 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.tfn import TFN -from freeclimb.model.tfn import TFN # noqa: E501 class TestTFN(unittest.TestCase): """TFN unit test stubs""" @@ -25,12 +28,12 @@ def setUp(self): self.model = TFN( campaign_id="", ) - + def test_campaign_id(self): """Test TFN.campaign_id""" self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" + assert self.model.campaign_id == "TEST_STRING" -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_transcribe_reason.py b/test/models/test_transcribe_reason.py new file mode 100644 index 0000000..9854c26 --- /dev/null +++ b/test/models/test_transcribe_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.transcribe_reason import TranscribeReason + + +class TestTranscribeReason(unittest.TestCase): + """TranscribeReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_transcribe_term_reason.py b/test/models/test_transcribe_term_reason.py new file mode 100644 index 0000000..66b31f4 --- /dev/null +++ b/test/models/test_transcribe_term_reason.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.transcribe_term_reason import TranscribeTermReason + + +class TestTranscribeTermReason(unittest.TestCase): + """TranscribeTermReason unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_transcribe_utterance.py b/test/models/test_transcribe_utterance.py new file mode 100644 index 0000000..1d65e41 --- /dev/null +++ b/test/models/test_transcribe_utterance.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.transcribe_utterance import TranscribeUtterance + + +class TestTranscribeUtterance(unittest.TestCase): + """TranscribeUtterance unit test stubs""" + + def setUp(self): + self.model = TranscribeUtterance( + action_url="", + ) + + def test_action_url(self): + """Test TranscribeUtterance.action_url""" + self.model.action_url = "TEST_STRING" + assert self.model.action_url == "TEST_STRING" + + def test_play_beep(self): + """Test TranscribeUtterance.play_beep""" + self.model.play_beep = False + assert self.model.play_beep == False + + def test_record(self): + """Test TranscribeUtterance.record""" + object = freeclimb.models.transcribe_utterance_record.TranscribeUtteranceRecord( + save_recording=True, + max_length_sec=1, + rcrd_termination_silence_time_ms=1, + ) + self.model.record = object + assert self.model.record == object + + def test_privacy_for_logging(self): + """Test TranscribeUtterance.privacy_for_logging""" + self.model.privacy_for_logging = False + assert self.model.privacy_for_logging == False + + def test_privacy_for_recording(self): + """Test TranscribeUtterance.privacy_for_recording""" + self.model.privacy_for_recording = False + assert self.model.privacy_for_recording == False + + def test_prompts(self): + """Test TranscribeUtterance.prompts""" + testList = [] + self.model.prompts = testList + assert self.model.prompts == testList + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_transcribe_utterance_all_of_record.py b/test/models/test_transcribe_utterance_record.py similarity index 55% rename from test/test_transcribe_utterance_all_of_record.py rename to test/models/test_transcribe_utterance_record.py index 9d14854..dc7662f 100644 --- a/test/test_transcribe_utterance_all_of_record.py +++ b/test/models/test_transcribe_utterance_record.py @@ -1,45 +1,47 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.transcribe_utterance_record import TranscribeUtteranceRecord -from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord # noqa: E501 -class TestTranscribeUtteranceAllOfRecord(unittest.TestCase): - """TranscribeUtteranceAllOfRecord unit test stubs""" +class TestTranscribeUtteranceRecord(unittest.TestCase): + """TranscribeUtteranceRecord unit test stubs""" def setUp(self): - self.model = TranscribeUtteranceAllOfRecord( - ) - + self.model = TranscribeUtteranceRecord() + def test_save_recording(self): - """Test TranscribeUtteranceAllOfRecord.save_recording""" + """Test TranscribeUtteranceRecord.save_recording""" self.model.save_recording = False - assert self.model.get("save_recording") == False + assert self.model.save_recording == False def test_max_length_sec(self): - """Test TranscribeUtteranceAllOfRecord.max_length_sec""" + """Test TranscribeUtteranceRecord.max_length_sec""" self.model.max_length_sec = 1 - assert self.model.get("max_length_sec") == 1 + assert self.model.max_length_sec == 1 def test_rcrd_termination_silence_time_ms(self): - """Test TranscribeUtteranceAllOfRecord.rcrd_termination_silence_time_ms""" + """Test TranscribeUtteranceRecord.rcrd_termination_silence_time_ms""" self.model.rcrd_termination_silence_time_ms = 1 - assert self.model.get("rcrd_termination_silence_time_ms") == 1 + assert self.model.rcrd_termination_silence_time_ms == 1 -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_transcribe_webhook.py b/test/models/test_transcribe_webhook.py new file mode 100644 index 0000000..08518e0 --- /dev/null +++ b/test/models/test_transcribe_webhook.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.transcribe_webhook import TranscribeWebhook + + +class TestTranscribeWebhook(unittest.TestCase): + """TranscribeWebhook unit test stubs""" + + def setUp(self): + self.model = TranscribeWebhook() + + def test_request_type(self): + """Test TranscribeWebhook.request_type""" + + def test_account_id(self): + """Test TranscribeWebhook.account_id""" + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_call_id(self): + """Test TranscribeWebhook.call_id""" + self.model.call_id = "TEST_STRING" + assert self.model.call_id == "TEST_STRING" + + def test_var_from(self): + """Test TranscribeWebhook.var_from""" + self.model.var_from = "TEST_STRING" + assert self.model.var_from == "TEST_STRING" + + def test_to(self): + """Test TranscribeWebhook.to""" + self.model.to = "TEST_STRING" + assert self.model.to == "TEST_STRING" + + def test_recording_id(self): + """Test TranscribeWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" + assert self.model.recording_id == "TEST_STRING" + + def test_recording_url(self): + """Test TranscribeWebhook.recording_url""" + self.model.recording_url = "TEST_STRING" + assert self.model.recording_url == "TEST_STRING" + + def test_recording_size(self): + """Test TranscribeWebhook.recording_size""" + self.model.recording_size = 1 + assert self.model.recording_size == 1 + + def test_recording_format(self): + """Test TranscribeWebhook.recording_format""" + self.model.recording_format = "TEST_STRING" + assert self.model.recording_format == "TEST_STRING" + + def test_recording_duration_ms(self): + """Test TranscribeWebhook.recording_duration_ms""" + self.model.recording_duration_ms = 1 + assert self.model.recording_duration_ms == 1 + + def test_term_reason(self): + """Test TranscribeWebhook.term_reason""" + self.model.term_reason = TranscribeTermReason.ERROR + assert self.model.term_reason == TranscribeTermReason.ERROR + self.model.term_reason = TranscribeTermReason.COMPLETED + assert self.model.term_reason == TranscribeTermReason.COMPLETED + + def test_record_term_reason(self): + """Test TranscribeWebhook.record_term_reason""" + self.model.record_term_reason = RecordUtteranceTermReason.FINISH_KEY + assert self.model.record_term_reason == RecordUtteranceTermReason.FINISH_KEY + self.model.record_term_reason = RecordUtteranceTermReason.TIMEOUT + assert self.model.record_term_reason == RecordUtteranceTermReason.TIMEOUT + self.model.record_term_reason = RecordUtteranceTermReason.HANGUP + assert self.model.record_term_reason == RecordUtteranceTermReason.HANGUP + self.model.record_term_reason = RecordUtteranceTermReason.MAX_LENGTH + assert self.model.record_term_reason == RecordUtteranceTermReason.MAX_LENGTH + + def test_digit(self): + """Test TranscribeWebhook.digit""" + self.model.digit = "TEST_STRING" + assert self.model.digit == "TEST_STRING" + + def test_privacy_for_logging(self): + """Test TranscribeWebhook.privacy_for_logging""" + self.model.privacy_for_logging = False + assert self.model.privacy_for_logging == False + + def test_privacy_for_recording(self): + """Test TranscribeWebhook.privacy_for_recording""" + self.model.privacy_for_recording = False + assert self.model.privacy_for_recording == False + + def test_barge_in_reason(self): + """Test TranscribeWebhook.barge_in_reason""" + self.model.barge_in_reason = BargeInReason.NO_BARGE_IN + assert self.model.barge_in_reason == BargeInReason.NO_BARGE_IN + self.model.barge_in_reason = BargeInReason.BARGE_IN_BY_DTMF + assert self.model.barge_in_reason == BargeInReason.BARGE_IN_BY_DTMF + self.model.barge_in_reason = BargeInReason.BARGE_IN_BY_ENERGY + assert self.model.barge_in_reason == BargeInReason.BARGE_IN_BY_ENERGY + + def test_barged_in_prompt_no(self): + """Test TranscribeWebhook.barged_in_prompt_no""" + self.model.barged_in_prompt_no = 1 + assert self.model.barged_in_prompt_no == 1 + + def test_barged_in_prompt_ms(self): + """Test TranscribeWebhook.barged_in_prompt_ms""" + self.model.barged_in_prompt_ms = 1 + assert self.model.barged_in_prompt_ms == 1 + + def test_barged_in_prompt_loop_no(self): + """Test TranscribeWebhook.barged_in_prompt_loop_no""" + self.model.barged_in_prompt_loop_no = 1 + assert self.model.barged_in_prompt_loop_no == 1 + + def test_barge_in_time_ms(self): + """Test TranscribeWebhook.barge_in_time_ms""" + self.model.barge_in_time_ms = 1 + assert self.model.barge_in_time_ms == 1 + + def test_transcript(self): + """Test TranscribeWebhook.transcript""" + self.model.transcript = "TEST_STRING" + assert self.model.transcript == "TEST_STRING" + + def test_transcribe_reason(self): + """Test TranscribeWebhook.transcribe_reason""" + self.model.transcribe_reason = TranscribeReason.INTERNAL_ERROR + assert self.model.transcribe_reason == TranscribeReason.INTERNAL_ERROR + self.model.transcribe_reason = TranscribeReason.HANGUP + assert self.model.transcribe_reason == TranscribeReason.HANGUP + self.model.transcribe_reason = TranscribeReason.MAX_LENGTH + assert self.model.transcribe_reason == TranscribeReason.MAX_LENGTH + self.model.transcribe_reason = TranscribeReason.DIGIT + assert self.model.transcribe_reason == TranscribeReason.DIGIT + self.model.transcribe_reason = TranscribeReason.NO_INPUT + assert self.model.transcribe_reason == TranscribeReason.NO_INPUT + + def test_transcription_duration_ms(self): + """Test TranscribeWebhook.transcription_duration_ms""" + self.model.transcription_duration_ms = 1 + assert self.model.transcription_duration_ms == 1 + + def test_deserialize(self): + payload = '{ "requestType": "transcribe" }' + assert isinstance(TranscribeWebhook.deserialize(payload), TranscribeWebhook) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_unpark.py b/test/models/test_unpark.py new file mode 100644 index 0000000..cabe1ef --- /dev/null +++ b/test/models/test_unpark.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.unpark import Unpark + + +class TestUnpark(unittest.TestCase): + """Unpark unit test stubs""" + + def setUp(self): + self.model = Unpark() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_call_request.py b/test/models/test_update_call_request.py similarity index 64% rename from test/test_update_call_request.py rename to test/models/test_update_call_request.py index b4d5bb8..f7a9cf1 100644 --- a/test/test_update_call_request.py +++ b/test/models/test_update_call_request.py @@ -1,40 +1,41 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.update_call_request_status import UpdateCallRequestStatus -globals()['UpdateCallRequestStatus'] = UpdateCallRequestStatus +from freeclimb import * +from freeclimb.models.update_call_request import UpdateCallRequest -from freeclimb.model.update_call_request import UpdateCallRequest # noqa: E501 class TestUpdateCallRequest(unittest.TestCase): """UpdateCallRequest unit test stubs""" def setUp(self): self.model = UpdateCallRequest( - status= UpdateCallRequestStatus.CANCELED, + status=UpdateCallRequestStatus.CANCELED, ) - + def test_status(self): """Test UpdateCallRequest.status""" self.model.status = UpdateCallRequestStatus.CANCELED - assert self.model.get("status") == UpdateCallRequestStatus.CANCELED + assert self.model.status == UpdateCallRequestStatus.CANCELED self.model.status = UpdateCallRequestStatus.COMPLETED - assert self.model.get("status") == UpdateCallRequestStatus.COMPLETED + assert self.model.status == UpdateCallRequestStatus.COMPLETED -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_update_call_request_status.py b/test/models/test_update_call_request_status.py new file mode 100644 index 0000000..1398450 --- /dev/null +++ b/test/models/test_update_call_request_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.update_call_request_status import UpdateCallRequestStatus + + +class TestUpdateCallRequestStatus(unittest.TestCase): + """UpdateCallRequestStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_conference_participant_request.py b/test/models/test_update_conference_participant_request.py similarity index 61% rename from test/test_update_conference_participant_request.py rename to test/models/test_update_conference_participant_request.py index 3405d55..f408130 100644 --- a/test/test_update_conference_participant_request.py +++ b/test/models/test_update_conference_participant_request.py @@ -1,40 +1,49 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb +from freeclimb import * +from freeclimb.models.update_conference_participant_request import ( + UpdateConferenceParticipantRequest, +) -from freeclimb.model.update_conference_participant_request import UpdateConferenceParticipantRequest # noqa: E501 class TestUpdateConferenceParticipantRequest(unittest.TestCase): """UpdateConferenceParticipantRequest unit test stubs""" def setUp(self): - self.model = UpdateConferenceParticipantRequest( - ) - + self.model = UpdateConferenceParticipantRequest() + def test_talk(self): """Test UpdateConferenceParticipantRequest.talk""" self.model.talk = False - assert self.model.get("talk") == False + assert self.model.talk == False def test_listen(self): """Test UpdateConferenceParticipantRequest.listen""" self.model.listen = False - assert self.model.get("listen") == False + assert self.model.listen == False + + def test_dtmf_pass_through(self): + """Test UpdateConferenceParticipantRequest.dtmf_pass_through""" + self.model.dtmf_pass_through = False + assert self.model.dtmf_pass_through == False -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_conference_request.py b/test/models/test_update_conference_request.py similarity index 58% rename from test/test_update_conference_request.py rename to test/models/test_update_conference_request.py index d0b7e67..b0bcb00 100644 --- a/test/test_update_conference_request.py +++ b/test/models/test_update_conference_request.py @@ -1,57 +1,55 @@ +# coding: utf-8 + """ FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. The version of the OpenAPI document: 1.0.0 Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -import sys -import unittest -from datetime import datetime, date -import pytest +import unittest +import pydantic_core +from datetime import datetime import freeclimb -from freeclimb.model.play_beep import PlayBeep -from freeclimb.model.update_conference_request_status import UpdateConferenceRequestStatus -globals()['PlayBeep'] = PlayBeep -globals()['UpdateConferenceRequestStatus'] = UpdateConferenceRequestStatus +from freeclimb import * +from freeclimb.models.update_conference_request import UpdateConferenceRequest -from freeclimb.model.update_conference_request import UpdateConferenceRequest # noqa: E501 class TestUpdateConferenceRequest(unittest.TestCase): """UpdateConferenceRequest unit test stubs""" def setUp(self): - self.model = UpdateConferenceRequest( - ) - + self.model = UpdateConferenceRequest() + def test_alias(self): """Test UpdateConferenceRequest.alias""" self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_play_beep(self): """Test UpdateConferenceRequest.play_beep""" self.model.play_beep = PlayBeep.ALWAYS - assert self.model.get("play_beep") == PlayBeep.ALWAYS + assert self.model.play_beep == PlayBeep.ALWAYS self.model.play_beep = PlayBeep.NEVER - assert self.model.get("play_beep") == PlayBeep.NEVER + assert self.model.play_beep == PlayBeep.NEVER self.model.play_beep = PlayBeep.ENTRY_ONLY - assert self.model.get("play_beep") == PlayBeep.ENTRY_ONLY + assert self.model.play_beep == PlayBeep.ENTRY_ONLY self.model.play_beep = PlayBeep.EXIT_ONLY - assert self.model.get("play_beep") == PlayBeep.EXIT_ONLY + assert self.model.play_beep == PlayBeep.EXIT_ONLY def test_status(self): """Test UpdateConferenceRequest.status""" self.model.status = UpdateConferenceRequestStatus.EMPTY - assert self.model.get("status") == UpdateConferenceRequestStatus.EMPTY + assert self.model.status == UpdateConferenceRequestStatus.EMPTY self.model.status = UpdateConferenceRequestStatus.TERMINATED - assert self.model.get("status") == UpdateConferenceRequestStatus.TERMINATED + assert self.model.status == UpdateConferenceRequestStatus.TERMINATED -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_update_conference_request_status.py b/test/models/test_update_conference_request_status.py new file mode 100644 index 0000000..4fba1ac --- /dev/null +++ b/test/models/test_update_conference_request_status.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.update_conference_request_status import ( + UpdateConferenceRequestStatus, +) + + +class TestUpdateConferenceRequestStatus(unittest.TestCase): + """UpdateConferenceRequestStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_webhook.py b/test/models/test_webhook.py new file mode 100644 index 0000000..4223a5a --- /dev/null +++ b/test/models/test_webhook.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.webhook import Webhook + + +class TestWebhook(unittest.TestCase): + """Webhook unit test stubs""" + + def setUp(self): + self.model = Webhook() + + def test_request_type(self): + """Test Webhook.request_type""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_account_result_all_of.py b/test/test_account_result_all_of.py deleted file mode 100644 index c05dcce..0000000 --- a/test/test_account_result_all_of.py +++ /dev/null @@ -1,76 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.account_status import AccountStatus -from freeclimb.model.account_type import AccountType -globals()['AccountStatus'] = AccountStatus -globals()['AccountType'] = AccountType - -from freeclimb.model.account_result_all_of import AccountResultAllOf # noqa: E501 - -class TestAccountResultAllOf(unittest.TestCase): - """AccountResultAllOf unit test stubs""" - - def setUp(self): - self.model = AccountResultAllOf( - ) - - def test_account_id(self): - """Test AccountResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_api_key(self): - """Test AccountResultAllOf.api_key""" - self.model.api_key = "TEST_STRING" - assert self.model.get("api_key") == "TEST_STRING" - - def test_alias(self): - """Test AccountResultAllOf.alias""" - self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" - - def test_label(self): - """Test AccountResultAllOf.label""" - self.model.label = "TEST_STRING" - assert self.model.get("label") == "TEST_STRING" - - def test_type(self): - """Test AccountResultAllOf.type""" - self.model.type = AccountType.TRIAL - assert self.model.get("type") == AccountType.TRIAL - self.model.type = AccountType.FULL - assert self.model.get("type") == AccountType.FULL - - def test_status(self): - """Test AccountResultAllOf.status""" - self.model.status = AccountStatus.CLOSED - assert self.model.get("status") == AccountStatus.CLOSED - self.model.status = AccountStatus.SUSPENDED - assert self.model.get("status") == AccountStatus.SUSPENDED - self.model.status = AccountStatus.ACTIVE - assert self.model.get("status") == AccountStatus.ACTIVE - - def test_subresource_uris(self): - """Test AccountResultAllOf.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_account_status.py b/test/test_account_status.py deleted file mode 100644 index 4f33705..0000000 --- a/test/test_account_status.py +++ /dev/null @@ -1,60 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.account_status import AccountStatus # noqa: E501 - -class TestAccountStatus(unittest.TestCase): - """AccountStatus unit test stubs""" - - - def test_CLOSED_should_serialize_to_enum(self): - expected = AccountStatus.CLOSED - calculated = AccountStatus['CLOSED'] - assert expected == calculated - - def test_CLOSED_should_deserialize_to_string(self): - test = AccountStatus.CLOSED - expected = "closed" - calculated = test.value - assert expected == calculated - - def test_SUSPENDED_should_serialize_to_enum(self): - expected = AccountStatus.SUSPENDED - calculated = AccountStatus['SUSPENDED'] - assert expected == calculated - - def test_SUSPENDED_should_deserialize_to_string(self): - test = AccountStatus.SUSPENDED - expected = "suspended" - calculated = test.value - assert expected == calculated - - def test_ACTIVE_should_serialize_to_enum(self): - expected = AccountStatus.ACTIVE - calculated = AccountStatus['ACTIVE'] - assert expected == calculated - - def test_ACTIVE_should_deserialize_to_string(self): - test = AccountStatus.ACTIVE - expected = "active" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_account_type.py b/test/test_account_type.py deleted file mode 100644 index 0f0db4a..0000000 --- a/test/test_account_type.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.account_type import AccountType # noqa: E501 - -class TestAccountType(unittest.TestCase): - """AccountType unit test stubs""" - - - def test_TRIAL_should_serialize_to_enum(self): - expected = AccountType.TRIAL - calculated = AccountType['TRIAL'] - assert expected == calculated - - def test_TRIAL_should_deserialize_to_string(self): - test = AccountType.TRIAL - expected = "trial" - calculated = test.value - assert expected == calculated - - def test_FULL_should_serialize_to_enum(self): - expected = AccountType.FULL - calculated = AccountType['FULL'] - assert expected == calculated - - def test_FULL_should_deserialize_to_string(self): - test = AccountType.FULL - expected = "full" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_add_to_conference.py b/test/test_add_to_conference.py deleted file mode 100644 index f64f143..0000000 --- a/test/test_add_to_conference.py +++ /dev/null @@ -1,133 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.add_to_conference_all_of import AddToConferenceAllOf -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['AddToConferenceAllOf'] = AddToConferenceAllOf -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.add_to_conference import AddToConference # noqa: E501 - -class TestAddToConference(unittest.TestCase): - """AddToConference unit test stubs""" - - def setUp(self): - self.model = AddToConference( - conference_id="", - ) - - def test_allow_call_control(self): - """Test AddToConference.allow_call_control""" - self.model.allow_call_control = False - assert self.model.get("allow_call_control") == False - - def test_call_control_sequence(self): - """Test AddToConference.call_control_sequence""" - self.model.call_control_sequence = "TEST_STRING" - assert self.model.get("call_control_sequence") == "TEST_STRING" - - def test_call_control_url(self): - """Test AddToConference.call_control_url""" - self.model.call_control_url = "TEST_STRING" - assert self.model.get("call_control_url") == "TEST_STRING" - - def test_conference_id(self): - """Test AddToConference.conference_id""" - self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" - - def test_leave_conference_url(self): - """Test AddToConference.leave_conference_url""" - self.model.leave_conference_url = "TEST_STRING" - assert self.model.get("leave_conference_url") == "TEST_STRING" - - def test_listen(self): - """Test AddToConference.listen""" - self.model.listen = False - assert self.model.get("listen") == False - - def test_notification_url(self): - """Test AddToConference.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - def test_start_conf_on_enter(self): - """Test AddToConference.start_conf_on_enter""" - self.model.start_conf_on_enter = False - assert self.model.get("start_conf_on_enter") == False - - def test_talk(self): - """Test AddToConference.talk""" - self.model.talk = False - assert self.model.get("talk") == False - - - def test_command_test(self): - assert self.model.command == "AddToConference" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_add_to_conference_all_of.py b/test/test_add_to_conference_all_of.py deleted file mode 100644 index 4565956..0000000 --- a/test/test_add_to_conference_all_of.py +++ /dev/null @@ -1,76 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.add_to_conference_all_of import AddToConferenceAllOf # noqa: E501 - -class TestAddToConferenceAllOf(unittest.TestCase): - """AddToConferenceAllOf unit test stubs""" - - def setUp(self): - self.model = AddToConferenceAllOf( - conference_id="", - ) - - def test_allow_call_control(self): - """Test AddToConferenceAllOf.allow_call_control""" - self.model.allow_call_control = False - assert self.model.get("allow_call_control") == False - - def test_call_control_sequence(self): - """Test AddToConferenceAllOf.call_control_sequence""" - self.model.call_control_sequence = "TEST_STRING" - assert self.model.get("call_control_sequence") == "TEST_STRING" - - def test_call_control_url(self): - """Test AddToConferenceAllOf.call_control_url""" - self.model.call_control_url = "TEST_STRING" - assert self.model.get("call_control_url") == "TEST_STRING" - - def test_conference_id(self): - """Test AddToConferenceAllOf.conference_id""" - self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" - - def test_leave_conference_url(self): - """Test AddToConferenceAllOf.leave_conference_url""" - self.model.leave_conference_url = "TEST_STRING" - assert self.model.get("leave_conference_url") == "TEST_STRING" - - def test_listen(self): - """Test AddToConferenceAllOf.listen""" - self.model.listen = False - assert self.model.get("listen") == False - - def test_notification_url(self): - """Test AddToConferenceAllOf.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - def test_start_conf_on_enter(self): - """Test AddToConferenceAllOf.start_conf_on_enter""" - self.model.start_conf_on_enter = False - assert self.model.get("start_conf_on_enter") == False - - def test_talk(self): - """Test AddToConferenceAllOf.talk""" - self.model.talk = False - assert self.model.get("talk") == False - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_answered_by.py b/test/test_answered_by.py deleted file mode 100644 index d8e47cf..0000000 --- a/test/test_answered_by.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.answered_by import AnsweredBy # noqa: E501 - -class TestAnsweredBy(unittest.TestCase): - """AnsweredBy unit test stubs""" - - - def test_HUMAN_should_serialize_to_enum(self): - expected = AnsweredBy.HUMAN - calculated = AnsweredBy['HUMAN'] - assert expected == calculated - - def test_HUMAN_should_deserialize_to_string(self): - test = AnsweredBy.HUMAN - expected = "human" - calculated = test.value - assert expected == calculated - - def test_MACHINE_should_serialize_to_enum(self): - expected = AnsweredBy.MACHINE - calculated = AnsweredBy['MACHINE'] - assert expected == calculated - - def test_MACHINE_should_deserialize_to_string(self): - test = AnsweredBy.MACHINE - expected = "machine" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_application_list_all_of.py b/test/test_application_list_all_of.py deleted file mode 100644 index cae0030..0000000 --- a/test/test_application_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.application_result import ApplicationResult -globals()['ApplicationResult'] = ApplicationResult - -from freeclimb.model.application_list_all_of import ApplicationListAllOf # noqa: E501 - -class TestApplicationListAllOf(unittest.TestCase): - """ApplicationListAllOf unit test stubs""" - - def setUp(self): - self.model = ApplicationListAllOf( - ) - - def test_applications(self): - """Test ApplicationListAllOf.applications""" - testList = [] - self.model.applications = testList - assert self.model.get("applications") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_application_result_all_of.py b/test/test_application_result_all_of.py deleted file mode 100644 index e24993f..0000000 --- a/test/test_application_result_all_of.py +++ /dev/null @@ -1,75 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.application_result_all_of import ApplicationResultAllOf # noqa: E501 - -class TestApplicationResultAllOf(unittest.TestCase): - """ApplicationResultAllOf unit test stubs""" - - def setUp(self): - self.model = ApplicationResultAllOf( - ) - - def test_account_id(self): - """Test ApplicationResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_application_id(self): - """Test ApplicationResultAllOf.application_id""" - self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" - - def test_alias(self): - """Test ApplicationResultAllOf.alias""" - self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" - - def test_voice_url(self): - """Test ApplicationResultAllOf.voice_url""" - self.model.voice_url = "TEST_STRING" - assert self.model.get("voice_url") == "TEST_STRING" - - def test_voice_fallback_url(self): - """Test ApplicationResultAllOf.voice_fallback_url""" - self.model.voice_fallback_url = "TEST_STRING" - assert self.model.get("voice_fallback_url") == "TEST_STRING" - - def test_call_connect_url(self): - """Test ApplicationResultAllOf.call_connect_url""" - self.model.call_connect_url = "TEST_STRING" - assert self.model.get("call_connect_url") == "TEST_STRING" - - def test_status_callback_url(self): - """Test ApplicationResultAllOf.status_callback_url""" - self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" - - def test_sms_url(self): - """Test ApplicationResultAllOf.sms_url""" - self.model.sms_url = "TEST_STRING" - assert self.model.get("sms_url") == "TEST_STRING" - - def test_sms_fallback_url(self): - """Test ApplicationResultAllOf.sms_fallback_url""" - self.model.sms_fallback_url = "TEST_STRING" - assert self.model.get("sms_fallback_url") == "TEST_STRING" - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_available_number_list_all_of.py b/test/test_available_number_list_all_of.py deleted file mode 100644 index 30a1682..0000000 --- a/test/test_available_number_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.available_number import AvailableNumber -globals()['AvailableNumber'] = AvailableNumber - -from freeclimb.model.available_number_list_all_of import AvailableNumberListAllOf # noqa: E501 - -class TestAvailableNumberListAllOf(unittest.TestCase): - """AvailableNumberListAllOf unit test stubs""" - - def setUp(self): - self.model = AvailableNumberListAllOf( - ) - - def test_available_phone_numbers(self): - """Test AvailableNumberListAllOf.available_phone_numbers""" - testList = [] - self.model.available_phone_numbers = testList - assert self.model.get("available_phone_numbers") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_call_direction.py b/test/test_call_direction.py deleted file mode 100644 index df29864..0000000 --- a/test/test_call_direction.py +++ /dev/null @@ -1,60 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.call_direction import CallDirection # noqa: E501 - -class TestCallDirection(unittest.TestCase): - """CallDirection unit test stubs""" - - - def test_INBOUND_should_serialize_to_enum(self): - expected = CallDirection.INBOUND - calculated = CallDirection['INBOUND'] - assert expected == calculated - - def test_INBOUND_should_deserialize_to_string(self): - test = CallDirection.INBOUND - expected = "inbound" - calculated = test.value - assert expected == calculated - - def test_OUTBOUND_API_should_serialize_to_enum(self): - expected = CallDirection.OUTBOUND_API - calculated = CallDirection['OUTBOUND_API'] - assert expected == calculated - - def test_OUTBOUND_API_should_deserialize_to_string(self): - test = CallDirection.OUTBOUND_API - expected = "outboundAPI" - calculated = test.value - assert expected == calculated - - def test_OUTBOUND_DIAL_should_serialize_to_enum(self): - expected = CallDirection.OUTBOUND_DIAL - calculated = CallDirection['OUTBOUND_DIAL'] - assert expected == calculated - - def test_OUTBOUND_DIAL_should_deserialize_to_string(self): - test = CallDirection.OUTBOUND_DIAL - expected = "outboundDial" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_call_list_all_of.py b/test/test_call_list_all_of.py deleted file mode 100644 index 91c689f..0000000 --- a/test/test_call_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.call_result import CallResult -globals()['CallResult'] = CallResult - -from freeclimb.model.call_list_all_of import CallListAllOf # noqa: E501 - -class TestCallListAllOf(unittest.TestCase): - """CallListAllOf unit test stubs""" - - def setUp(self): - self.model = CallListAllOf( - ) - - def test_calls(self): - """Test CallListAllOf.calls""" - testList = [] - self.model.calls = testList - assert self.model.get("calls") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_call_result_all_of.py b/test/test_call_result_all_of.py deleted file mode 100644 index 60ec0cd..0000000 --- a/test/test_call_result_all_of.py +++ /dev/null @@ -1,132 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.answered_by import AnsweredBy -from freeclimb.model.call_direction import CallDirection -from freeclimb.model.call_status import CallStatus -globals()['AnsweredBy'] = AnsweredBy -globals()['CallDirection'] = CallDirection -globals()['CallStatus'] = CallStatus - -from freeclimb.model.call_result_all_of import CallResultAllOf # noqa: E501 - -class TestCallResultAllOf(unittest.TestCase): - """CallResultAllOf unit test stubs""" - - def setUp(self): - self.model = CallResultAllOf( - ) - - def test_call_id(self): - """Test CallResultAllOf.call_id""" - self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" - - def test_parent_call_id(self): - """Test CallResultAllOf.parent_call_id""" - self.model.parent_call_id = "TEST_STRING" - assert self.model.get("parent_call_id") == "TEST_STRING" - - def test_account_id(self): - """Test CallResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test__from(self): - """Test CallResultAllOf._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" - - def test_to(self): - """Test CallResultAllOf.to""" - self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" - - def test_phone_number_id(self): - """Test CallResultAllOf.phone_number_id""" - self.model.phone_number_id = "TEST_STRING" - assert self.model.get("phone_number_id") == "TEST_STRING" - - def test_call_status(self): - """Test CallResultAllOf.call_status""" - self.model.call_status = CallStatus.QUEUED - assert self.model.get("call_status") == CallStatus.QUEUED - self.model.call_status = CallStatus.RINGING - assert self.model.get("call_status") == CallStatus.RINGING - self.model.call_status = CallStatus.IN_PROGRESS - assert self.model.get("call_status") == CallStatus.IN_PROGRESS - self.model.call_status = CallStatus.CANCELED - assert self.model.get("call_status") == CallStatus.CANCELED - self.model.call_status = CallStatus.COMPLETED - assert self.model.get("call_status") == CallStatus.COMPLETED - self.model.call_status = CallStatus.FAILED - assert self.model.get("call_status") == CallStatus.FAILED - self.model.call_status = CallStatus.BUSY - assert self.model.get("call_status") == CallStatus.BUSY - self.model.call_status = CallStatus.NO_ANSWER - assert self.model.get("call_status") == CallStatus.NO_ANSWER - - def test_start_time(self): - """Test CallResultAllOf.start_time""" - self.model.start_time = "TEST_STRING" - assert self.model.get("start_time") == "TEST_STRING" - - def test_connect_time(self): - """Test CallResultAllOf.connect_time""" - self.model.connect_time = "TEST_STRING" - assert self.model.get("connect_time") == "TEST_STRING" - - def test_end_time(self): - """Test CallResultAllOf.end_time""" - self.model.end_time = "TEST_STRING" - assert self.model.get("end_time") == "TEST_STRING" - - def test_duration(self): - """Test CallResultAllOf.duration""" - self.model.duration = 1 - assert self.model.get("duration") == 1 - - def test_connect_duration(self): - """Test CallResultAllOf.connect_duration""" - self.model.connect_duration = 1 - assert self.model.get("connect_duration") == 1 - - def test_direction(self): - """Test CallResultAllOf.direction""" - self.model.direction = CallDirection.INBOUND - assert self.model.get("direction") == CallDirection.INBOUND - self.model.direction = CallDirection.OUTBOUND_API - assert self.model.get("direction") == CallDirection.OUTBOUND_API - self.model.direction = CallDirection.OUTBOUND_DIAL - assert self.model.get("direction") == CallDirection.OUTBOUND_DIAL - - def test_answered_by(self): - """Test CallResultAllOf.answered_by""" - self.model.answered_by = AnsweredBy.HUMAN - assert self.model.get("answered_by") == AnsweredBy.HUMAN - self.model.answered_by = AnsweredBy.MACHINE - assert self.model.get("answered_by") == AnsweredBy.MACHINE - - def test_subresource_uris(self): - """Test CallResultAllOf.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_call_status.py b/test/test_call_status.py deleted file mode 100644 index 948b33a..0000000 --- a/test/test_call_status.py +++ /dev/null @@ -1,115 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.call_status import CallStatus # noqa: E501 - -class TestCallStatus(unittest.TestCase): - """CallStatus unit test stubs""" - - - def test_QUEUED_should_serialize_to_enum(self): - expected = CallStatus.QUEUED - calculated = CallStatus['QUEUED'] - assert expected == calculated - - def test_QUEUED_should_deserialize_to_string(self): - test = CallStatus.QUEUED - expected = "queued" - calculated = test.value - assert expected == calculated - - def test_RINGING_should_serialize_to_enum(self): - expected = CallStatus.RINGING - calculated = CallStatus['RINGING'] - assert expected == calculated - - def test_RINGING_should_deserialize_to_string(self): - test = CallStatus.RINGING - expected = "ringing" - calculated = test.value - assert expected == calculated - - def test_IN_PROGRESS_should_serialize_to_enum(self): - expected = CallStatus.IN_PROGRESS - calculated = CallStatus['IN_PROGRESS'] - assert expected == calculated - - def test_IN_PROGRESS_should_deserialize_to_string(self): - test = CallStatus.IN_PROGRESS - expected = "inProgress" - calculated = test.value - assert expected == calculated - - def test_CANCELED_should_serialize_to_enum(self): - expected = CallStatus.CANCELED - calculated = CallStatus['CANCELED'] - assert expected == calculated - - def test_CANCELED_should_deserialize_to_string(self): - test = CallStatus.CANCELED - expected = "canceled" - calculated = test.value - assert expected == calculated - - def test_COMPLETED_should_serialize_to_enum(self): - expected = CallStatus.COMPLETED - calculated = CallStatus['COMPLETED'] - assert expected == calculated - - def test_COMPLETED_should_deserialize_to_string(self): - test = CallStatus.COMPLETED - expected = "completed" - calculated = test.value - assert expected == calculated - - def test_FAILED_should_serialize_to_enum(self): - expected = CallStatus.FAILED - calculated = CallStatus['FAILED'] - assert expected == calculated - - def test_FAILED_should_deserialize_to_string(self): - test = CallStatus.FAILED - expected = "failed" - calculated = test.value - assert expected == calculated - - def test_BUSY_should_serialize_to_enum(self): - expected = CallStatus.BUSY - calculated = CallStatus['BUSY'] - assert expected == calculated - - def test_BUSY_should_deserialize_to_string(self): - test = CallStatus.BUSY - expected = "busy" - calculated = test.value - assert expected == calculated - - def test_NO_ANSWER_should_serialize_to_enum(self): - expected = CallStatus.NO_ANSWER - calculated = CallStatus['NO_ANSWER'] - assert expected == calculated - - def test_NO_ANSWER_should_deserialize_to_string(self): - test = CallStatus.NO_ANSWER - expected = "noAnswer" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_conference_list_all_of.py b/test/test_conference_list_all_of.py deleted file mode 100644 index 90df3f9..0000000 --- a/test/test_conference_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.conference_result import ConferenceResult -globals()['ConferenceResult'] = ConferenceResult - -from freeclimb.model.conference_list_all_of import ConferenceListAllOf # noqa: E501 - -class TestConferenceListAllOf(unittest.TestCase): - """ConferenceListAllOf unit test stubs""" - - def setUp(self): - self.model = ConferenceListAllOf( - ) - - def test_conferences(self): - """Test ConferenceListAllOf.conferences""" - testList = [] - self.model.conferences = testList - assert self.model.get("conferences") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_conference_participant_list_all_of.py b/test/test_conference_participant_list_all_of.py deleted file mode 100644 index a9cfe22..0000000 --- a/test/test_conference_participant_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.conference_participant_result import ConferenceParticipantResult -globals()['ConferenceParticipantResult'] = ConferenceParticipantResult - -from freeclimb.model.conference_participant_list_all_of import ConferenceParticipantListAllOf # noqa: E501 - -class TestConferenceParticipantListAllOf(unittest.TestCase): - """ConferenceParticipantListAllOf unit test stubs""" - - def setUp(self): - self.model = ConferenceParticipantListAllOf( - ) - - def test_participants(self): - """Test ConferenceParticipantListAllOf.participants""" - testList = [] - self.model.participants = testList - assert self.model.get("participants") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_conference_participant_result_all_of.py b/test/test_conference_participant_result_all_of.py deleted file mode 100644 index 3db3c95..0000000 --- a/test/test_conference_participant_result_all_of.py +++ /dev/null @@ -1,60 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.conference_participant_result_all_of import ConferenceParticipantResultAllOf # noqa: E501 - -class TestConferenceParticipantResultAllOf(unittest.TestCase): - """ConferenceParticipantResultAllOf unit test stubs""" - - def setUp(self): - self.model = ConferenceParticipantResultAllOf( - ) - - def test_account_id(self): - """Test ConferenceParticipantResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_conference_id(self): - """Test ConferenceParticipantResultAllOf.conference_id""" - self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" - - def test_call_id(self): - """Test ConferenceParticipantResultAllOf.call_id""" - self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" - - def test_talk(self): - """Test ConferenceParticipantResultAllOf.talk""" - self.model.talk = False - assert self.model.get("talk") == False - - def test_listen(self): - """Test ConferenceParticipantResultAllOf.listen""" - self.model.listen = False - assert self.model.get("listen") == False - - def test_start_conf_on_enter(self): - """Test ConferenceParticipantResultAllOf.start_conf_on_enter""" - self.model.start_conf_on_enter = False - assert self.model.get("start_conf_on_enter") == False - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_conference_result_all_of.py b/test/test_conference_result_all_of.py deleted file mode 100644 index 07864ec..0000000 --- a/test/test_conference_result_all_of.py +++ /dev/null @@ -1,97 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.conference_status import ConferenceStatus -from freeclimb.model.play_beep import PlayBeep -globals()['ConferenceStatus'] = ConferenceStatus -globals()['PlayBeep'] = PlayBeep - -from freeclimb.model.conference_result_all_of import ConferenceResultAllOf # noqa: E501 - -class TestConferenceResultAllOf(unittest.TestCase): - """ConferenceResultAllOf unit test stubs""" - - def setUp(self): - self.model = ConferenceResultAllOf( - ) - - def test_conference_id(self): - """Test ConferenceResultAllOf.conference_id""" - self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" - - def test_account_id(self): - """Test ConferenceResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_alias(self): - """Test ConferenceResultAllOf.alias""" - self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" - - def test_play_beep(self): - """Test ConferenceResultAllOf.play_beep""" - self.model.play_beep = PlayBeep.ALWAYS - assert self.model.get("play_beep") == PlayBeep.ALWAYS - self.model.play_beep = PlayBeep.NEVER - assert self.model.get("play_beep") == PlayBeep.NEVER - self.model.play_beep = PlayBeep.ENTRY_ONLY - assert self.model.get("play_beep") == PlayBeep.ENTRY_ONLY - self.model.play_beep = PlayBeep.EXIT_ONLY - assert self.model.get("play_beep") == PlayBeep.EXIT_ONLY - - def test_record(self): - """Test ConferenceResultAllOf.record""" - self.model.record = False - assert self.model.get("record") == False - - def test_status(self): - """Test ConferenceResultAllOf.status""" - self.model.status = ConferenceStatus.EMPTY - assert self.model.get("status") == ConferenceStatus.EMPTY - self.model.status = ConferenceStatus.POPULATED - assert self.model.get("status") == ConferenceStatus.POPULATED - self.model.status = ConferenceStatus.IN_PROGRESS - assert self.model.get("status") == ConferenceStatus.IN_PROGRESS - self.model.status = ConferenceStatus.TERMINATED - assert self.model.get("status") == ConferenceStatus.TERMINATED - - def test_wait_url(self): - """Test ConferenceResultAllOf.wait_url""" - self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" - - def test_action_url(self): - """Test ConferenceResultAllOf.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_status_callback_url(self): - """Test ConferenceResultAllOf.status_callback_url""" - self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" - - def test_subresource_uris(self): - """Test ConferenceResultAllOf.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_conference_status.py b/test/test_conference_status.py deleted file mode 100644 index ed0abf0..0000000 --- a/test/test_conference_status.py +++ /dev/null @@ -1,71 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.conference_status import ConferenceStatus # noqa: E501 - -class TestConferenceStatus(unittest.TestCase): - """ConferenceStatus unit test stubs""" - - - def test_EMPTY_should_serialize_to_enum(self): - expected = ConferenceStatus.EMPTY - calculated = ConferenceStatus['EMPTY'] - assert expected == calculated - - def test_EMPTY_should_deserialize_to_string(self): - test = ConferenceStatus.EMPTY - expected = "empty" - calculated = test.value - assert expected == calculated - - def test_POPULATED_should_serialize_to_enum(self): - expected = ConferenceStatus.POPULATED - calculated = ConferenceStatus['POPULATED'] - assert expected == calculated - - def test_POPULATED_should_deserialize_to_string(self): - test = ConferenceStatus.POPULATED - expected = "populated" - calculated = test.value - assert expected == calculated - - def test_IN_PROGRESS_should_serialize_to_enum(self): - expected = ConferenceStatus.IN_PROGRESS - calculated = ConferenceStatus['IN_PROGRESS'] - assert expected == calculated - - def test_IN_PROGRESS_should_deserialize_to_string(self): - test = ConferenceStatus.IN_PROGRESS - expected = "inProgress" - calculated = test.value - assert expected == calculated - - def test_TERMINATED_should_serialize_to_enum(self): - expected = ConferenceStatus.TERMINATED - calculated = ConferenceStatus['TERMINATED'] - assert expected == calculated - - def test_TERMINATED_should_deserialize_to_string(self): - test = ConferenceStatus.TERMINATED - expected = "terminated" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_create_conference.py b/test/test_create_conference.py deleted file mode 100644 index e8911a6..0000000 --- a/test/test_create_conference.py +++ /dev/null @@ -1,126 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.create_conference_all_of import CreateConferenceAllOf -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_beep import PlayBeep -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['CreateConferenceAllOf'] = CreateConferenceAllOf -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayBeep'] = PlayBeep -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.create_conference import CreateConference # noqa: E501 - -class TestCreateConference(unittest.TestCase): - """CreateConference unit test stubs""" - - def setUp(self): - self.model = CreateConference( - action_url="", - ) - - def test_action_url(self): - """Test CreateConference.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_alias(self): - """Test CreateConference.alias""" - self.model.alias = False - assert self.model.get("alias") == False - - def test_play_beep(self): - """Test CreateConference.play_beep""" - self.model.play_beep = PlayBeep.ALWAYS - assert self.model.get("play_beep") == PlayBeep.ALWAYS - self.model.play_beep = PlayBeep.NEVER - assert self.model.get("play_beep") == PlayBeep.NEVER - self.model.play_beep = PlayBeep.ENTRY_ONLY - assert self.model.get("play_beep") == PlayBeep.ENTRY_ONLY - self.model.play_beep = PlayBeep.EXIT_ONLY - assert self.model.get("play_beep") == PlayBeep.EXIT_ONLY - - def test_record(self): - """Test CreateConference.record""" - self.model.record = False - assert self.model.get("record") == False - - def test_status_callback_url(self): - """Test CreateConference.status_callback_url""" - self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" - - def test_wait_url(self): - """Test CreateConference.wait_url""" - self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "CreateConference" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_dequeue.py b/test/test_dequeue.py deleted file mode 100644 index aee4a8a..0000000 --- a/test/test_dequeue.py +++ /dev/null @@ -1,85 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.dequeue import Dequeue # noqa: E501 - -class TestDequeue(unittest.TestCase): - """Dequeue unit test stubs""" - - def setUp(self): - self.model = Dequeue( - ) - - - def test_command_test(self): - assert self.model.command == "Dequeue" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_enqueue.py b/test/test_enqueue.py deleted file mode 100644 index bbb8e43..0000000 --- a/test/test_enqueue.py +++ /dev/null @@ -1,110 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.enqueue_all_of import EnqueueAllOf -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['EnqueueAllOf'] = EnqueueAllOf -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.enqueue import Enqueue # noqa: E501 - -class TestEnqueue(unittest.TestCase): - """Enqueue unit test stubs""" - - def setUp(self): - self.model = Enqueue( - action_url="", - queue_id="", - wait_url="", - ) - - def test_action_url(self): - """Test Enqueue.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_notification_url(self): - """Test Enqueue.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - def test_queue_id(self): - """Test Enqueue.queue_id""" - self.model.queue_id = "TEST_STRING" - assert self.model.get("queue_id") == "TEST_STRING" - - def test_wait_url(self): - """Test Enqueue.wait_url""" - self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "Enqueue" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_get_digits.py b/test/test_get_digits.py deleted file mode 100644 index ba6d297..0000000 --- a/test/test_get_digits.py +++ /dev/null @@ -1,134 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_digits_all_of import GetDigitsAllOf -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetDigitsAllOf'] = GetDigitsAllOf -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.get_digits import GetDigits # noqa: E501 - -class TestGetDigits(unittest.TestCase): - """GetDigits unit test stubs""" - - def setUp(self): - self.model = GetDigits( - action_url="", - ) - - def test_action_url(self): - """Test GetDigits.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_digit_timeout_ms(self): - """Test GetDigits.digit_timeout_ms""" - self.model.digit_timeout_ms = 1 - assert self.model.get("digit_timeout_ms") == 1 - - def test_finish_on_key(self): - """Test GetDigits.finish_on_key""" - self.model.finish_on_key = "TEST_STRING" - assert self.model.get("finish_on_key") == "TEST_STRING" - - def test_flush_buffer(self): - """Test GetDigits.flush_buffer""" - self.model.flush_buffer = False - assert self.model.get("flush_buffer") == False - - def test_initial_timeout_ms(self): - """Test GetDigits.initial_timeout_ms""" - self.model.initial_timeout_ms = 1 - assert self.model.get("initial_timeout_ms") == 1 - - def test_max_digits(self): - """Test GetDigits.max_digits""" - self.model.max_digits = 1 - assert self.model.get("max_digits") == 1 - - def test_min_digits(self): - """Test GetDigits.min_digits""" - self.model.min_digits = 1 - assert self.model.get("min_digits") == 1 - - def test_prompts(self): - """Test GetDigits.prompts""" - testList = [] - self.model.prompts = testList - assert self.model.get("prompts") == testList - - def test_privacy_mode(self): - """Test GetDigits.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "GetDigits" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_get_speech.py b/test/test_get_speech.py deleted file mode 100644 index 4aab18e..0000000 --- a/test/test_get_speech.py +++ /dev/null @@ -1,165 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.get_speech_all_of import GetSpeechAllOf -from freeclimb.model.grammar_type import GrammarType -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['GetSpeechAllOf'] = GetSpeechAllOf -globals()['GrammarType'] = GrammarType -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.get_speech import GetSpeech # noqa: E501 - -class TestGetSpeech(unittest.TestCase): - """GetSpeech unit test stubs""" - - def setUp(self): - self.model = GetSpeech( - action_url="", - grammar_file="", - ) - - def test_action_url(self): - """Test GetSpeech.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_grammar_type(self): - """Test GetSpeech.grammar_type""" - self.model.grammar_type = GrammarType.URL - assert self.model.get("grammar_type") == GrammarType.URL - self.model.grammar_type = GrammarType.BUILT_IN - assert self.model.get("grammar_type") == GrammarType.BUILT_IN - - def test_grammar_file(self): - """Test GetSpeech.grammar_file""" - self.model.grammar_file = "TEST_STRING" - assert self.model.get("grammar_file") == "TEST_STRING" - - def test_grammar_rule(self): - """Test GetSpeech.grammar_rule""" - self.model.grammar_rule = "TEST_STRING" - assert self.model.get("grammar_rule") == "TEST_STRING" - - def test_play_beep(self): - """Test GetSpeech.play_beep""" - self.model.play_beep = False - assert self.model.get("play_beep") == False - - def test_prompts(self): - """Test GetSpeech.prompts""" - testList = [] - self.model.prompts = testList - assert self.model.get("prompts") == testList - - def test_no_input_timeout_ms(self): - """Test GetSpeech.no_input_timeout_ms""" - self.model.no_input_timeout_ms = 1 - assert self.model.get("no_input_timeout_ms") == 1 - - def test_recognition_timeout_ms(self): - """Test GetSpeech.recognition_timeout_ms""" - self.model.recognition_timeout_ms = 1 - assert self.model.get("recognition_timeout_ms") == 1 - - def test_confidence_threshold(self): - """Test GetSpeech.confidence_threshold""" - - - self.model.confidence_threshold = float(1) - assert self.model.get("confidence_threshold") == float(1) - - - def test_sensitivity_level(self): - """Test GetSpeech.sensitivity_level""" - - - self.model.sensitivity_level = float(1) - assert self.model.get("sensitivity_level") == float(1) - - - def test_speech_complete_timeout_ms(self): - """Test GetSpeech.speech_complete_timeout_ms""" - self.model.speech_complete_timeout_ms = 1 - assert self.model.get("speech_complete_timeout_ms") == 1 - - def test_speech_incomplete_timeout_ms(self): - """Test GetSpeech.speech_incomplete_timeout_ms""" - self.model.speech_incomplete_timeout_ms = 1 - assert self.model.get("speech_incomplete_timeout_ms") == 1 - - def test_privacy_mode(self): - """Test GetSpeech.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "GetSpeech" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_get_speech_all_of.py b/test/test_get_speech_all_of.py deleted file mode 100644 index 967d336..0000000 --- a/test/test_get_speech_all_of.py +++ /dev/null @@ -1,110 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.grammar_type import GrammarType -from freeclimb.model.percl_command import PerclCommand -globals()['GrammarType'] = GrammarType -globals()['PerclCommand'] = PerclCommand - -from freeclimb.model.get_speech_all_of import GetSpeechAllOf # noqa: E501 - -class TestGetSpeechAllOf(unittest.TestCase): - """GetSpeechAllOf unit test stubs""" - - def setUp(self): - self.model = GetSpeechAllOf( - action_url="", - grammar_file="", - ) - - def test_action_url(self): - """Test GetSpeechAllOf.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_grammar_type(self): - """Test GetSpeechAllOf.grammar_type""" - self.model.grammar_type = GrammarType.URL - assert self.model.get("grammar_type") == GrammarType.URL - self.model.grammar_type = GrammarType.BUILT_IN - assert self.model.get("grammar_type") == GrammarType.BUILT_IN - - def test_grammar_file(self): - """Test GetSpeechAllOf.grammar_file""" - self.model.grammar_file = "TEST_STRING" - assert self.model.get("grammar_file") == "TEST_STRING" - - def test_grammar_rule(self): - """Test GetSpeechAllOf.grammar_rule""" - self.model.grammar_rule = "TEST_STRING" - assert self.model.get("grammar_rule") == "TEST_STRING" - - def test_play_beep(self): - """Test GetSpeechAllOf.play_beep""" - self.model.play_beep = False - assert self.model.get("play_beep") == False - - def test_prompts(self): - """Test GetSpeechAllOf.prompts""" - testList = [] - self.model.prompts = testList - assert self.model.get("prompts") == testList - - def test_no_input_timeout_ms(self): - """Test GetSpeechAllOf.no_input_timeout_ms""" - self.model.no_input_timeout_ms = 1 - assert self.model.get("no_input_timeout_ms") == 1 - - def test_recognition_timeout_ms(self): - """Test GetSpeechAllOf.recognition_timeout_ms""" - self.model.recognition_timeout_ms = 1 - assert self.model.get("recognition_timeout_ms") == 1 - - def test_confidence_threshold(self): - """Test GetSpeechAllOf.confidence_threshold""" - - - self.model.confidence_threshold = float(1) - assert self.model.get("confidence_threshold") == float(1) - - - def test_sensitivity_level(self): - """Test GetSpeechAllOf.sensitivity_level""" - - - self.model.sensitivity_level = float(1) - assert self.model.get("sensitivity_level") == float(1) - - - def test_speech_complete_timeout_ms(self): - """Test GetSpeechAllOf.speech_complete_timeout_ms""" - self.model.speech_complete_timeout_ms = 1 - assert self.model.get("speech_complete_timeout_ms") == 1 - - def test_speech_incomplete_timeout_ms(self): - """Test GetSpeechAllOf.speech_incomplete_timeout_ms""" - self.model.speech_incomplete_timeout_ms = 1 - assert self.model.get("speech_incomplete_timeout_ms") == 1 - - def test_privacy_mode(self): - """Test GetSpeechAllOf.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_get_speech_reason.py b/test/test_get_speech_reason.py deleted file mode 100644 index 85a4532..0000000 --- a/test/test_get_speech_reason.py +++ /dev/null @@ -1,93 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.get_speech_reason import GetSpeechReason # noqa: E501 - -class TestGetSpeechReason(unittest.TestCase): - """GetSpeechReason unit test stubs""" - - - def test_ERROR_should_serialize_to_enum(self): - expected = GetSpeechReason.ERROR - calculated = GetSpeechReason['ERROR'] - assert expected == calculated - - def test_ERROR_should_deserialize_to_string(self): - test = GetSpeechReason.ERROR - expected = "error" - calculated = test.value - assert expected == calculated - - def test_HANGUP_should_serialize_to_enum(self): - expected = GetSpeechReason.HANGUP - calculated = GetSpeechReason['HANGUP'] - assert expected == calculated - - def test_HANGUP_should_deserialize_to_string(self): - test = GetSpeechReason.HANGUP - expected = "hangup" - calculated = test.value - assert expected == calculated - - def test_DIGIT_should_serialize_to_enum(self): - expected = GetSpeechReason.DIGIT - calculated = GetSpeechReason['DIGIT'] - assert expected == calculated - - def test_DIGIT_should_deserialize_to_string(self): - test = GetSpeechReason.DIGIT - expected = "digit" - calculated = test.value - assert expected == calculated - - def test_NO_INPUT_should_serialize_to_enum(self): - expected = GetSpeechReason.NO_INPUT - calculated = GetSpeechReason['NO_INPUT'] - assert expected == calculated - - def test_NO_INPUT_should_deserialize_to_string(self): - test = GetSpeechReason.NO_INPUT - expected = "noInput" - calculated = test.value - assert expected == calculated - - def test_NO_MATCH_should_serialize_to_enum(self): - expected = GetSpeechReason.NO_MATCH - calculated = GetSpeechReason['NO_MATCH'] - assert expected == calculated - - def test_NO_MATCH_should_deserialize_to_string(self): - test = GetSpeechReason.NO_MATCH - expected = "noMatch" - calculated = test.value - assert expected == calculated - - def test_RECOGNITION_should_serialize_to_enum(self): - expected = GetSpeechReason.RECOGNITION - calculated = GetSpeechReason['RECOGNITION'] - assert expected == calculated - - def test_RECOGNITION_should_deserialize_to_string(self): - test = GetSpeechReason.RECOGNITION - expected = "recognition" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_grammar_file_built_in.py b/test/test_grammar_file_built_in.py deleted file mode 100644 index 9b7deb7..0000000 --- a/test/test_grammar_file_built_in.py +++ /dev/null @@ -1,192 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.grammar_file_built_in import GrammarFileBuiltIn # noqa: E501 - -class TestGrammarFileBuiltIn(unittest.TestCase): - """GrammarFileBuiltIn unit test stubs""" - - - def test_ALPHNUM6_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.ALPHNUM6 - calculated = GrammarFileBuiltIn['ALPHNUM6'] - assert expected == calculated - - def test_ALPHNUM6_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.ALPHNUM6 - expected = "ALPHNUM6" - calculated = test.value - assert expected == calculated - - def test_ANY_DIG_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.ANY_DIG - calculated = GrammarFileBuiltIn['ANY_DIG'] - assert expected == calculated - - def test_ANY_DIG_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.ANY_DIG - expected = "ANY_DIG" - calculated = test.value - assert expected == calculated - - def test_DIG1_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG1 - calculated = GrammarFileBuiltIn['DIG1'] - assert expected == calculated - - def test_DIG1_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG1 - expected = "DIG1" - calculated = test.value - assert expected == calculated - - def test_DIG2_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG2 - calculated = GrammarFileBuiltIn['DIG2'] - assert expected == calculated - - def test_DIG2_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG2 - expected = "DIG2" - calculated = test.value - assert expected == calculated - - def test_DIG3_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG3 - calculated = GrammarFileBuiltIn['DIG3'] - assert expected == calculated - - def test_DIG3_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG3 - expected = "DIG3" - calculated = test.value - assert expected == calculated - - def test_DIG4_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG4 - calculated = GrammarFileBuiltIn['DIG4'] - assert expected == calculated - - def test_DIG4_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG4 - expected = "DIG4" - calculated = test.value - assert expected == calculated - - def test_DIG5_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG5 - calculated = GrammarFileBuiltIn['DIG5'] - assert expected == calculated - - def test_DIG5_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG5 - expected = "DIG5" - calculated = test.value - assert expected == calculated - - def test_DIG6_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG6 - calculated = GrammarFileBuiltIn['DIG6'] - assert expected == calculated - - def test_DIG6_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG6 - expected = "DIG6" - calculated = test.value - assert expected == calculated - - def test_DIG7_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG7 - calculated = GrammarFileBuiltIn['DIG7'] - assert expected == calculated - - def test_DIG7_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG7 - expected = "DIG7" - calculated = test.value - assert expected == calculated - - def test_DIG8_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG8 - calculated = GrammarFileBuiltIn['DIG8'] - assert expected == calculated - - def test_DIG8_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG8 - expected = "DIG8" - calculated = test.value - assert expected == calculated - - def test_DIG9_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG9 - calculated = GrammarFileBuiltIn['DIG9'] - assert expected == calculated - - def test_DIG9_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG9 - expected = "DIG9" - calculated = test.value - assert expected == calculated - - def test_DIG10_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG10 - calculated = GrammarFileBuiltIn['DIG10'] - assert expected == calculated - - def test_DIG10_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG10 - expected = "DIG10" - calculated = test.value - assert expected == calculated - - def test_DIG11_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.DIG11 - calculated = GrammarFileBuiltIn['DIG11'] - assert expected == calculated - - def test_DIG11_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.DIG11 - expected = "DIG11" - calculated = test.value - assert expected == calculated - - def test_UP_TO_20_DIGIT_SEQUENCE_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.UP_TO_20_DIGIT_SEQUENCE - calculated = GrammarFileBuiltIn['UP_TO_20_DIGIT_SEQUENCE'] - assert expected == calculated - - def test_UP_TO_20_DIGIT_SEQUENCE_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.UP_TO_20_DIGIT_SEQUENCE - expected = "UP_TO_20_DIGIT_SEQUENCE" - calculated = test.value - assert expected == calculated - - def test_VERSAY_YESNO_should_serialize_to_enum(self): - expected = GrammarFileBuiltIn.VERSAY_YESNO - calculated = GrammarFileBuiltIn['VERSAY_YESNO'] - assert expected == calculated - - def test_VERSAY_YESNO_should_deserialize_to_string(self): - test = GrammarFileBuiltIn.VERSAY_YESNO - expected = "VERSAY_YESNO" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_grammar_type.py b/test/test_grammar_type.py deleted file mode 100644 index 2595b63..0000000 --- a/test/test_grammar_type.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.grammar_type import GrammarType # noqa: E501 - -class TestGrammarType(unittest.TestCase): - """GrammarType unit test stubs""" - - - def test_URL_should_serialize_to_enum(self): - expected = GrammarType.URL - calculated = GrammarType['URL'] - assert expected == calculated - - def test_URL_should_deserialize_to_string(self): - test = GrammarType.URL - expected = "URL" - calculated = test.value - assert expected == calculated - - def test_BUILT_IN_should_serialize_to_enum(self): - expected = GrammarType.BUILT_IN - calculated = GrammarType['BUILT_IN'] - assert expected == calculated - - def test_BUILT_IN_should_deserialize_to_string(self): - test = GrammarType.BUILT_IN - expected = "BUILTIN" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_hangup.py b/test/test_hangup.py deleted file mode 100644 index 8754858..0000000 --- a/test/test_hangup.py +++ /dev/null @@ -1,92 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.hangup_all_of import HangupAllOf -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['HangupAllOf'] = HangupAllOf -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.hangup import Hangup # noqa: E501 - -class TestHangup(unittest.TestCase): - """Hangup unit test stubs""" - - def setUp(self): - self.model = Hangup( - ) - - def test_reason(self): - """Test Hangup.reason""" - self.model.reason = "TEST_STRING" - assert self.model.get("reason") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "Hangup" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_if_machine.py b/test/test_if_machine.py deleted file mode 100644 index c5ed4ab..0000000 --- a/test/test_if_machine.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.if_machine import IfMachine # noqa: E501 - -class TestIfMachine(unittest.TestCase): - """IfMachine unit test stubs""" - - - def test_REDIRECT_should_serialize_to_enum(self): - expected = IfMachine.REDIRECT - calculated = IfMachine['REDIRECT'] - assert expected == calculated - - def test_REDIRECT_should_deserialize_to_string(self): - test = IfMachine.REDIRECT - expected = "redirect" - calculated = test.value - assert expected == calculated - - def test_HANGUP_should_serialize_to_enum(self): - expected = IfMachine.HANGUP - calculated = IfMachine['HANGUP'] - assert expected == calculated - - def test_HANGUP_should_deserialize_to_string(self): - test = IfMachine.HANGUP - expected = "hangup" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_incoming_number_list_all_of.py b/test/test_incoming_number_list_all_of.py deleted file mode 100644 index a592cf3..0000000 --- a/test/test_incoming_number_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.incoming_number_result import IncomingNumberResult -globals()['IncomingNumberResult'] = IncomingNumberResult - -from freeclimb.model.incoming_number_list_all_of import IncomingNumberListAllOf # noqa: E501 - -class TestIncomingNumberListAllOf(unittest.TestCase): - """IncomingNumberListAllOf unit test stubs""" - - def setUp(self): - self.model = IncomingNumberListAllOf( - ) - - def test_incoming_phone_numbers(self): - """Test IncomingNumberListAllOf.incoming_phone_numbers""" - testList = [] - self.model.incoming_phone_numbers = testList - assert self.model.get("incoming_phone_numbers") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_incoming_number_result_all_of.py b/test/test_incoming_number_result_all_of.py deleted file mode 100644 index 2a258ff..0000000 --- a/test/test_incoming_number_result_all_of.py +++ /dev/null @@ -1,109 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.capabilities import Capabilities -from freeclimb.model.tfn import TFN -globals()['Capabilities'] = Capabilities -globals()['TFN'] = TFN - -from freeclimb.model.incoming_number_result_all_of import IncomingNumberResultAllOf # noqa: E501 - -class TestIncomingNumberResultAllOf(unittest.TestCase): - """IncomingNumberResultAllOf unit test stubs""" - - def setUp(self): - self.model = IncomingNumberResultAllOf( - ) - - def test_capabilities(self): - """Test IncomingNumberResultAllOf.capabilities""" - object = Capabilities( - voice=True, - sms=True, - toll_free=True, - ten_dlc=True, - short_code=True, - ) - self.model.capabilities = object - assert self.model.get("capabilities", object) - - def test_campaign_id(self): - """Test IncomingNumberResultAllOf.campaign_id""" - self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" - - def test_phone_number_id(self): - """Test IncomingNumberResultAllOf.phone_number_id""" - self.model.phone_number_id = "TEST_STRING" - assert self.model.get("phone_number_id") == "TEST_STRING" - - def test_account_id(self): - """Test IncomingNumberResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_application_id(self): - """Test IncomingNumberResultAllOf.application_id""" - self.model.application_id = "TEST_STRING" - assert self.model.get("application_id") == "TEST_STRING" - - def test_phone_number(self): - """Test IncomingNumberResultAllOf.phone_number""" - self.model.phone_number = "TEST_STRING" - assert self.model.get("phone_number") == "TEST_STRING" - - def test_alias(self): - """Test IncomingNumberResultAllOf.alias""" - self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" - - def test_region(self): - """Test IncomingNumberResultAllOf.region""" - self.model.region = "TEST_STRING" - assert self.model.get("region") == "TEST_STRING" - - def test_country(self): - """Test IncomingNumberResultAllOf.country""" - self.model.country = "TEST_STRING" - assert self.model.get("country") == "TEST_STRING" - - def test_voice_enabled(self): - """Test IncomingNumberResultAllOf.voice_enabled""" - self.model.voice_enabled = False - assert self.model.get("voice_enabled") == False - - def test_sms_enabled(self): - """Test IncomingNumberResultAllOf.sms_enabled""" - self.model.sms_enabled = False - assert self.model.get("sms_enabled") == False - - def test_offnet(self): - """Test IncomingNumberResultAllOf.offnet""" - self.model.offnet = False - assert self.model.get("offnet") == False - - def test_tfn(self): - """Test IncomingNumberResultAllOf.tfn""" - object = TFN( - campaign_id="campaign_id_example", - ) - self.model.tfn = object - assert self.model.get("tfn", object) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_language.py b/test/test_language.py deleted file mode 100644 index 2f115a9..0000000 --- a/test/test_language.py +++ /dev/null @@ -1,313 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.language import Language # noqa: E501 - -class TestLanguage(unittest.TestCase): - """Language unit test stubs""" - - - def test_CATALAN_should_serialize_to_enum(self): - expected = Language.CATALAN - calculated = Language['CATALAN'] - assert expected == calculated - - def test_CATALAN_should_deserialize_to_string(self): - test = Language.CATALAN - expected = "ca-ES" - calculated = test.value - assert expected == calculated - - def test_DANISH_should_serialize_to_enum(self): - expected = Language.DANISH - calculated = Language['DANISH'] - assert expected == calculated - - def test_DANISH_should_deserialize_to_string(self): - test = Language.DANISH - expected = "da-DK" - calculated = test.value - assert expected == calculated - - def test_GERMAN_should_serialize_to_enum(self): - expected = Language.GERMAN - calculated = Language['GERMAN'] - assert expected == calculated - - def test_GERMAN_should_deserialize_to_string(self): - test = Language.GERMAN - expected = "de-DE" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_AU_should_serialize_to_enum(self): - expected = Language.ENGLISH_AU - calculated = Language['ENGLISH_AU'] - assert expected == calculated - - def test_ENGLISH_AU_should_deserialize_to_string(self): - test = Language.ENGLISH_AU - expected = "en-AU" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_CA_should_serialize_to_enum(self): - expected = Language.ENGLISH_CA - calculated = Language['ENGLISH_CA'] - assert expected == calculated - - def test_ENGLISH_CA_should_deserialize_to_string(self): - test = Language.ENGLISH_CA - expected = "en-CA" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_UK_should_serialize_to_enum(self): - expected = Language.ENGLISH_UK - calculated = Language['ENGLISH_UK'] - assert expected == calculated - - def test_ENGLISH_UK_should_deserialize_to_string(self): - test = Language.ENGLISH_UK - expected = "en-GB" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_IN_should_serialize_to_enum(self): - expected = Language.ENGLISH_IN - calculated = Language['ENGLISH_IN'] - assert expected == calculated - - def test_ENGLISH_IN_should_deserialize_to_string(self): - test = Language.ENGLISH_IN - expected = "en-IN" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_US_should_serialize_to_enum(self): - expected = Language.ENGLISH_US - calculated = Language['ENGLISH_US'] - assert expected == calculated - - def test_ENGLISH_US_should_deserialize_to_string(self): - test = Language.ENGLISH_US - expected = "en-US" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_ES_should_serialize_to_enum(self): - expected = Language.ENGLISH_ES - calculated = Language['ENGLISH_ES'] - assert expected == calculated - - def test_ENGLISH_ES_should_deserialize_to_string(self): - test = Language.ENGLISH_ES - expected = "es-ES" - calculated = test.value - assert expected == calculated - - def test_ENGLISH_MX_should_serialize_to_enum(self): - expected = Language.ENGLISH_MX - calculated = Language['ENGLISH_MX'] - assert expected == calculated - - def test_ENGLISH_MX_should_deserialize_to_string(self): - test = Language.ENGLISH_MX - expected = "es-MX" - calculated = test.value - assert expected == calculated - - def test_FINNISH_should_serialize_to_enum(self): - expected = Language.FINNISH - calculated = Language['FINNISH'] - assert expected == calculated - - def test_FINNISH_should_deserialize_to_string(self): - test = Language.FINNISH - expected = "fi-FI" - calculated = test.value - assert expected == calculated - - def test_FRENCH_CA_should_serialize_to_enum(self): - expected = Language.FRENCH_CA - calculated = Language['FRENCH_CA'] - assert expected == calculated - - def test_FRENCH_CA_should_deserialize_to_string(self): - test = Language.FRENCH_CA - expected = "fr-CA" - calculated = test.value - assert expected == calculated - - def test_FRENCH_FR_should_serialize_to_enum(self): - expected = Language.FRENCH_FR - calculated = Language['FRENCH_FR'] - assert expected == calculated - - def test_FRENCH_FR_should_deserialize_to_string(self): - test = Language.FRENCH_FR - expected = "fr-FR" - calculated = test.value - assert expected == calculated - - def test_ITALIAN_should_serialize_to_enum(self): - expected = Language.ITALIAN - calculated = Language['ITALIAN'] - assert expected == calculated - - def test_ITALIAN_should_deserialize_to_string(self): - test = Language.ITALIAN - expected = "it-IT" - calculated = test.value - assert expected == calculated - - def test_JAPANESE_should_serialize_to_enum(self): - expected = Language.JAPANESE - calculated = Language['JAPANESE'] - assert expected == calculated - - def test_JAPANESE_should_deserialize_to_string(self): - test = Language.JAPANESE - expected = "ja-JP" - calculated = test.value - assert expected == calculated - - def test_KOREAN_should_serialize_to_enum(self): - expected = Language.KOREAN - calculated = Language['KOREAN'] - assert expected == calculated - - def test_KOREAN_should_deserialize_to_string(self): - test = Language.KOREAN - expected = "ko-KR" - calculated = test.value - assert expected == calculated - - def test_NORWEGIAN_should_serialize_to_enum(self): - expected = Language.NORWEGIAN - calculated = Language['NORWEGIAN'] - assert expected == calculated - - def test_NORWEGIAN_should_deserialize_to_string(self): - test = Language.NORWEGIAN - expected = "nb-NO" - calculated = test.value - assert expected == calculated - - def test_DUTCH_should_serialize_to_enum(self): - expected = Language.DUTCH - calculated = Language['DUTCH'] - assert expected == calculated - - def test_DUTCH_should_deserialize_to_string(self): - test = Language.DUTCH - expected = "nl-NL" - calculated = test.value - assert expected == calculated - - def test_POLISH_should_serialize_to_enum(self): - expected = Language.POLISH - calculated = Language['POLISH'] - assert expected == calculated - - def test_POLISH_should_deserialize_to_string(self): - test = Language.POLISH - expected = "pl-PL" - calculated = test.value - assert expected == calculated - - def test_PORTUGESE_BR_should_serialize_to_enum(self): - expected = Language.PORTUGESE_BR - calculated = Language['PORTUGESE_BR'] - assert expected == calculated - - def test_PORTUGESE_BR_should_deserialize_to_string(self): - test = Language.PORTUGESE_BR - expected = "pt-BR" - calculated = test.value - assert expected == calculated - - def test_PORTUGESE_PT_should_serialize_to_enum(self): - expected = Language.PORTUGESE_PT - calculated = Language['PORTUGESE_PT'] - assert expected == calculated - - def test_PORTUGESE_PT_should_deserialize_to_string(self): - test = Language.PORTUGESE_PT - expected = "pt-PT" - calculated = test.value - assert expected == calculated - - def test_RUSSIAN_should_serialize_to_enum(self): - expected = Language.RUSSIAN - calculated = Language['RUSSIAN'] - assert expected == calculated - - def test_RUSSIAN_should_deserialize_to_string(self): - test = Language.RUSSIAN - expected = "ru-RU" - calculated = test.value - assert expected == calculated - - def test_SWEDISH_should_serialize_to_enum(self): - expected = Language.SWEDISH - calculated = Language['SWEDISH'] - assert expected == calculated - - def test_SWEDISH_should_deserialize_to_string(self): - test = Language.SWEDISH - expected = "sv-SE" - calculated = test.value - assert expected == calculated - - def test_CHINESE_CN_should_serialize_to_enum(self): - expected = Language.CHINESE_CN - calculated = Language['CHINESE_CN'] - assert expected == calculated - - def test_CHINESE_CN_should_deserialize_to_string(self): - test = Language.CHINESE_CN - expected = "zh-CN" - calculated = test.value - assert expected == calculated - - def test_CHINESE_HK_should_serialize_to_enum(self): - expected = Language.CHINESE_HK - calculated = Language['CHINESE_HK'] - assert expected == calculated - - def test_CHINESE_HK_should_deserialize_to_string(self): - test = Language.CHINESE_HK - expected = "zh-HK" - calculated = test.value - assert expected == calculated - - def test_CHINESE_TW_should_serialize_to_enum(self): - expected = Language.CHINESE_TW - calculated = Language['CHINESE_TW'] - assert expected == calculated - - def test_CHINESE_TW_should_deserialize_to_string(self): - test = Language.CHINESE_TW - expected = "zh-TW" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_log_level.py b/test/test_log_level.py deleted file mode 100644 index c104bd1..0000000 --- a/test/test_log_level.py +++ /dev/null @@ -1,60 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.log_level import LogLevel # noqa: E501 - -class TestLogLevel(unittest.TestCase): - """LogLevel unit test stubs""" - - - def test_INFO_should_serialize_to_enum(self): - expected = LogLevel.INFO - calculated = LogLevel['INFO'] - assert expected == calculated - - def test_INFO_should_deserialize_to_string(self): - test = LogLevel.INFO - expected = "info" - calculated = test.value - assert expected == calculated - - def test_WARNING_should_serialize_to_enum(self): - expected = LogLevel.WARNING - calculated = LogLevel['WARNING'] - assert expected == calculated - - def test_WARNING_should_deserialize_to_string(self): - test = LogLevel.WARNING - expected = "warning" - calculated = test.value - assert expected == calculated - - def test_ERROR_should_serialize_to_enum(self): - expected = LogLevel.ERROR - calculated = LogLevel['ERROR'] - assert expected == calculated - - def test_ERROR_should_deserialize_to_string(self): - test = LogLevel.ERROR - expected = "error" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_log_list_all_of.py b/test/test_log_list_all_of.py deleted file mode 100644 index 8328e84..0000000 --- a/test/test_log_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.log_result import LogResult -globals()['LogResult'] = LogResult - -from freeclimb.model.log_list_all_of import LogListAllOf # noqa: E501 - -class TestLogListAllOf(unittest.TestCase): - """LogListAllOf unit test stubs""" - - def setUp(self): - self.model = LogListAllOf( - ) - - def test_logs(self): - """Test LogListAllOf.logs""" - testList = [] - self.model.logs = testList - assert self.model.get("logs") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_machine_type.py b/test/test_machine_type.py deleted file mode 100644 index 0cf6883..0000000 --- a/test/test_machine_type.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.machine_type import MachineType # noqa: E501 - -class TestMachineType(unittest.TestCase): - """MachineType unit test stubs""" - - - def test_ANSWERING_MACHINE_should_serialize_to_enum(self): - expected = MachineType.ANSWERING_MACHINE - calculated = MachineType['ANSWERING_MACHINE'] - assert expected == calculated - - def test_ANSWERING_MACHINE_should_deserialize_to_string(self): - test = MachineType.ANSWERING_MACHINE - expected = "answeringMachine" - calculated = test.value - assert expected == calculated - - def test_FAX_MACHINE_should_serialize_to_enum(self): - expected = MachineType.FAX_MACHINE - calculated = MachineType['FAX_MACHINE'] - assert expected == calculated - - def test_FAX_MACHINE_should_deserialize_to_string(self): - test = MachineType.FAX_MACHINE - expected = "faxMachine" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_message_direction.py b/test/test_message_direction.py deleted file mode 100644 index ba56e0a..0000000 --- a/test/test_message_direction.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.message_direction import MessageDirection # noqa: E501 - -class TestMessageDirection(unittest.TestCase): - """MessageDirection unit test stubs""" - - - def test_INBOUND_should_serialize_to_enum(self): - expected = MessageDirection.INBOUND - calculated = MessageDirection['INBOUND'] - assert expected == calculated - - def test_INBOUND_should_deserialize_to_string(self): - test = MessageDirection.INBOUND - expected = "inbound" - calculated = test.value - assert expected == calculated - - def test_OUTBOUND_should_serialize_to_enum(self): - expected = MessageDirection.OUTBOUND - calculated = MessageDirection['OUTBOUND'] - assert expected == calculated - - def test_OUTBOUND_should_deserialize_to_string(self): - test = MessageDirection.OUTBOUND - expected = "outbound" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_message_request_all_of.py b/test/test_message_request_all_of.py deleted file mode 100644 index 8105ae2..0000000 --- a/test/test_message_request_all_of.py +++ /dev/null @@ -1,59 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.message_request_all_of import MessageRequestAllOf # noqa: E501 - -class TestMessageRequestAllOf(unittest.TestCase): - """MessageRequestAllOf unit test stubs""" - - def setUp(self): - self.model = MessageRequestAllOf( - _from="", - to="", - text="", - ) - - def test__from(self): - """Test MessageRequestAllOf._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" - - def test_to(self): - """Test MessageRequestAllOf.to""" - self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" - - def test_text(self): - """Test MessageRequestAllOf.text""" - self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" - - def test_notification_url(self): - """Test MessageRequestAllOf.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - def test_media_urls(self): - """Test MessageRequestAllOf.media_urls""" - testList = [] - self.model.media_urls = testList - assert self.model.get("media_urls") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_message_result_all_of.py b/test/test_message_result_all_of.py deleted file mode 100644 index 9a3d516..0000000 --- a/test/test_message_result_all_of.py +++ /dev/null @@ -1,116 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.message_status import MessageStatus -globals()['MessageStatus'] = MessageStatus - -from freeclimb.model.message_result_all_of import MessageResultAllOf # noqa: E501 - -class TestMessageResultAllOf(unittest.TestCase): - """MessageResultAllOf unit test stubs""" - - def setUp(self): - self.model = MessageResultAllOf( - ) - - def test_account_id(self): - """Test MessageResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_message_id(self): - """Test MessageResultAllOf.message_id""" - self.model.message_id = "TEST_STRING" - assert self.model.get("message_id") == "TEST_STRING" - - def test_status(self): - """Test MessageResultAllOf.status""" - self.model.status = MessageStatus.NEW - assert self.model.get("status") == MessageStatus.NEW - self.model.status = MessageStatus.QUEUED - assert self.model.get("status") == MessageStatus.QUEUED - self.model.status = MessageStatus.REJECTED - assert self.model.get("status") == MessageStatus.REJECTED - self.model.status = MessageStatus.SENDING - assert self.model.get("status") == MessageStatus.SENDING - self.model.status = MessageStatus.SENT - assert self.model.get("status") == MessageStatus.SENT - self.model.status = MessageStatus.FAILED - assert self.model.get("status") == MessageStatus.FAILED - self.model.status = MessageStatus.RECEIVED - assert self.model.get("status") == MessageStatus.RECEIVED - self.model.status = MessageStatus.UNDELIVERED - assert self.model.get("status") == MessageStatus.UNDELIVERED - self.model.status = MessageStatus.EXPIRED - assert self.model.get("status") == MessageStatus.EXPIRED - self.model.status = MessageStatus.DELETED - assert self.model.get("status") == MessageStatus.DELETED - self.model.status = MessageStatus.UNKNOWN - assert self.model.get("status") == MessageStatus.UNKNOWN - - def test__from(self): - """Test MessageResultAllOf._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" - - def test_to(self): - """Test MessageResultAllOf.to""" - self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" - - def test_text(self): - """Test MessageResultAllOf.text""" - self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" - - def test_direction(self): - """Test MessageResultAllOf.direction""" - self.model.direction = "TEST_STRING" - assert self.model.get("direction") == "TEST_STRING" - - def test_notification_url(self): - """Test MessageResultAllOf.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - def test_brand_id(self): - """Test MessageResultAllOf.brand_id""" - self.model.brand_id = "TEST_STRING" - assert self.model.get("brand_id") == "TEST_STRING" - - def test_campaign_id(self): - """Test MessageResultAllOf.campaign_id""" - self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" - - def test_segment_count(self): - """Test MessageResultAllOf.segment_count""" - - - self.model.segment_count = float(1) - assert self.model.get("segment_count") == float(1) - - - def test_media_urls(self): - """Test MessageResultAllOf.media_urls""" - testList = [] - self.model.media_urls = testList - assert self.model.get("media_urls") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_message_status.py b/test/test_message_status.py deleted file mode 100644 index 638835b..0000000 --- a/test/test_message_status.py +++ /dev/null @@ -1,148 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.message_status import MessageStatus # noqa: E501 - -class TestMessageStatus(unittest.TestCase): - """MessageStatus unit test stubs""" - - - def test_NEW_should_serialize_to_enum(self): - expected = MessageStatus.NEW - calculated = MessageStatus['NEW'] - assert expected == calculated - - def test_NEW_should_deserialize_to_string(self): - test = MessageStatus.NEW - expected = "new" - calculated = test.value - assert expected == calculated - - def test_QUEUED_should_serialize_to_enum(self): - expected = MessageStatus.QUEUED - calculated = MessageStatus['QUEUED'] - assert expected == calculated - - def test_QUEUED_should_deserialize_to_string(self): - test = MessageStatus.QUEUED - expected = "queued" - calculated = test.value - assert expected == calculated - - def test_REJECTED_should_serialize_to_enum(self): - expected = MessageStatus.REJECTED - calculated = MessageStatus['REJECTED'] - assert expected == calculated - - def test_REJECTED_should_deserialize_to_string(self): - test = MessageStatus.REJECTED - expected = "rejected" - calculated = test.value - assert expected == calculated - - def test_SENDING_should_serialize_to_enum(self): - expected = MessageStatus.SENDING - calculated = MessageStatus['SENDING'] - assert expected == calculated - - def test_SENDING_should_deserialize_to_string(self): - test = MessageStatus.SENDING - expected = "sending" - calculated = test.value - assert expected == calculated - - def test_SENT_should_serialize_to_enum(self): - expected = MessageStatus.SENT - calculated = MessageStatus['SENT'] - assert expected == calculated - - def test_SENT_should_deserialize_to_string(self): - test = MessageStatus.SENT - expected = "sent" - calculated = test.value - assert expected == calculated - - def test_FAILED_should_serialize_to_enum(self): - expected = MessageStatus.FAILED - calculated = MessageStatus['FAILED'] - assert expected == calculated - - def test_FAILED_should_deserialize_to_string(self): - test = MessageStatus.FAILED - expected = "failed" - calculated = test.value - assert expected == calculated - - def test_RECEIVED_should_serialize_to_enum(self): - expected = MessageStatus.RECEIVED - calculated = MessageStatus['RECEIVED'] - assert expected == calculated - - def test_RECEIVED_should_deserialize_to_string(self): - test = MessageStatus.RECEIVED - expected = "received" - calculated = test.value - assert expected == calculated - - def test_UNDELIVERED_should_serialize_to_enum(self): - expected = MessageStatus.UNDELIVERED - calculated = MessageStatus['UNDELIVERED'] - assert expected == calculated - - def test_UNDELIVERED_should_deserialize_to_string(self): - test = MessageStatus.UNDELIVERED - expected = "undelivered" - calculated = test.value - assert expected == calculated - - def test_EXPIRED_should_serialize_to_enum(self): - expected = MessageStatus.EXPIRED - calculated = MessageStatus['EXPIRED'] - assert expected == calculated - - def test_EXPIRED_should_deserialize_to_string(self): - test = MessageStatus.EXPIRED - expected = "expired" - calculated = test.value - assert expected == calculated - - def test_DELETED_should_serialize_to_enum(self): - expected = MessageStatus.DELETED - calculated = MessageStatus['DELETED'] - assert expected == calculated - - def test_DELETED_should_deserialize_to_string(self): - test = MessageStatus.DELETED - expected = "deleted" - calculated = test.value - assert expected == calculated - - def test_UNKNOWN_should_serialize_to_enum(self): - expected = MessageStatus.UNKNOWN - calculated = MessageStatus['UNKNOWN'] - assert expected == calculated - - def test_UNKNOWN_should_deserialize_to_string(self): - test = MessageStatus.UNKNOWN - expected = "unknown" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_messages_list_all_of.py b/test/test_messages_list_all_of.py deleted file mode 100644 index da05598..0000000 --- a/test/test_messages_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.message_result import MessageResult -globals()['MessageResult'] = MessageResult - -from freeclimb.model.messages_list_all_of import MessagesListAllOf # noqa: E501 - -class TestMessagesListAllOf(unittest.TestCase): - """MessagesListAllOf unit test stubs""" - - def setUp(self): - self.model = MessagesListAllOf( - ) - - def test_messages(self): - """Test MessagesListAllOf.messages""" - testList = [] - self.model.messages = testList - assert self.model.get("messages") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_out_dial.py b/test/test_out_dial.py deleted file mode 100644 index 30caa8a..0000000 --- a/test/test_out_dial.py +++ /dev/null @@ -1,145 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.if_machine import IfMachine -from freeclimb.model.out_dial import OutDial -from freeclimb.model.out_dial_all_of import OutDialAllOf -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['IfMachine'] = IfMachine -globals()['OutDial'] = OutDial -globals()['OutDialAllOf'] = OutDialAllOf -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.out_dial import OutDial # noqa: E501 - -class TestOutDial(unittest.TestCase): - """OutDial unit test stubs""" - - def setUp(self): - self.model = OutDial( - action_url="", - call_connect_url="", - calling_number="", - destination="", - ) - - def test_action_url(self): - """Test OutDial.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_call_connect_url(self): - """Test OutDial.call_connect_url""" - self.model.call_connect_url = "TEST_STRING" - assert self.model.get("call_connect_url") == "TEST_STRING" - - def test_calling_number(self): - """Test OutDial.calling_number""" - self.model.calling_number = "TEST_STRING" - assert self.model.get("calling_number") == "TEST_STRING" - - def test_destination(self): - """Test OutDial.destination""" - self.model.destination = "TEST_STRING" - assert self.model.get("destination") == "TEST_STRING" - - def test_if_machine(self): - """Test OutDial.if_machine""" - self.model.if_machine = IfMachine.REDIRECT - assert self.model.get("if_machine") == IfMachine.REDIRECT - self.model.if_machine = IfMachine.HANGUP - assert self.model.get("if_machine") == IfMachine.HANGUP - - def test_if_machine_url(self): - """Test OutDial.if_machine_url""" - self.model.if_machine_url = "TEST_STRING" - assert self.model.get("if_machine_url") == "TEST_STRING" - - def test_send_digits(self): - """Test OutDial.send_digits""" - self.model.send_digits = "TEST_STRING" - assert self.model.get("send_digits") == "TEST_STRING" - - def test_status_callback_url(self): - """Test OutDial.status_callback_url""" - self.model.status_callback_url = "TEST_STRING" - assert self.model.get("status_callback_url") == "TEST_STRING" - - def test_timeout(self): - """Test OutDial.timeout""" - self.model.timeout = 1 - assert self.model.get("timeout") == 1 - - def test_privacy_mode(self): - """Test OutDial.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "OutDial" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_park.py b/test/test_park.py deleted file mode 100644 index 2f0668d..0000000 --- a/test/test_park.py +++ /dev/null @@ -1,104 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.park_all_of import ParkAllOf -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['ParkAllOf'] = ParkAllOf -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.park import Park # noqa: E501 - -class TestPark(unittest.TestCase): - """Park unit test stubs""" - - def setUp(self): - self.model = Park( - wait_url="", - action_url="", - ) - - def test_wait_url(self): - """Test Park.wait_url""" - self.model.wait_url = "TEST_STRING" - assert self.model.get("wait_url") == "TEST_STRING" - - def test_action_url(self): - """Test Park.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_notification_url(self): - """Test Park.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "Park" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_pause.py b/test/test_pause.py deleted file mode 100644 index 0a8dc5e..0000000 --- a/test/test_pause.py +++ /dev/null @@ -1,93 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.pause_all_of import PauseAllOf -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PauseAllOf'] = PauseAllOf -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.pause import Pause # noqa: E501 - -class TestPause(unittest.TestCase): - """Pause unit test stubs""" - - def setUp(self): - self.model = Pause( - length=1, - ) - - def test_length(self): - """Test Pause.length""" - self.model.length = 1 - assert self.model.get("length") == 1 - - - def test_command_test(self): - assert self.model.command == "Pause" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_percl_command.py b/test/test_percl_command.py deleted file mode 100644 index ebc38de..0000000 --- a/test/test_percl_command.py +++ /dev/null @@ -1,80 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.percl_command import PerclCommand # noqa: E501 - -class TestPerclCommand(unittest.TestCase): - """PerclCommand unit test stubs""" - - - def test_command(self): - """Test PerclCommand.command""" - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_play.py b/test/test_play.py deleted file mode 100644 index 7733d84..0000000 --- a/test/test_play.py +++ /dev/null @@ -1,103 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_all_of import PlayAllOf -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayAllOf'] = PlayAllOf -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.play import Play # noqa: E501 - -class TestPlay(unittest.TestCase): - """Play unit test stubs""" - - def setUp(self): - self.model = Play( - file="", - ) - - def test_file(self): - """Test Play.file""" - self.model.file = "TEST_STRING" - assert self.model.get("file") == "TEST_STRING" - - def test_loop(self): - """Test Play.loop""" - self.model.loop = 1 - assert self.model.get("loop") == 1 - - def test_privacy_mode(self): - """Test Play.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "Play" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_play_beep.py b/test/test_play_beep.py deleted file mode 100644 index fd1cdfa..0000000 --- a/test/test_play_beep.py +++ /dev/null @@ -1,71 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.play_beep import PlayBeep # noqa: E501 - -class TestPlayBeep(unittest.TestCase): - """PlayBeep unit test stubs""" - - - def test_ALWAYS_should_serialize_to_enum(self): - expected = PlayBeep.ALWAYS - calculated = PlayBeep['ALWAYS'] - assert expected == calculated - - def test_ALWAYS_should_deserialize_to_string(self): - test = PlayBeep.ALWAYS - expected = "always" - calculated = test.value - assert expected == calculated - - def test_NEVER_should_serialize_to_enum(self): - expected = PlayBeep.NEVER - calculated = PlayBeep['NEVER'] - assert expected == calculated - - def test_NEVER_should_deserialize_to_string(self): - test = PlayBeep.NEVER - expected = "never" - calculated = test.value - assert expected == calculated - - def test_ENTRY_ONLY_should_serialize_to_enum(self): - expected = PlayBeep.ENTRY_ONLY - calculated = PlayBeep['ENTRY_ONLY'] - assert expected == calculated - - def test_ENTRY_ONLY_should_deserialize_to_string(self): - test = PlayBeep.ENTRY_ONLY - expected = "entryOnly" - calculated = test.value - assert expected == calculated - - def test_EXIT_ONLY_should_serialize_to_enum(self): - expected = PlayBeep.EXIT_ONLY - calculated = PlayBeep['EXIT_ONLY'] - assert expected == calculated - - def test_EXIT_ONLY_should_deserialize_to_string(self): - test = PlayBeep.EXIT_ONLY - expected = "exitOnly" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_play_early_media.py b/test/test_play_early_media.py deleted file mode 100644 index e073ed1..0000000 --- a/test/test_play_early_media.py +++ /dev/null @@ -1,93 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.play_early_media_all_of import PlayEarlyMediaAllOf -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['PlayEarlyMediaAllOf'] = PlayEarlyMediaAllOf -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.play_early_media import PlayEarlyMedia # noqa: E501 - -class TestPlayEarlyMedia(unittest.TestCase): - """PlayEarlyMedia unit test stubs""" - - def setUp(self): - self.model = PlayEarlyMedia( - file="", - ) - - def test_file(self): - """Test PlayEarlyMedia.file""" - self.model.file = "TEST_STRING" - assert self.model.get("file") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "PlayEarlyMedia" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_queue_list_all_of.py b/test/test_queue_list_all_of.py deleted file mode 100644 index 49ccc12..0000000 --- a/test/test_queue_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.queue_result import QueueResult -globals()['QueueResult'] = QueueResult - -from freeclimb.model.queue_list_all_of import QueueListAllOf # noqa: E501 - -class TestQueueListAllOf(unittest.TestCase): - """QueueListAllOf unit test stubs""" - - def setUp(self): - self.model = QueueListAllOf( - ) - - def test_queues(self): - """Test QueueListAllOf.queues""" - testList = [] - self.model.queues = testList - assert self.model.get("queues") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_queue_member_list_all_of.py b/test/test_queue_member_list_all_of.py deleted file mode 100644 index 365b831..0000000 --- a/test/test_queue_member_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.queue_member import QueueMember -globals()['QueueMember'] = QueueMember - -from freeclimb.model.queue_member_list_all_of import QueueMemberListAllOf # noqa: E501 - -class TestQueueMemberListAllOf(unittest.TestCase): - """QueueMemberListAllOf unit test stubs""" - - def setUp(self): - self.model = QueueMemberListAllOf( - ) - - def test_queue_members(self): - """Test QueueMemberListAllOf.queue_members""" - testList = [] - self.model.queue_members = testList - assert self.model.get("queue_members") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_queue_result_all_of.py b/test/test_queue_result_all_of.py deleted file mode 100644 index 8fbd576..0000000 --- a/test/test_queue_result_all_of.py +++ /dev/null @@ -1,66 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.queue_result_all_of import QueueResultAllOf # noqa: E501 - -class TestQueueResultAllOf(unittest.TestCase): - """QueueResultAllOf unit test stubs""" - - def setUp(self): - self.model = QueueResultAllOf( - ) - - def test_account_id(self): - """Test QueueResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_queue_id(self): - """Test QueueResultAllOf.queue_id""" - self.model.queue_id = "TEST_STRING" - assert self.model.get("queue_id") == "TEST_STRING" - - def test_alias(self): - """Test QueueResultAllOf.alias""" - self.model.alias = "TEST_STRING" - assert self.model.get("alias") == "TEST_STRING" - - def test_max_size(self): - """Test QueueResultAllOf.max_size""" - self.model.max_size = 1 - assert self.model.get("max_size") == 1 - - def test_current_size(self): - """Test QueueResultAllOf.current_size""" - self.model.current_size = 1 - assert self.model.get("current_size") == 1 - - def test_average_queue_removal_time(self): - """Test QueueResultAllOf.average_queue_removal_time""" - self.model.average_queue_removal_time = 1 - assert self.model.get("average_queue_removal_time") == 1 - - def test_subresource_uris(self): - """Test QueueResultAllOf.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.get("subresource_uris") == testObject - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_queue_result_status.py b/test/test_queue_result_status.py deleted file mode 100644 index ebdf3f6..0000000 --- a/test/test_queue_result_status.py +++ /dev/null @@ -1,71 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.queue_result_status import QueueResultStatus # noqa: E501 - -class TestQueueResultStatus(unittest.TestCase): - """QueueResultStatus unit test stubs""" - - - def test_QUEUE_FULL_should_serialize_to_enum(self): - expected = QueueResultStatus.QUEUE_FULL - calculated = QueueResultStatus['QUEUE_FULL'] - assert expected == calculated - - def test_QUEUE_FULL_should_deserialize_to_string(self): - test = QueueResultStatus.QUEUE_FULL - expected = "queueFull" - calculated = test.value - assert expected == calculated - - def test_DEQUEUED_should_serialize_to_enum(self): - expected = QueueResultStatus.DEQUEUED - calculated = QueueResultStatus['DEQUEUED'] - assert expected == calculated - - def test_DEQUEUED_should_deserialize_to_string(self): - test = QueueResultStatus.DEQUEUED - expected = "dequeued" - calculated = test.value - assert expected == calculated - - def test_HANGUP_should_serialize_to_enum(self): - expected = QueueResultStatus.HANGUP - calculated = QueueResultStatus['HANGUP'] - assert expected == calculated - - def test_HANGUP_should_deserialize_to_string(self): - test = QueueResultStatus.HANGUP - expected = "hangup" - calculated = test.value - assert expected == calculated - - def test_SYSTEM_ERROR_should_serialize_to_enum(self): - expected = QueueResultStatus.SYSTEM_ERROR - calculated = QueueResultStatus['SYSTEM_ERROR'] - assert expected == calculated - - def test_SYSTEM_ERROR_should_deserialize_to_string(self): - test = QueueResultStatus.SYSTEM_ERROR - expected = "systemError" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_record_utterance.py b/test/test_record_utterance.py deleted file mode 100644 index d095e20..0000000 --- a/test/test_record_utterance.py +++ /dev/null @@ -1,123 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.record_utterance_all_of import RecordUtteranceAllOf -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['RecordUtteranceAllOf'] = RecordUtteranceAllOf -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.record_utterance import RecordUtterance # noqa: E501 - -class TestRecordUtterance(unittest.TestCase): - """RecordUtterance unit test stubs""" - - def setUp(self): - self.model = RecordUtterance( - action_url="", - ) - - def test_action_url(self): - """Test RecordUtterance.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_silence_timeout_ms(self): - """Test RecordUtterance.silence_timeout_ms""" - self.model.silence_timeout_ms = 1 - assert self.model.get("silence_timeout_ms") == 1 - - def test_finish_on_key(self): - """Test RecordUtterance.finish_on_key""" - self.model.finish_on_key = "TEST_STRING" - assert self.model.get("finish_on_key") == "TEST_STRING" - - def test_max_length_sec(self): - """Test RecordUtterance.max_length_sec""" - self.model.max_length_sec = 1 - assert self.model.get("max_length_sec") == 1 - - def test_play_beep(self): - """Test RecordUtterance.play_beep""" - self.model.play_beep = False - assert self.model.get("play_beep") == False - - def test_auto_start(self): - """Test RecordUtterance.auto_start""" - self.model.auto_start = False - assert self.model.get("auto_start") == False - - def test_privacy_mode(self): - """Test RecordUtterance.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "RecordUtterance" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_record_utterance_term_reason.py b/test/test_record_utterance_term_reason.py deleted file mode 100644 index 3d01a55..0000000 --- a/test/test_record_utterance_term_reason.py +++ /dev/null @@ -1,71 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.record_utterance_term_reason import RecordUtteranceTermReason # noqa: E501 - -class TestRecordUtteranceTermReason(unittest.TestCase): - """RecordUtteranceTermReason unit test stubs""" - - - def test_FINISH_KEY_should_serialize_to_enum(self): - expected = RecordUtteranceTermReason.FINISH_KEY - calculated = RecordUtteranceTermReason['FINISH_KEY'] - assert expected == calculated - - def test_FINISH_KEY_should_deserialize_to_string(self): - test = RecordUtteranceTermReason.FINISH_KEY - expected = "finishKey" - calculated = test.value - assert expected == calculated - - def test_TIMEOUT_should_serialize_to_enum(self): - expected = RecordUtteranceTermReason.TIMEOUT - calculated = RecordUtteranceTermReason['TIMEOUT'] - assert expected == calculated - - def test_TIMEOUT_should_deserialize_to_string(self): - test = RecordUtteranceTermReason.TIMEOUT - expected = "timeout" - calculated = test.value - assert expected == calculated - - def test_HANGUP_should_serialize_to_enum(self): - expected = RecordUtteranceTermReason.HANGUP - calculated = RecordUtteranceTermReason['HANGUP'] - assert expected == calculated - - def test_HANGUP_should_deserialize_to_string(self): - test = RecordUtteranceTermReason.HANGUP - expected = "hangup" - calculated = test.value - assert expected == calculated - - def test_MAX_LENGTH_should_serialize_to_enum(self): - expected = RecordUtteranceTermReason.MAX_LENGTH - calculated = RecordUtteranceTermReason['MAX_LENGTH'] - assert expected == calculated - - def test_MAX_LENGTH_should_deserialize_to_string(self): - test = RecordUtteranceTermReason.MAX_LENGTH - expected = "maxLength" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_recording_list_all_of.py b/test/test_recording_list_all_of.py deleted file mode 100644 index 35a7bc9..0000000 --- a/test/test_recording_list_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.recording_result import RecordingResult -globals()['RecordingResult'] = RecordingResult - -from freeclimb.model.recording_list_all_of import RecordingListAllOf # noqa: E501 - -class TestRecordingListAllOf(unittest.TestCase): - """RecordingListAllOf unit test stubs""" - - def setUp(self): - self.model = RecordingListAllOf( - ) - - def test_recordings(self): - """Test RecordingListAllOf.recordings""" - testList = [] - self.model.recordings = testList - assert self.model.get("recordings") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_recording_result_all_of.py b/test/test_recording_result_all_of.py deleted file mode 100644 index 7fc2edc..0000000 --- a/test/test_recording_result_all_of.py +++ /dev/null @@ -1,55 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.recording_result_all_of import RecordingResultAllOf # noqa: E501 - -class TestRecordingResultAllOf(unittest.TestCase): - """RecordingResultAllOf unit test stubs""" - - def setUp(self): - self.model = RecordingResultAllOf( - ) - - def test_recording_id(self): - """Test RecordingResultAllOf.recording_id""" - self.model.recording_id = "TEST_STRING" - assert self.model.get("recording_id") == "TEST_STRING" - - def test_account_id(self): - """Test RecordingResultAllOf.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_call_id(self): - """Test RecordingResultAllOf.call_id""" - self.model.call_id = "TEST_STRING" - assert self.model.get("call_id") == "TEST_STRING" - - def test_duration_sec(self): - """Test RecordingResultAllOf.duration_sec""" - self.model.duration_sec = 1 - assert self.model.get("duration_sec") == 1 - - def test_conference_id(self): - """Test RecordingResultAllOf.conference_id""" - self.model.conference_id = "TEST_STRING" - assert self.model.get("conference_id") == "TEST_STRING" - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_redirect.py b/test/test_redirect.py deleted file mode 100644 index 3709a11..0000000 --- a/test/test_redirect.py +++ /dev/null @@ -1,93 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.redirect_all_of import RedirectAllOf -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['RedirectAllOf'] = RedirectAllOf -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.redirect import Redirect # noqa: E501 - -class TestRedirect(unittest.TestCase): - """Redirect unit test stubs""" - - def setUp(self): - self.model = Redirect( - action_url="", - ) - - def test_action_url(self): - """Test Redirect.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "Redirect" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_reject.py b/test/test_reject.py deleted file mode 100644 index 8df8ac9..0000000 --- a/test/test_reject.py +++ /dev/null @@ -1,92 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.reject_all_of import RejectAllOf -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RejectAllOf'] = RejectAllOf -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.reject import Reject # noqa: E501 - -class TestReject(unittest.TestCase): - """Reject unit test stubs""" - - def setUp(self): - self.model = Reject( - ) - - def test_reason(self): - """Test Reject.reason""" - self.model.reason = "TEST_STRING" - assert self.model.get("reason") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "Reject" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_remove_from_conference.py b/test/test_remove_from_conference.py deleted file mode 100644 index b5a86e4..0000000 --- a/test/test_remove_from_conference.py +++ /dev/null @@ -1,85 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.remove_from_conference import RemoveFromConference # noqa: E501 - -class TestRemoveFromConference(unittest.TestCase): - """RemoveFromConference unit test stubs""" - - def setUp(self): - self.model = RemoveFromConference( - ) - - - def test_command_test(self): - assert self.model.command == "RemoveFromConference" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_request_type.py b/test/test_request_type.py deleted file mode 100644 index ff85249..0000000 --- a/test/test_request_type.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.request_type import RequestType # noqa: E501 - -class TestRequestType(unittest.TestCase): - """RequestType unit test stubs""" - - - def test_INBOUND_CALL_should_serialize_to_enum(self): - expected = RequestType.INBOUND_CALL - calculated = RequestType['INBOUND_CALL'] - assert expected == calculated - - def test_INBOUND_CALL_should_deserialize_to_string(self): - test = RequestType.INBOUND_CALL - expected = "inboundCall" - calculated = test.value - assert expected == calculated - - def test_RECORD_should_serialize_to_enum(self): - expected = RequestType.RECORD - calculated = RequestType['RECORD'] - assert expected == calculated - - def test_RECORD_should_deserialize_to_string(self): - test = RequestType.RECORD - expected = "record" - calculated = test.value - assert expected == calculated - - def test_GET_DIGITS_should_serialize_to_enum(self): - expected = RequestType.GET_DIGITS - calculated = RequestType['GET_DIGITS'] - assert expected == calculated - - def test_GET_DIGITS_should_deserialize_to_string(self): - test = RequestType.GET_DIGITS - expected = "getDigits" - calculated = test.value - assert expected == calculated - - def test_GET_SPEECH_should_serialize_to_enum(self): - expected = RequestType.GET_SPEECH - calculated = RequestType['GET_SPEECH'] - assert expected == calculated - - def test_GET_SPEECH_should_deserialize_to_string(self): - test = RequestType.GET_SPEECH - expected = "getSpeech" - calculated = test.value - assert expected == calculated - - def test_REDIRECT_should_serialize_to_enum(self): - expected = RequestType.REDIRECT - calculated = RequestType['REDIRECT'] - assert expected == calculated - - def test_REDIRECT_should_deserialize_to_string(self): - test = RequestType.REDIRECT - expected = "redirect" - calculated = test.value - assert expected == calculated - - def test_PAUSE_should_serialize_to_enum(self): - expected = RequestType.PAUSE - calculated = RequestType['PAUSE'] - assert expected == calculated - - def test_PAUSE_should_deserialize_to_string(self): - test = RequestType.PAUSE - expected = "pause" - calculated = test.value - assert expected == calculated - - def test_OUT_DIAL_START_should_serialize_to_enum(self): - expected = RequestType.OUT_DIAL_START - calculated = RequestType['OUT_DIAL_START'] - assert expected == calculated - - def test_OUT_DIAL_START_should_deserialize_to_string(self): - test = RequestType.OUT_DIAL_START - expected = "outDialStart" - calculated = test.value - assert expected == calculated - - def test_OUT_DIAL_CONNECT_should_serialize_to_enum(self): - expected = RequestType.OUT_DIAL_CONNECT - calculated = RequestType['OUT_DIAL_CONNECT'] - assert expected == calculated - - def test_OUT_DIAL_CONNECT_should_deserialize_to_string(self): - test = RequestType.OUT_DIAL_CONNECT - expected = "outDialConnect" - calculated = test.value - assert expected == calculated - - def test_OUT_DIAL_API_CONNECT_should_serialize_to_enum(self): - expected = RequestType.OUT_DIAL_API_CONNECT - calculated = RequestType['OUT_DIAL_API_CONNECT'] - assert expected == calculated - - def test_OUT_DIAL_API_CONNECT_should_deserialize_to_string(self): - test = RequestType.OUT_DIAL_API_CONNECT - expected = "outDialApiConnect" - calculated = test.value - assert expected == calculated - - def test_MACHINE_DETECTED_should_serialize_to_enum(self): - expected = RequestType.MACHINE_DETECTED - calculated = RequestType['MACHINE_DETECTED'] - assert expected == calculated - - def test_MACHINE_DETECTED_should_deserialize_to_string(self): - test = RequestType.MACHINE_DETECTED - expected = "machineDetected" - calculated = test.value - assert expected == calculated - - def test_DEQUEUE_should_serialize_to_enum(self): - expected = RequestType.DEQUEUE - calculated = RequestType['DEQUEUE'] - assert expected == calculated - - def test_DEQUEUE_should_deserialize_to_string(self): - test = RequestType.DEQUEUE - expected = "dequeue" - calculated = test.value - assert expected == calculated - - def test_QUEUE_WAIT_should_serialize_to_enum(self): - expected = RequestType.QUEUE_WAIT - calculated = RequestType['QUEUE_WAIT'] - assert expected == calculated - - def test_QUEUE_WAIT_should_deserialize_to_string(self): - test = RequestType.QUEUE_WAIT - expected = "queueWait" - calculated = test.value - assert expected == calculated - - def test_ADD_TO_QUEUE_NOTIFICATION_should_serialize_to_enum(self): - expected = RequestType.ADD_TO_QUEUE_NOTIFICATION - calculated = RequestType['ADD_TO_QUEUE_NOTIFICATION'] - assert expected == calculated - - def test_ADD_TO_QUEUE_NOTIFICATION_should_deserialize_to_string(self): - test = RequestType.ADD_TO_QUEUE_NOTIFICATION - expected = "addToQueueNotification" - calculated = test.value - assert expected == calculated - - def test_REMOVE_FROM_QUEUE_NOTIFICATION_should_serialize_to_enum(self): - expected = RequestType.REMOVE_FROM_QUEUE_NOTIFICATION - calculated = RequestType['REMOVE_FROM_QUEUE_NOTIFICATION'] - assert expected == calculated - - def test_REMOVE_FROM_QUEUE_NOTIFICATION_should_deserialize_to_string(self): - test = RequestType.REMOVE_FROM_QUEUE_NOTIFICATION - expected = "removeFromQueueNotification" - calculated = test.value - assert expected == calculated - - def test_CALL_STATUS_should_serialize_to_enum(self): - expected = RequestType.CALL_STATUS - calculated = RequestType['CALL_STATUS'] - assert expected == calculated - - def test_CALL_STATUS_should_deserialize_to_string(self): - test = RequestType.CALL_STATUS - expected = "callStatus" - calculated = test.value - assert expected == calculated - - def test_CREATE_CONFERENCE_should_serialize_to_enum(self): - expected = RequestType.CREATE_CONFERENCE - calculated = RequestType['CREATE_CONFERENCE'] - assert expected == calculated - - def test_CREATE_CONFERENCE_should_deserialize_to_string(self): - test = RequestType.CREATE_CONFERENCE - expected = "createConference" - calculated = test.value - assert expected == calculated - - def test_CONFERENCE_STATUS_should_serialize_to_enum(self): - expected = RequestType.CONFERENCE_STATUS - calculated = RequestType['CONFERENCE_STATUS'] - assert expected == calculated - - def test_CONFERENCE_STATUS_should_deserialize_to_string(self): - test = RequestType.CONFERENCE_STATUS - expected = "conferenceStatus" - calculated = test.value - assert expected == calculated - - def test_LEAVE_CONFERENCE_should_serialize_to_enum(self): - expected = RequestType.LEAVE_CONFERENCE - calculated = RequestType['LEAVE_CONFERENCE'] - assert expected == calculated - - def test_LEAVE_CONFERENCE_should_deserialize_to_string(self): - test = RequestType.LEAVE_CONFERENCE - expected = "leaveConference" - calculated = test.value - assert expected == calculated - - def test_ADD_TO_CONFERENCE_NOTIFICATION_should_serialize_to_enum(self): - expected = RequestType.ADD_TO_CONFERENCE_NOTIFICATION - calculated = RequestType['ADD_TO_CONFERENCE_NOTIFICATION'] - assert expected == calculated - - def test_ADD_TO_CONFERENCE_NOTIFICATION_should_deserialize_to_string(self): - test = RequestType.ADD_TO_CONFERENCE_NOTIFICATION - expected = "addToConferenceNotification" - calculated = test.value - assert expected == calculated - - def test_CONFERENCE_RECORDING_STATUS_should_serialize_to_enum(self): - expected = RequestType.CONFERENCE_RECORDING_STATUS - calculated = RequestType['CONFERENCE_RECORDING_STATUS'] - assert expected == calculated - - def test_CONFERENCE_RECORDING_STATUS_should_deserialize_to_string(self): - test = RequestType.CONFERENCE_RECORDING_STATUS - expected = "conferenceRecordingStatus" - calculated = test.value - assert expected == calculated - - def test_CONFERENCE_CALL_CONTROL_should_serialize_to_enum(self): - expected = RequestType.CONFERENCE_CALL_CONTROL - calculated = RequestType['CONFERENCE_CALL_CONTROL'] - assert expected == calculated - - def test_CONFERENCE_CALL_CONTROL_should_deserialize_to_string(self): - test = RequestType.CONFERENCE_CALL_CONTROL - expected = "conferenceCallControl" - calculated = test.value - assert expected == calculated - - def test_MESSAGE_DELIVERY_should_serialize_to_enum(self): - expected = RequestType.MESSAGE_DELIVERY - calculated = RequestType['MESSAGE_DELIVERY'] - assert expected == calculated - - def test_MESSAGE_DELIVERY_should_deserialize_to_string(self): - test = RequestType.MESSAGE_DELIVERY - expected = "messageDelivery" - calculated = test.value - assert expected == calculated - - def test_MESSAGE_STATUS_should_serialize_to_enum(self): - expected = RequestType.MESSAGE_STATUS - calculated = RequestType['MESSAGE_STATUS'] - assert expected == calculated - - def test_MESSAGE_STATUS_should_deserialize_to_string(self): - test = RequestType.MESSAGE_STATUS - expected = "messageStatus" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_say.py b/test/test_say.py deleted file mode 100644 index ff7ae9e..0000000 --- a/test/test_say.py +++ /dev/null @@ -1,108 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.say_all_of import SayAllOf -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SayAllOf'] = SayAllOf -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.say import Say # noqa: E501 - -class TestSay(unittest.TestCase): - """Say unit test stubs""" - - def setUp(self): - self.model = Say( - text="", - ) - - def test_text(self): - """Test Say.text""" - self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" - - def test_language(self): - """Test Say.language""" - self.model.language = "TEST_STRING" - assert self.model.get("language") == "TEST_STRING" - - def test_loop(self): - """Test Say.loop""" - self.model.loop = 1 - assert self.model.get("loop") == 1 - - def test_privacy_mode(self): - """Test Say.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "Say" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_send_digits.py b/test/test_send_digits.py deleted file mode 100644 index 3a51f63..0000000 --- a/test/test_send_digits.py +++ /dev/null @@ -1,103 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.send_digits_all_of import SendDigitsAllOf -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SendDigitsAllOf'] = SendDigitsAllOf -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.send_digits import SendDigits # noqa: E501 - -class TestSendDigits(unittest.TestCase): - """SendDigits unit test stubs""" - - def setUp(self): - self.model = SendDigits( - digits="", - ) - - def test_digits(self): - """Test SendDigits.digits""" - self.model.digits = "TEST_STRING" - assert self.model.get("digits") == "TEST_STRING" - - def test_pause_ms(self): - """Test SendDigits.pause_ms""" - self.model.pause_ms = 1 - assert self.model.get("pause_ms") == 1 - - def test_privacy_mode(self): - """Test SendDigits.privacy_mode""" - self.model.privacy_mode = False - assert self.model.get("privacy_mode") == False - - - def test_command_test(self): - assert self.model.command == "SendDigits" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_set_dtmf_pass_through.py b/test/test_set_dtmf_pass_through.py deleted file mode 100644 index 2e77f1d..0000000 --- a/test/test_set_dtmf_pass_through.py +++ /dev/null @@ -1,94 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough -from freeclimb.model.set_dtmf_pass_through_all_of import SetDTMFPassThroughAllOf -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetDTMFPassThrough'] = SetDTMFPassThrough -globals()['SetDTMFPassThroughAllOf'] = SetDTMFPassThroughAllOf -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.set_dtmf_pass_through import SetDTMFPassThrough # noqa: E501 - -class TestSetDTMFPassThrough(unittest.TestCase): - """SetDTMFPassThrough unit test stubs""" - - def setUp(self): - self.model = SetDTMFPassThrough( - ) - - def test_dtmf_pass_through(self): - """Test SetDTMFPassThrough.dtmf_pass_through""" - self.model.dtmf_pass_through = False - assert self.model.get("dtmf_pass_through") == False - - - def test_command_test(self): - assert self.model.command == "SetDTMFPassThrough" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_set_listen.py b/test/test_set_listen.py deleted file mode 100644 index a241143..0000000 --- a/test/test_set_listen.py +++ /dev/null @@ -1,92 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_listen_all_of import SetListenAllOf -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetListenAllOf'] = SetListenAllOf -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.set_listen import SetListen # noqa: E501 - -class TestSetListen(unittest.TestCase): - """SetListen unit test stubs""" - - def setUp(self): - self.model = SetListen( - ) - - def test_listen(self): - """Test SetListen.listen""" - self.model.listen = False - assert self.model.get("listen") == False - - - def test_command_test(self): - assert self.model.command == "SetListen" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_set_talk.py b/test/test_set_talk.py deleted file mode 100644 index 0eb1dab..0000000 --- a/test/test_set_talk.py +++ /dev/null @@ -1,92 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.set_talk_all_of import SetTalkAllOf -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['SetTalkAllOf'] = SetTalkAllOf -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.set_talk import SetTalk # noqa: E501 - -class TestSetTalk(unittest.TestCase): - """SetTalk unit test stubs""" - - def setUp(self): - self.model = SetTalk( - ) - - def test_talk(self): - """Test SetTalk.talk""" - self.model.talk = False - assert self.model.get("talk") == False - - - def test_command_test(self): - assert self.model.command == "SetTalk" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms.py b/test/test_sms.py deleted file mode 100644 index cfec7c9..0000000 --- a/test/test_sms.py +++ /dev/null @@ -1,110 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.sms_all_of import SmsAllOf -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['SmsAllOf'] = SmsAllOf -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.sms import Sms # noqa: E501 - -class TestSms(unittest.TestCase): - """Sms unit test stubs""" - - def setUp(self): - self.model = Sms( - to="", - _from="", - text="", - ) - - def test_to(self): - """Test Sms.to""" - self.model.to = "TEST_STRING" - assert self.model.get("to") == "TEST_STRING" - - def test__from(self): - """Test Sms._from""" - self.model._from = "TEST_STRING" - assert self.model.get("_from") == "TEST_STRING" - - def test_text(self): - """Test Sms.text""" - self.model.text = "TEST_STRING" - assert self.model.get("text") == "TEST_STRING" - - def test_notification_url(self): - """Test Sms.notification_url""" - self.model.notification_url = "TEST_STRING" - assert self.model.get("notification_url") == "TEST_STRING" - - - def test_command_test(self): - assert self.model.command == "Sms" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms_ten_dlc_brand.py b/test/test_sms_ten_dlc_brand.py deleted file mode 100644 index 7c4f755..0000000 --- a/test/test_sms_ten_dlc_brand.py +++ /dev/null @@ -1,449 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand # noqa: E501 - -class TestSMSTenDLCBrand(unittest.TestCase): - """SMSTenDLCBrand unit test stubs""" - - def setUp(self): - self.model = SMSTenDLCBrand( - entity_type="PRIVATE_PROFIT", - display_name="", - phone="", - country="", - email="", - brand_relationship="BASIC_ACCOUNT", - vertical="", - mock=True, - identity_status="SELF_DECLARED", - ) - - def test_account_id(self): - """Test SMSTenDLCBrand.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_entity_type(self): - """Test SMSTenDLCBrand.entity_type""" - - self.model.entity_type = "PRIVATE_PROFIT" - assert self.model.get("entity_type") == "PRIVATE_PROFIT" - - self.model.entity_type = "PUBLIC_PROFIT" - assert self.model.get("entity_type") == "PUBLIC_PROFIT" - - self.model.entity_type = "NON_PROFIT" - assert self.model.get("entity_type") == "NON_PROFIT" - - self.model.entity_type = "GOVERNMENT" - assert self.model.get("entity_type") == "GOVERNMENT" - - self.model.entity_type = "SOLE_PROPRIETOR" - assert self.model.get("entity_type") == "SOLE_PROPRIETOR" - - - def test_entity_type_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.entity_type = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_csp_id(self): - """Test SMSTenDLCBrand.csp_id""" - self.model.csp_id = "TEST_STRING" - assert self.model.get("csp_id") == "TEST_STRING" - - def test_brand_id(self): - """Test SMSTenDLCBrand.brand_id""" - self.model.brand_id = "TEST_STRING" - assert self.model.get("brand_id") == "TEST_STRING" - - def test_first_name(self): - """Test SMSTenDLCBrand.first_name""" - self.model.first_name = "T" * 100 - assert self.model.get("first_name") == "T" * 100 - - with pytest.raises(Exception) as info: - self.model.first_name = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_last_name(self): - """Test SMSTenDLCBrand.last_name""" - self.model.last_name = "T" * 100 - assert self.model.get("last_name") == "T" * 100 - - with pytest.raises(Exception) as info: - self.model.last_name = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_display_name(self): - """Test SMSTenDLCBrand.display_name""" - self.model.display_name = "T" * 255 - assert self.model.get("display_name") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.display_name = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_company_name(self): - """Test SMSTenDLCBrand.company_name""" - self.model.company_name = "T" * 255 - assert self.model.get("company_name") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.company_name = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_ein(self): - """Test SMSTenDLCBrand.ein""" - self.model.ein = "T" * 21 - assert self.model.get("ein") == "T" * 21 - - with pytest.raises(Exception) as info: - self.model.ein = "T" * (21 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_ein_issuing_country(self): - """Test SMSTenDLCBrand.ein_issuing_country""" - self.model.ein_issuing_country = "T" * 2 - assert self.model.get("ein_issuing_country") == "T" * 2 - - with pytest.raises(Exception) as info: - self.model.ein_issuing_country = "T" * (2 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_phone(self): - """Test SMSTenDLCBrand.phone""" - self.model.phone = "T" * 20 - assert self.model.get("phone") == "T" * 20 - - with pytest.raises(Exception) as info: - self.model.phone = "T" * (20 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_street(self): - """Test SMSTenDLCBrand.street""" - self.model.street = "T" * 100 - assert self.model.get("street") == "T" * 100 - - with pytest.raises(Exception) as info: - self.model.street = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_city(self): - """Test SMSTenDLCBrand.city""" - self.model.city = "T" * 100 - assert self.model.get("city") == "T" * 100 - - with pytest.raises(Exception) as info: - self.model.city = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_state(self): - """Test SMSTenDLCBrand.state""" - self.model.state = "T" * 20 - assert self.model.get("state") == "T" * 20 - - with pytest.raises(Exception) as info: - self.model.state = "T" * (20 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_postal_code(self): - """Test SMSTenDLCBrand.postal_code""" - self.model.postal_code = "T" * 10 - assert self.model.get("postal_code") == "T" * 10 - - with pytest.raises(Exception) as info: - self.model.postal_code = "T" * (10 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_country(self): - """Test SMSTenDLCBrand.country""" - self.model.country = "T" * 2 - assert self.model.get("country") == "T" * 2 - - with pytest.raises(Exception) as info: - self.model.country = "T" * (2 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_email(self): - """Test SMSTenDLCBrand.email""" - self.model.email = "T" * 100 - assert self.model.get("email") == "T" * 100 - - with pytest.raises(Exception) as info: - self.model.email = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_stock_symbol(self): - """Test SMSTenDLCBrand.stock_symbol""" - self.model.stock_symbol = "T" * 10 - assert self.model.get("stock_symbol") == "T" * 10 - - with pytest.raises(Exception) as info: - self.model.stock_symbol = "T" * (10 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_stock_exchange(self): - """Test SMSTenDLCBrand.stock_exchange""" - - self.model.stock_exchange = "NONE" - assert self.model.get("stock_exchange") == "NONE" - - self.model.stock_exchange = "NASDAQ" - assert self.model.get("stock_exchange") == "NASDAQ" - - self.model.stock_exchange = "NYSE" - assert self.model.get("stock_exchange") == "NYSE" - - self.model.stock_exchange = "AMEX" - assert self.model.get("stock_exchange") == "AMEX" - - self.model.stock_exchange = "AMX" - assert self.model.get("stock_exchange") == "AMX" - - self.model.stock_exchange = "ASX" - assert self.model.get("stock_exchange") == "ASX" - - self.model.stock_exchange = "B3" - assert self.model.get("stock_exchange") == "B3" - - self.model.stock_exchange = "BME" - assert self.model.get("stock_exchange") == "BME" - - self.model.stock_exchange = "BSE" - assert self.model.get("stock_exchange") == "BSE" - - self.model.stock_exchange = "FRA" - assert self.model.get("stock_exchange") == "FRA" - - self.model.stock_exchange = "ICEX" - assert self.model.get("stock_exchange") == "ICEX" - - self.model.stock_exchange = "JPX" - assert self.model.get("stock_exchange") == "JPX" - - self.model.stock_exchange = "JSE" - assert self.model.get("stock_exchange") == "JSE" - - self.model.stock_exchange = "KRX" - assert self.model.get("stock_exchange") == "KRX" - - self.model.stock_exchange = "LON" - assert self.model.get("stock_exchange") == "LON" - - self.model.stock_exchange = "NSE" - assert self.model.get("stock_exchange") == "NSE" - - self.model.stock_exchange = "OMX" - assert self.model.get("stock_exchange") == "OMX" - - self.model.stock_exchange = "SEHK" - assert self.model.get("stock_exchange") == "SEHK" - - self.model.stock_exchange = "SGX" - assert self.model.get("stock_exchange") == "SGX" - - self.model.stock_exchange = "SSE" - assert self.model.get("stock_exchange") == "SSE" - - self.model.stock_exchange = "STO" - assert self.model.get("stock_exchange") == "STO" - - self.model.stock_exchange = "SWX" - assert self.model.get("stock_exchange") == "SWX" - - self.model.stock_exchange = "SZSE" - assert self.model.get("stock_exchange") == "SZSE" - - self.model.stock_exchange = "TSX" - assert self.model.get("stock_exchange") == "TSX" - - self.model.stock_exchange = "TWSE" - assert self.model.get("stock_exchange") == "TWSE" - - self.model.stock_exchange = "VSE" - assert self.model.get("stock_exchange") == "VSE" - - self.model.stock_exchange = "OTHER" - assert self.model.get("stock_exchange") == "OTHER" - - - def test_stock_exchange_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.stock_exchange = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_ip_address(self): - """Test SMSTenDLCBrand.ip_address""" - self.model.ip_address = "T" * 50 - assert self.model.get("ip_address") == "T" * 50 - - with pytest.raises(Exception) as info: - self.model.ip_address = "T" * (50 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_website(self): - """Test SMSTenDLCBrand.website""" - self.model.website = "T" * 100 - assert self.model.get("website") == "T" * 100 - - with pytest.raises(Exception) as info: - self.model.website = "T" * (100 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_brand_relationship(self): - """Test SMSTenDLCBrand.brand_relationship""" - - self.model.brand_relationship = "BASIC_ACCOUNT" - assert self.model.get("brand_relationship") == "BASIC_ACCOUNT" - - self.model.brand_relationship = "SMALL_ACCOUNT" - assert self.model.get("brand_relationship") == "SMALL_ACCOUNT" - - self.model.brand_relationship = "MEDIUM_ACCOUNT" - assert self.model.get("brand_relationship") == "MEDIUM_ACCOUNT" - - self.model.brand_relationship = "LARGE_ACCOUNT" - assert self.model.get("brand_relationship") == "LARGE_ACCOUNT" - - self.model.brand_relationship = "KEY_ACCOUNT" - assert self.model.get("brand_relationship") == "KEY_ACCOUNT" - - - def test_brand_relationship_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.brand_relationship = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_vertical(self): - """Test SMSTenDLCBrand.vertical""" - self.model.vertical = "T" * 50 - assert self.model.get("vertical") == "T" * 50 - - with pytest.raises(Exception) as info: - self.model.vertical = "T" * (50 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_alt_business_id(self): - """Test SMSTenDLCBrand.alt_business_id""" - self.model.alt_business_id = "T" * 50 - assert self.model.get("alt_business_id") == "T" * 50 - - with pytest.raises(Exception) as info: - self.model.alt_business_id = "T" * (50 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_alt_business_id_type(self): - """Test SMSTenDLCBrand.alt_business_id_type""" - - self.model.alt_business_id_type = "NONE" - assert self.model.get("alt_business_id_type") == "NONE" - - self.model.alt_business_id_type = "DUNS" - assert self.model.get("alt_business_id_type") == "DUNS" - - self.model.alt_business_id_type = "GIIN" - assert self.model.get("alt_business_id_type") == "GIIN" - - self.model.alt_business_id_type = "LEI" - assert self.model.get("alt_business_id_type") == "LEI" - - - def test_alt_business_id_type_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.alt_business_id_type = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_universal_ein(self): - """Test SMSTenDLCBrand.universal_ein""" - self.model.universal_ein = "TEST_STRING" - assert self.model.get("universal_ein") == "TEST_STRING" - - def test_reference_id(self): - """Test SMSTenDLCBrand.reference_id""" - self.model.reference_id = "T" * 50 - assert self.model.get("reference_id") == "T" * 50 - - with pytest.raises(Exception) as info: - self.model.reference_id = "T" * (50 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_optional_attributes(self): - """Test SMSTenDLCBrand.optional_attributes""" - self.model.optional_attributes = {} - assert self.model.get("optional_attributes") == {} - - def test_mock(self): - """Test SMSTenDLCBrand.mock""" - self.model.mock = False - assert self.model.get("mock") == False - - def test_identity_status(self): - """Test SMSTenDLCBrand.identity_status""" - - self.model.identity_status = "SELF_DECLARED" - assert self.model.get("identity_status") == "SELF_DECLARED" - - self.model.identity_status = "UNVERIFIED" - assert self.model.get("identity_status") == "UNVERIFIED" - - self.model.identity_status = "VERIFIED" - assert self.model.get("identity_status") == "VERIFIED" - - self.model.identity_status = "VETTED_VERIFIED" - assert self.model.get("identity_status") == "VETTED_VERIFIED" - - - def test_identity_status_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.identity_status = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_create_date(self): - """Test SMSTenDLCBrand.create_date""" - self.model.create_date = datetime.fromtimestamp(1691592436) - assert self.model.get("create_date") == datetime.fromtimestamp(1691592436) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms_ten_dlc_brands_list_result_all_of.py b/test/test_sms_ten_dlc_brands_list_result_all_of.py deleted file mode 100644 index d94bf89..0000000 --- a/test/test_sms_ten_dlc_brands_list_result_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.sms_ten_dlc_brand import SMSTenDLCBrand -globals()['SMSTenDLCBrand'] = SMSTenDLCBrand - -from freeclimb.model.sms_ten_dlc_brands_list_result_all_of import SMSTenDLCBrandsListResultAllOf # noqa: E501 - -class TestSMSTenDLCBrandsListResultAllOf(unittest.TestCase): - """SMSTenDLCBrandsListResultAllOf unit test stubs""" - - def setUp(self): - self.model = SMSTenDLCBrandsListResultAllOf( - ) - - def test_brands(self): - """Test SMSTenDLCBrandsListResultAllOf.brands""" - testList = [] - self.model.brands = testList - assert self.model.get("brands") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms_ten_dlc_campaigns_list_result_all_of.py b/test/test_sms_ten_dlc_campaigns_list_result_all_of.py deleted file mode 100644 index 3552f10..0000000 --- a/test/test_sms_ten_dlc_campaigns_list_result_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.sms_ten_dlc_campaign import SMSTenDLCCampaign -globals()['SMSTenDLCCampaign'] = SMSTenDLCCampaign - -from freeclimb.model.sms_ten_dlc_campaigns_list_result_all_of import SMSTenDLCCampaignsListResultAllOf # noqa: E501 - -class TestSMSTenDLCCampaignsListResultAllOf(unittest.TestCase): - """SMSTenDLCCampaignsListResultAllOf unit test stubs""" - - def setUp(self): - self.model = SMSTenDLCCampaignsListResultAllOf( - ) - - def test_campaigns(self): - """Test SMSTenDLCCampaignsListResultAllOf.campaigns""" - testList = [] - self.model.campaigns = testList - assert self.model.get("campaigns") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms_ten_dlc_partner_campaign.py b/test/test_sms_ten_dlc_partner_campaign.py deleted file mode 100644 index bfb3a14..0000000 --- a/test/test_sms_ten_dlc_partner_campaign.py +++ /dev/null @@ -1,281 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.sms_ten_dlc_partner_campaign_brand import SMSTenDLCPartnerCampaignBrand -globals()['SMSTenDLCPartnerCampaignBrand'] = SMSTenDLCPartnerCampaignBrand - -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign # noqa: E501 - -class TestSMSTenDLCPartnerCampaign(unittest.TestCase): - """SMSTenDLCPartnerCampaign unit test stubs""" - - def setUp(self): - self.model = SMSTenDLCPartnerCampaign( - campaign_id="", - brand_id="", - usecase="", - description="", - ) - - def test_account_id(self): - """Test SMSTenDLCPartnerCampaign.account_id""" - self.model.account_id = "TEST_STRING" - assert self.model.get("account_id") == "TEST_STRING" - - def test_campaign_id(self): - """Test SMSTenDLCPartnerCampaign.campaign_id""" - self.model.campaign_id = "TEST_STRING" - assert self.model.get("campaign_id") == "TEST_STRING" - - def test_status(self): - """Test SMSTenDLCPartnerCampaign.status""" - - self.model.status = "ACTIVE" - assert self.model.get("status") == "ACTIVE" - - self.model.status = "EXPIRED" - assert self.model.get("status") == "EXPIRED" - - - def test_status_throws_on_invalid_enum(self): - with pytest.raises(Exception) as info: - self.model.status = "INVALID_ENUM" - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_create_date(self): - """Test SMSTenDLCPartnerCampaign.create_date""" - self.model.create_date = datetime.fromtimestamp(1691592436) - assert self.model.get("create_date") == datetime.fromtimestamp(1691592436) - - def test_brand_id(self): - """Test SMSTenDLCPartnerCampaign.brand_id""" - self.model.brand_id = "T" * 8 - assert self.model.get("brand_id") == "T" * 8 - - with pytest.raises(Exception) as info: - self.model.brand_id = "T" * (8 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_usecase(self): - """Test SMSTenDLCPartnerCampaign.usecase""" - self.model.usecase = "T" * 20 - assert self.model.get("usecase") == "T" * 20 - - with pytest.raises(Exception) as info: - self.model.usecase = "T" * (20 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_description(self): - """Test SMSTenDLCPartnerCampaign.description""" - self.model.description = "T" * 4096 - assert self.model.get("description") == "T" * 4096 - - with pytest.raises(Exception) as info: - self.model.description = "T" * (4096 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_embedded_link(self): - """Test SMSTenDLCPartnerCampaign.embedded_link""" - self.model.embedded_link = False - assert self.model.get("embedded_link") == False - - def test_embedded_phone(self): - """Test SMSTenDLCPartnerCampaign.embedded_phone""" - self.model.embedded_phone = False - assert self.model.get("embedded_phone") == False - - def test_affiliate_marketing(self): - """Test SMSTenDLCPartnerCampaign.affiliate_marketing""" - self.model.affiliate_marketing = False - assert self.model.get("affiliate_marketing") == False - - def test_number_pool(self): - """Test SMSTenDLCPartnerCampaign.number_pool""" - self.model.number_pool = False - assert self.model.get("number_pool") == False - - def test_age_gated(self): - """Test SMSTenDLCPartnerCampaign.age_gated""" - self.model.age_gated = False - assert self.model.get("age_gated") == False - - def test_direct_lending(self): - """Test SMSTenDLCPartnerCampaign.direct_lending""" - self.model.direct_lending = False - assert self.model.get("direct_lending") == False - - def test_subscriber_optin(self): - """Test SMSTenDLCPartnerCampaign.subscriber_optin""" - self.model.subscriber_optin = False - assert self.model.get("subscriber_optin") == False - - def test_subscriber_optout(self): - """Test SMSTenDLCPartnerCampaign.subscriber_optout""" - self.model.subscriber_optout = False - assert self.model.get("subscriber_optout") == False - - def test_subscriber_help(self): - """Test SMSTenDLCPartnerCampaign.subscriber_help""" - self.model.subscriber_help = False - assert self.model.get("subscriber_help") == False - - def test_sample1(self): - """Test SMSTenDLCPartnerCampaign.sample1""" - self.model.sample1 = "T" * 1024 - assert self.model.get("sample1") == "T" * 1024 - - with pytest.raises(Exception) as info: - self.model.sample1 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_sample2(self): - """Test SMSTenDLCPartnerCampaign.sample2""" - self.model.sample2 = "T" * 1024 - assert self.model.get("sample2") == "T" * 1024 - - with pytest.raises(Exception) as info: - self.model.sample2 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_sample3(self): - """Test SMSTenDLCPartnerCampaign.sample3""" - self.model.sample3 = "T" * 1024 - assert self.model.get("sample3") == "T" * 1024 - - with pytest.raises(Exception) as info: - self.model.sample3 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_sample4(self): - """Test SMSTenDLCPartnerCampaign.sample4""" - self.model.sample4 = "T" * 1024 - assert self.model.get("sample4") == "T" * 1024 - - with pytest.raises(Exception) as info: - self.model.sample4 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_sample5(self): - """Test SMSTenDLCPartnerCampaign.sample5""" - self.model.sample5 = "T" * 1024 - assert self.model.get("sample5") == "T" * 1024 - - with pytest.raises(Exception) as info: - self.model.sample5 = "T" * (1024 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_message_flow(self): - """Test SMSTenDLCPartnerCampaign.message_flow""" - self.model.message_flow = "T" * 2048 - assert self.model.get("message_flow") == "T" * 2048 - - with pytest.raises(Exception) as info: - self.model.message_flow = "T" * (2048 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_help_message(self): - """Test SMSTenDLCPartnerCampaign.help_message""" - self.model.help_message = "T" * 255 - assert self.model.get("help_message") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.help_message = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_optin_keywords(self): - """Test SMSTenDLCPartnerCampaign.optin_keywords""" - self.model.optin_keywords = "T" * 255 - assert self.model.get("optin_keywords") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.optin_keywords = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_optout_keywords(self): - """Test SMSTenDLCPartnerCampaign.optout_keywords""" - self.model.optout_keywords = "T" * 255 - assert self.model.get("optout_keywords") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.optout_keywords = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_help_keywords(self): - """Test SMSTenDLCPartnerCampaign.help_keywords""" - self.model.help_keywords = "T" * 255 - assert self.model.get("help_keywords") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.help_keywords = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_optin_message(self): - """Test SMSTenDLCPartnerCampaign.optin_message""" - self.model.optin_message = "T" * 255 - assert self.model.get("optin_message") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.optin_message = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_optout_message(self): - """Test SMSTenDLCPartnerCampaign.optout_message""" - self.model.optout_message = "T" * 255 - assert self.model.get("optout_message") == "T" * 255 - - with pytest.raises(Exception) as info: - self.model.optout_message = "T" * (255 + 1) - exception_raised = info.value - assert exception_raised.__class__.__name__ == freeclimb.ApiValueError.__name__ - - def test_brand(self): - """Test SMSTenDLCPartnerCampaign.brand""" - object = SMSTenDLCPartnerCampaignBrand( - account_id="account_id_example", - first_name="John", - last_name="Doe", - display_name="ABC Mobile", - company_name="ABC Inc.", - phone="+12024567890", - email="email_example", - website="http://www.abcmobile.com", - optional_attributes={ - "key": {}, - }, - evp_vetting_score=1, - ) - self.model.brand = object - assert self.model.get("brand", object) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms_ten_dlc_partner_campaigns_list_result_all_of.py b/test/test_sms_ten_dlc_partner_campaigns_list_result_all_of.py deleted file mode 100644 index a3e7093..0000000 --- a/test/test_sms_ten_dlc_partner_campaigns_list_result_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.sms_ten_dlc_partner_campaign import SMSTenDLCPartnerCampaign -globals()['SMSTenDLCPartnerCampaign'] = SMSTenDLCPartnerCampaign - -from freeclimb.model.sms_ten_dlc_partner_campaigns_list_result_all_of import SMSTenDLCPartnerCampaignsListResultAllOf # noqa: E501 - -class TestSMSTenDLCPartnerCampaignsListResultAllOf(unittest.TestCase): - """SMSTenDLCPartnerCampaignsListResultAllOf unit test stubs""" - - def setUp(self): - self.model = SMSTenDLCPartnerCampaignsListResultAllOf( - ) - - def test_partner_campaigns(self): - """Test SMSTenDLCPartnerCampaignsListResultAllOf.partner_campaigns""" - testList = [] - self.model.partner_campaigns = testList - assert self.model.get("partner_campaigns") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_sms_toll_free_campaigns_list_result_all_of.py b/test/test_sms_toll_free_campaigns_list_result_all_of.py deleted file mode 100644 index 3aef63a..0000000 --- a/test/test_sms_toll_free_campaigns_list_result_all_of.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.sms_toll_free_campaign import SMSTollFreeCampaign -globals()['SMSTollFreeCampaign'] = SMSTollFreeCampaign - -from freeclimb.model.sms_toll_free_campaigns_list_result_all_of import SMSTollFreeCampaignsListResultAllOf # noqa: E501 - -class TestSMSTollFreeCampaignsListResultAllOf(unittest.TestCase): - """SMSTollFreeCampaignsListResultAllOf unit test stubs""" - - def setUp(self): - self.model = SMSTollFreeCampaignsListResultAllOf( - ) - - def test_brands(self): - """Test SMSTollFreeCampaignsListResultAllOf.brands""" - testList = [] - self.model.brands = testList - assert self.model.get("brands") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_start_record_call.py b/test/test_start_record_call.py deleted file mode 100644 index af1d709..0000000 --- a/test/test_start_record_call.py +++ /dev/null @@ -1,85 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.start_record_call import StartRecordCall # noqa: E501 - -class TestStartRecordCall(unittest.TestCase): - """StartRecordCall unit test stubs""" - - def setUp(self): - self.model = StartRecordCall( - ) - - - def test_command_test(self): - assert self.model.command == "StartRecordCall" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_terminate_conference.py b/test/test_terminate_conference.py deleted file mode 100644 index 64f2c56..0000000 --- a/test/test_terminate_conference.py +++ /dev/null @@ -1,85 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.terminate_conference import TerminateConference # noqa: E501 - -class TestTerminateConference(unittest.TestCase): - """TerminateConference unit test stubs""" - - def setUp(self): - self.model = TerminateConference( - ) - - - def test_command_test(self): - assert self.model.command == "TerminateConference" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_transcribe_utterance.py b/test/test_transcribe_utterance.py deleted file mode 100644 index 4274a46..0000000 --- a/test/test_transcribe_utterance.py +++ /dev/null @@ -1,126 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.transcribe_utterance_all_of import TranscribeUtteranceAllOf -from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['TranscribeUtteranceAllOf'] = TranscribeUtteranceAllOf -globals()['TranscribeUtteranceAllOfRecord'] = TranscribeUtteranceAllOfRecord -globals()['Unpark'] = Unpark - -from freeclimb.model.transcribe_utterance import TranscribeUtterance # noqa: E501 - -class TestTranscribeUtterance(unittest.TestCase): - """TranscribeUtterance unit test stubs""" - - def setUp(self): - self.model = TranscribeUtterance( - action_url="", - ) - - def test_action_url(self): - """Test TranscribeUtterance.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_play_beep(self): - """Test TranscribeUtterance.play_beep""" - self.model.play_beep = False - assert self.model.get("play_beep") == False - - def test_record(self): - """Test TranscribeUtterance.record""" - object = TranscribeUtteranceAllOfRecord( - save_recording=False, - max_length_sec=60, - rcrd_termination_silence_time_ms=0, - ) - self.model.record = object - assert self.model.get("record", object) - - def test_privacy_for_logging(self): - """Test TranscribeUtterance.privacy_for_logging""" - self.model.privacy_for_logging = False - assert self.model.get("privacy_for_logging") == False - - def test_privacy_for_recording(self): - """Test TranscribeUtterance.privacy_for_recording""" - self.model.privacy_for_recording = False - assert self.model.get("privacy_for_recording") == False - - def test_prompts(self): - """Test TranscribeUtterance.prompts""" - testList = [] - self.model.prompts = testList - assert self.model.get("prompts") == testList - - - def test_command_test(self): - assert self.model.command == "TranscribeUtterance" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_transcribe_utterance_all_of.py b/test/test_transcribe_utterance_all_of.py deleted file mode 100644 index 623d384..0000000 --- a/test/test_transcribe_utterance_all_of.py +++ /dev/null @@ -1,69 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.transcribe_utterance_all_of_record import TranscribeUtteranceAllOfRecord -globals()['TranscribeUtteranceAllOfRecord'] = TranscribeUtteranceAllOfRecord - -from freeclimb.model.transcribe_utterance_all_of import TranscribeUtteranceAllOf # noqa: E501 - -class TestTranscribeUtteranceAllOf(unittest.TestCase): - """TranscribeUtteranceAllOf unit test stubs""" - - def setUp(self): - self.model = TranscribeUtteranceAllOf( - action_url="", - ) - - def test_action_url(self): - """Test TranscribeUtteranceAllOf.action_url""" - self.model.action_url = "TEST_STRING" - assert self.model.get("action_url") == "TEST_STRING" - - def test_play_beep(self): - """Test TranscribeUtteranceAllOf.play_beep""" - self.model.play_beep = False - assert self.model.get("play_beep") == False - - def test_record(self): - """Test TranscribeUtteranceAllOf.record""" - object = TranscribeUtteranceAllOfRecord( - save_recording=False, - max_length_sec=60, - rcrd_termination_silence_time_ms=0, - ) - self.model.record = object - assert self.model.get("record", object) - - def test_privacy_for_logging(self): - """Test TranscribeUtteranceAllOf.privacy_for_logging""" - self.model.privacy_for_logging = False - assert self.model.get("privacy_for_logging") == False - - def test_privacy_for_recording(self): - """Test TranscribeUtteranceAllOf.privacy_for_recording""" - self.model.privacy_for_recording = False - assert self.model.get("privacy_for_recording") == False - - def test_prompts(self): - """Test TranscribeUtteranceAllOf.prompts""" - testList = [] - self.model.prompts = testList - assert self.model.get("prompts") == testList - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_unpark.py b/test/test_unpark.py deleted file mode 100644 index 075129e..0000000 --- a/test/test_unpark.py +++ /dev/null @@ -1,85 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb -from freeclimb.model.add_to_conference import AddToConference -from freeclimb.model.create_conference import CreateConference -from freeclimb.model.dequeue import Dequeue -from freeclimb.model.enqueue import Enqueue -from freeclimb.model.get_digits import GetDigits -from freeclimb.model.get_speech import GetSpeech -from freeclimb.model.hangup import Hangup -from freeclimb.model.out_dial import OutDial -from freeclimb.model.park import Park -from freeclimb.model.pause import Pause -from freeclimb.model.percl_command import PerclCommand -from freeclimb.model.play import Play -from freeclimb.model.play_early_media import PlayEarlyMedia -from freeclimb.model.record_utterance import RecordUtterance -from freeclimb.model.redirect import Redirect -from freeclimb.model.reject import Reject -from freeclimb.model.remove_from_conference import RemoveFromConference -from freeclimb.model.say import Say -from freeclimb.model.send_digits import SendDigits -from freeclimb.model.set_listen import SetListen -from freeclimb.model.set_talk import SetTalk -from freeclimb.model.sms import Sms -from freeclimb.model.start_record_call import StartRecordCall -from freeclimb.model.terminate_conference import TerminateConference -from freeclimb.model.transcribe_utterance import TranscribeUtterance -from freeclimb.model.unpark import Unpark -globals()['AddToConference'] = AddToConference -globals()['CreateConference'] = CreateConference -globals()['Dequeue'] = Dequeue -globals()['Enqueue'] = Enqueue -globals()['GetDigits'] = GetDigits -globals()['GetSpeech'] = GetSpeech -globals()['Hangup'] = Hangup -globals()['OutDial'] = OutDial -globals()['Park'] = Park -globals()['Pause'] = Pause -globals()['PerclCommand'] = PerclCommand -globals()['Play'] = Play -globals()['PlayEarlyMedia'] = PlayEarlyMedia -globals()['RecordUtterance'] = RecordUtterance -globals()['Redirect'] = Redirect -globals()['Reject'] = Reject -globals()['RemoveFromConference'] = RemoveFromConference -globals()['Say'] = Say -globals()['SendDigits'] = SendDigits -globals()['SetListen'] = SetListen -globals()['SetTalk'] = SetTalk -globals()['Sms'] = Sms -globals()['StartRecordCall'] = StartRecordCall -globals()['TerminateConference'] = TerminateConference -globals()['TranscribeUtterance'] = TranscribeUtterance -globals()['Unpark'] = Unpark - -from freeclimb.model.unpark import Unpark # noqa: E501 - -class TestUnpark(unittest.TestCase): - """Unpark unit test stubs""" - - def setUp(self): - self.model = Unpark( - ) - - - def test_command_test(self): - assert self.model.command == "Unpark" - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_update_call_request_status.py b/test/test_update_call_request_status.py deleted file mode 100644 index d42be27..0000000 --- a/test/test_update_call_request_status.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.update_call_request_status import UpdateCallRequestStatus # noqa: E501 - -class TestUpdateCallRequestStatus(unittest.TestCase): - """UpdateCallRequestStatus unit test stubs""" - - - def test_CANCELED_should_serialize_to_enum(self): - expected = UpdateCallRequestStatus.CANCELED - calculated = UpdateCallRequestStatus['CANCELED'] - assert expected == calculated - - def test_CANCELED_should_deserialize_to_string(self): - test = UpdateCallRequestStatus.CANCELED - expected = "canceled" - calculated = test.value - assert expected == calculated - - def test_COMPLETED_should_serialize_to_enum(self): - expected = UpdateCallRequestStatus.COMPLETED - calculated = UpdateCallRequestStatus['COMPLETED'] - assert expected == calculated - - def test_COMPLETED_should_deserialize_to_string(self): - test = UpdateCallRequestStatus.COMPLETED - expected = "completed" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/test/test_update_conference_request_status.py b/test/test_update_conference_request_status.py deleted file mode 100644 index 74eff82..0000000 --- a/test/test_update_conference_request_status.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - FreeClimb API - - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import datetime, date -import pytest - -import freeclimb - -from freeclimb.model.update_conference_request_status import UpdateConferenceRequestStatus # noqa: E501 - -class TestUpdateConferenceRequestStatus(unittest.TestCase): - """UpdateConferenceRequestStatus unit test stubs""" - - - def test_EMPTY_should_serialize_to_enum(self): - expected = UpdateConferenceRequestStatus.EMPTY - calculated = UpdateConferenceRequestStatus['EMPTY'] - assert expected == calculated - - def test_EMPTY_should_deserialize_to_string(self): - test = UpdateConferenceRequestStatus.EMPTY - expected = "empty" - calculated = test.value - assert expected == calculated - - def test_TERMINATED_should_serialize_to_enum(self): - expected = UpdateConferenceRequestStatus.TERMINATED - calculated = UpdateConferenceRequestStatus['TERMINATED'] - assert expected == calculated - - def test_TERMINATED_should_deserialize_to_string(self): - test = UpdateConferenceRequestStatus.TERMINATED - expected = "terminated" - calculated = test.value - assert expected == calculated - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b8d243a..05c5376 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,15 +17,15 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@jsep-plugin/assignment@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@jsep-plugin/assignment/-/assignment-1.2.1.tgz#07277bdd7862451a865d391e2142efba33f46c9b" - integrity sha512-gaHqbubTi29aZpVbBlECRpmdia+L5/lh2BwtIJTmtxdbecEyyX/ejAOg7eQDGNvGOUmPY7Z2Yxdy9ioyH/VJeA== +"@jsep-plugin/assignment@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@jsep-plugin/assignment/-/assignment-1.3.0.tgz#fcfc5417a04933f7ceee786e8ab498aa3ce2b242" + integrity sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ== -"@jsep-plugin/regex@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@jsep-plugin/regex/-/regex-1.0.3.tgz#3aeaa2e5fa45d89de116aeafbfa41c95935b7f6d" - integrity sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug== +"@jsep-plugin/regex@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@jsep-plugin/regex/-/regex-1.0.4.tgz#cb2fc423220fa71c609323b9ba7f7d344a755fcc" + integrity sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg== "@stoplight/http-spec@^7.0.2", "@stoplight/http-spec@^7.0.3": version "7.1.0" @@ -86,7 +86,7 @@ "@types/json-schema" "^7.0.7" json-pointer "^0.6.1" -"@stoplight/json@3.20.0", "@stoplight/json@^3.18.1": +"@stoplight/json@3.20.0", "@stoplight/json@3.21.7", "@stoplight/json@^3.18.1": version "3.20.0" resolved "https://registry.yarnpkg.com/@stoplight/json/-/json-3.20.0.tgz#3acd893c6ed3394ac0a32b383038bd9710a167f9" integrity sha512-xR5nnO2HSy7hGzchUAv1/p7V94EXwHmpbm5ORim4BQm8w/u1sF2ttIYqDx8BesTLWTybRxLysyDH+QHjpQnQdw== @@ -145,12 +145,12 @@ tslib "^2.3.1" "@stoplight/prism-http-server@^5.6.0": - version "5.8.3" - resolved "https://registry.yarnpkg.com/@stoplight/prism-http-server/-/prism-http-server-5.8.3.tgz#da4185778e83d18d72d4c2f287865276823fac17" - integrity sha512-7SOBjccS+czl9F2eKxY1Y3bjFefq+1aX2PdSHC5+HcZ2oupffRKMA0gIL2/lsvgcPGBO0HJvl6WXPLnRJ3q2yw== + version "5.12.0" + resolved "https://registry.yarnpkg.com/@stoplight/prism-http-server/-/prism-http-server-5.12.0.tgz#c1fdc86bcb7d42d3420b9b84f05f9ae8977bc953" + integrity sha512-rnACUB950kvgDGXk1MsVk1v8nAZNCRaxdrTlACoJpQA0qzF8eBszYikoDsVmx2BbGsOrCC/49+nQc+HyFFpMdQ== dependencies: "@stoplight/prism-core" "^5.8.0" - "@stoplight/prism-http" "^5.8.3" + "@stoplight/prism-http" "^5.12.0" "@stoplight/types" "^14.1.0" fast-xml-parser "^4.2.0" fp-ts "^2.11.5" @@ -162,14 +162,14 @@ tslib "^2.3.1" type-is "^1.6.18" -"@stoplight/prism-http@^5.6.0", "@stoplight/prism-http@^5.8.3": - version "5.8.3" - resolved "https://registry.yarnpkg.com/@stoplight/prism-http/-/prism-http-5.8.3.tgz#a0d10faf5bb375587fde9e58523b7a47b2340a47" - integrity sha512-v58g0d4zhLbGiKkXSIE4ineYkIK8IZ/FT3im2Sg78hhp69TkF9bZc8+XdVYPLZxt1jkLDcm2SepM/InDtaK0xA== +"@stoplight/prism-http@^5.12.0", "@stoplight/prism-http@^5.6.0": + version "5.12.0" + resolved "https://registry.yarnpkg.com/@stoplight/prism-http/-/prism-http-5.12.0.tgz#b763292c5044e9213b558cbc44e5a2187cfffea4" + integrity sha512-H+B/SO4SgQ6DT3CHIDCMQFGOe48Yecj0Eu+6rXwrs5m1JFyA2nlDwz+r73QJLGQanN4Biod2s0V9pZRcs2JnPA== dependencies: "@faker-js/faker" "^6.0.0" "@stoplight/http-spec" "^7.0.3" - "@stoplight/json" "^3.18.1" + "@stoplight/json" "3.21.7" "@stoplight/json-schema-merge-allof" "0.7.8" "@stoplight/json-schema-ref-parser" "9.2.7" "@stoplight/json-schema-sampler" "0.3.0" @@ -186,11 +186,12 @@ fp-ts "^2.11.5" http-proxy-agent "^5.0.0" https-proxy-agent "^5.0.0" - json-schema-faker "0.5.3" + json-schema-faker "0.5.8" lodash "^4.17.21" node-fetch "^2.6.5" parse-multipart-data "^1.5.0" pino "^6.13.3" + seedrandom "^3.0.5" tslib "^2.3.1" type-is "^1.6.18" uri-template-lite "^22.9.0" @@ -251,11 +252,11 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "20.14.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b" - integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA== + version "22.10.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b" + integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ== dependencies: - undici-types "~5.26.4" + undici-types "~6.20.0" "@types/swagger-schema-official@~2.0.22": version "2.0.25" @@ -467,18 +468,18 @@ content-type@^1.0.4: integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== cross-fetch@^3.1.5: - version "3.1.8" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" - integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.2.0.tgz#34e9192f53bc757d6614304d9e5e6fb4edb782e3" + integrity sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q== dependencies: - node-fetch "^2.6.12" + node-fetch "^2.7.0" debug@4: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: - ms "2.1.2" + ms "^2.1.3" emoji-regex@^8.0.0: version "8.0.0" @@ -493,9 +494,9 @@ error-ex@^1.3.1: is-arrayish "^0.2.1" escalade@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -523,14 +524,14 @@ fast-safe-stringify@^2.0.8: integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== fast-uri@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" - integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + version "3.0.5" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.5.tgz#19f5f9691d0dab9b85861a7bb5d98fca961da9cd" + integrity sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q== fast-xml-parser@^4.2.0, fast-xml-parser@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz#2882b7d01a6825dfdf909638f2de0256351def37" - integrity sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg== + version "4.5.1" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz#a7e665ff79b7919100a5202f23984b6150f9b31e" + integrity sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w== dependencies: strnum "^1.0.5" @@ -586,9 +587,9 @@ format-util@^1.0.3: integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== fp-ts@^2.11.5: - version "2.16.8" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.16.8.tgz#dfa1ea1c967ac6794c43ce877aeb8ed76f5e0df7" - integrity sha512-nmDtNqmMZkOxu0M5hkrS9YA15/KPkYkILb6Axg9XBAoUoYEtzg+LFmVWqZrl9FNttsW0qIUpx9RCA9INbv+Bxw== + version "2.16.9" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.16.9.tgz#99628fc5e0bb3b432c4a16d8f4455247380bae8a" + integrity sha512-+I2+FnVB+tVaxcYyQkHUq7ZdKScaBlX53A41mxQtpIccsfyv8PzdzP7fzp2AY832T4aoK6UZ5WRX/ebGd8uZuQ== fsevents@~2.3.2: version "2.3.3" @@ -662,9 +663,9 @@ inherits@^2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== io-ts@^2.2.16: - version "2.2.21" - resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.2.21.tgz#4ef754176f7082a1099d04c7d5c4ea53267c530a" - integrity sha512-zz2Z69v9ZIC3mMLYWIeoUcwWD6f+O7yP92FMVVaXEOSZH1jnVBmET/urd/uoarD1WGBY4rCj8TAyMPzsGNzMFQ== + version "2.2.22" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.2.22.tgz#5ab0d3636fe8494a275f0266461ab019da4b8d0b" + integrity sha512-FHCCztTkHoV9mdBsHpocLpdTAfh956ZQcIkWQxxS0U5HT53vtrcuYdQneEJKH6xILaLNzXVl2Cvwtoy8XNN0AA== is-arrayish@^0.2.1: version "0.2.1" @@ -716,10 +717,10 @@ js-yaml@^3.12.1: argparse "^1.0.7" esprima "^4.0.0" -jsep@^1.3.9: - version "1.3.9" - resolved "https://registry.yarnpkg.com/jsep/-/jsep-1.3.9.tgz#8ce42df80ee9c1b39e52d0dd062a465342f35440" - integrity sha512-i1rBX5N7VPl0eYb6+mHNp52sEuaS2Wi8CDYx1X5sn9naevL78+265XJqy1qENEk7mRKwS06NHpUqiBwR7qeodw== +jsep@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsep/-/jsep-1.4.0.tgz#19feccbfa51d8a79f72480b4b8e40ce2e17152f0" + integrity sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw== json-parse-better-errors@^1.0.1: version "1.0.2" @@ -755,6 +756,14 @@ json-schema-faker@0.5.3: json-schema-ref-parser "^6.1.0" jsonpath-plus "^7.2.0" +json-schema-faker@0.5.8: + version "0.5.8" + resolved "https://registry.yarnpkg.com/json-schema-faker/-/json-schema-faker-0.5.8.tgz#13e8b53fef4d86de5c5d164763c80427da892b0c" + integrity sha512-sqzPEbEDlpiH8U1tfmJHScXHy52onvMxITPsHyhe/jhS83g8TX6ruvRqt/ot1bXUPRsh7Ps1sWqJiBxIXmW5Xw== + dependencies: + json-schema-ref-parser "^6.1.0" + jsonpath-plus "^10.1.0" + json-schema-ref-parser@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz#30af34aeab5bee0431da805dac0eb21b574bf63d" @@ -774,14 +783,14 @@ jsonc-parser@~2.2.1: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== -jsonpath-plus@^10.0.0, jsonpath-plus@^7.2.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-10.0.1.tgz#a61f4dc6c7489955af0872b0956cc42fbbacb5ab" - integrity sha512-30DeH2QD4nL1IpDLPIFz09G5XyLvh+oNMUI2Zxf4tbrlsVHs0e3VPnwpOnSTFb4yM0dfQK2WGKLsSaAS8V62rw== +jsonpath-plus@^10.0.0, jsonpath-plus@^10.1.0, jsonpath-plus@^7.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-10.2.0.tgz#84d680544d9868579cc7c8f59bbe153a5aad54c4" + integrity sha512-T9V+8iNYKFL2n2rF+w02LBOT2JjDnTjioaNFrxRy0Bv1y/hNsqR/EBK7Ojy2ythRHwmz2cRIls+9JitQGZC/sw== dependencies: - "@jsep-plugin/assignment" "^1.2.1" - "@jsep-plugin/regex" "^1.0.3" - jsep "^1.3.9" + "@jsep-plugin/assignment" "^1.3.0" + "@jsep-plugin/regex" "^1.0.4" + jsep "^1.4.0" liquid-json@0.3.1: version "0.3.1" @@ -816,13 +825,6 @@ lodash@4.17.21, lodash@^4.17.21, lodash@^4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -871,10 +873,10 @@ mkdirp@0.5.x: dependencies: minimist "^1.2.6" -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== negotiator@0.6.3: version "0.6.3" @@ -886,7 +888,7 @@ node-abort-controller@^3.0.1: resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548" integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ== -node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.5: +node-fetch@^2.6.1, node-fetch@^2.6.5, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -993,9 +995,9 @@ pkg-conf@^2.1.0: load-json-file "^4.0.0" postman-collection@^4.1.3: - version "4.4.0" - resolved "https://registry.yarnpkg.com/postman-collection/-/postman-collection-4.4.0.tgz#6acb6e3796fcd9f6ac5a94e6894185e42387d7da" - integrity sha512-2BGDFcUwlK08CqZFUlIC8kwRJueVzPjZnnokWPtJCd9f2J06HBQpGL7t2P1Ud1NEsK9NHq9wdipUhWLOPj5s/Q== + version "4.5.0" + resolved "https://registry.yarnpkg.com/postman-collection/-/postman-collection-4.5.0.tgz#cc485d67f2177d6f4c5c5f4bc75c257efd23f221" + integrity sha512-152JSW9pdbaoJihwjc7Q8lc3nPg/PC9lPTHdMk7SHnHhu/GBJB7b2yb9zG7Qua578+3PxkQ/HYBuXpDSvsf7GQ== dependencies: "@faker-js/faker" "5.5.3" file-type "3.9.0" @@ -1006,7 +1008,7 @@ postman-collection@^4.1.3: mime-format "2.0.1" mime-types "2.1.35" postman-url-encoder "3.0.5" - semver "7.5.4" + semver "7.6.3" uuid "8.3.2" postman-url-encoder@3.0.5: @@ -1077,12 +1079,15 @@ safe-stable-stringify@^1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" +seedrandom@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" + integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== + +semver@7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== signale@^1.4.0: version "1.4.0" @@ -1173,9 +1178,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== tslib@^2.2.0, tslib@^2.3.1, tslib@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== type-is@^1.6.18: version "1.6.18" @@ -1185,10 +1190,10 @@ type-is@^1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== uri-template-lite@^22.9.0: version "22.9.0" @@ -1282,11 +1287,6 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"